test(types): pair the objectui#9034 census default arm by the source's optin, not the output's type - #9532
Conversation
…ut's type The objectui#9034 census decided which node was the stripped twin of a default's inner type by reading the OUTPUT's `def.type`. On the `.optional().default()` spelling the output is a `ZodOptional` whether or not the strip added a wrap, so the walk paired the spec's own `ZodOptional(T)` against `walk(T)`, no child label matched, and the recursion stopped. Re-measured on the published spec surface: 394 pairs, every one of them a dead stop. Nothing about `../zod/imported-defaults.ts` was wrong, and it is not touched here. What was wrong is the instrument and the integers it wrote into prose. - The `default` arm now branches on `optin` of the node `.removeDefault() returns — the same question `isAlreadyOptional` asks in the walker — so the twin is `after.innerType` when a wrap was added and `after` itself when it was not. - The pairing is extracted so it can be run twice: the superseded rule is kept as `'output-type'` and is the control that FIRES, both on a hand-built corpus whose answers are counted off the source and on the real spec surface. - A new alignment invariant counts pairs whose two sides are different kinds of node. The strip changes a node's kind in exactly one place, so this is 0 under the live rule and 394 under the superseded one. Without it, "not one described node loses its description" was partly true by construction: the walk could not have seen a loss beneath a subtree it never entered. - The docblock's hard-coded populations are deleted rather than corrected. They were lower bounds, not values. The live figures are printed by the census, derived from the spec version installed. - `the spec's own graph still carries every default AND every description` now reads descriptions, and reads every carrier instead of the first 200. The name used to over-claim the body. Also measured, and contrary to objectui#9034's prose: 50 reachable `ZodDefault` nodes carry a description on the node UNDER the default, 32 of which disagree with the outer one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5xpA5q533BgTTNADibEFt
✅ 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
|
Contract reviewHead reviewed: 14 claims measured — counting rule: one claim per independently falsifiable assertion (the 6 the dispatch named + the scope fence + the corpus + its self-test + the incidental #9034 claim + the 4 structural head/base facts). 13 verified TRUE, 1 FALSE. Population bound, proved. The diff's changed-line population is 533 lines (461+/72−), enumerated three independent ways that agree exactly: local Corpus, measured before anything in it
⭐ The corpus self-test fires — I proved it rather than assuming it. Ablating one subpath specifier to an unresolvable name gives 16/17 subpaths, roots 1635→1479, The six dispatched claims, re-derived on my own instrument
Claim 2b — I did not take the causal story on trust. #9496's code change is exactly one line (
The card's own integers reappear the moment #9496 is removed, and Claim 5 — the control genuinely fires. Switching the census to Claim 4 — at the base, Claim 6 — every census-derived assertion is a floor, a total-equals-kept identity, or an emptiness. The only exact integers ( Scope fence — respectedThe diff touches ⭐ Disclosure for the PM seat, from a whole-tree sweep: both card items that live in the fenced file are already gone upstream. The Incidental claim — confirmed. #9034's body states verbatim: "if any key were spelled ⛔ FAIL — 1 item1. The PR body publishes a causal figure that is wrong in both sign and magnitude — on a card whose whole subject is published figures. The body says:
The first half is right (−21 on both columns). The second is not. Measured from the two runs above, #9496's actual effect on reference-equal nodes is −60 on both columns (9665→9605 superseded, 10071→10011 corrected) — fewer, not ~400 more, because a tuple that comes back reference-equal short-circuits the pairing walk before it descends ( ⛔ The committed diff needs no change: the table above this sentence is correct in every row, and all 28 tests are green. The remedy is one sentence of the PR body. I am failing it rather than noting it because #9034's prose is the reason this card exists, and passing the same class of defect in this PR's own prose would reproduce the loop the card is trying to close. The three landing checks① This verdict, at the head named above. ② ③
Not measured
Own errors and disclosures
Implemented-by: claude/issue-9103-optional-default-census-blind-spot Generated by Claude Code |
…dens The `PROVING REMOVAL` note in this file promised that restoring `: undefined` at the `tuple` arm's `const rest` makes "this assertion the one that reddens". Measured, with that single line reverted and nothing else: THREE assertions in this file redden, and the note now names all three. The count is the whole point of the note. A reader who reverts the line, sees three reds and was promised one cannot tell an over-broad pin from a correct one — and the fenced file's own note on the same ablation already named the wider population, so the two disagreed. Comment only; no assertion, name or expression changed. 28 tests still pass. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5xpA5q533BgTTNADibEFt
✅ 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
|
CI red on this head —
|
| field | value |
|---|---|
| name | Test (shard 1/4) |
| conclusion | cancelled |
| started / completed | 22:20:15Z → 22:40:19Z |
| wall | 1204.0 s against ci.yml:752's timeout-minutes: 20 = 1200 s — 4.0 s over |
| sibling shards | 2/4 success 696 s · 3/4 success 980 s · 4/4 success 1000 s |
What the job log says, read rather than inferred. The tail shows the shard's own work finishing: Tasks: 9 successful, 9 total, the last project reporting Test Files 2 passed / Tests 8 passed at 22:40:12Z, immediately followed by Post job cleanup and Cleaning up orphan processes. The job was guillotined 7 s later, during teardown, with every test body it ran already green. ⇒ this is not a test failure being reported as a cancellation. Nothing in the log names this PR's file as failing, because nothing failed.
Why I read it as objectui#9499 rather than as this PR's. #9499 is the timeout-minutes: 20 cancellation class specifically (distinct from objectui#9468, the .vite-oracle-* grep race, which produces failure inside the budget — that one hit PR #9530 earlier tonight and is a different defect). Test (shard 1/4) has landed within 116 s, 72 s, 58 s, 39 s, 22 s and 1 s of this same ceiling on six readings this shift, on PRs that do not touch this file. A fourth-shard job that has been finishing with a 0.1%–9.7% margin all day is a ceiling problem, and today it finally crossed.
What I am not claiming. This PR adds +467/−73 lines to packages/types/src/__tests__/imported-defaults-describe-9034.test.ts, and packages/types tests do run in shard 1 (the log shows zod-subpath-single-module-8598.dist.spec.tsx in this job). ⛔ I cannot separate "the ceiling was always going to be crossed" from "these added tests are the last four seconds" on a single reading, and I will not pretend otherwise. The re-run below is the discriminator, not a formality: if it lands under the ceiling the ambient reading holds; if it cancels again at ~1200 s, the added test time is implicated and that is card #9103's problem to answer, not the ceiling's.
Action. Spending the one allowed re-run on rerun_failed_jobs for run 34903537004. ⛔ No empty commit, ⛔ no close/reopen, ⛔ no test skipped, disabled or quarantined, ⛔ no change to timeout-minutes — raising that ceiling is already ruled out at ci.yml:641, and the fix for #9499 belongs to domain:devx, not to this PR. A second cancellation is real and will be treated as real.
This PR stays in draft and is not enqueued until a head of it is fully green; its round-2 contract review is still running against this same head.
Generated by Claude Code
Contract reviewRound 2, independent seat. Head reviewed: 35 claims measured — 34 TRUE, 1 FALSE. Counting rule: one claim per independently falsifiable assertion — 4 structural, 2 corpus, the 6 repair items the dispatch names (decomposed where the dispatch itself decomposes them: 2 + 6 + 3 + 1 + 7 + 1), and 9 further body figures I could falsify on my own instrument. Population bound, proved. The diff's changed-line population is 546 lines (473+/73−), enumerated three ways that agree exactly: Corpus, measured before anything in it
⭐ The corpus self-test FIRES — proved, not assumed. Ablating one subpath specifier to an unresolvable name: 16/17 subpaths, roots 1635→1479,
The six repairs① The body repair — the correction paragraph. ✅ It quotes the retracted claim and does not re-assert it: "Correction to an earlier revision of this paragraph, which said ② The dev did NOT adopt round 1's numbers — I re-derived the ablation a third time and it holds row for row. Mutation proved to land on disk before any result was read: blob
⇒ #9496 made reference-equal nodes fewer, and the ~400 is a gap it provably does not move. Three instruments now agree; mine shared no state with either. ③ The second commit ⭐ Exactly three assertions redden under the Agreement with the fenced file's own note ✅. ④ The provenance claim the round-1 seat could not settle — I measured it, and it is TRUE. My clone is not shallow and this file's history is not thin: 10,242 commits reachable from the head, 4 touching this file. ⑤ Figures at the new head — all seven reproduce exactly, on a clean tree,
⑥ The scope fence holds, by blob identity. Round 1's other 13 claims — which could the second commit move?Derived, ⛔ not asserted empty:
Further body figures I measured
⛔ FAIL — 1 item1. The body still publishes one figure whose population is unnamed, and it does not reproduce. Line 85:
⭐ And This is the same defect class round 1 failed, in the same body, surviving the repair round — and it sits 32 lines above this PR's own §Round-1 claim that the class was repaired "with each population named", and in the same body as a test file whose new comment says "a figure quoted in prose is a figure taken against some tree nobody can name later". I am failing it rather than noting it for exactly the reason round 1 gave: passing this class in this card's own prose reproduces the loop the card exists to close. ⛔ The committed diff needs no change. The string appears nowhere in the diff or in either commit message — body only. 28/28 and 4354/4354 are green at this head. The remedy is one word: up from 19.
|
Round-2 FAIL item discharged — the
|
| ref | it( |
top-level describe( |
it( + top-level describe( |
expect( |
|---|---|---|---|---|
derived merge-base bbc9dc34e3 |
19 | 4 | 23 | 45 |
origin/main today |
19 | 4 | 23 | 45 |
head 0079b6d88d |
28 | 5 | 33 | 77 |
⇒ the reviewer's reading is exactly right, including its diagnosis: 23 is not a typo for 19, it is 19 tests + 4 top-level suites — a different population — so the clause compared 28 tests against 23 tests-and-suites. Counted the same way the head would be 33, not 28.
Scope of the defect, measured before touching anything. The string is body-only: git grep 'up from 23' over packages/types at the head returns nothing while the control reddens returns a hit in the same file, and the two commit messages on this branch contain up from 0 times against a control (census) hitting 2 in the same 3,065-byte corpus. ⛔ Zero readings here are backed by firing controls, not asserted. The committed tree needs no change and none was made — head.sha is still 0079b6d88d3d580d585bb09c61d07ff55ddf8f59 after the edit, and the PR is still a draft.
What I changed. One clause in the PR body, by PATCH /pulls/9532 sending only body: up from 23 → up from 19, plus the population named inline and the retracted figure kept as a quoted retraction rather than deleted. Readback: up from 19 present, up from 23 absent, footer count unchanged at 2, and the stored body differs from what I sent at exactly one index (13725) by a single \n — GitHub's footer normalisation, with the prefix identical up to it. ⛔ Verified by localising the first differing index, not by comparing lengths, which differ by 1 here and would have been the wrong instrument either way.
Why the seat did this rather than sending it back. The dev for this card was mode:subagent and is finished; a repair round would cost a concurrency slot and a full dispatch for a change that touches no code. I did not treat "one word" as licence to write loosely: the remedy names the population, because fixing the number while leaving the population unnamed would repeat half of the defect in a card whose entire subject is figures published without the population that makes them checkable.
⛔ This comment does not turn the round-2 verdict into a PASS. ① is not satisfied by a seat's assertion that it fixed the finding — the round-2 reviewer has been asked to re-verify this single item at the unchanged head and to state the verdict afresh. Until that returns, this PR is not enqueued.
Also still open on this head: Test (shard 1/4) was cancelled at the 20-minute ceiling; the one allowed re-run is in flight (run_attempt 2, job 104181657533, started 22:45:44Z). Both must clear.
Generated by Claude Code
Contract reviewRound 2, item 1 re-verified at the unmoved head ⛔ Scope, as asked: item 1 only. I did ⛔ not re-run the 35-claim review, and the shard-1 cancellation and the 2 sub-claims measured, the two the request names, plus the 5 further assertions the replacement clause makes — 6 TRUE, 1 defective. Counting rule: one claim per independently falsifiable assertion in the replacement clause. Population bound, proved. The clause publishes four integers ( (a) The figure now reproduces against a nameable tree — ✅ YES
Also verified: "an earlier revision of this line published 23" ✅ (I hold the pre-edit body); "Corrected by the PM seat" ✅; footer population still 2, ⛔ no third added — measured with the wide matcher, since the exact-string matcher reports 1; no model identifier in the body. (b) Did the edit introduce a new claim of its own? —
|
The re-verification's (b) was right about my own clause, and it is now fixedThe round-2 re-verification returned PASS and discharged item 1 — and in the same breath found a defect in the repair I wrote. It was correct, so I fixed it rather than banking the PASS. Re-measured before acting, at four trees, under five counting rules (control:
⇒ my clause said "both figures are Fixed by a second On the reviewer's invitation to overrule its PASS: I don't. Its line is the right one and it drew it in the open — round 1 failed a figure wrong in sign and magnitude, round 2 failed a figure that reproduced at no tree in the file's history, and this was a descriptor ambiguous between a parse selecting the empty set and two innocent ones, with every published integer correct and reproducible. Manufacturing a third FAIL out of the least charitable parse would be the same population error aimed at a sentence instead of a corpus. ⭐ That it flagged the defect anyway, on a PASS, on text a seat wrote, is the reason the finding reached me at all — a reviewer that rounds off in the author's favour returns the same value as one with nothing to say. ① is therefore discharged for this head. Still outstanding before this PR can be enqueued: Generated by Claude Code |
Landing record — PR #9532Read at ① Same-form PASS at the landing head. Round-2 review returned FAIL on one item; the item was repaired in the body (twice — the second time because the re-verification found a defect in my own repair), and the re-verification returned PASS in #9532 (comment) declaring head ② Clause-② carrier pair. ③ Checks at that head — now settled green, and the discriminator came back.
The re-run answered the question the stand-down comment posed and refused to prejudge:
⇒ same commit, same +467 lines of test, 51 s apart. The added tests are not what crossed the line; runner variance of ~50 s against a margin of ~50 s is. That is objectui#9499's reading, now with the cleanest evidence it has: the discriminator was stated in advance, and it came back on the ambient side. Margin distribution for
⛔ Still no ceiling change proposed from here —
Generated by Claude Code |
Enqueued
Generated by Claude Code |
Part of #9103 — the pairing half, which is the whole of this round's declared file surface. Two items the card also names sit in
packages/types/src/zod/imported-defaults.ts; that file is the SOURCE this census measures, the dispatch fences it off, and correcting a census is not a licence to move what it measures. They are listed under Acceptance notes and #9103 stays open for them.The defect — and what it is not
⛔ The repair objectui#9086 shipped is correct. The card says so in its own first line, and nothing here touches
stripImportedDefaults. What was narrow is the instrument and the integers it wrote into prose.The census decided which node was the stripped twin of a default's inner type by reading the output's
def.type. Re-derived from the source, thedefaultarm re-wraps conditionally:So on the
.optional().default()spelling the output is aZodOptionalwhether or not a wrap was added. The old rule could not tell the two apart, paired the spec's ownZodOptional(T)againstwalk(T), matched no child label, and stopped.The repair branches on
optinof the node.removeDefault()returns — the same questionisAlreadyOptionalasks, on the only side that still holds the answer.Premise check — re-measured at the current tree, ⛔ not carried from the card
PR #9496 landed on
imported-defaults.tsat 15:01:35Z today (8700d6d93700828eff4d6a8f145add8a0f1ac412), andgit merge-base --is-ancestorputs it in this branch's base (exit 0; repo is not shallow; a control commit 40 back also answers 0). So every figure below was taken after it, and two of the card's are now stale.Corpus measured before anything in it:
@objectstack/spec17.4.0, 17/17 subpaths, 1635 schema roots;zodresolves tonode_modules/.pnpm/zod@4.4.3/...— ⭐ not thezod@3.25.76copy that also ships av4/directory. The subpath count is read out of the spec's ownexportsmap and asserted non-vacuous, so a probe aimed at the wrong tree fails the corpus self-test rather than returning a plausible number.The republished figures
All taken at
0079b6d88d(this PR's head, clean tree), spec 17.4.0, zod 4.4.3. Re-derived on that head after the second commit rather than carried from the first — the figures are byte-for-byte the ones below, which is a measurement and not the argument that a comment-only commit cannot move them. Re-derive them live with:ZodDefaultnodes.optional().default()-shaped arms.describe().default()inner-described: def.restback to: undefined) in a throwaway worktree and re-running this file, the mutation proved to land on disk (blob42765e66a0→ab718d1714,git diff --numstat= exactly1 1) and the restore proved by blob equality back to42765e66a0plus an emptygit diff HEAD:ZodDefault, corrected / superseded⇒ #9496 made reference-equal nodes fewer, not more: a tuple that comes back reference-equal short-circuits the pairing walk before it descends, which is also why
nodesVisitedfalls by 91. The card's own integers reappear the moment that one line is reverted, and the figures it did not publish as moving — described defaults, and 394/394 — do not move at all.⛔ Correction to an earlier revision of this paragraph, which said "~400 more reference-equal nodes on both sides" and attributed it to #9496. That was wrong in both sign and magnitude, and it named no population — it silently borrowed a number from a different quantity. The ~400 is the corrected-minus-superseded rule gap, which measures 406 with #9496 and 406 without it: provably independent of #9496, so #9496 did not move it. Round-1 contract review caught this and failed the PR for it, correctly — publishing a figure without naming what it counts is this card's entire subject, and passing it here would reproduce the loop the card exists to break.
The pin that fires
⭐ A new alignment invariant: the strip changes a node's kind in exactly one place, so at every other node the two sides must report the same
def.type.misalignedis 0 under the live rule and 394 under the superseded one.Ablation — the census switched on disk to the superseded rule, run, restored, re-run. The mutation was proved to land (anchor
pairRoots(roots, 'inner-optin')1 → 0, blob79b32ee8→f7477d37) and the restore proved by blob equality back to79b32ee8plus an emptygit diff HEAD, not by an exit code. ⭐ No build is involved on this path: vitest transforms the test source and its relative import directly, so there is nodist/that could serve stale bytes.⭐ That green column is the card's thesis made literal: under the blind pairing the two "nothing was lost" assertions stay green, because the walk could not have seen a loss beneath a subtree it never entered. Only the new invariant reddens.
What changed in the one file
defaultarm branches on the source'soptininstead of the output'sdef.type.'output-type'and is the control that fires — on a hand-built corpus whose five answers are counted off the literals, ⛔ never read off a run, and on the real spec surface.removeDefault()returnsdef.innerType, andoptintells the two spellings apart while the output'sdef.typedoes not.the spec's own graph still carries every default AND every descriptionreadhasDefaulton the first 200 carriers and never read a description. It now reads descriptions, across every carrier, with its own non-vacuity floor.it(call in this file — ⛔ none of them sits at the top level:^it(is 0 at every tree, all 19 and all 28 being nested inside adescribe(, measured at the head and at the derived merge-basebbc9dc34e3. ⛔ Not tests-plus-suites: an earlier revision of this line published 23, which is 19 tests + the file’s 4 column-0describe(suites (16describe(tokens in all, so “column-0” is load-bearing there and is ⛔ not the same rule theit(figures use), and comparing it against 28 mixed two populations in one clause. Corrected by the PM seat on the round-2 review’s finding; the committed diff is unchanged.Verification
Exit codes captured as
cmd > file 2>&1; EXIT=$?, ⛔ never through a pipe. Heavy runs went throughscripts/pm/os-verify-lock.shon slotissue-9103-types.pnpm --filter @object-ui/types run type-checkpnpm --filter @object-ui/types run test— 190 files, 4354 tests--reporter=verbose— 28 testscheck:control-bytes·check:test-path-roots·check:new-line-citationscheck:changeset-claims·check:installed-pin-claimscheck:spec-symbols·check:comment-mask-corpuscheck-governed-queue-guard.mjs --teston both pathspnpm --filter '@object-ui/types^...' buildexits 1 withERR_PNPM_RECURSIVE_RUN_NO_SCRIPT— no dependency of this package declares abuildscript. Nothing published moves in this diff, so the changeset carries empty frontmatter, the repo's declared spelling for that.Repository-wide
pnpm lintis CI's run, not this branch's;eslinton the edited file exits 0.Second commit
0079b6d88d(comment only). After round-1 review I re-ran the gates that read prose and the file itself:check:control-bytes0,check:new-line-citations0,check:comment-mask-corpus0,check:changeset-claims0,eslint0, and this file 28/28. No assertion, name or expression changed —git show --statis1 file changed, 12 insertions(+), 1 deletion(-), all inside one comment.Labels and authorship
⛔ This branch wrote no label,
needs:contract-reviewincluded — labels are the PM seat's alone (upstream contract defect objectstack#18181). The claim comment does not carryClause-②: yes, the diff is test-only, and the governed-surface guard answers NOT GOVERNED, so no carrier is claimed here.For whoever renders a verdict, the fixed spelling of the authorship pair: this is a
mode:subagentdev with no session of its own, soImplemented-by:is its branch,claude/issue-9103-optional-default-census-blind-spot. TheReviewed-by:value is the rendering seat's own session and is ⛔ not mine to write.Round-1 contract review
FAIL on one item, and it was a body sentence — the committed diff needed no change. The reviewer re-derived all six dispatched claims on its own instrument and proved the causal story by the same #9496 ablation I have now repeated independently rather than adopting. Both corrections are above and in
0079b6d88d:~400sentence, replaced by the measured table with each population named.PROVING REMOVALnote now says three assertions redden and names all three, measured with: undefinedrestored and nothing else: this one,⭐ every export with nothing to strip comes back REFERENCE-EQUAL, andthe ONLY clean exports that are rebuilt are behind a z.lazy.git log -Sputs it in8700d6d93700828eff4d6a8f145add8a0f1ac412(#9496), and my first commit does not touch the line. It is repaired here because it sits inside this round's declared file surface and is the same defect class as the card — a prose claim about a measurement that the measurement does not support.⭐ The reviewer also disclosed that both card items living in the fenced
imported-defaults.tswere already removed upstream by30443fb46d(#9349). ⛔ I have not acted on it: no scope change, no retitle, and thePart of #9103framing above stands. The closeout is the PM seat's to re-rule.Acceptance notes
Out of this round's file surface, ⛔ not filed, ⛔ not fixed here — every one lives in
packages/types/src/zod/imported-defaults.ts, the source under measurement:lazyarm's docblock and the267claim. The card asks for both. Carrier: this same card, once a round is dispatched with that file in surface — the figures move together with this census, so they should be re-taken from the print this PR adds rather than re-derived independently.267docblock precision. The card measured 257 of 267. This census independently reports 267.optional().default()-shaped arms carrying a description, which is the population that sentence is about — so the number to correct it with is now derivable rather than hand-counted.z.prefaulthas no arm in the walker.childrenOfand the strip's switch both fall through to "nothing inside" fordef.type === 'prefault', which zod 4.4.3 does mint (z.prefaultis a function). Observation only: no reachable spec node uses it on 17.4.0 — the census would have counted it — so there is nothing to reproduce today and no carrier. Noted, not filed.Generated by Claude Code
Generated by Claude Code