Uh oh!
There was an error while loading. Please reload this page.
docs(objectui): widen check-docs-section-name to singular section: and json fences - #14558
Merged
Merged
Conversation
…d json fences - scripts/check-docs-section-name.mjs: new selector for a singular YAML section: mapping (any nesting) and a new JSON-family arm (json/jsonc/json5) that bracket-matches sections: [ ... ] arrays the same way the TS arm does. Both are shape-based, not marker-based, per the #13880 triage ruling. - content/docs/protocol/objectui/concept.mdx: the Layer 2 customizations: overlay-diff fence taught a shape packages/spec never declared (the retired paper metadata-customization protocol, ADR-0126 #13135) and is replaced with a Callout citing that; the Final Merged Layout json fence and the earlier Server Response json fence now carry name: on their sections. Fixes#13880
…ction-name-population
…ction-name-population
baozhoutao
marked this pull request as ready for review
September 2, 2026 13:52
baozhoutao
enabled auto-merge
September 2, 2026 13:52
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#13880
① The prior question, answered first (per triage)
The
customizations:overlay-diff list this page's "Layer 2: Admin Customization"example taught (
{ field: ... }/{ section: ... }entries meant to patch Layer1's fields and add a section) is not a declared shape:
git grep -n "customizations" -- packages/spec/srcfinds only package-APImerge-strategy prose (
api/package-api.zod.ts,kernel/package-upgrade.zod.ts,contracts/package-service.ts) andtenant.zod.ts's single authorablecustomizationskey:z.record(z.string(), z.unknown())— a free-form record,not an overlay-diff list.
FormViewSchemais.strict(), so authoring this fence as a real form viewwould be refused by name (
Unrecognized key(s) on this page: customizations).metadata-customizationprotocol retired in@objectstack/spec17(Retire the paper metadata-customization protocol with its full coupling set — spec module, authorable customizationPolicies/mergeStrategy keys, metadata API §5, optional IMetadataService overlay methods, unreachable packages/metadata limb (re-charter of #12057) #13135, ADR-0049 enforce-or-remove — see
packages/spec/src/kernel/metadata-customization-retirement.test.ts). ItscustomizationPoliciesandmergeStrategykeys are tombstoned rather thandeleted on
MetadataPluginConfig— read by nothing, because no 3-waymerge engine ever ran and package upgrades never merge customizations
(ADR-0126 §6 wall 3: an upgrade rewrites the packaged BASE; a tenant's
choices live separately and are never merged into it).
Per the ruling, the fence is rewritten, not given an anchor — same register
as the
steps:wizard-template ghostlayout-dsl.mdxalready removed (PRthat landed as
63cf416e8, "layout-dsl teaches only shapes the live schemasaccept"). It is replaced with a
<Callout type="warn">that:(
#13135, ADR-0126 §6,FormViewSchema.strict()).viewmetadata type (
allowOrgOverride: trueon itsDEFAULT_METADATA_TYPE_REGISTRYentry, ADR-0005) — the org's ownFormViewdocument, authored with the same shape Layer 1 and the earlier"Server Response" example already use, not a diff against the base.
The "Final Merged Layout" JSON fence right below it no longer shows a
"Billing Info"section or a// ← Admin overrideannotation onphone(both were only produced by the removed fictional Layer 2) — it now shows
only what the two real layers (base schema + user preferences) actually
merge, and its one remaining section carries
name: "contact_information".The page's "Multi-Layer Resolution Engine" summary diagram got one matching
line-edit so it does not contradict the worked example directly below it
(
- Custom sections: Added "Billing Info" section→- Org overlay: a full FormView write, not a diff) — plain ASCII, not a fence the gate parses.The two new selectors (② the population question)
scripts/check-docs-section-name.mjsgains, per the triage ("population byshape, not marker, not fence language"):
section:mapping (any nesting: adocument-root key, or a sequence-item value like
- section: {...}),judged exactly like a
sections:sequence item. TheYAML_SECTIONS_KEYprefilter widens from
sections\s*:tosections?\s*:.sections: [...]array inside ajson/jsonc/json5fence, bracket-matched with the same comment-masked matcher the TS arm
uses (not
JSON.parse— a teaching fence carries// ←comments andJSON5 trailing commas;
concept.mdx's own merged-layout fence does both).Both are shape-based: fence language and key cardinality vary, the judgment
(does the section-shaped mapping/literal carry
name?) does not.Census, mechanically reproduced
Before this PR's docs fix (widened gate on the unmodified
concept.mdx,run once to make the card's "4, not 3" mechanical):
Note the corpus-wide widened sweep surfaced a 5th site the issue itself did not
name: the same page's earlier "Server Response" example (
:307, a real,live-shape example unrelated to the retired-protocol fence) also had a
nameless
"Contact Information"section. Fixed in this PR alongside the twothe issue named (listed below) — the widened gate's own directive is "fix
every new red it turns up in
content/docs/**", not only the sites a cardhappened to enumerate.
After (widened gate over the full corpus, clean):
Sites fixed, all in
content/docs/protocol/objectui/concept.mdx::307("Server Response")json"name": "contact_information":419(Layer 2customizations:)yaml<Callout>— no anchor added, per ①:443/:451(Final Merged Layout)json"name": "contact_information"content/docs/ui/forms.mdx:183's"sections": [/* … */]elided placeholderis judged as zero entries by the new arm (not skipped, not fabricated as
a nameless section) — no change needed there.
content/docs/protocol/objectui/layout-dsl.mdx's three singularsection:sites (from #13759) read
✓ namedunder the widened selector, as expected.content/docs/ui/doc-pages.mdx:257("…from the previous section:", proseoutside any fence) does not enter the population — verified, no change.
No other
content/docs/**page turned red under the widened gate; the corpussweep above is over the full 404-file tree.
Gates
node scripts/check-docs-section-name.mjs --self-test→ 85 cases pass(real temp trees on disk; both new selectors driven RED and GREEN, both
cardinalities of the singular-
section:mapping, the JSON elided-placeholderand comment/trailing-comma tolerance, every new refusal exercised).
node scripts/check-docs-section-name.mjs→ green on the merged tree (seecensus above).
pnpm --filter @objectstack/spec run check:yaml-examples→concept.mdx: 0 tagged / 9 untagged(down from0 tagged / 10 untagged—one fewer untagged YAML fence, since the
customizations:fence is gone).node scripts/pm/dispatch-gates.mjs --commands,39 commands) run at
45312b3fb— all 39 green (three needed a one-timedependency-closure build first:
@objectstack/spec,@objectstack/formula/@objectstack/lint,@objectstack/client-react—check:doc-formula-expressions/check:doc-security-posture/check:skill-exampleseach reportedPREREQUISITE NOT MET, exit 3, beforethe build — not a finding).
check:pm-dispatch-gates(node scripts/pm/check-dispatch-gates.mjs) run detached under heavy shared-lockcontention (several sibling dispatch's PRs profiling/self-testing the same
tool concurrently):
command-exit 0,dispatch-gates self-test: 1240 cases pass.check-docs-section-name.mjs--self-testat the final merge commit38c73232d(after pullingmaina second time, no conflicts, no overlap with this PR's two files) —still green; the other 38 were not re-run post-merge since none of the
incoming commits touch
scripts/check-docs-section-name.mjsorcontent/docs/protocol/objectui/**(verified viagit log -- <paths>over the merged range).
pnpm lint-narrowed ESLint pass over just the two touched files wasattempted three times (
node_modules/eslint/bin/eslint.js scripts/check-docs-section-name.mjs content/docs/protocol/objectui/concept.mdx --no-inline-config) and could not complete: each attempt queued behindother agents' heavy jobs on the shared verify-lock and hit the 540s
acquisition budget before reaching the front (
queue-timeout, exit 99,NOT MEASURED— never ran, not a finding). Not one of the 39 derivedcommands; CI's required
Lint & Repo Gatesjob runs fullpnpm lintregardless.
Changeset
None —
scripts/**+content/docs/**only, publishes nothing.skip-changesetlabel applied and read back.
Out of scope
Nothing filed — the widened gate's full-corpus sweep came back clean apart
from the sites listed above, and no unrelated defect was hit along the way.
Generated by Claude Code
Generated by Claude Code