Skip to content

[finding] docs-drift's route bridge can reach only 45 of the 221 client-bound ledger routes — 176 have no registrar tail at all, and the variable-path recall half of #9503 is a small slice of it #9572

Description

@os-steve

Filed unassigned by the os-dev seat working #9503 (session session_01XqDQYVU5smx29ts9pAErja), whose PR closes that card's precision half only. Recording, not fixing — the recall half turned out to be a much larger, differently-shaped hole than the card assumed, and it needs its own measurement before anyone attempts it.

What

parseRegistrarSource in scripts/docs-audit/affected-docs.mjs indexes a route by the tail of a literal path:. The sdk anchor kind then joins those tails against the route/client rows the route ledgers declare. A ledger row whose route no registrar tail matches is structurally unreachable: no symbol change can ever bridge to it, and api/client-sdk.mdx never enters the advisory through it.

Measured on e7daea169

Replicating the scan's own file walk (REGISTRAR_FILE_RE over packages/**, comment-masked as of #9432) and its own ledger parse:

registrar tails the scan can produce ...... 42
ledger rows carrying a `client` .......... 221
ledger rows NO registrar tail can select .. 176 (79.6%)

The 176 break into at least three unrelated causes, which is why this is not one fix:

  1. Registrars that take no path: property at all. The bulk. plugin-auth alone contributes ~55 rows (/api/v1/auth/sign-in/email to auth.login, the whole organization/* and two-factor/* families) — those doors are mounted through better-auth, not through a { method, path, handler } literal, so the filename-convention walk finds the file and the path: scan finds nothing in it.
  2. Variable path: registrations — the recall half of docs-drift's registrar window swallows the NEXT route whole when that route's path: is a variable — a foreign handler's code identifiers bridge to the previous route #9503. path: publishedPath at rest-server.ts:5747 costs /api/v1/meta/:type/:name/published and /api/v1/meta/:type/:section/:name/published, both bound to meta.getPublished; path: metaPath costs /api/v1/meta to meta.getTypes; path: packagesPath costs /api/v1/packages to packages.list. Four rows, and the only ones a one-hop binding lookup could recover — publishedPath is a for…of over an array of template literals, metaPath/packagesPath are in-file consts.
  3. Rows whose route the tail matcher declines even where a literal exists — e.g. /api/v1/packages/:id to packages.get. Not yet diagnosed; may be routeTailOf or may be a genuinely absent registration.

Why it is worth recording

anchorlessChanges reports when a change derives nothing, and the file's own comment on REGISTRAR_FILE_RE says a missed registrar "costs recall on the sdk anchor kind only, and anchorlessChanges reports the silence". Neither statement covers this: the ledger declares 221 client bindings and the bridge can honour 45 of them, and nothing anywhere prints that ratio. A sign-in handler change simply never mentions api/client-sdk.mdx, silently, and the run looks healthy.

Sibling of #9433, which records that the two bridge exclusion rules are silent while only the cross-cutting cap publishes what it withheld. Same shape of complaint (the tool does not report its own blind spots), different mechanism.

Direction, not a prescription

The cheap first move is reporting, not recovery: emit the unreachable-ledger-row count the way crossCuttingSymbols and overbroadAnchors are already emitted, so the number is visible and can be ratcheted. Recovery is at least three separate pieces of work with three different costs, and per #9432's standard none should be attempted without before/after numbers on real commits.

Refs: #9503 (precision half, PR #9571), #9433 (the exclusion-silence sibling), #9294, #9192.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions