You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finding(docs): component reference pages declare their own interface, so the doc-snippet gate can never see the props they invent — 4 measured on the 5 pages #6122 PR 2 touched alone #6143
Measured by #6122 PR 2 (PR #6142) on origin/mainbfdb9f906, against a freshly built packages/types/dist/*.d.ts. Filed unassigned, not fixed — the dispatch for that PR ruled "anything else is a finding — report it, do not reconcile it."
The structural hole, which is the point
The ## Schema block on a content/docs/components/** reference page does not import the type it describes. It re-declares it:
A self-declared interface compiles no matter what it says. So check-doc-snippet-types — even once #5867 re-fences these blocks as ts — will judge them green while every key inside is invented. The gate's own header already names this failure mode for a different case:
A gate that checks the one thing that is right converts "unverified" into a green, which is worse than no gate.
ActionConfig (#6122) was only ever visible because it was an undefined name. A key that is merely wrong produces no diagnostic at all. #6122 is therefore not the disease; it is the one symptom that happened to be detectable.
What was measured
Five pages were swept — the exact five PR #6142 corrected, chosen only because they were already open. Documented props were compared against the shipped interface body plus everything inherited from BaseSchema, so className, disabled and friends are correctly counted as real. Four divergences remain:
page
documented
shipped type says
read by a renderer?
form/radio-group.mdx
direction?: 'vertical' | 'horizontal'
no direction; the slot is orientation?: 'horizontal' | 'vertical' — form.d.ts:377
no — neither name appears in packages/components/src/renderers/form/radio-group.tsx
form/combobox.mdx
searchPlaceholder?: string, emptyText?: string
neither is declared on ComboboxSchema — form.d.ts:1283
no — neither appears in renderers/form/combobox.tsx
variant?: 'default' | 'success' | 'warning' | 'error' | 'info' — feedback.d.ts:123. 'destructive' is not a member, and four real variants are undocumented
'destructive' appears nowhere in renderers/feedback/toast.tsx
toast.mdx additionally omits two props the type does declare: position (feedback.d.ts:133) and onDismiss (feedback.d.ts:144).
⚠️toast.mdx's variant is the worst of the four, because it is the one an author is most likely to copy: variant: 'destructive' is a plausible-looking value, it matches the Shadcn vocabulary a reader arrives with, and it is not in the union. It fails no gate today and it would fail no gate after re-fencing.
#6122 asks which type did these props mean and is answered from the .d.ts. This asks why can a reference page say anything at all and stay green, and the answer is the self-declared interface. The two ship independently: PR #6142 corrects the ActionConfig sites without touching any of the above, and none of the above would be caught by the correction.
The class also recurs. #4653 — "the toggle-group schema block teaches type for the selection mode, but the renderer reads selectionType" — is the identical defect, found by eye and closed one page at a time. It has no mechanical guard, so it comes back.
The deciding question, ⛔ not decided here
⚠️ Only five of roughly 80 content/docs/components pages were swept, and 4 divergences fell out of those five. The unswept remainder is unmeasured and should be measured before anything is decided.
Make the blocks import instead of re-declare — a page that writes import type { RadioGroupSchema } from '@object-ui/types'; and then annotates an authored literal is checked by the gate that already exists. Costs a rewrite of the block's shape and changes what the reader copies.
A new gate that compares a self-declared interface Foo in docs against the shipped Foo of the same name — catches the class without rewriting the pages, but has to answer what a page is allowed to omit (all four pages above legitimately show a subset).
⚠️ Option 2 or 3 decides whether these reference pages are documentation of a type or prose that resembles one, which is a lane-shaping question for #5867 rather than a per-page fix. It needs a ruling, not a guess.
Refs: #6122 / PR #6142 (where this was measured) · #5867 (the lane whose re-fencing will report these pages green) · #4653 (same class, closed per-page) · #4895.
Measured by #6122 PR 2 (PR #6142) on
origin/mainbfdb9f906, against a freshly builtpackages/types/dist/*.d.ts. Filed unassigned, not fixed — the dispatch for that PR ruled "anything else is a finding — report it, do not reconcile it."The structural hole, which is the point
The
## Schemablock on acontent/docs/components/**reference page does not import the type it describes. It re-declares it:A self-declared interface compiles no matter what it says. So
check-doc-snippet-types— even once #5867 re-fences these blocks asts— will judge them green while every key inside is invented. The gate's own header already names this failure mode for a different case:ActionConfig(#6122) was only ever visible because it was an undefined name. A key that is merely wrong produces no diagnostic at all. #6122 is therefore not the disease; it is the one symptom that happened to be detectable.What was measured
Five pages were swept — the exact five PR #6142 corrected, chosen only because they were already open. Documented props were compared against the shipped interface body plus everything inherited from
BaseSchema, soclassName,disabledand friends are correctly counted as real. Four divergences remain:form/radio-group.mdxdirection?: 'vertical' | 'horizontal'direction; the slot isorientation?: 'horizontal' | 'vertical'—form.d.ts:377packages/components/src/renderers/form/radio-group.tsxform/combobox.mdxsearchPlaceholder?: string,emptyText?: stringComboboxSchema—form.d.ts:1283renderers/form/combobox.tsxform/command.mdxCommandItem.shortcut?: string[]CommandItemdeclares onlyvalue,label,icon—form.d.ts:1329feedback/toast.mdxvariant?: 'default' | 'destructive'variant?: 'default' | 'success' | 'warning' | 'error' | 'info'—feedback.d.ts:123.'destructive'is not a member, and four real variants are undocumented'destructive'appears nowhere inrenderers/feedback/toast.tsxtoast.mdxadditionally omits two props the type does declare:position(feedback.d.ts:133) andonDismiss(feedback.d.ts:144).toast.mdx'svariantis the worst of the four, because it is the one an author is most likely to copy:variant: 'destructive'is a plausible-looking value, it matches the Shadcn vocabulary a reader arrives with, and it is not in the union. It fails no gate today and it would fail no gate after re-fencing.Why this is not the same card as #6122
#6122 asks which type did these props mean and is answered from the
.d.ts. This asks why can a reference page say anything at all and stay green, and the answer is the self-declared interface. The two ship independently: PR #6142 corrects theActionConfigsites without touching any of the above, and none of the above would be caught by the correction.The class also recurs. #4653 — "the toggle-group schema block teaches
typefor the selection mode, but the renderer readsselectionType" — is the identical defect, found by eye and closed one page at a time. It has no mechanical guard, so it comes back.The deciding question, ⛔ not decided here
content/docs/componentspages were swept, and 4 divergences fell out of those five. The unswept remainder is unmeasured and should be measured before anything is decided.componentspage and correct each divergence. Honest, but it is docs(components): the toggle-group schema block teachestypefor the selection mode, but the renderer readsselectionType#4653's approach at scale, and it buys no guard against the next one.import type { RadioGroupSchema } from '@object-ui/types';and then annotates an authored literal is checked by the gate that already exists. Costs a rewrite of the block's shape and changes what the reader copies.interface Fooin docs against the shippedFooof the same name — catches the class without rewriting the pages, but has to answer what a page is allowed to omit (all four pages above legitimately show a subset).Refs: #6122 / PR #6142 (where this was measured) · #5867 (the lane whose re-fencing will report these pages green) · #4653 (same class, closed per-page) · #4895.
Generated by Claude Code