Uh oh!
There was an error while loading. Please reload this page.
refactor(types,app-shell,plugin-designer): one tombstone registry for the designer seam's retired field keys - #6627
Conversation
… the designer seam's retired field keys Three independently maintained RETIRED_FIELD_KEYS literals on the designer seam (the metadata-admin read door in object-fields-io.ts, MetadataService's carryOver, MetadataFieldsPage's carryOver) become derivations from a single tombstone registry in @object-ui/types: RETIRED_FIELD_KEY_TOMBSTONES names each retired key, the card that retired it, and its PER-SITE applicability, and retiredFieldKeysFor(site) is the only supported way for a site to obtain its strip list. Deliberately NOT a union of the three lists — per-site behaviour is unchanged and pinned per site: - `formula` stays stripped by the two write-side carry-overs and is NOT applicable at the read door, per the objectui#6526 option B ruling (ObjectFieldInspector's linting CEL editor migrates the legacy key; stripping on read destroys authored expression text). The registry test makes that ruling mechanical. - `sortOrder` stays a single-site strip at MetadataService's carry-over and is now recorded as the registry's one DEFENSIVE entry, with the objectui#6045 measurement (no shipped writer ever populated a field-level one) cited on the tombstone instead of the entry reading like a measurement. The per-key evidence that used to live in three file-local comment blocks moves onto the tombstones; each site keeps only its own mechanics (read-door strip-on-load contract, carry-over bounds, this-writer history). Not touched here: scripts/check-designer-field-key-parity.mjs still reads the declared payload shapes, not this registry; pinning the registry as that gate's single source is a cross-lane follow-up (gate-class scripts/ is domain:devx), named in the PR body. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRJge11jso9TpXRWFt1Z49
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
os-sales
commented
Aug 27, 2026
Placement-topology measurements for the ruling on objectui#6527 (taken read-only on this branch at 1. Yes — it is on the package's public entry, and only there
// Retired-field-key tombstone registry — the single source for the designer// seam's per-site strip lists (objectui#6527).exporttype{RetiredFieldKeySite,RetiredFieldKeyTombstone,RetiredFieldKey,RetiredFieldKeysAt,}from'./retired-field-keys.js';export{RETIRED_FIELD_KEY_SITES,RETIRED_FIELD_KEY_TOMBSTONES,retiredFieldKeysFor,}from'./retired-field-keys.js';So: three value exports + four type exports re-exported from the index barrel. The 2. Changeset frontmatter, verbatim
3. Non-published placement: structurally not available; the real options with measured costsThe binding constraint, measured on the branch:
Therefore whatever module both consumers import must be resolvable at their consumers' runtime through some published package's
Plain answer: a non-published placement is not genuinely available. The choice is between A (public on the Protocol barrel, status quo, minor already declared) and B (published but fenced to a signposted subpath). Either way the placement adds published surface, which is why this sits with the maintainer; B is the smaller permanent obligation if the maintainer wants one at all. Generated by Claude Code |
os-sales
commented
Aug 27, 2026
ui execution seat, The failure1 failed / 532 passed (533 files); 7174 tests passed. ⭐⭐ Why this is the placement decision showing up as a test failureThe registry is exported from ⭐ The generalisable finding, worth more than the fix: adding one export to a barrel widens what every consumer of that barrel must be able to evaluate. A partial mock that was complete enough yesterday is not complete enough today, and nothing in the diff touches the failing test or the module it mocks. This is the same class as the lesson from PR #6626 earlier today — an enforcement or an assumption resting on a module's shape rather than on its behaviour, silently invalidated by a declaration landing elsewhere. ⛔ Why I am not fixing itThere are exactly two fixes, and choosing between them is the decision this PR is held on (see #6527):
Pushing the mock patch would silently pre-commit the repo to A while a decision on A-vs-B is open. ⛔ Not mine to make. What this changes about the decisionIt moves a cost from theoretical to measured. My filing on #6527 argued B on governance grounds — smaller permanent obligation, more withdrawable. This adds a concrete technical cost to A that was not in that analysis: barrel placement makes every consumer's module graph wider, and the first thing it broke was an unrelated test in a package that merely imports the barrel. Recorded on the card as new evidence rather than left here. Status: PR stays draft, held on #6527's ruling. Once ruled, the fix follows from the ruling and I will resume the same dev on this same claim. Generated by Claude Code |
Fixes#6527
Session:
session_01CRJge11jso9TpXRWFt1Z49(durable copy of the attribution, since PATCH edits demote the footer).What this is
The designer seam carried three independently maintained
RETIRED_FIELD_KEYSliterals — the metadata-admin read door (packages/app-shell/src/views/metadata-admin/previews/object-fields-io.ts),MetadataService'scarryOverandMetadataFieldsPage'scarryOver— and they had drifted. They now derive from a single tombstone registry in@object-ui/types:RETIRED_FIELD_KEY_TOMBSTONES— each retired key, the card that retired it (retiredBy), the accepted spelling the concept lives under today (specEquivalent, documentation and never a migration instruction), adefensiveflag, and PER-SITE applicability booleans.retiredFieldKeysFor(site)— the only supported way for a site to obtain its strip list; the return type is the literal union derived from the same data, so a site's list and its type cannot drift apart.All three lists were re-taken on the merged ref (
fa1348fe, which includes PR #6624) before writing anything, as the dispatch required — contents matched the card's table.Deliberately NOT a union — per-site behaviour is unchanged and pinned
indexed(objectui#4644)referenceTo(objectui#6041)formula(objectui#6043)isSystem(objectui#6044)sortOrder(objectui#6045)formulaat the read door: ruled on objectui#6526 (option B, director seat 2026-08-27) — theObjectFieldInspectormigration path (objectui#6043) stands; the linting CEL editor seeds from the legacy key and the first edit migrates it, and the 422 diagnostic points at that editor (PR fix(app-shell): name the field and the Formula (CEL) editor in the retiredformula422 diagnostic #6624). The registry records thefalsewith the ruling, andretired-field-key-tombstones.test.tspins it mechanically — flipping it also turns the read door's own pins and the inspector's migration pin red (measured below).sortOrderverdict (recorded, not silently unioned): re-measured on this ref —FieldSchema17.2.0 refuses it by name (probe with positive control), no emit site on this tree writes a field-level one, andDesignerFieldDefinitiondeliberately declares none (objectui#6045: "the key never reached the wire"). Chosen arm: keep theMetadataServicestrip as the registry's one explicitly-defensiveentry, with the measurement cited on the tombstone. Keeping preserves exact per-site parity and protects any document a non-designer client may have stored while an older server accepted the key; dropping would turn such a document into an un-clearable 422. The other two sites do not gain it — widening them would be the naive union this card exists to prevent.The per-key evidence that lived in three file-local comment blocks moved onto the tombstones; each site keeps only its own mechanics (strip-on-load contract, carry-over bounds, this writer's history).
Verification
Union re-run at the final commit
ec93ccfaon a clean tree, under the shared verify lock (VERDICT command-exit 0): 62 test files / 716 tests passed (registry pins, the full previews and services suites,ObjectFieldInspector.test.tsx, sixMetadataFieldsPagesuites);type-checkgreen for all three packages;check-changeset-presence/check-designer-field-key-parity/check-control-bytesgreen; package-scopedlintgreen for the three touched packages (turbo, 4 tasks — one pre-existingno-explicit-anywarning inMetadataService.tsis on origin/main at the same line). Repo-widepnpm lintis CI's run.tsc -p tsconfig.test.json --listFileslists both new files, so the type-check verdict covers them.Every new pin shown red (mutation committed-first; mutation proven on disk by a unique anchored replacement, before/after grep counts and a blob-hash difference vs HEAD; restore proven by empty
git diff HEADAND hash match, never by exit code; each leg's script carried atraprestore):formula's read-door flag totrue: 5 red — the registry's asymmetry pin, its read-door parity pin, the read door's "names exactly the three keys" and "carries a legacyformulathrough", andObjectFieldInspector's "commits edits toexpressionand migrates the legacyformulakey" (the editor renders the empty string — the objectui#6519-measured destruction signature).sortOrder'sMetadataServiceflag tofalse: 5 red — verdict pin, MetadataService parity pin, no-dead-entries pin, and both wire-bytes strip cases inMetadataService.fieldKeyCarryOver.test.ts(diagnostics increase: the key rides out onto the PUT body).defensive: true: exactly the 2 verdict pins red, 12 green.sortable): 5 red — the membership-criterion pin, MetadataService parity pin, and three wire-bytes cases proving the hazard the criterion exists for (authoredsortabledeleted from the PUT body).Cross-package negative type check:
retiredFieldKeysFor('notASite')in app-shell turnstscred with TS2345 naming the exact three-literal union from the rebuilt.d.ts, then restored. Mutation legs run against source directly (root vitest aliases@object-ui/typestopackages/types/src—vitest.config.mts:261), so no stale-dist hazard applies to them.Changeset:
@object-ui/typesminor (new public exports),@object-ui/app-shell/@object-ui/plugin-designerpatch.Cross-lane follow-up (deliberately NOT in this PR)
scripts/check-designer-field-key-parity.mjsstill reads the declared payload shapes and does not know this registry. Triage's unlock shape includes pinning the registry as that gate's single source — that half is real and worth doing, but gate-classscripts/isdomain:devx, another lane. It needs its own card: without a gate pinning it, the registry is a convention, and conventions drift, which is exactly how three lists happened. This PR's registry test carries the interim line (parity pins per site + membership criterion).#6526 is not addressed here (it landed as PR #6624); #6519, #6488, #6045, #6043, #6044, #6041, #4644 are context and all remain as they were.
Generated by Claude Code