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

archetech / archon / 30713830006
94%

Build:
DEFAULT BRANCH: main
Ran 01 Aug 2026 07:03PM UTC
Jobs 1
Files 98
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 07:00PM UTC coverage: 89.383% (-3.6%) from 93.029%
30713830006

push

github

web-flow
refactor(herald): extract the routes so index.ts can be tested (#820)

index.ts built its Express app at module scope and called app.listen() at
import time, so importing it booted the server. Its 34 routes were
untestable and uncounted — the last instance of the pattern #705, #706
and #819 fixed for the other services.

Split into three files:

- config.ts holds the environment-derived constants. Extracting these
  first meant the 38 constant references in the moved code needed no
  rewriting at all.
- routes.ts exports createHeraldRoutes(ctx), returning the router and
  startDmailPollLoop (the only symbol the bootstrap still needs).
- index.ts (1,490 -> ~210 lines) owns bootstrap only: app creation,
  session setup, service identity, database and keymaster wiring, listen.

keymaster, db, emailBridge and serviceDID are assigned after the routes
register, so they are read lazily through a HeraldContext object the
bootstrap populates.

Behaviour-preserving, verified rather than assumed: the block was moved
programmatically and diffed against the original with the same
transformations applied — it matches exactly, modulo indentation from
eslint --fix. The route set is identical (34 before, 34 after) and the
service's own `tsc -p tsconfig.json` is clean.

Two hazards worth recording. A naive \bkeymaster\b rewrite corrupted
import specifiers ('@didcid/keymaster' -> '@didcid/ctx.keymaster'), so
string literals are stashed before the identifier rewrite. And the object
shorthand `serviceDID,` became invalid syntax as `ctx.serviceDID,`; tsc
caught it, which is why the diff alone is not sufficient verification.

multer is declared in root devDependencies at herald's own ^2.2.0, so
routes.ts resolves in CI — services/* are not workspaces, so `npm ci`
never installs their dependencies.

42 tests cover the public endpoints, auth and owner gates, name
validation and the full name lifecycle (assign, credential issue vs
update, delete with revocation), webfinger, se... (continued)

3483 of 4238 branches covered (82.18%)

Branch coverage included in aggregate %.

297 of 632 new or added lines in 2 files covered. (46.99%)

8059 of 8675 relevant lines covered (92.9%)

657.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
335
41.05
services/herald/server/src/routes.ts
Jobs
ID Job ID Ran Files Coverage
1 30713830006.1 01 Aug 2026 07:03PM UTC 196
90.81
GitHub Action Run
Source Files on build 30713830006
  • Tree
  • List 98
  • Changed 79
  • Source Changed 0
  • Coverage Changed 79
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30713830006
  • 2b7c6a7c on github
  • Prev Build on main (#30712604266)
  • Next Build on main (#30715539698)
  • 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