fix(types): correct six docblock claims in arm-named-export-8784.test.ts and add the control they described - #9530
Conversation
…ribed
`packages/types/src/__tests__/arm-named-export-8784.test.ts` carried six
statements that were wrong, dangling, or unsupported. Every edit here is a
comment except one ADDED `it`; the pin's mechanism, firing legs and census are
untouched.
The item that earns the change: ablating `namesOn` from identity to "identity OR
the arm's declaring name" left the whole file green — with the barrel intact
(15/15) AND with `export { NavigationSchema as BreadcrumbSchema }` written to
`index.zod.ts` (15/15, where the pristine file is 1 failed / 14 passed). The
existing permanent control states that property on probe schemas, which have no
declaring name for such a check to match on, so nothing in the file could see the
difference. The added control reads the real barrel with the arm's name rebound
to its parent union and reddens under exactly that weakening.
The prose corrections, each re-measured rather than taken on report:
- `defOf`'s "nothing public exposes it" is false on zod 4.4.3 — `schema.def ===
schema._zod.def` for every shape this file walks, and `ZodType` declares `def`
while carrying `_def` only as deprecated.
- the `z.union` lazy control's rationale was wrong three ways: a bare `z.lazy`
does compute `propValues`, `z.discriminatedUnion('type', [lazyArm])` both
type-checks (tsc 6.0.3) and parses, and the refusal
`any-component-union-fanout.test.ts` measures is of a plain `z.union` MEMBER,
thrown at first parse. The real tree's cast is owed to an annotation, not to a
lazy.
- "a delta commit ... was prepared" — it was named; the sha offered for it
answers 422 where its controls answer 200.
- a cross-reference to an `it()` title no test in this file has ever carried; it
now cites by title, the shape objectui#7853 established.
- "the absence outlives its own explanation" overstated the mechanism: a
changeset that declares a bump has its prose copied into the package CHANGELOG.
The operative argument — nothing re-reads it, nothing reddens — is kept.
Also removes a hard-coded control count in the same block ("all four", carrying
five) rather than correcting it, which is the shape AGENTS.md #9 asks for.
Claude-Session: https://claude.ai/code/session_01L5xpA5q533BgTTNADibEFt
Co-authored-by: Claude <noreply@anthropic.com>
✅ 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
|
⛔
|
| ruled out | measurement |
|---|---|
| the ambient shard-1 timeout (objectui#9499 / #9503) | that class ends cancelled at the 20-minute ceiling; this ran 1084.0 s against 1200 s — 116 s of margin — and concluded failure |
| a red base branch | origin/main 63dc4f7313 carries shards 1/4 … 4/4 all success at the same moment |
| this diff | the whole diff is packages/types/src/__tests__/arm-named-export-8784.test.ts plus a changeset — it touches no scripts/, no i18n, and creates no .vite-oracle-* |
Carrier — ⛔ no new card filed
objectui#9468 already names this exact mechanism, both file ends, and the status: 2 rethrow, and is open. This occurrence has been added there as the third instance, with the datum that the card's own "one occurrence, did not recur" is now falsified — different scratch-dir and patterns-dir suffixes prove two distinct occurrences, and the stack frame moved :475 → :460 while the race did not. ⇒ ⛔ a duplicate card would have split the evidence.
What happens next on this PR
The failed job is being re-run once — the single re-run these rules allow for confirming a failure that is not this PR's. ⛔ Nothing here is skipped, disabled or quarantined; ⛔ no timeout-minutes is proposed (ci.yml:641 rules that out); ⛔ no empty commit and no close/reopen. If it fails a second time with the same annotation the failure stops being a confirmation exercise and this seat will say so rather than re-run again.
Generated by Claude Code
Contract reviewHead reviewed: Merge-base derived, not adopted: 90 claims measured. Counting rule: one claim = one assertion below that I measured myself with a named instrument at a named sha; one instrument re-run on N inputs counts N (the ablation matrix is 8, not 1; the citation table is 15 — 7 sites at the bound sha, 7 on Population bound — proved before any counter was read. The tracked tree at this head is 7790 files, by two independent enumerations that agree as sets, not merely as totals: Corpus, measured before anything in it. The four report claims — each re-measured on my own instrument① The card's own proposed replacement for item ② is FALSE, and the dev is right to have refused it. ✅ Runtime, zod 4.4.3, observer self-tested with a firing positive (a deliberate
TypeScript, tsc 6.0.3, under this package's real
⇒ the mechanism is the annotation, not the lazy. zod's own typings settle it: ② Item ⑤'s ③ The card's ④ The ablation matrix — re-run cell by cell, and it reproduces exactly. ✅ Instrument:
In both "after" ablation cells the single failing test is the new one — The spelling was independently re-derived, not taken on report: the barrel binds The seventh item — AGENTS.md #9✅ The citation is correct and the shape is correct, though not where I first looked. AGENTS.md §9 is "Operational Rules" (housekeeping, changesets, test discipline) and says nothing about counts — my first read, and a near-miss I record here. The rule is Commandment #9, in §5 "Coding Standards (the Commandments)",
⇒ removal is the shape it asks for; correcting "all four" to "all five" would have written down an answer that rots on the next added Citations — verified, with two corrections to the reportAll seven cited sites (six items; ⑤ cites two) resolve exactly at
⑤b being rewritten by The tree, and the gates I ran myself
|
Landing record — PR #9530Read at ① Same-form PASS at the landing head. ② Clause-② carrier pair. ③ Checks at that head.
Next actions, in order: ⛔ Generated by Claude Code |
EnqueuedFollow-up to the landing record above, which said ③ would be re-taken after the undraft because leaving draft starts a 37th check. It was, and here it is.
The queue rebuilds on current Generated by Claude Code |
Fixes #9087
Six docblock statements in
packages/types/src/__tests__/arm-named-export-8784.test.tswere wrong, dangling or unsupported. Every edit is a comment except one added
it.⛔ The pin's mechanism, its firing legs and its census are untouched — no assertion was
weakened, removed or relaxed.
Everything below states what was measured on this branch, not what the card asserted.
Where the two differ, the difference is called out.
Corpus, measured before anything in it
bbc9dc34e3git rev-parse HEADin a fresh worktree offorigin/main56b09101fdpackages/typesresolvesrequire.resolve('zod/package.json')anchored atpackages/typeszod@3.25.76, which also ships av4/directory, pulled in by@modelcontextprotocol/sdkls node_modules/.pnpm/zod@*pnpm exec tsc --versionItem 6 — the hardening gap, re-derived rather than taken on report
The ablation weakens
namesOnfrom identity to identity OR the arm's declaring name(the name-based check that adversarial probing of objectui#8777's pin defeated). Leg B writes
export { NavigationSchema as BreadcrumbSchema }intoindex.zod.tson disk. Every cellbelow is a real
pnpm exec vitest run packages/types/src/__tests__/arm-named-export-8784.test.ts,each mutation proved on disk by counting the injected marker and the deleted text, each
restored by
git checkout HEAD -- PATHwith a blob-hash comparison as the restore proof.namesOnbbc9dc34e356b09101fdThe failing test in both "after" ablation cells is the new one, and it is the only one:
still reports the REAL arm when the barrel binds its name to the parent union. ⇒ the addedcontrol fires against exactly the regression class the card named, and is green on the intact
barrel. A control that cannot fail is not a control; this one was measured failing.
difference is not a disagreement.
ABSENT_PENDING_DECISIONheld four rows at the card's shaand holds none now (objectui#9067 settled them, landed by objectui#9405), so
it.each(Object.keys(LEDGER))generates 3 cases where it generated 5. 12 fixed cases + 5 = 17 then, 12 + 3 = 15 now.
The spelling was re-derived from the file, not copied: the barrel binds
BreadcrumbSchematoexactly one name and
NavigationSchemato exactly one name, andNavigationSchemais thez.discriminatedUnioninnavigation.zod.tsthat contains the breadcrumb arm — so thesubstitution leaves zero barrel keys bound to the arm, which is why identity must answer with
an empty list. Measured before the control was written.
Items 1-5, each re-measured
1 —
defOf's "nothing public exposes it" is FALSE. On zod 4.4.3,schema.defis an own,enumerable property equal by reference to
schema._zod.deffor every shape this file walks(object, literal, enum, union, discriminated union, lazy). zod's
ZodTypeinterface declaresdefand carries_defonly as deprecated, with its doc comment pointing at.def. ⇒ thehelper is correct either way and the spelling is not load-bearing; ⛔ the stated reason was
false and is replaced, with the version stamped and a pointer at the file that decides it.
2 — the
z.unionlazy rationale was wrong on all three of its parts, and the card's proposedreplacement is wrong too. Measured on zod 4.4.3 and tsc 6.0.3:
z.lazyover an object schema does computepropValues— it inherits itsmember's, so a lazy over a concrete object carries the concrete type;
z.discriminatedUnion('type', [lazyArm])type-checks and parses — green for thedeclared literal, red for a bogus one. ⇒ neither the runtime nor
tscrefuses it, so thecard's suggested sentence ("
tscrefuses it without a cast; the runtime does not") is ⛔ notthe correction this site needs;
z.unionMEMBER, whichcomputes no
propValues— and it refuses at the first parse, not at construction(
Invalid discriminated union option at index "N").tscrefuses the same member withPropValues | undefinedis not assignable toPropValues. That is whatany-component-union-fanout.test.tsmeasures, inlets both nested unions declare their literals too; ⛔ it measures nothing about a lazy, exactly as the card said.⇒ where the
PropValues | undefinedreally comes from: the basez.ZodTypeannotation thatobjectui#7760 ruled onto
crud.zod.ts's action arm, whose internals declare it optional. Theannotation, not
z.lazy, is whattsccannot see through — which is what that file's owncomment already says. A tsc probe with a deliberate error as its negative control pinned all
five cases.
3 — "a delta commit was prepared" is unsupported. Comment
5597569641(fetched) names theremedy: "one additive commit on
90fcf4f2with the eight barrel lines". Comment5598263402(fetched) records the sha later offered for it as phantom. Re-derived independently on the
commits endpoint:
b7af6b52answers 422 while the controls90fcf4f2,fb010227and005409fc1answer 200, and a known-good sha answers 200. ⇒ named, ⛔ not prepared. Theconclusion it supported is unaffected and is ⛔ not retracted.
4 — the cross-reference dangled. 0
it()in this file has ever carried the citedtitle, at the card's sha or today. It now cites the two controls by title, ⛔ not by line —
the shape objectui#7853 established and
fb0102271b(objectui#8478) applied across twelvepublished strings.
check:new-line-citationsreports 0 new citations for this diff.5 — "the absence outlives its own explanation" overstates it. Re-derived on release commit
59f61cfb8by diffing its.changeset/deletions against the*CHANGELOG.mdlines it adds,with a firing positive and a silent negative control on the search corpus: every deleted
changeset that declared a bump had its prose copied into a package CHANGELOG, and only
those with empty frontmatter — this repo's "no release" declaration — vanished without a
trace. The split is clean in both directions.
.changeset/8499-node-slot-registered-arms.mddeclares'@object-ui/types': minor, so itsreason lands in
packages/types/CHANGELOG.md. ⇒ the mechanism is reworded; the operativeargument — nothing in the tree re-reads it, nothing reddens when it stops being true — is kept.
59f61cfb8" does not re-derive. 40 is the number ofCHANGELOG.mdfiles that commit touches, not a hit rate over changesets: it deletes 291 ofthem. The mechanism the card wanted that figure to support is nonetheless true, in the sharper
form above. ⛔ Per AGENTS.md #9 no count is written into the source comment — the comment gives
the recipe and says plainly that nothing re-derives it.
A seventh statement, same class, same block, fixed in place
The
the census fires — controlspreamble said "all four" while the block carries fiveit()s — at the card's sha and today. That is a hard-coded count in a comment nothing checks,which is the objectui#8606 shape that this file's own docblock names. It is removed rather
than corrected to five, per AGENTS.md #9. ⛔ It was not filed separately: same defect class,
same file, mechanical, no new verification surface.
Premise check
✅ Holds. None of the six is a defect in the pin, and item 6 is a hardening gap rather than
a false claim — both confirmed by the matrix above, where the pristine pin still catches Leg B
through its real reading (
no arm is missing from the barrel without a ledger row saying why)and only the permanent controls were blind to it. ⛔ objectui#8499's deferral and
objectui#9067's design question are untouched.
citations resolve exactly at the sha they were bound to (
19f8ab48d3) and none of them landstoday — the file moved under them by up to 19 lines, and one cited paragraph was rewritten
outright by objectui#9405. This card is about citations that did not land; its own are a
live example of why the repo cites by identifier.
Verification
pnpm exec vitest run packages/types/— 190 files / 4346 tests passed, under the sharedverify lock at
56b09101fd.pnpm --filter @object-ui/types run type-check— green (three tsconfigs). The edited file isin the type-check corpus:
tsc -p packages/types/tsconfig.test.json --listFileslists itamong 671 files, with a positive and a negative control on the same listing.
pnpm exec eslinton the changed file — green. No line over 100 chars added (the file'spre-existing count is unchanged).
check-changeset-presence(fired red before the changeset was added,green after — a real positive control),
check-changeset-no-major,check:control-bytes,check:new-line-citations,check:changeset-claims,check:test-path-roots,check:comment-mask-corpus.check-governed-queue-guard --teston both changed paths: NOT GOVERNED, with a controlthat correctly reports
AGENTS.mdas governed.firing vertical-tab fixture and a silent plain fixture.
Labels and the authorship carrier
⛔ No label added or removed,
needs:contract-reviewincluded — labels are the dispatchingseat's alone. The claim comment on objectui#9087 carries no
Clause-②: yesdeclaration, sono carrier is declared here; if the seat judges otherwise it hangs the carrier itself. This PR
stays a draft: ⛔ not flipped ready, ⛔ not enqueued, ⛔ no auto-merge.
Generated by Claude Code