• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

divviup / divviup-api / 25568019997
69%

Build:
DEFAULT BRANCH: main
Ran 08 May 2026 04:53PM UTC
Jobs 1
Files 118
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 May 2026 04:50PM UTC coverage: 57.28% (-1.3%) from 58.564%
25568019997

push

github

web-flow
Migrate from Trillium [part 7C]: admin routes and Trillium router removal (#2247)

* Migrate from Trillium [part 7C]: admin routes and Trillium router removal

- Move the admin queue routes (index, show, delete) to Axum handlers
gated by the new AdminPermissionsActor extractor, which centralizes
the admin-only check (returning 404 for non-admins to hide endpoint
existence). This is enforced by using a nested router, which has a
`route_layer` that layers `admin::require_admin` on top of everything
in that router, so we don't forget anything.

- Wire ReplaceMimeTypesLayer on the Axum /api sub-router now that all
API routes are served by Axum. Removed the Trillium routes() and
api_routes() functions, the api() handler chain, handler/misc.rs
(actor_required, admin_required), and all FromConn impls from route
files. Then I realized this is supposed to be in Part 8 and I stopped.

- Add #[serde(alias)]es to JobStatus so query-param
deserialization accepts lowercase values (matching the previous
QueryStrong behavior).

- Add #[cfg(all(assets)...] to a couple of telemetry things so we
don't commit compilation crimes. These'll get cleaned up when we
drop trillium_opentelemetry, I think.

Note that there is still cleanup to do in Part 8, even though the
migration is mostly done here. I wasn't super disciplined with what
I deleted and what I marked dead, for which I request grace. Just,
one thing at a time.

* Fix Docker dev compose

The Trillium `api()` handler chain had `state(User::for_integration_testing())`
gated on `#[cfg(feature = "integration-testing")]`, which injected an admin
user into every request. When 7C removed the Trillium router, this injection
was lost, causing the `pair_aggregator` container in compose.dev.yaml to get
403 Forbidden on `POST /api/aggregators` (n.b. the CLI uses `--token=""` and
relies on the integration-testing user for auth).

So, let's fix it. This is a new Axum middleware that unconditionally injects the
`integration-testin... (continued)

44 of 65 new or added lines in 5 files covered. (67.69%)

110 existing lines in 12 files now uncovered.

4351 of 7596 relevant lines covered (57.28%)

64.39 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
51.11
-13.47% src/routes/admin.rs

Coverage Regressions

Lines Coverage ∆ File
23
27.2
-18.4% src/handler/session_store.rs
18
60.71
-18.77% src/permissions.rs
14
55.56
-38.89% src/handler/account_bearer_token.rs
14
46.55
-24.14% src/handler/cors.rs
13
86.84
-11.4% src/handler/custom_mime_types.rs
10
84.0
-13.33% src/user.rs
6
65.71
-17.14% src/db.rs
6
87.05
-5.93% src/handler.rs
3
61.86
-2.54% src/handler/error.rs
1
72.73
-4.55% src/entity/aggregator/role.rs
1
80.6
-1.49% src/handler/proxy.rs
1
51.11
-13.47% src/routes/admin.rs
Jobs
ID Job ID Ran Files Coverage
1 25568019997.1 08 May 2026 04:53PM UTC 118
57.28
GitHub Action Run
Source Files on build 25568019997
  • Tree
  • List 118
  • Changed 20
  • Source Changed 14
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25568019997
  • 14cf57ad on github
  • Prev Build on main (#25528517822)
  • Next Build on main (#25780162361)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc