Uh oh!
There was an error while loading. Please reload this page.
test(app-shell): pin the form-view option element's narrowings, per the 2026-08-28 ruling - #6886
Conversation
…he ruling `FormFieldSpec.options`' element type is `Omit<SelectOption, 'visibleWhen' | 'default'>` plus a re-pointed predicate. Nothing failed if either name left that `Omit` list: PIN G covers the section/view narrowings, the option element had no negative pin at all — so the one narrowing a maintainer actually ruled on rested on a comment. PIN I closes that. `default` is refused, `visibleWhen`'s `dialect`-only envelope is refused, the keys this position does declare still compile (so a collapsed element type cannot satisfy both `@ts-expect-error` lines), and `SelectOption` itself is asserted to still carry `default` — the pin measures a NARROWING, not an absence, and would otherwise go on passing if the spec ever retired the key from the object-field face, where it is ruled `enforce`. The tombstone comment in `form-spec.ts` is updated from "tracked separately, that card's decision" to the decision itself, and now names where a pre-selected choice IS declared: the object definition's field `defaultValue`, or the object option's own `default: true`. Type-level only — no runtime change, no published behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hfmP9hoMd3dJwTh85J4yB
✅ 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-sam
commented
Aug 30, 2026
Review — ACCEPT. And the finding is worth more than the pin.Landing gated on CI. Two things first: an independent check of the load-bearing claim, and an I verified the linchpin by a different instrument, and it holdsEverything in "What this does not close" rests on one claim: objectstack PR #13033's narrowing So I checked the npm registry instead, which is a genuinely different instrument: objectstack#12868 was closed by MERGED PR #13033 on 2026-08-28T19:23:03Z — five days ⇒ the gap is a release train, not work, exactly as the PR says. And the conclusion that ⛔ My dispatch named the wrong file surfaceI declared it as You amended the surface on the card before the first edit, which is the whole reason the The sharpest thing here is PIN I's fourth assertionThree of PIN I's four assertions are controls, and the fourth is one I would not have asked Without it, PIN I cannot tell a narrowing from an absence. If the key were ever retired The type/runtime split is measured the right way too: each level carries a control that must The census is a proper one — 4526 files, 615 option literals, Card disposition: #6263 does not close on this mergeYou were right to use #6263 goes to Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Part of #6263
Part of, not a closing keyword. The card's deliverable is there-verification, and the re-verification came back with a correction the card should
close on the record of, not silently on this merge. See "What this does not close".
Generic-type spellings in this body use parentheses —
Omit(A, 'k')— rather than anglebrackets, because the body sanitizer eats short angle-bracket fragments.
What this is
objectstack#12868 wrote its own downstream action: "when this lands, re-verify on the
merged ref — the ui-side derived type already tombstones the key (objectui PR #6618), so
the residual ui work is likely nil and that card closes on verification."
The re-verification is below. The residual is nil, and this PR is the pin that makes
it stay nil, plus the tombstone prose the 2026-08-28 ruling asked for. No source change,
no runtime change, no published behaviour change.
The measurements
1 — Which spec is actually resolved, read from the built dist.
@objectstack/spec@17.2.0, resolved identically bypackages/types,packages/app-shell,packages/coreandpackages/react. objectstack PR #13033's narrowing is NOT in it:FormSelectOptionSchemais absent from the dist'suientry, andFormFieldBaseSchema.optionsis stillz.array(SelectOptionSchema)— the full five-keyvocabulary. It is not merely un-bumped, it is unpublished: the npm registry's
dist-tags.latestfor@objectstack/specis17.2.0.2 — Does the form-view surface still accept a per-option
default? Both levels answered,and they disagree — which is the split this card family is about.
FormViewSchema.safeParse@17.2.0)default,label,valueFormFieldSpec.options' element)tsc'default' does not exist in typeBoth readings carry a control that must hit, run in the same query:
zzz_not_a_keyis REFUSED(
invalid_union@sections.0.fields.0), and the sibling declared keyvisibleWhenisACCEPTED — so the acceptance of
defaultis a real declaration, not passthrough.zzz_not_a_keyon the same position is also TS2353 —excess-property checking is live there, so the refusal of
defaultis a narrowing andnot a collapsed type.
colorand a stringvisibleWhencompile clean.The
tscdiagnostic prints the resolved type and settles who does the dropping:Omit({ label; value; color?; default?; visibleWhen? }, "default" | "visibleWhen") & ...—the source
SelectOptionstill carriesdefault, and objectui's ownOmitis whatremoves it. The tombstone is this repo's, not an inherited narrowing.
3 — Corpus census, one instrument over one population, with positive controls.
There are zero
*.form.tsfiles in this repo, so the census ran over the equivalentauthoring sites: every
options:array literal in every git-tracked.ts/.tsx/.json(dist excluded), read through the TypeScript AST, plus a recursive JSON walk.The single
defaulthit ispackages/components/src/__tests__/metadata-viewer.test.tsx:42— aTASK_OBJECT.fields.status.optionsfixture, i.e. the object-field face, which is ruled
enforce(objectstack#7246, PR #7388)and is this card's red line. Form-view sites writing the key: 0.
4 — Is there a reader? One, and it is on the enforced face:
packages/components/src/renderers/basic/metadata-viewer.tsx:148reads an objectdefinition's option
defaultto pick a state machine's initial state. Nothing on theform-view path reads it — consistent with the 2026-08-10 rider that the console needs no
second default contract.
What this PR changes
PIN I in
form-spec.containers.test.tsx. That file's header already promised that"each narrowing has a matching negative pin"; the leaf's option element was the one
position where that was not true. PIN G covers the section/view narrowings, and the option
element — whose
Omitlist carries the only narrowing a maintainer actually ruled on — hadno negative pin at all. Removing
'default'from that list was a silent widening.PIN I asserts four things, three of them controls:
default: trueon the option element is refused;visibleWhen: { dialect: 'cel' }is refused (the re-pointed predicate needssource),the sibling narrowing in the same
Omit;cannot satisfy the two
@ts-expect-errorlines and read as a narrowing;'default'is still a key of the spec's sharedSelectOption. This is the control thatmakes PIN I measure a narrowing and not an absence: if the key were ever retired
outright — reverting the ruled, implemented, pinned object-field behaviour — the
expect-error would still fire, for a reason that is not this card's, and PIN I would go
on passing while the thing it guards was gone.
And the tombstone comment in
form-spec.tsmoves from "tracked separately as objectui#6263,that card's decision" to the decision itself, naming where a pre-selected choice is
declared: the object definition's field
defaultValue, or the object option's owndefault: true.Verification
Anchored at
ae160b2b, the final commit;git statusclean at the time of each run. Heavyruns went through the shared verify lock; every verdict below is the tool's own line.
pnpm --filter @object-ui/app-shell run type-check, script echoed as> @object-ui/app-shell@17.6.0 type-checkrunningtsc --noEmit && tsc -p tsconfig.test.json(so this is not a zero-match false green).
VERDICT command-exit 0.pnpm --filter @object-ui/app-shell run lint, whole package, not narrowed:✖ 2798 problems (0 errors, 2798 warnings). Both changed files confirmed present ineslint's own reported population via
--format json(2 files reported, 0 errors and0 warnings each).
pnpm exec vitest run packages/app-shell/src/views/metadata-admin/plus everyother importer of
form-spec(apps/console/src/components/FormPage.fieldSpec.test.ts,scripts/__tests__/one-authority-per-exported-name-6273.test.ts):Test Files 220 passed (220),Tests 2302 passed | 1 skipped (2303).Before/after on the pin file itself:
Tests 2 passed (2)→Tests 2 passed (2), unchangedand expected — PIN I lives in
formContainerContractPins(), which never runs;tscis theinstrument, exactly as that file's header says.
check:control-bytesOK (5735 files),check:spec-symbolsOK,check:phantom-depsOK,check:self-importOK,check:vi-mock-specifiersOK,check:esm-specifiersOK,check-changeset-presence✅ (empty frontmatter, declared asreleasing nothing),
check-changeset-no-major✅,check-changeset-fixed✅.Reverse verification of PIN I — predicted direction stated before the run: dropping
'default'from theOmitmakes the expect-error unnecessary, so the failure isTS2578, not a type error. Mutation confirmed on disk before reading anything (anchor
census
1 → 0for the removed text and0 → 1for the injected text, plus the diff hunk).Observed:
Line 240 is PIN I's
defaultdirective — which also proves that project actually compilesthis file, so the green above is a measurement and not a NOT-MEASURED. Restore proven
byte-exact:
hash-object9df80695…equalsrev-parse HEAD:path9df80695…, andgit diff HEADfor the file is empty. The script carried atrap … EXIT INT TERMwithabsolute paths.
What this does not close
The composite defect the card describes — a per-option
defaultwritten on a form viewparses clean — is still true on this tree, because the ruled narrowing lives in
@objectstack/specand that release has not shipped. objectstack#12868 is closed and itsPR merged, so nothing is owed on that side either; the gap is a release train, not work.
No objectui change is warranted for it: every package's range is
^17.0.0/^17.2.0, sothe narrowing arrives on its own the next time the lockfile resolves a spec that has it.
Recorded here so that closing #6263 on this verification does not bury the fact.
⛔ Untouched, deliberately: the object-field face, the alias table, and
SelectOptionSchemaitself.
packages/types/src/**is untouched too — it was the card's originally declaredsurface, and it turned out to be the wrong address (it is the SDUI component protocol held
in key-parity with the spec, and its
defaulthas a live reader on the enforced face). Thesurface amendment was posted on #6263 before the first edit.
Generated by Claude Code