fix(spec): qualify a union variant's nested-shape and allowed-values headings by which variant they belong to - #12863
Merged
Conversation
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-sales
marked this pull request as ready for review
August 28, 2026 05:32
os-sales
enabled auto-merge
August 28, 2026 05:32
This was referenced Aug 28, 2026
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 free
to 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 #12590
renderSchemaSection's### Union Optionsbranch callsrenderPropertiesonce per variant, and both halves of theSchema.keyqualifier those headings carry are shared by every sibling variant of one schema. TwoViewItemvariants each declaring a shape-openingconfigtherefore emitted### Nested Shape: \ViewItem.config`` twice — two identical anchors on one page, on the very heading whose qualifier exists to prevent exactly that.Day-of population (re-measured, not inherited)
The card measured
origin/main@7bd6447. PR #12592 (#12316) has since merged on this same renderer, so the population was re-measured on the then-current merged tree,origin/main@b489d3c7, by counting identical### Nested Shape:/### Allowed Values:heading texts per emitted page undercontent/docs/references/**:data/data-engine.mdx### Nested Shape: `DataEngineRequest.query`data/data-engine.mdx### Nested Shape: `DataEngineRequest.options`system/collaboration.mdx### Nested Shape: `CRDTState.vectorClock`system/tenant.mdx### Nested Shape: `TenantIsolationConfig.database`system/tenant.mdx### Nested Shape: `TenantIsolationConfig.performance`ui/view.mdx### Nested Shape: `ViewItem.config`ui/view.mdx### Nested Shape: `ViewItem.protection`ui/view.mdx### Nested Shape: `ViewItemWire.config`ui/view.mdx### Nested Shape: `ViewItemWire.protection`ui/view.mdx### Nested Shape: `ViewItemWire.columnState`The card's excess (12) and page (4) counts survive #12316 unchanged, which is what its byte-identity claim asserted. Its "9 distinct headings" does not: the measured value is 10, and 10 is the count the excess arithmetic requires (one heading at x4 contributes 3, nine headings at x2 contribute 1 each = 12). Reported as a correction to the card, not as a change in the defect.
Zero pages collide on
### Allowed Values:today — 24 such headings exist across the tree, none duplicated. That half is covered anyway; see below.The qualifier, and why it invents nothing
The heading's owner is now the schema name plus the variant selector, in the accessor grammar #12316 established and the page already prints:
The spelling is not re-implemented here.
format-type.ts'sdiscriminantKeyOfand a newvariantSelectorare exported and called from both positions, so the segment stamped into a property accessor (navigation[number][type='sidebar']) and the segment qualifying a section heading are produced by one function. A page carries one variant notation, not two.Three properties of that grammar are load-bearing and are pinned:
discriminantKeyOfalready refuses a key two variants pin to the same value; qualifying with such a key would re-create the duplicate anchors through the fix itself. Where it refuses, the fallback is[option N].[option N]counts DECLARED position, including arms that emit no headings — so the number is checkable against the#### Option Nheading three lines above it.### Allowed Values:is covered by the same threading. It has zero corpus today and is the identical exposure — one qualifier shared by every sibling variant — so closing only the half with a measured population would leave the next wide vocabulary declared on two variants to reopen it.Verification
Head is
e102f6ae, which mergesorigin/main@277948f7. Acceptance, byte-identity and the whole gate set were re-run on that merged head; the ablation below was run on the pre-merge tip25c8b777and is stated as such.Acceptance measurement — duplicate qualified heading texts per page over the regenerated 214-page tree, at
e102f6ae:Byte-identity for everything else. This branch's delta against
origin/mainundercontent/docs/references/**is 78 lines across 7 pages: 39 removed, 39 added, every one of them a### Nested Shape:heading line. Non-heading changed lines: 0. That figure is unchanged across the merge, which is the point — the regenerated pages carry main's content and only the heading qualifiers differ. The 3 pages beyond the duplicate population (api/websocket.mdx,system/migration.mdx,ui/app.mdx) carry variant headings that were already unique and are now re-qualified — legitimately, since they are emitted from inside a union variant. No heading outside a union variant moved.Reverse verification (ablation), run at
25c8b777. The qualifier threading was ablated — the union branch restored to passing the bareschemaName, i.e. the pre-fix shared qualifier:b4990323…→cf37af96…; occurrences of the removed call text0, injected marker1schema-section.test.tsgo RED, the other 24 stay green — including both byte-identity cases (a plain object schema, and a union with a single heading-emitting arm), which is the asymmetry that mattersexcess=12 pages=4 distinctHeadings=10, heading for headinggit checkout HEADscoped to the mutated file (spelled with the two-dash pathspec separator): blob back tob4990323…(BLOB_MATCH=YES), injected marker count0,git diff HEADempty,git status --porcelainempty, and the regenerated tree back toexcess=0An earlier ablation attempt was a no-op — the in-place edit reported success while changing nothing (
POST_HASH == PRE_HASH, marker count 0). Its readings were discarded, not reported; the numbers above are from the run whose mutation is proved on disk. No rebuild step is claimed for this ablation because none applies:gen:docsistsx scripts/build-docs.tsand vitest both resolvescripts/lib/schema-section.tsas source, not through a packageexportsentry pointing atdist.Gates, at
e102f6ae. All 30 families derived bynode scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackagainst the actual 11-path changed set, pluscheck:nul-bytes, run and green. (An earlier revision of this body said 28; that was a miscount of the same derivation, corrected here — the family list itself is byte-identical across both runs.) Their own verdict lines, for the load-bearing ones:pnpm lint(repo-wideeslint . --no-inline-config) also run in full and green — no narrowing to declare.Three gates first exited 1 with
PREREQUISITE NOT MET(@objectstack/formula,@objectstack/lintand@objectstack/client-reactunbuilt in a fresh worktree). Their own text states nothing was measured; the prerequisites were built and all three then exited 0. Recorded here so the first reading is not mistaken for a finding.Merge with
mainmainmoved under this branch (#12849, #12838, #12837, #12854, #12737), and #12849 also regeneratedcontent/docs/references/ui/view.mdx. Landed viabash scripts/pm/os-regen-merge.sh— merge commit, never a rebase or force-push. Generated pages were not hand-resolved: the script takes main's side of every os-regen artifact, commits the merge (the pre-commit hook records that as a deferral), and the regeneration then runs from the merged tree with this branch's own renderer, as its own commite102f6ae. The deferral marker cleared on that commit (os-regen: all deferred artifacts are current — marker cleared.). The index-versus-worktree split the procedure leaves behind was staged explicitly and the staged diff re-checked againstorigin/mainbefore committing, so the commit contains the regeneration rather than main's side.Notes
@objectstack/spec: patch, following the fix(spec): render a nested item shape as a table so its describe text reaches the reference page #12309/fix(spec): one sub-table per variant for a property that opens more than one object shape #12592 precedent — this changes what the docs site publishes, so it is release-visible rather thanskip-changeset.content/docs/references/**is regenerated withgen:schema+gen:docsonly; nothing hand-edited.content/docs/releases/**untouched.### Properties,### Allowed Values,#### Option N) carry no qualifier at all #12862: 1316 duplicate heading anchors remain on 162 of 214 pages, all from the section-grammar headings (### Properties,### Allowed Values,#### Option N) which carry no qualifier by construction. Different population, different decision — deliberately not touched here. [finding] 1316 duplicate heading anchors remain on 162 of 214 reference pages — the section grammar's own headings (### Properties,### Allowed Values,#### Option N) carry no qualifier at all #12862 is not addressed by this PR and remains open.https://claude.ai/code/session_01JvjTCjJQn9zSTXEhUKgT7s— recorded here in prose because the footer's session form is normalised away by any later body edit.