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

archetech / archon / 30712604266
94%

Build:
DEFAULT BRANCH: main
Ran 01 Aug 2026 06:31PM UTC
Jobs 1
Files 96
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

01 Aug 2026 06:28PM UTC coverage: 93.029% (+0.04%) from 92.987%
30712604266

push

github

web-flow
refactor(drawbridge): extract the v1 router so it can be tested (#819)

drawbridge-api.ts built its Express app inside main(), which the module
calls at import time — so importing it booted the server, connected to
Gatekeeper and Redis, and bound a port. That left its 28 v1 routes
untestable and uncounted, the same shape #705/#706 fixed for gatekeeper
and keymaster.

Extract createV1Router() into v1-router.ts, with createRequireAdminKey()
in v1-admin.ts and the options interface in v1-router-types.ts, mirroring
the gatekeeper layout. drawbridge-api.ts now builds its dependencies and
mounts the router.

Behaviour-preserving: the route block was moved programmatically rather
than retyped, and diffed against the original. The only change is
serviceVersion -> getServiceVersion(), which is required — serviceVersion
is a module-scope `let` reassigned after an async package.json read, so
capturing it by value at factory time would pin /version to "unknown"
forever. Verified: the route set is identical (28 before, 28 after) and
`tsc -p tsconfig.json` is clean for the service.

ARCHON_ADMIN_HEADER is used both by the admin middleware and by the
herald proxy for upstream auth, so it is exported from v1-admin.ts rather
than duplicated.

Tests: 18 for the extracted router (capabilities derivation, DIDComm
endpoint including the null case, admin gating across 401/403/pass,
resolve-option passthrough, numeric-vs-hash blockId parsing, a
table-driven 502 check across every proxy route, mid-stream read failure,
and the lightning proxy's 501/200/502 paths), plus 11 for
lightning-mediator-client, which the router test transitively pulled into
the coverage denominator at 5.9%.

Three one-line L402 delegation lines are deliberately left uncovered:
driving those routes with a stub options object leaves one handler never
responding, which hangs Jest (CI runs without --forceExit). Their
handlers are already at 100% via l402-auth.test.ts. A comment in the test
records this.

... (continued)

3328 of 3878 branches covered (85.82%)

Branch coverage included in aggregate %.

174 of 177 new or added lines in 2 files covered. (98.31%)

7762 of 8043 relevant lines covered (96.51%)

707.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
96.86
services/drawbridge/server/src/v1-router.ts
Jobs
ID Job ID Ran Files Coverage
1 30712604266.1 01 Aug 2026 06:31PM UTC 192
94.41
GitHub Action Run
Source Files on build 30712604266
  • Tree
  • List 96
  • Changed 75
  • Source Changed 0
  • Coverage Changed 75
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30712604266
  • 086c3f00 on github
  • Prev Build on main (#30711375353)
  • Next Build on main (#30713830006)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc