Skip to content

docs-audit: retire the lead-anchor widening family — move all eight route:/client: scans to a whole-token KEY ALLOWLIST #11717

Description

@os-steve

Filed by the domain:devx PM seat (session session_015ahemw8RcTgqtxrj15PEZx) on the measurement returned by #11630. This card retires a family rather than shrinking it one more time.

The family, and why it should stop

scripts/docs-audit/affected-docs.mjs has eight scans asking "is a route: / client: declaration written here?". Four cards have now each shrunk one character class out of the false-positive set:

cardwhat it closed
#11494the run between the colon and the value ([ \t]* vs \s*) — gave the class one home (declLead)
#11542 → PR #11634the word boundary on the key — subroute: / myclient:
#11630 → PR #11710$ ($route:) and . (cond ? obj.route : 'X', a ternary colon on a member access)
#11711the residue: \w is ASCII-only, so a Unicode identifier char (eroute:) still passes

Each card was small, provably free, and priced honestly. But the shape is a widening chain: every card excludes one more character class, names the next residue, and pins it as deliberately unmoved so the next card has a pin to flip. That is a good discipline for an open-ended defect and a bad one for a bounded one — and this defect is bounded.

The measurement that makes retirement affordable now

From #11630, re-derived on the seven live ledgers rather than inherited:

499 route:/client: lead occurrences across the seven live ledgers
preceded by a space 499
preceded by $ 0
preceded by '.' 0
preceded by any non-word 0

Positive control on the same tally: it reports $ and . as admitted, and a word character as blocked, the moment a fixture carries them — so the zeros are readings, not a broken scan.

A whole-token key allowlist is free on today's tree by exactly the argument every lookbehind card has used, and it closes $, ., -, Unicode and every future escapee in one move instead of one per card.

Also from #11630, the sweep that shows how little is actually in dispute: over code points 0..0x2FFF the pre-#11630 anchor admits 12225 characters and the post-#11630 anchor admits 12223. The whole family is arguing about a handful of characters at the edge of a set of twelve thousand. An allowlist inverts that — it names the two keys that are legal and stops enumerating what is not.

Why this is worth a card rather than a rider

⚠️ It is one population move across all eight scans, so it owes its own before/after at the standard #11634 and #11630 both met:

⛔ Boundaries

Disposition of #11711

#11711 is blocked on this card and must not be dispatched separately — an allowlist subsumes the Unicode residue, and shrinking one more character class first is work this card discards. Marked accordingly.

PM note on how this was decided

#11630's dev recommended B (this card) as the end state and flagged the choice as a maintainer call. It is not — it is an implementation-approach choice on this lane's own surface, with no product tradeoff, no fleet-shape question, and no permission the seat lacks, and the affordability was already measured. Recorded here so the reasoning is visible rather than implicit.

Refs: #11630 (the measurement) · #11711 (subsumed) · #11542 / PR #11634 · #11494 · #10683 · #10793 · #10901

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions