feat(core): the ingestion choke point says out loud when it cannot fold a retired spelling (objectui#8938) - #9523
Merged
os-tesla merged 2 commits intoSep 14, 2026
Conversation
… retired spelling Maintainer ruling item 3 on objectui#7650 asked the retired-dialect fold for a loud diagnostic — not a silent drop — for a spelling the choke point cannot fold. What shipped warned about the spelling it CAN fold and said nothing about the three it cannot, and those are the ones whose value reaches no consumer: the retirement cards in this family narrowed every reader to the canonical spelling. `normalizeSchemaReferenceKeys` now names all three refusals — no declared twin, an ambiguous probe, an occupied canonical key carrying a different value — in dev only and memoised per (object, field, spelling, reason). It ⛔ never offers a near match for a typo, because a serve path that suggests a correction is one revision away from applying it. Same value under both spellings stays silent: that is the state the pass leaves behind on its own second run. Which keys fold is unchanged. The diagnostic fires only on the paths that already left the key alone, and it is a no-op under NODE_ENV=production. Also lands the width pin the card asked for — it drives every snake twin the linked @objectstack/spec implies through the public choke point, so the accepted set can never again be a sentence somebody typed — and corrects the objectui#7650 changeset, which presented a handful of keys as the whole of it. Part of objectui#8938 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QreXiyMEqKLN4U5daMPVa
…ver was objectui#8938 names this beside the width it is really about: the test titled "leaves a declared key alone even when a snake twin of it exists on the def" carries a fixture with no snake twin on it. The fixture is right and the title described something else — the same declared-versus-measured drift the card is about, one file down, so it is repaired in place rather than left for a sweep. Title only. The fixture, the call and the assertion are untouched. Part of objectui#8938 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QreXiyMEqKLN4U5daMPVa
Contributor
✅ 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-tesla
marked this pull request as ready for review
September 14, 2026 18:16
os-tesla
deleted the
claude/issue-8938-retired-dialect-measured-surface
branch
September 14, 2026 18:36
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.
Part of objectui#8938 — parts (a), (b) and (d). Part (c) is deliberately NOT here.
objectui#8873 landed the retired-dialect fold at the ingestion choke point per the route ruling, losslessly. What it declared was not what it measured, and that gap is this card.
Re-measured against the RESOLVED spec pin
The card measured its figures on
@objectstack/spec@17.3.0. This branch resolves@objectstack/spec@17.4.0(pnpm-lock.yaml), and the surface was re-derived against that pin rather than inherited:FieldSchemakeys, 0 probe collisions, 42 snake twins that fold — the same width the card measured one release earlier, re-derived, not copied.FIELD_KEY_GUIDANCE.id_fieldis still in no published version:id_fieldoccurs 0 times in the installeddist/, withstartingNumberlit at 32 occurrences in the same read as the control.(a) The changeset correction
.changeset/7650-retired-dialect-choke-point.mdis unreleased — no releasedCHANGELOGentry carries it (packages/core/CHANGELOG.mdhas no entry for this slice; the changeset file is still in.changeset/), so the stop clause on amending release history does not apply and correcting it is ordinary work.It presented four keys as the accepted set. It now states the accepted set is measured, not enumerated: one spelling rule applied to
FieldSchema's entire declared key set at run time, so it is a property of the installed spec and grows with it. The classes the original never named are spelled out — the gate keysvisible_when/readonly_when/required_when,default_value,required_permissions,masking_rule,track_history,delete_behavior,external_id,depends_on,lookup_page_size, therelated_list*andinline_*families, and the managed-by lock keys_lock_reason/_lock_source/_lock_docs_url/_package_id/_package_version.No count is written there on purpose (AGENTS.md #9): a number in that paragraph is derived once and derived never again, which is the defect this card is about. The prose points at the instrument instead.
(b) The width pin
the width IS the spec's declared key set, not a list anyone typedbuilds the twin set fromFieldSchema.shapeat run time — a spelling rule, never a key list — puts every twin the live spec implies on one def, and drives it through the publicnormalizeSchemaReferenceKeys. Add a camel key to the spec and this pin demands its snake twin fold, with no edit here. Beside it: the four keys the original declaration enumerated are asserted to be a strict subset, a lit-instrument control so an empty key set cannot pass vacuously, a negative control that a non-twin key is still not folded, and a class-membership pin so the subject of the (c) decision is a measured fact.(d) The ruling's diagnostic — maintainer ruling item 3 (objectui#7650, comment 5572018999)
The fold shipped with a warning for the spelling it can fold and nothing for the ones it cannot. Those are the ones that matter to a reader: a key that folds reaches every consumer, a key that does not reaches none, because the retirement cards in this family narrowed every reader to the canonical spelling.
All three refusals now speak, dev-only and memoised per (object, field, spelling, reason):
no-declared-twinFieldSchemadeclares neither the key nor anything sharing its alias probe —id_field,title_format, the typosortibleambiguous-probeFieldSchemacanonical-occupiedIt ⛔ never offers a near match. The refused alternative on objectui#7650 was the spec's
lintAuthoredRecordKeys, whose Levenshtein fall-through answers "did you meansortable?" for that very input; a serve path that suggests a correction is one revision away from applying it. The pin asserts the message namessortibleand neversortable.Two silences are kept, and pinned as such: a spelling that DID fold (that is the existing warn's case — the stop clause), and
reference_to/referenceTo(the reference arm owns those, objectui#6837). Two more silences fell out of the work: same value under both spellings is not a conflict, and neither is the canonical this pass stamped itself — the adapter re-serves a cached schema, so reporting that would have put a line on every folded field on every metadata refresh. The existing idempotence pin in the objectui#7650 suite is what caught it.The three inverted pins
expect(warn).not.toHaveBeenCalled()in the objectui#7650 suite pinned the ABSENCE of this diagnostic in three places. None is deleted and none is weakened: each keeps every behavioural assertion it had (no fold, no typo correction, no overwrite) and additionally requires the refusal to be audible, with objectui#8938 and the reason written at the assertion.Both readings, from real run output
Ablation leg A —
packages/core/src/utils/reference-keys.tsrestored to the merge base, mutation proven on disk (new diagnostic: 0 hits; old fold warn: 1 hit), both pin files run:The 10 are the 7 new diagnostic pins plus the 3 inverted ones. ⭐ Every width pin PASSES on the old implementation — which is the evidence that (a) and (b) change no behaviour: the fold was already this wide, only the declaration was wrong.
Ablation leg B — the derivation replaced by a four-key hand table (injected text 1 hit, removed spec read 0 hits):
with
the width IS the spec's declared key set, not a list anyone typedamong the failures — a declaration that stops tracking the spec cannot satisfy this pin.Restoration proven both legs, not assumed:
git hash-objectreturns the HEAD blob5f2c8d62064bb157f43f57a050f978da409caf35after each,git diff HEADempty,git statusclean.After the change:
Gates:
check-changeset-presenceOK,check-changeset-no-majorOK,check-control-bytesOK,check-new-cross-file-line-citations0 new,check-governed-queue-guard --testNOT GOVERNED,eslint --no-inline-configon the 3 changed source files 0 errors / 0 warnings.Scope
no. Which keys fold is unchanged: every new line sits on a path that already left the key alone, and leg A confirms it by running the width pins green against the pre-change implementation.NODE_ENV=production; the leave arm stays lossless.Acceptance notes
FieldSchema.shapedereference. The state is constructible by substituting the spec module, so it could be pinned; what is not a lane call is what the guard should DO. A named throw is cosmetic, and an empty-fold fallback is the invisible-degradation class this same file explicitly refused forid_field. Carried by objectui#8938, which stays open for (c).MetadataProvider.itemReferenceKeys-7650.test.tsxdrivesreference_tothrough the by-namegetItemserve path and asserts both spellings arrive. The claim needs narrowing to the arm this card is about.Generated by Claude Code