Skip to content

[finding] docs-audit: the "every key spelling a call site passes comes back ANCHORED" pin checks 3 of the 4 spellings actually passed — client is omitted #11737

Description

@os-steve

Noticed while implementing #11717 (PR #11736). Not a live defect — filed because the assertion's label over-claims relative to what it checks, and because the omission may equally have been deliberate. Recording it for triage rather than fixing it inside #11717's PR, which is about the anchor rather than about pin coverage.

What is there

scripts/docs-audit/affected-docs.mjs, in --self-test:

check('declLead','every key spelling a call site passes comes back ANCHORED','declLead',/* expected */,['(route|client)','route','(?:route|client)'].map((k)=>declLead(k)).join(' | '));

What the call sites actually pass

All eight new RegExp(declLead(…)) call sites pass string literals, and there are four distinct spellings, not three:

spellingcall sites
`(routeclient)`
route3 — routeRe, nextRouteRe, routesDeclared
`(?:routeclient)`
client1 — windowClientRe

client is the one the pin's array does not carry, so the assertion named "every key spelling a call site passes" is checking three quarters of them.

Why it is not currently a defect

The anchor is spelled once in declLead and a separate pin asserts that (the run between a route:/client: colon and its value is spelled ONCE, plus no call site restates it). Every spelling therefore gets the same anchor by construction, so the missing array element cannot currently diverge. The gap is that the behavioural pin — the one that exists precisely so the property is checked rather than asserted — would not see a regression that reached only the client-only spelling.

Two readings, hence triage rather than a fix

  1. Oversight.client was simply missed when docs-audit: subroute: / myclient: mints a silent PHANTOM ROW — only declarationsIn anchors the key with \b, the other seven scans do not #11542 built the list, and the label should be made true by adding it.
  2. Deliberate.client was judged redundant because (route|client) already exercises the same key, and the label is loose rather than wrong.

Either way the resolution is a one-element change plus a label that matches, but which one it is decides whether the label or the array moves. Left for whoever picks it up.

Found in: scripts/docs-audit/affected-docs.mjs · context: #11717 / PR #11736 · family: #11494, #11542 (PR #11634), #11630 (PR #11710), #11711.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions