Measured on main 52cac3886 while landing objectui#7488, which is one instance of this class.
objectui#7340 landed packages/types/src/__tests__/component-docs-retired-handler-keys-7340.test.ts
as the pin for exactly this class: a doc page that still teaches a handler key the contract
has retired to a never tombstone. It stayed green on objectui#7488's page for the whole
interval, and the reason is structural rather than incidental.
The mechanism
The pin's doc reader recognises two shapes, both declaration-shaped:
/** An interface member row: ` onFoo?: (x: T) =` ... */
const DOC_MEMBER_RE = /^\s{0,8}(on[A-Z][A-Za-z0-9]*)\?:\s*(\S.*)$/;
/** A markdown prop-table row: `| onFoo | function | ... |` */
const DOC_TABLE_RE = /^\|\s*`(on[A-Z][A-Za-z0-9]*)`\s*\|\s*([^|]*)\|/;
DOC_MEMBER_RE requires the ? — it matches a member DECLARATION (onSave?: string;),
not an assignment. So an example object literal, which is how most pages actually teach
a schema:
const builder: ReportBuilderSchema = {
showPreview: true,
onSave: 'handleSaveReport',
onCancel: 'handleCancel'
};
matches neither shape, and the pin has nothing to say about it. It is not that the pin
"measures table rows and this happened to be prose" — the population it walks is every
.mdx / .md under content/docs, this page included; the two regexes simply cannot
express an assignment.
Why the other instruments do not cover the gap
check:doc-snippets compiles ts / tsx fences only. A retired key inside a
```plaintext (or text / `plain` / `txt` / no info string) fence is invisible to it.
That is objectui#5867's population, and `check:doc-fences` carries it as a declared
SHRINK-ONLY ledger — so the block being hidden from the compiler is a KNOWN, BASELINED
state, not an unknown one.
check:doc-types reads type string literals, nothing else.
⇒ the intersection that nothing covers today: a retired handler key authored as an
example object literal inside a fence that is not ts/tsx. Every page still holding a
check:doc-fences ledger entry is a place where this can sit green.
The measurement this card owes
The PR for objectui#7488 dealt with its own instance by re-fencing that one block ts, which puts
the literal under check:doc-snippets (it then reports TS2322: Type 'string' is not assignable to type 'undefined' per line). That works instance by instance. Widening the
pin instead closes the class, and it is its own measurement, for the reason objectui#7488's
triage gave: the parse surface of example literals is much larger than that of declaration
rows, and the false-positive cost is unknown. Specifically it has to answer:
- Which shapes count as an authored literal? A bare
onSave: 'x', line matches inside any
object anywhere on the page — including one that is deliberately showing the retired
dialect as a counter-example, or prose about the retirement itself. The pin already has
a PROSE rule (rule 5: it flags rows, never mentions) that would need an analogue.
- What owns the literal? The declaration-row reader resolves an owner from the enclosing
heading or interface declaration; an object literal resolves its owner from its type
annotation (const builder: ReportBuilderSchema = {), which the current reader does not
parse. Without an owner there is no (owner, key) pair, and the pin's PAIR RULE — the
thing that keeps a live runtime slot such as ActionSchema.onClick from being swept —
cannot run. A name-level sweep is the shape objectui#7340 explicitly rejected.
- What is the population on
main today, before any change? Both counts: literals that
would be flagged, and of those, how many are real (a retired pair) vs. counter-examples.
An alternative worth pricing in the same measurement: drive the class to zero through
check:doc-fences instead — every block that leaves that shrink-only ledger becomes a
compiled block, and a retired key in a compiled block is a tsc error by construction, no
new pin needed. That trades a new instrument for finishing objectui#5867's lane
(80 files / 89 blocks at 52cac3886).
Provenance
Filed by the execution seat that landed objectui#7488, at the explicit request of that
card's triage comment, so the class does not reappear on a fourth page once that card lands. Cross-reference: objectui#7488 (the instance), objectui#7340 (the pin),
objectui#5867 / check:doc-fences (the hidden-fence population), objectui#7344 (the
retirement these keys belong to). Generated by Claude Code, session
session_01KbJQ1y1J12nZxYzFWhP8Q3.
Generated by Claude Code
Measured on
main52cac3886while landing objectui#7488, which is one instance of this class.objectui#7340 landed
packages/types/src/__tests__/component-docs-retired-handler-keys-7340.test.tsas the pin for exactly this class: a doc page that still teaches a handler key the contract
has retired to a
nevertombstone. It stayed green on objectui#7488's page for the wholeinterval, and the reason is structural rather than incidental.
The mechanism
The pin's doc reader recognises two shapes, both declaration-shaped:
DOC_MEMBER_RErequires the?— it matches a member DECLARATION (onSave?: string;),not an assignment. So an example object literal, which is how most pages actually teach
a schema:
matches neither shape, and the pin has nothing to say about it. It is not that the pin
"measures table rows and this happened to be prose" — the population it walks is every
.mdx/.mdundercontent/docs, this page included; the two regexes simply cannotexpress an assignment.
Why the other instruments do not cover the gap
check:doc-snippetscompilests/tsxfences only. A retired key inside a```plaintext (or
text/ `plain` / `txt` / no info string) fence is invisible to it.That is objectui#5867's population, and `check:doc-fences` carries it as a declared
SHRINK-ONLY ledger — so the block being hidden from the compiler is a KNOWN, BASELINED
state, not an unknown one.
check:doc-typesreadstypestring literals, nothing else.⇒ the intersection that nothing covers today: a retired handler key authored as an
example object literal inside a fence that is not
ts/tsx. Every page still holding acheck:doc-fencesledger entry is a place where this can sit green.The measurement this card owes
The PR for objectui#7488 dealt with its own instance by re-fencing that one block
ts, which putsthe literal under
check:doc-snippets(it then reportsTS2322: Type 'string' is not assignable to type 'undefined'per line). That works instance by instance. Widening thepin instead closes the class, and it is its own measurement, for the reason objectui#7488's
triage gave: the parse surface of example literals is much larger than that of declaration
rows, and the false-positive cost is unknown. Specifically it has to answer:
onSave: 'x',line matches inside anyobject anywhere on the page — including one that is deliberately showing the retired
dialect as a counter-example, or prose about the retirement itself. The pin already has
a PROSE rule (rule 5: it flags rows, never mentions) that would need an analogue.
heading or
interfacedeclaration; an object literal resolves its owner from its typeannotation (
const builder: ReportBuilderSchema = {), which the current reader does notparse. Without an owner there is no
(owner, key)pair, and the pin's PAIR RULE — thething that keeps a live runtime slot such as
ActionSchema.onClickfrom being swept —cannot run. A name-level sweep is the shape objectui#7340 explicitly rejected.
maintoday, before any change? Both counts: literals thatwould be flagged, and of those, how many are real (a retired pair) vs. counter-examples.
An alternative worth pricing in the same measurement: drive the class to zero through
check:doc-fencesinstead — every block that leaves that shrink-only ledger becomes acompiled block, and a retired key in a compiled block is a
tscerror by construction, nonew pin needed. That trades a new instrument for finishing objectui#5867's lane
(80 files / 89 blocks at
52cac3886).Provenance
Filed by the execution seat that landed objectui#7488, at the explicit request of that
card's triage comment, so the class does not reappear on a fourth page once that card lands. Cross-reference: objectui#7488 (the instance), objectui#7340 (the pin),
objectui#5867 /
check:doc-fences(the hidden-fence population), objectui#7344 (theretirement these keys belong to). Generated by Claude Code, session
session_01KbJQ1y1J12nZxYzFWhP8Q3.Generated by Claude Code