Repository navigation
test(types): measure the MIRRORED-but-undeclared direction the zod-mirror-parity ratchet was blind to (objectui#9711) - #9725
Conversation
… ratchet was blind to (objectui#9711) `zod-mirror-parity.test.ts` could not see a key the zod mirror declares and the TypeScript twin does not. Three operators, three different structural reasons: `WithoutIndexSignature` strips the index signature so an undeclared key has nothing to be stripped from and `DeclaredKeys` cannot enumerate it; `UnmirroredDeclaredKeys` is declared-minus-mirrored, the other subtraction; `WiderThanDeclaredKeys` maps over the INTERSECTION, so such a key is outside its domain and leaves the comparison — the exact shape objectui#6058 closed in the opposite direction, unfixed in this one, while rulings cited the ratchet as the reason to mirror a twin. Adds `MirroredUndeclaredKeys` and its seeded `MirroredUndeclared` ledger, reconciled by `assertionMirroredUndeclaredMatchesLedger` with the same shrink-only ratchet the other three carry. All four operators are pinned on ONE synthetic pair, each firing on a DIFFERENT key of it, so every blindness claim is a zero read beside a lit control on the same instrument and the same corpus. The seed's entry count and key total are derived from the ledger's own AST at test time and pinned to the one place a human writes them. This is the INSTRUMENT, not the remediation: declaring a key the new direction reports would enlarge a published accept set, and narrowing a mirror to make it read zero is the same decision pointing the other way. No declaration and no mirror moved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UanLVj6xvbS6puBCewLr8L
|
changeset-claim-re-read
|
✅ 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
|
|
ACCEPT — card objectui#9711, reviewed by the ⛔ Nothing below is taken from the PR body. ① The stop condition held, and the file list proves it without reading a line of code
Two files. No ② The card's thesis, verified at its own addressThe PR names
⭐ The mirror's own comment says the key was 「Missing in previous TS scan」. The gap was noticed by a human at authoring time, written into a code comment — and then measured by nothing until this direction existed. That is precisely the defect objectui#9711 was filed about, and it was sitting in the tree annotated. ③ The control design is better than the card asked for⭐ One synthetic pair on which all four operators fire, each on a DIFFERENT key — The naive spelling is pinned beside the working one: Non-vacuity on the live tree: 153 of 161 registered pairs read EMPTY, and the existing ④ One review point — a true claim stated as an inference where it is in fact guardedAnswering
⭐ It is nevertheless true and certified, for a reason the PR leaves implicit: all five ledgers are sized by the same AST reader at test time (that is why Accepted as correct, recorded as under-stated. ⛔ Not sent back: the claim is guarded, and sending a PR back to rewrite a true sentence's justification would be a worse use of a queue slot than saying so here. ⑤ Declared delta, and it is the right callThe diff adds one ⑥ Gates — job conclusions, ⛔ not the aggregateAll 36 check runs on head The changeset carries empty frontmatter — verified — so no package releases and it reaches no CHANGELOG. It publishes no figure that can rot: it names the mechanism, ⛔ not a count. The honest end state, which is the deliverableThe new direction catches 8 entries / 102 keys it does ⛔ not fix, listed by name and seeded as a FLOOR that can only shrink. Two classes are read out rather than ruled on — spec-owned inflow ( Every remedy — declare the key, or narrow the mirror — enlarges or narrows a published accept set and belongs to its own card at tier. Implemented-by: VERDICT: ACCEPT. Turning ready and enqueueing; card objectui#9711 closes on merge. Generated by Claude Code |
|
| ledger | merge-base 4cf57b6da |
this head | source bytes | sha256 (first 16) |
|---|---|---|---|---|
KnownDrift |
46 entries / 85 keys | 46 / 85 | 29341 both | 70a1c3565dd22db8 both |
UnmirroredDeclared |
14 entries / 86 keys | 14 / 86 | 30045 both | cf8549e258c97708 both |
RuntimeOnlyDeclared |
3 entries / 7 keys | 3 / 7 | 13537 both | 06518e7111e2292e both |
WiderThanDeclared |
19 entries / 29 keys | 19 / 29 | 12425 both | 84b93eca57bb0969 both |
WIDER_ARMS |
29 rows | 29 rows | — | — |
MirroredUndeclared |
ABSENT | 8 entries / 102 keys | 8777 | 9ce9f638f2bca84d |
⇒ every pre-existing ledger is byte-identical, not merely equal in count. ⭐ Non-vacuity for that row of zeros, on the same instrument and the same corpus: the fifth row is where the same reader returns a difference (ABSENT to 8 / 102), so the reader is discriminating and the four identities are a measurement rather than a reader that cannot see.
Cross-checked against the file's own pinned spellings on this head, which its green suite re-derives through ledgerEntryMembers: **46 entries** in KnownDrift, **85 keys** across them, **14 entries** in UnmirroredDeclared, **86 keys** across them, **86 keys** is what this ledger records today. Two independent readers, one answer.
⭐ And the diff itself says the same thing mechanically: 636 insertions, 1 deletion, and the one deleted line is type LedgerName = … — reflowed to carry one more union arm. No pre-existing ledger line was removed or edited.
The 10, one at a time
Still true — 8. Each names a ledger or map this change does not write to, and the byte-identity above is the derivation, not the argument:
5928-classname-style-props-rename.md— theEXCLUSIONSentry keyed toClassNameStylePropsSchema.EXCLUSIONSuntouched; the token reads 1 on both trees.6150-undeclared-but-consumed-keys.md— theTreeViewSchemaslice, andRuntimeOnlyDeclaredbeing a SUBSET ofUnmirroredDeclaredwith their union equal toUnmirroredDeclared. Both ledgers byte-identical, and the file's own leg asserting that containment is green on this head.6175-column-state-persistence.md—onColumnReorderstays inRuntimeOnlyDeclared. Token reads 5 on both trees; ledger byte-identical.6639-objectgrid-title-mirrored.md— the seeded121decomposition onUnmirroredDeclared. That ledger is byte-identical, and the decomposition is anchored at named revisions in the file, so nothing landing later can move it.7344-handler-string-any-mirrors.md— three runtime-slot drift rows inKnownDrift. Byte-identical.7654-floating-chatbot-trigger-icon-tombstone.md—floatingConfigundercomplex.zod.ts#ChatbotSchemainUnmirroredDeclared. Token reads 5 on both trees.⚠️ Checked specifically against the NEW ledger too:ChatbotSchemais not one of its 8 entries, so nothing about that pair moved in any direction.7804-tree-view-handler-slot.md— the containment relation, same reading as6150.8572-chatbot-body-retired.md— thebodycollision row inKnownDrift. Byte-identical.
ROTTED before this branch — 2. ⛔ Reported, ⛔ not repaired, and ⛔ not silently overwritten:
8338-retire-toast-action.mdpublishesKnownDrift42 / 64to41 / 63andWiderThanDeclared23 / 36 / 47split6 / 30 / 0 / 11to22 / 35 / 45split6 / 29 / 0 / 10. Re-derived on the merge-base: 46 / 85 and 19 / 29 with 29 arm rows. Already divergent onorigin/main, with this branch's ledgers byte-identical to it.object-view-unmirrored-keys-7779.mdpublishesUnmirroredDeclared14 entries / 96 keysto14 / 87. Re-derived on the merge-base: 14 / 86. Same conclusion, off by one key.
⇒ both were true when written — a reading at the card that produced them — and were falsified afterwards by cards that are not this one. Under the present-tense reading they are ROTTED, which is exactly the class objectui#9713 (in flight as PR objectui#9723) owns. ⛔ Not repaired here: only a claim this diff falsifies would be this PR's to correct, and this diff falsifies none.
.changeset/7322-object-kanban-component-props.md and .changeset/8802-8257-8008-kanban-gantt-family-retirement.md. Neither is among the 10, and this PR writes to no .changeset/ file other than the one it adds.
Third case, named rather than folded into either
⛔ None of the 10 is in it, stated so the absence is a reading and not an omission: no pending body here states a figure that is still true and would go false only once an unmerged PR lands. This change adds a ledger and moves none, so it cannot put any of them in that state either.
Generated by Claude Code
Fixes #9711
Clause-②: no
The
zod-mirror-parityratchet could not see a key the zod mirror declares and the TypeScript twin does not. This PR delivers the instrument for that direction. It delivers no remediation, and that is deliberate: declaring any key the new direction reports, on a published TypeScript face, ENLARGES AN ACCEPT SET — a different card, at-tier.Why all three prior operators were blind, each for a different reason
Re-read at the head this branch was cut from, not inherited:
WithoutIndexSignaturestripsBaseSchema's string index signature, so a key the declaration never states has nothing to be stripped FROM —DeclaredKeyscannot enumerate it.UnmirroredDeclaredKeysisExclude< DeclaredKeys, MirroredKeys >: declared-minus-mirrored, the other subtraction by construction.WiderThanDeclaredKeysmaps overMirroredKeys & DeclaredKeys— the INTERSECTION — so such a key is outside its domain and LEAVES THE COMPARISON, the same shape objectui#6058 measured in the opposite direction.What landed
MirroredUndeclaredKeysplus the seededMirroredUndeclaredledger, reconciled byassertionMirroredUndeclaredMatchesLedger(by pair) andassertionMirroredUndeclaredRecordsEveryKey(by key), with the same shrink-only ratchet the other three ledgers carry — growth on a clean pair and growth on a ledgered pair both redden, and a key that leaves the measurement reddens as stale.LedgerNamegains one union arm, so the new ledger is sized by the SAME AST reader as the other four rather than by a second definition of the word "key".The lit-control discipline, at operator granularity
⭐ ONE synthetic pair on which ALL FOUR operators fire, each on a different key, with the declaration carrying the real
[key: string]: any:sizestrayMirroredUndeclaredKeysonlymissingUnmirroredDeclaredKeysonlywideWiderThanDeclaredKeysonlynarrowNarrowerThanDeclaredonly⇒ every "operator X is blind to
stray" claim is a zero read beside a lit control on the same instrument and the same corpus, not a zero read alone. Resolved through the TypeScript compiler API before being written down, so the pins are a measurement rather than a prediction.The naive spelling is pinned beside the working one:
Exclude< MirroredKeys, Extract< keyof D, string > >readsneveron that pair (the index signature absorbs it) and readsstrayon the same pair with the index signature removed. So theneveris the defect reproduced, not an operator that cannot report anything.What the new direction catches on today's tree, BY NAME
Derived with the compiler API over
tsconfig.test.json, one binding per registered pair, walking each union's string-literal members — ⛔ never read off a compile error, for the truncation reason this file's own header records.8 entries carrying 102 keys, out of the 161 registered pairs. ⛔ Read those two figures off the census, not off this sentence: the ledger docstring is the one place a human writes them and the test
the fourth direction is enumerated and sized at test timederives both from the ledger's own AST.|
app.zod.ts#AppComponentSchema| SPEC-DERIVED | 20 |contextSelectors_lock_lockReason_lockSource_provenance_packageId_packageVersion_lockDocsUrlversionisDefault_unpublishedhomePageIdobjectsapissharingembedmobileNavigationdefaultAgentariaprotection||
complex.zod.ts#DashboardComponentSchema| SPEC-DERIVED | 11 |_lock_lockReason_lockSource_provenance_packageId_packageVersion_lockDocsUrlariaprotectionrefreshIntervalperformance||
complex.zod.ts#DashboardConfigSchema| LOCAL | 1 |aria||
form.zod.ts#InputShorthandSchema| LOCAL | 32 |labelerrordescriptionidnamepatternplaceholderclassNamestyledatabindbodychildrenvisiblevisibleWhenvisibleOnhiddenhiddenOndisableddisabledOntestIddefaultValueariaLabelrequiredvalueminmaxsteponChangewrapperClassreadOnlymaxLength||
form.zod.ts#UiCalendarSchema| LOCAL | 26 |labeldescriptionidnameplaceholderclassNamestyledatabindbodychildrenvisiblevisibleWhenvisibleOnhiddenhiddenOndisableddisabledOntestIddefaultValueariaLabelvalueonChangemodeminDatemaxDate||
layout.zod.ts#PageNodeSchema| SPEC-DERIVED | 10 |source_lock_lockReason_lockSource_provenance_packageId_packageVersion_lockDocsUrlinterfaceConfigrequires||
objectql.zod.ts#ObjectGridSchema| SPEC-DERIVED | 1 |operators||
views.zod.ts#DetailViewFieldSchema| LOCAL | 1 |dueLike|Non-vacuity of that reading: 153 of 161 pairs read EMPTY, so the walker is discriminating rather than uniformly silent. Lit control on the same instrument and the same corpus: the existing
UnmirroredOfdirection read 14 pairs / 93 keys in the same pass.Two classes, stated as a reading and not as a rule the instrument applies:
.extend(SpecXFields.shape), so the spec surface flows in by reference while the hand-written interface restates only the subset the renderers read.OmitCOLLAPSE — the declaration isOmit< Base, K >over an interface carrying the index signature, soExclude< keyof Base, K >resolves throughstringand every member collapses into the signature. That face has never declared the keys its docblock describes.packages/types/src/form.tsfor the calendar twin and pinned bycontent-channel-family-d-9256.test.ts— the new operator rediscovers it independently, which is evidence the operator reads the published face and not a convenient subset.⭐
objectql.zod.ts#ObjectGridSchema.operatorsis this card's thesis in one key: the mirror carries a comment saying the key was missing from an earlier TypeScript scan. The gap was noticed at authoring time, written into a comment, and then measured by nothing until this direction existed.Ablation — both legs, mutation proven on disk BEFORE any result was read
Both legs ran from the committed implementation, under
trap RESTORE_FN EXIT INT TERMwithgit checkout HEAD -- ABSOLUTE_PATH.Leg A — GROWTH: a fresh mirrored-but-undeclared key on a CLEAN pair. Added
ablationProbe9711: z.string().optional()tooverlay.zod.ts#TooltipSchema.⇒ the guard fires, names the pair and the key, and reports exactly those two — no other assertion moved, so the output is precise and not a blanket failure.
Leg B — the operator is what catches it. Same growth key, plus
DeclaredKeys< D >swapped for the naiveExtract< keyof D, string >in the operator. Two files mutated, both proven on disk (mirror blobe70bde56to86a1e2b3, +129 bytes; guard blobee6b2bf2to97f42190, +9 bytes;DeclaredKeysspelling 1 to 0, naive spelling 0 to 1).⇒ under the naive spelling the growth key and its pair are not named — a measured absence, because the very same run is red and IS naming seven other pairs plus the synthetic pin. The zero has its lit control inside the same output.
⭐ Seven of the eight seeded pairs go stale under the naive spelling, not eight. The eighth is
views.zod.ts#DetailViewFieldSchema, whose declaration does not extendBaseSchemaand therefore carries no index signature for the naive spelling to be absorbed by — so it still readsdueLike. The mechanism is confirmed at exactly the granularity claimed: the blindness is the index signature, nothing else.⛔ No ablation artefact is left in the tree. Both legs restored to blob equality with the HEAD blob and to an empty
git diff HEAD, proven by observing state — never by reading a cleanup step's exit code.Gates — exit code captured to a variable BEFORE any pipe, in every case
pnpm --filter @object-ui/types type-checktsc -p tsconfig.test.jsonincludedpnpm --filter @object-ui/types testTest Files 202 passed (202)·Tests 4703 passed (4703)node scripts/check-changeset-presence.mjspnpm check:control-bytescheck-control-bytes: OK (scanned 7818 tracked text file(s); skipped 85 binary)pnpm check:new-line-citationsVERDICT new-cross-file-line-citations: 0 new citation(s)pnpm check:changeset-claimsnode scripts/check-governed-queue-guard.mjs --test …NOT GOVERNED — 2 path(s) checked against 5 governed surface(s); none matchedAdditionally derived from the changed paths and run:
check:pending-changeset-literals0,check:test-path-roots0,check:unreferenced-sources0.The heavy runs went through the shared verify lock; each printed
VERDICT command-exit 0.check:changeset-claimsreading. It reports 10 pending changesets whose bodies namezod-mirror-parity.test.tsand asks the editing seat to re-read them. Read: this PR adds a NEW ledger and moves no entry and no key inKnownDrift,UnmirroredDeclared,RuntimeOnlyDeclaredorWiderThanDeclared, which is what every one of those paragraphs describes. ⇒ none of them is falsified. Report-only, exit 0.Lint, declared narrowing. This repo's
lintisturbo run lint— per-packageeslint ., not one root run. The only package this diff touches is@object-ui/types, and its complete package lint ran: exit 0, 0 errors. So there is no narrowing at the package level.eslint.config.jsconfigures noproject/projectService, so type-aware linting is off and this diff cannot move the verdict on any file it does not touch. Whole-repoeslint . --no-inline-configbelongs to CI.@typescript-eslint/no-explicit-anywarning (base file: 1 warning, 0 errors; this file: 2 warnings, 0 errors). Theanyis[key: string]: anyon the synthetic declaration and it is load-bearing — it reproducesBaseSchema's exact index signature, which is the whole subject of the pin. Withunknownthere,NarrowerThanDeclaredwould reportstrayand the four-way separation would be destroyed. It carries an inline disable that the package lint honours and that the repo-wide--no-inline-configrun ignores by design.Scope
⛔ No declaration moved. ⛔ No mirror moved. ⛔ No ledger entry outside the new one moved. One test file, plus an empty-frontmatter changeset:
packages/types/package.jsonpublishesdistonly andtsconfig.jsonexcludes*.test.tsfrom the build, so no published byte moves.File surface held to:
packages/types/src/__tests__/zod-mirror-parity.test.tsand.changeset/9711-zod-mirror-parity-mirrored-undeclared.md. No file on any in-flight PR of this lane was reached.The honest end state
The new direction catches keys this card may not fix. That is the stated correct outcome: they are listed above by name, seeded as a FLOOR that can only shrink, and each remedy — declaring the key, or narrowing the mirror — is a published-accept-set decision belonging to its own card and its own review.
Generated by Claude Code