Skip to content

[finding] REGISTRAR_FILE_RE admits ADR-0049 retirement entries whose basename contains "routes" — the published bridge figures drifted 45 to 47 on main, unnoticed #12966

Description

@os-elon

Filed unassigned while implementing half B of #11857. ⛔ Not a claim on anyone's time, and ⛔ not
a request to change any published number — only a record that one moved on its own.

What was measured

scripts/docs-audit/affected-docs.mjs picks route registrars by filename convention:

REGISTRAR_FILE_RE=/(?:^|\/)(?:[\w.-]*route[\w.-]*|[\w.-]*-server)\.ts$/

That pattern matches any basename containingroute. Two ADR-0049 retirement entries landed
after #11857's measurement ref a6eca9223 whose basenames do:

  • packages/spec/src/migrations/entries/retired-keys/18.kernel__Manifest__contributes.routes.ts
  • packages/spec/src/migrations/entries/semantic/18.plugin-manifest-contributes-routes-retired.ts

Both are confirmed absent at a6eca9223 and present at b1a987e4a by git cat-file -e. Neither
registers a route: they are enforce-or-remove ledger entries recording that
manifest.contributes.routes was retired. The second declares no route at all — it carries
/api/v1/showcase/recalc inside a prose description string explaining how a route that needs
real handler code is mounted imperatively instead.

The effect: a published control silently stopped reproducing

#11857's re-derivation recipe is explicit — "Confirm the probe first by reproducing 12
registrar files / 43 tails on the unmodified tree — if that control does not reproduce, the
delta means nothing."
On origin/main at b1a987e4a it does not:

--bridge-coverage readingat a6eca9223at b1a987e4a
registrar files scanned1214
route tails produced4344
client-bound reachable4547

The 45 is a figure #10534's census and #9572's original 221-to-45 measurement both quote. It is
now 47, and nothing recorded that or why. #11857 point 3 anticipated exactly this hazard for its
half A — "a number that other records depend on does not get restated as a side effect" — but
the drift arrived through the existing convention route instead, with no card attached.

Why this is its own defect, not part of #11857

#11857's half A is about widening admission (should a Zod contract declaration count as a
registrar). This is the opposite direction: the convention route as it stands already admits
files that are not registrars, because [\w.-]*route[\w.-]* is a substring match on the
basename. The three false positives #11857 enumerates are all reached only under half A's wider
net; these two are admitted by the live convention today.

PR #12965 (half B of #11857) does not address this and does not move these numbers — its
isTestFile change is byte-identical across the whole convention route. It is recorded here so
the two are not conflated.

Not claimed

Re-derivation

git cat-file -e a6eca9223:packages/spec/src/migrations/entries/semantic/18.plugin-manifest-contributes-routes-retired.ts # absent
node scripts/docs-audit/affected-docs.mjs --bridge-coverage --json # registrarFiles: 14, tails: 44, reachable: 47

Refs

#11857 (where this surfaced) · PR #12965 (half B, does not touch this) · #10534 and #9572 (the
records quoting 45)

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions