Found while implementing #10830 (the TS-fence name gate). Filing separately: the
gate that lands there reads object literals, and a YAML block is a different parser,
not a bigger regex. Widening it is a separate change with its own verification surface.
The observation
scripts/check-docs-section-name.mjs (landing in #10830) judges form-section literals in
TS-family fences under content/docs/** and requires a name — the i18n anchor that
resolves objects.<object>._sections.<name>.label. A section without one renders its
authored label in every locale.
That gate declares and counts its out-of-scope population rather than silently
skipping it: its verdict line prints 16 YAML fence(s) declared out of scope, and
--list names each. This issue is the measurement of what is inside that declared gap.
The census
Measured on 4019e16cd, parsing each YAML fence with the yaml package (the same parser
the docs build resolves) and walking every sections: sequence for mapping items that
lack a name key:
yaml fences carrying `sections:` : 16 (14 parse; 2 are elided fragments that do not)
section mappings named : 3
section mappings NAMELESS : 21
| page | nameless |
|---|
content/docs/protocol/objectui/layout-dsl.mdx | 17 |
content/docs/protocol/objectui/concept.mdx | 2 |
content/docs/protocol/objectui/index.mdx | 2 |
⚠️Two numbers, and the smaller one is the trustworthy one. A first pass with a
hand-rolled indentation walker returned 51. A real YAML parse returns 21. The
hand-rolled walker double-counted nested sequences. Recording both, because #10830's whole
subject is instrument error in exactly this shape — a hand-derived count that reads
plausible and is wrong. Anyone acting on this card should re-derive with a parser, not
trust either number here.
Why it is not folded into #10830
Not proposing a schema change
name stays .optional() in packages/spec — settled in #10709 and reaffirmed in
#10830. A nameless section is legal metadata. This is about examples.
Possible shapes (not a recommendation — needs triage)
- Extend
check-docs-section-name.mjs with a YAML limb that parses each fence with yaml
and walks sections: sequences, treating an unparseable fence as a declared skip with a
printed count (the pattern that file already uses for its out-of-scope population). - Or sweep the 21 sites and leave the surface unguarded, which is the state that let the
TS-fence population drift for three counting passes.
Back-links: #10830, #10709, #10827, #10579
Generated by Claude Code
Found while implementing #10830 (the TS-fence
namegate). Filing separately: thegate that lands there reads object literals, and a YAML block is a different parser,
not a bigger regex. Widening it is a separate change with its own verification surface.
The observation
scripts/check-docs-section-name.mjs(landing in #10830) judges form-section literals inTS-family fences under
content/docs/**and requires aname— the i18n anchor thatresolves
objects.<object>._sections.<name>.label. A section without one renders itsauthored label in every locale.
That gate declares and counts its out-of-scope population rather than silently
skipping it: its verdict line prints
16 YAML fence(s) declared out of scope, and--listnames each. This issue is the measurement of what is inside that declared gap.The census
Measured on
4019e16cd, parsing each YAML fence with theyamlpackage (the same parserthe docs build resolves) and walking every
sections:sequence for mapping items thatlack a
namekey:content/docs/protocol/objectui/layout-dsl.mdxcontent/docs/protocol/objectui/concept.mdxcontent/docs/protocol/objectui/index.mdxhand-rolled indentation walker returned 51. A real YAML parse returns 21. The
hand-rolled walker double-counted nested sequences. Recording both, because #10830's whole
subject is instrument error in exactly this shape — a hand-derived count that reads
plausible and is wrong. Anyone acting on this card should re-derive with a parser, not
trust either number here.
Why it is not folded into #10830
{ … }object literals and would misread a YAMLblock rather than judge it — a gate that fabricates findings out of a syntax it does not
parse is worse than no gate (AGENTS.md's stated direction).
…placeholders). A YAML rulehas to decide what an unparseable teaching fragment means before it can have a verdict,
and that decision is not one [finding] Nothing enforces the form-section
nameconvention in content/docs/** examples — os:check passes becausenameis.optional()#10830 made.nameconvention in content/docs/** examples — os:check passes becausenameis.optional()#10830 is docs-examples enforcement over TS fences, and its triage constraintswere written against that shape.
Not proposing a schema change
namestays.optional()inpackages/spec— settled in #10709 and reaffirmed in#10830. A nameless section is legal metadata. This is about examples.
Possible shapes (not a recommendation — needs triage)
check-docs-section-name.mjswith a YAML limb that parses each fence withyamland walks
sections:sequences, treating an unparseable fence as a declared skip with aprinted count (the pattern that file already uses for its out-of-scope population).
TS-fence population drift for three counting passes.
Back-links: #10830, #10709, #10827, #10579
Generated by Claude Code