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
Found while implementing #10709 (PR #10827). Filing separately — adding a gate is a
different defect class from adding a name attribute, and it would widen that PR's
verification surface.
The observation
Form-section examples in content/docs/** can drift from the name convention
indefinitely without any gate reddening. Two mechanisms look like they would catch it,
and neither can:
packages/lint's translation-section-name-missing
(packages/lint/src/validate-translatable-sections.ts:95) walks app metadata — collectionEntries, walkPageComponents, viewContainerSites. It never sees an .mdx code fence. Its severity is 'warning' in any case.
{/* os:check */} fencesare type-checked against the live spec by packages/spec/scripts/check-skill-examples.ts. But name is .optional() in packages/spec/src/ui/component.zod.ts:825, so a nameless section type-checks
clean. content/docs/ui/forms.mdx's first block carries an os:check marker and
still shipped a nameless section.
So the docs surface that teaches the convention is the one surface where the convention
is unenforced.
Why it looks like a recurring class rather than a one-off
The same defect has now been counted three times, by hand, each time with a different
number:
8 of 16 across 5 pages (pre-sweep, measured at b6bb2ee454^)
—
Each pass corrected its predecessor's instrument and introduced a subtler version of the
same error: #10579's scan was single-line, #10709's was multi-line but still required {
to begin a fresh line, so it missed forms.mdx's sections: [{ inline form. A mechanical
check would settle the count once instead of re-deriving it per card.
Possible shapes (not a recommendation — this needs triage)
Or narrower: have check:skill-examples apply a docs-only strictness overlay for keys
that are .optional() in the schema but conventional in authored examples.
Both are speculative on the cost side; the underlying observation (nothing enforces it)
is the part that is measured.
⚠️ Not proposing that name become required in the schema — it is .optional()
deliberately (a nameless section is legal and renders its authored label), and #10709's
own body treats that as settled. This is about the docs examples, not the contract.
Found while implementing #10709 (PR #10827). Filing separately — adding a gate is a
different defect class from adding a
nameattribute, and it would widen that PR'sverification surface.
The observation
Form-section examples in
content/docs/**can drift from thenameconventionindefinitely without any gate reddening. Two mechanisms look like they would catch it,
and neither can:
packages/lint'stranslation-section-name-missing(
packages/lint/src/validate-translatable-sections.ts:95) walks app metadata —collectionEntries,walkPageComponents,viewContainerSites. It never sees an.mdxcode fence. Its severity is'warning'in any case.{/* os:check */}fencesare type-checked against the live spec bypackages/spec/scripts/check-skill-examples.ts. Butnameis.optional()inpackages/spec/src/ui/component.zod.ts:825, so a nameless section type-checksclean.
content/docs/ui/forms.mdx's first block carries anos:checkmarker andstill shipped a nameless section.
So the docs surface that teaches the convention is the one surface where the convention
is unenforced.
Why it looks like a recurring class rather than a one-off
The same defect has now been counted three times, by hand, each time with a different
number:
ui/pages"forms.mdxentirelyb6bb2ee454^)Each pass corrected its predecessor's instrument and introduced a subtler version of the
same error: #10579's scan was single-line, #10709's was multi-line but still required
{to begin a fresh line, so it missed
forms.mdx'ssections: [{inline form. A mechanicalcheck would settle the count once instead of re-deriving it per card.
Possible shapes (not a recommendation — this needs triage)
nameonsections[]object literals incontent/docs/**TS fences. Bracket-matching, not line-matching — the parser used forPR docs(ui): name the 5 remaining nameless form sections in content/docs/ui #10827's census is ~80 lines and is in that PR's description.
check:skill-examplesapply a docs-only strictness overlay for keysthat are
.optional()in the schema but conventional in authored examples.Both are speculative on the cost side; the underlying observation (nothing enforces it)
is the part that is measured.
namebecome required in the schema — it is.optional()deliberately (a nameless section is legal and renders its authored label), and #10709's
own body treats that as settled. This is about the docs examples, not the contract.
Back-links: #10709, #10827, #10579, #10616
Generated by Claude Code
Generated by Claude Code