Found while implementing #11887 (the YAML-fence arm on scripts/check-docs-section-name.mjs).
Filing separately rather than widening that PR: this is a different selector, not a
different spelling of the same one, so it carries its own verification surface.
The observation
check-docs-section-name.mjs now has two arms, and both judge a sections:sequence:
content/docs/protocol/objectui/layout-dsl.mdx also teaches form sections through a
singular section: mapping — one section on its own, not in a list. Three fences do
this, each marked for the os:check-yaml gate as FormSectionSchema key=section, and
all three are nameless:
content/docs/protocol/objectui/layout-dsl.mdx:234 label: Contact Information keys=label|columns|fields
content/docs/protocol/objectui/layout-dsl.mdx:262 label: Product Details keys=label|columns|fields
content/docs/protocol/objectui/layout-dsl.mdx:294 (no label key) keys=columns|fields
Measured with the same yaml parser and the same classifyYamlFence the #11887 arm uses,
on af01080e3; the singular population across all of content/docs/** is exactly these 3.
Why it is the same defect class
Identical to #11887 and #10830: a nameless section has no i18n anchor, so its heading
resolves through objects.OBJECT._sections.NAME.label and renders its authored label in
every locale. These are teaching pages, so the example contradicts the convention it
teaches. FormSectionSchema declares name as .optional() and that stays settled
(#10709, reaffirmed #10830) — this is about examples, ⛔ not a schema change.
Why it was not folded into #11887
The triage ruling on #11887 scoped the sweep to the sections: sequence population its
census measured. Judging a bare singular section: mapping means deciding which YAML
keys introduce a form section at all — a population question neither #10830 nor #11887
answered, and one that has to be answered before a gate can rule on it. The three
key=section fences are also the shape the os:check-yaml markers already name, so the
decision probably wants to be taken together with how that marker vocabulary is read.
Possible shapes (not a recommendation — needs triage)
Back-links: #11887, #10830, #10709
Found while implementing #11887 (the YAML-fence arm on
scripts/check-docs-section-name.mjs).Filing separately rather than widening that PR: this is a different selector, not a
different spelling of the same one, so it carries its own verification surface.
The observation
check-docs-section-name.mjsnow has two arms, and both judge asections:sequence:sections: [ … ]object literals;name— outside check-docs-section-name's declared scope #11887) parses each YAML fence with theyamlpackage and walks everysections:sequence for mapping items.content/docs/protocol/objectui/layout-dsl.mdxalso teaches form sections through asingular
section:mapping — one section on its own, not in a list. Three fences dothis, each marked for the
os:check-yamlgate asFormSectionSchema key=section, andall three are nameless:
Measured with the same
yamlparser and the sameclassifyYamlFencethe #11887 arm uses,on
af01080e3; the singular population across all ofcontent/docs/**is exactly these 3.Why it is the same defect class
Identical to #11887 and #10830: a nameless section has no i18n anchor, so its heading
resolves through
objects.OBJECT._sections.NAME.labeland renders its authored label inevery locale. These are teaching pages, so the example contradicts the convention it
teaches.
FormSectionSchemadeclaresnameas.optional()and that stays settled(#10709, reaffirmed #10830) — this is about examples, ⛔ not a schema change.
Why it was not folded into #11887
The triage ruling on #11887 scoped the sweep to the
sections:sequence population itscensus measured. Judging a bare singular
section:mapping means deciding which YAMLkeys introduce a form section at all — a population question neither #10830 nor #11887
answered, and one that has to be answered before a gate can rule on it. The three
key=sectionfences are also the shape theos:check-yamlmarkers already name, so thedecision probably wants to be taken together with how that marker vocabulary is read.
Possible shapes (not a recommendation — needs triage)
section:key is asection mapping too. Cheap, and the arm's AST walk already reaches it; the cost is that
the gate's population is then defined by a key vocabulary rather than by one key.
the sequence population drift through three counting passes before [finding] Nothing enforces the form-section
nameconvention in content/docs/** examples — os:check passes becausenameis.optional()#10830.Back-links: #11887, #10830, #10709