Uh oh!
There was an error while loading. Please reload this page.
fix(docs-audit): count a declared client: whose row was never assembled - #10674
Conversation
…bled `clientsDeclared` was computed from two row-relative terms, so a correctly single-quoted `client:` belonging to a row whose `route:` could not be read fell out of both: its row never became a row, and its own spelling is the one the recognizer reads, so nothing declined it. The value left the denominator without a word while the file plainly declared it. The declared-`client:` sweep is now file-wide over the same code-only, type-declaration-excluded source #10500 built for the non-literal case, minus the values a row window already claimed. It is billed to no row: an unclaimed value is pushed to `declined`, so it is NAMED with its own line rather than only bumping a number. Fixes#10636 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. |
PM review — verified against the diff, not the report. Approving. The change is right and the arithmetic holds under my own reading, not just the author's. The offset alignment is the part that could silently break, and it is sound. Ablation C is what proves it, and it proves more than it claims. Dropping the The reject side is asserted positively, which is the right instinct. All seven live
The denominator/numerator symmetry is the thing #10636 was actually about, and the Scope is slightly wider than the card (it also catches a declined-spelling The card's framing is kept honestly: sub-count residue, not a live false green. The CI green (29 checks). Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#10636
A sub-count residue, not a live false green. After #10500 the row itself does land in a verdict — its unreadable
route:is named with its line and the file is flaggedPARTIAL read— so nothing here was silent. What was wrong is a denominator: it quietly omitted a value the file plainly declares, and understating a denominator is the direction that makes a partial read look more complete than it is.The residue
clientsDeclaredwas two row-relative terms:A correctly single-quoted
client:on a row whoseroute:could not be read is in neither: its row never became a row, and its own spelling is the one the recognizer reads, so nothing declined it.Reproduction, re-derived on today's tree
Card measured this on
ba2d8d4730; re-derived at merge base72d75ebb55with the card's own row appended topackages/services/service-i18n/src/i18n-route-ledger.ts(client: 'occurrences in that file: 3 ⇒ 4, confirmed on disk before each run):Totals:
221 of 221⇒221 of 222. The card's3 of 3reproduces verbatim on today's tree. The mutation was then reverted (anchor counts back to 0/0/3) and the run repeated:259 of 259/221 of 221, exit 0, no verdict — the seven live ledgers are unmoved, because all seven are wholly single-quoted and every row was assembled, so noclient:can be orphaned.What each side counts after this change
clientRows)client:values READ and bound to a rowclientsDeclared)client:the file declares in code position — bound, declined, non-literal, or claimed by no rowThe recognizer is not widened:
rowscomes out of the loop it always did. An unclaimed value is pushed todeclined, so it is named with its own line rather than only bumping a number — the property #9896 argued for, and the reason the two sides stay comparable: every unit added to the denominator arrives as a named "declared, not read" event that the numerator was never going to count.Attribution stays window-relative. The file-wide sweep bills its findings to no row, which is what answers the objection the old comment made against counting
client:file-wide (a value in prose would be billed to a row that never declared it):codeOnlymasks prose and string payloads,typeDeclRegionsexcludes type members, and the sweep names rather than binds.Implementation:
unreadableInand the newunclaimedClientsInare now filters over one scan (declarationsIn), so "what is a declaration in code position" is decided once instead of by two scans that can drift into disagreeing while both look right.Slightly wider than the card, same defect: the sweep keys on no row claimed it, not on the quote, so it also counts a declined-spelling
client:that sits outside every row window (before the first assembled row, or in the gap a truncated 1200-char window leaves) — previously missed for exactly the same reason. Pinned by its own fixture.Reject side, asserted positively
The entry-interface member must not be billed. All seven live ledgers spell it
client?: string;, which the scan's\b(route|client)\s*:never even matches — so the live tree cannot exercise this. The fixture therefore uses the hostile spelling, a literal-union type member that opens with the very quote the counter reads:The quote test alone would swallow that;
typeDeclRegionsis what keeps it out. Pinned twice — no line-1 entry in the declined list, and deleting the interface changes no count.Ablations (each mutation confirmed on disk by anchor count, each restored and re-run green)
unclaimedClientsInsweeptypeDeclRegionsskiproute: string;pins red too (live tree:259 of 266)!claimed.has(...)guard221 of 442— the exact "denominator widened past what the numerator can ever count" failurecodeOnlymask259 of 260, the English sentence inruntime/src/route-ledger.ts)Ablation A was predicted at 9 red by name before running and returned exactly those 9; it is 11 after the extra fixture below it was added.
Self-test: 291 cases on
origin/main⇒ 308 here (+17).Gates
Union derived with
node scripts/pm/dispatch-gates.mjs, no paths passed (change set: 1 path, three-dot vs merge base) — 4 families, hand-cross-checked against every workflow naming this surface. All run at19c982a268, underscripts/pm/os-verify-lock.sh:No dependency import was added — this file stays runnable with
nodealone, which is whatdocs-drift-check.ymlneeds (it deliberately never runspnpm install).Changeset:
scripts/**-only, publishes nothing ⇒skip-changeset.Generated by Claude Code