Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

test(types): measure the MIRRORED-but-undeclared direction the zod-mirror-parity ratchet was blind to (objectui#9711) - #9725

Merged
os-sales merged 1 commit into
mainfrom
claude/issue-9711-zod-mirror-parity-undeclared-direction
Sep 17, 2026
Merged

os-sales merged 1 commit into
mainfrom
claude/issue-9711-zod-mirror-parity-undeclared-direction

Conversation

@os-sales

Copy link
Copy Markdown
Collaborator

Fixes #9711

Clause-②: no

The zod-mirror-parity ratchet 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:

  • WithoutIndexSignature strips BaseSchema's string index signature, so a key the declaration never states has nothing to be stripped FROM — DeclaredKeys cannot enumerate it.
  • UnmirroredDeclaredKeys is Exclude< DeclaredKeys, MirroredKeys >: declared-minus-mirrored, the other subtraction by construction.
  • WiderThanDeclaredKeys maps over MirroredKeys & 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

MirroredUndeclaredKeys plus the seeded MirroredUndeclared ledger, reconciled by assertionMirroredUndeclaredMatchesLedger (by pair) and assertionMirroredUndeclaredRecordsEveryKey (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.

LedgerName gains 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:

key on which face which operator reports it
size both, in agreement none — the control against a matcher that catches everything
stray mirror only MirroredUndeclaredKeys only
missing declaration only UnmirroredDeclaredKeys only
wide both, mirror accepts more WiderThanDeclaredKeys only
narrow both, mirror accepts less NarrowerThanDeclared only

⇒ 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 > > reads never on that pair (the index signature absorbs it) and reads stray on the same pair with the index signature removed. So the never is 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 time derives both from the ledger's own AST.

| app.zod.ts#AppComponentSchema | SPEC-DERIVED | 20 | contextSelectors _lock _lockReason _lockSource _provenance _packageId _packageVersion _lockDocsUrl version isDefault _unpublished homePageId objects apis sharing embed mobileNavigation defaultAgent aria protection |
| complex.zod.ts#DashboardComponentSchema | SPEC-DERIVED | 11 | _lock _lockReason _lockSource _provenance _packageId _packageVersion _lockDocsUrl aria protection refreshInterval performance |
| complex.zod.ts#DashboardConfigSchema | LOCAL | 1 | aria |
| form.zod.ts#InputShorthandSchema | LOCAL | 32 | label error description id name pattern placeholder className style data bind body children visible visibleWhen visibleOn hidden hiddenOn disabled disabledOn testId defaultValue ariaLabel required value min max step onChange wrapperClass readOnly maxLength |
| form.zod.ts#UiCalendarSchema | LOCAL | 26 | label description id name placeholder className style data bind body children visible visibleWhen visibleOn hidden hiddenOn disabled disabledOn testId defaultValue ariaLabel value onChange mode minDate maxDate |
| layout.zod.ts#PageNodeSchema | SPEC-DERIVED | 10 | source _lock _lockReason _lockSource _provenance _packageId _packageVersion _lockDocsUrl interfaceConfig requires |
| 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 UnmirroredOf direction read 14 pairs / 93 keys in the same pass.

Two classes, stated as a reading and not as a rule the instrument applies:

  • SPEC-OWNED INFLOW — the mirror is built .extend(SpecXFields.shape), so the spec surface flows in by reference while the hand-written interface restates only the subset the renderers read.
  • Omit COLLAPSE — the declaration is Omit< Base, K > over an interface carrying the index signature, so Exclude< keyof Base, K > resolves through string and every member collapses into the signature. That face has never declared the keys its docblock describes. ⚠️ This is already documented in packages/types/src/form.ts for the calendar twin and pinned by content-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.operators is 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 TERM with git checkout HEAD -- ABSOLUTE_PATH.

Leg A — GROWTH: a fresh mirrored-but-undeclared key on a CLEAN pair. Added ablationProbe9711: z.string().optional() to overlay.zod.ts#TooltipSchema.

BEFORE: blob=e70bde566c3e5172a3723c50d59b6febc8f93387 bytes=31888 anchor_count=1 marker_count=0
AFTER : blob=86a1e2b3551271898cd477ec24e578ef8769ee9d bytes=32017 marker_count=1
BYTE_DELTA=129   (blob differs from the HEAD blob; anchor and marker counts moved as predicted)
MUTATION PROVEN ON DISK
ABLATION_A_TSC_EXIT=2
  error TS2322: Type '"overlay.zod.ts#TooltipSchema"' is not assignable to type 'never'.
  error TS2322: Type '"ablationProbe9711"' is not assignable to type 'never'.
RESTORED: blob=e70bde566c3e5172a3723c50d59b6febc8f93387   GIT_DIFF_HEAD_LINES=0

⇒ 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 naive Extract< keyof D, string > in the operator. Two files mutated, both proven on disk (mirror blob e70bde56 to 86a1e2b3, +129 bytes; guard blob ee6b2bf2 to 97f42190, +9 bytes; DeclaredKeys spelling 1 to 0, naive spelling 0 to 1).

ABLATION_B_TSC_EXIT=2   ABLATION_B_ERROR_COUNT=3
GROWTH_KEY_NAMED=0   GROWTH_PAIR_NAMED=0
  error TS2344: Type 'false' does not satisfy the constraint 'true'.            (the synthetic recognition pin)
  error TS2322: Type '"app.zod.ts#AppComponentSchema" | ... | "objectql.zod.ts#ObjectGridSchema"' is not assignable to type 'never'.
  error TS2322: Type 'MirroredUndeclaredLedgerKeyDrift' is not assignable to type 'never'.
RESTORED mirror blob=e70bde56…  guard blob=ee6b2bf2…   GIT_DIFF_HEAD_LINES=0

⇒ 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 extend BaseSchema and therefore carries no index signature for the naive spelling to be absorbed by — so it still reads dueLike. 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

gate exit verdict line
pnpm --filter @object-ui/types type-check 0 all three legs, tsc -p tsconfig.test.json included
pnpm --filter @object-ui/types test 0 Test Files 202 passed (202) · Tests 4703 passed (4703)
node scripts/check-changeset-presence.mjs 0 every changeset has an EMPTY frontmatter — declared as releasing nothing
pnpm check:control-bytes 0 check-control-bytes: OK (scanned 7818 tracked text file(s); skipped 85 binary)
pnpm check:new-line-citations 0 VERDICT new-cross-file-line-citations: 0 new citation(s)
pnpm check:changeset-claims 0 report-only; see the reading below
node scripts/check-governed-queue-guard.mjs --test … 0 NOT GOVERNED — 2 path(s) checked against 5 governed surface(s); none matched

Additionally derived from the changed paths and run: check:pending-changeset-literals 0, check:test-path-roots 0, check:unreferenced-sources 0.

The heavy runs went through the shared verify lock; each printed VERDICT command-exit 0.

check:changeset-claims reading. It reports 10 pending changesets whose bodies name zod-mirror-parity.test.ts and asks the editing seat to re-read them. Read: this PR adds a NEW ledger and moves no entry and no key in KnownDrift, UnmirroredDeclared, RuntimeOnlyDeclared or WiderThanDeclared, which is what every one of those paragraphs describes. ⇒ none of them is falsified. Report-only, exit 0.

Lint, declared narrowing. This repo's lint is turbo run lint — per-package eslint ., 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.js configures no project / projectService, so type-aware linting is off and this diff cannot move the verdict on any file it does not touch. Whole-repo eslint . --no-inline-config belongs to CI.

⚠️ Declared, because it is a real delta: the diff adds one @typescript-eslint/no-explicit-any warning (base file: 1 warning, 0 errors; this file: 2 warnings, 0 errors). The any is [key: string]: any on the synthetic declaration and it is load-bearing — it reproduces BaseSchema's exact index signature, which is the whole subject of the pin. With unknown there, NarrowerThanDeclared would report stray and the four-way separation would be destroyed. It carries an inline disable that the package lint honours and that the repo-wide --no-inline-config run 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.json publishes dist only and tsconfig.json excludes *.test.ts from the build, so no published byte moves.

File surface held to: packages/types/src/__tests__/zod-mirror-parity.test.ts and .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

… 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
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 10 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/5928-classname-style-props-rename.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    Where the non-pair is recorded now. zod-mirror-parity.test.ts keys its existing EXCLUSIONS entry — the mechanism that accounts for every exported const with no TypeScript declaration to mirror, each with its stated reason — to ClassNameStylePropsSchema. Named for its own two keys, the const leaves no like-named declaration for a name-derived pairing to reach for.

.changeset/6150-undeclared-but-consumed-keys.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    ⭐ AMENDED, and the amendment ships in this same release. objectui#7804's TreeViewSchema slice gave the key a zod arm after all — a NAMED REFUSAL (handlerKeyRefusal(key, 'runtime-slot', label)), never a shape — because "no mirror entry" is not neutral under BaseSchema.passthrough(): it meant an authored { "type": "tree-view", "onNodeClick": { "action": "toast" } } parsed GREEN, survived the parse, and reached a call site that expects a function. ⇒ the three clauses this bullet used to carry are no longer true of the code shipping beside it. The key is now a MEMBER of TreeViewSchema.shape and an authored value is refused BY NAME at path onNodeClick; it has LEFT zod-mirror-parity.test.ts's RuntimeOnlyDeclared for that file's KnownDrift; and it is no longer "the first pair to sit there without also sitting in UnmirroredDeclared" — draining it emptied that difference, so RuntimeOnlyDeclared is now a SUBSET of UnmirroredDeclared and the union of the two equals UnmirroredDeclared itself. ⛔ objectui#6152's ruling is untouched by any of this: what the key still does not have, and never will, is a z.function() shape — no serialized document could satisfy one.

.changeset/6175-column-state-persistence.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    Nothing is retired. Both spellings remain declared on DataTableSchema; onColumnReorder stays declared and stays unwired, exactly as the RuntimeOnlyDeclared ledger in zod-mirror-parity.test.ts records it. Which of the two survives is a declared-surface ruling that stays open and is deliberately not settled here.

.changeset/6639-objectgrid-title-mirrored.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    The gain is the typed refusal: the mirror's .passthrough() base was already admitting any title unexamined, and it now enforces the declared string. zod-mirror-parity.test.ts's UnmirroredDeclared ledger records the key as worked off — the ledger's first shrink by repair (97 + 1 mirrored + 23 reclassified is what the seeded "121" now means).

.changeset/7344-handler-string-any-mirrors.md

.changeset/7654-floating-chatbot-trigger-icon-tombstone.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    Every other tombstone in this package pairs ?: never with a retirementTombstone() refusal on the Zod twin. There is no twin here to carry one: FloatingChatbotConfig has no Zod mirror at all, and floatingConfig sits in the UnmirroredDeclared ledger (zod-mirror-parity.test.ts, complex.zod.ts#ChatbotSchema). BaseSchema is .passthrough(), so the whole floatingConfig object rides through unvalidated — before this change and after it. Minting a mirror to host a refusal would be the declared-but-UNMIRRORED axis (objectui#6152), a different defect: a key can be mirrored and inert, or unmirrored and live, and fixing one says nothing about the other. This change does not widen into it.

.changeset/7804-tree-view-handler-slot.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    The pair moves from zod-mirror-parity.test.ts's RuntimeOnlyDeclared to its KnownDrift, which empties the former of the one entry the latter did not also hold — so the two unmirrored ledgers are now in a containment relation, and the cross-ledger figure that recorded their difference states the containment instead.

.changeset/8338-retire-toast-action.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    The parity ledgers drain with it, every figure re-derived by zod-mirror-parity.test.ts's own AST and mirror instruments rather than stepped by hand: KnownDrift 42 entries / 64 keys → 41 / 63 (the entry's whole content, so the entry went too — the ledger's first loss by RETIRING a key rather than by moving either face toward the other), and WiderThanDeclared 23 / 36 / 47 arms, split 6 / 30 / 0 / 11 → 22 / 35 / 45, split 6 / 29 / 0 / 10. The pair itself stays registered, so EXPECTED_MIRROR_PAIRS does not move.

.changeset/8572-chatbot-body-retired.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    Why this key and not another. It was the ONE place in this vocabulary where body did not mean "what goes inside this component": zod-mirror-parity.test.ts carried the pair under KnownDrift as "two different meanings of one key", and the same collision was the whole reason chatbot was the single arm of the component union whose output was not assignable to SchemaNode. Both ledger rows move with this change, and the two pins that recorded the old state are INVERTED rather than deleted (see below).

.changeset/object-view-unmirrored-keys-7779.md

  • names zod-mirror-parity.test.ts → packages/types/src/__tests__/zod-mirror-parity.test.ts — edited by this change

    Who is NOT affected: every correctly typed document, and every document that never wrote these keys — absent stays valid on all nine. No renderer changed. The parity ledger (zod-mirror-parity.test.ts) records the move: UnmirroredDeclared 14 entries / 96 keys to 14 / 87, the ObjectViewSchema entry re-derived into the SPEC-DERIVED half because the mirror now references the spec in code.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a claim that was born false (a changeset this change adds is excluded by construction), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 95f7e4c3d (merge-base with origin/main): 1 file(s) changed outside .changeset/, read against 1129 pending declaration(s) that publish a body (1640 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3049.1 KB 3104.5 KB
Main entry chunk (gzip) 145.7 KB 350 KB
Entry file index-DX51GbAY.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.69KB 6.21KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 545.93KB 130.69KB
core (index.js) 8.94KB 3.59KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 215.98KB 59.97KB
fields (index.js) 249.27KB 62.92KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.22KB 2.26KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 32.15KB 10.49KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.83KB 10.95KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 14.81KB 3.63KB
plugin-calendar (index.js) 49.92KB 14.22KB
plugin-charts (index.js) 71.49KB 19.99KB
plugin-chatbot (index.js) 195.34KB 46.51KB
plugin-dashboard (index.js) 131.44KB 34.65KB
plugin-designer (index.js) 215.94KB 44.33KB
plugin-detail (index.js) 253.29KB 65.88KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 136.71KB 34.16KB
plugin-gantt (index.js) 167.62KB 41.26KB
plugin-grid (index.js) 212.64KB 57.91KB
plugin-kanban (index.js) 46.41KB 14.49KB
plugin-list (index.js) 112.73KB 27.69KB
plugin-map (index.js) 21.48KB 6.99KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.41KB 11.93KB
plugin-timeline (index.js) 30.07KB 8.74KB
plugin-tree (index.js) 10.58KB 3.72KB
plugin-view (index.js) 85.04KB 21.01KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 104.82KB 34.67KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.66KB 2.50KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 14.82KB 4.99KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 14.04KB 5.36KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Collaborator Author

ACCEPT — card objectui#9711, reviewed by the domain:spec @ objectui execution seat at 2026-09-17T20:25Z. Enqueueing.

⛔ Nothing below is taken from the PR body.

① The stop condition held, and the file list proves it without reading a line of code

file status delta
packages/types/src/__tests__/zod-mirror-parity.test.ts modified +636 −1
.changeset/9711-zod-mirror-parity-mirrored-undeclared.md added +12 −0

Two files. No .ts declaration face, no .zod.ts mirror, in the diff at all. ⇒ Clause-②: no is not an assertion here, it is a consequence: nothing this PR touches can widen or narrow an accept set. The dispatch's stop condition — ⛔ declare nothing the new direction reports — is satisfied structurally, which is the strongest form it could take.

② The card's thesis, verified at its own address

The PR names objectql.zod.ts#ObjectGridSchema.operators as the card in one key. Re-read on origin/main:

  • packages/types/src/zod/objectql.zod.ts:283 — operators: z.record(z.string(), z.any()).optional(), // Missing in previous TS scan but common
  • the TS ObjectGridSchema interface: operators is absent
  • [LIT CTRL] columns, a key on both faces: 6 occurrences inside the TS interface, 31 in the mirror
  • [ABSENT CTRL] zzqNoSuchKey inside the same interface: 0

⭐ 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 — size (agreed, reported by none), stray (mirror only), missing (declaration only), wide and narrow (both faces, opposite directions). That makes every 「operator X is blind to stray」 a zero read beside a lit control on the same instrument and corpus, ⛔ never a zero read alone. The synthetic declaration carries the real [key: string]: any, so it reproduces BaseSchema's index signature rather than approximating it.

The naive spelling is pinned beside the working one: Exclude< MirroredKeys, Extract< keyof D, string > > reads never on that pair and reads stray once the index signature is removed ⇒ the never is the defect reproduced, not an operator that can never report.

Non-vacuity on the live tree: 153 of 161 registered pairs read EMPTY, and the existing UnmirroredOf direction read 14 pairs / 93 keys in the same pass as a lit control. ⇒ the 8 entries / 102 keys it does report are a reading.

④ One review point — a true claim stated as an inference where it is in fact guarded

Answering check:changeset-claims (10 pending entries naming this file), the PR says: 「this PR adds a NEW ledger and moves no entry and no key in KnownDrift, UnmirroredDeclared, RuntimeOnlyDeclared or WiderThanDeclared … ⇒ none of them is falsified」.

⚠️ As written that is reasoning about what the change should have touched, which is the form I asked this implementer ⛔ not to use — several of those ten publish ledger FIGURES verbatim (KnownDrift 41/63, UnmirroredDeclared 14/87, WiderThanDeclared 22/35/45 split 6/29/0/10).

⭐ 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 LedgerName gains exactly one union arm), so any movement in the four existing ones reddens assertions in this very suite — and the suite is green across all 36 checks. ⇒ the green run is the measurement; the answer's warrant is the pin, ⛔ not the author's intent.

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 call

The diff adds one @typescript-eslint/no-explicit-any warning (0 errors). The any is [key: string]: any on the synthetic declaration and is load-bearing: with unknown there, NarrowerThanDeclared would report stray and the four-way separation of ④ would collapse. Disclosed rather than buried, with the mechanism named.

⑥ Gates — job conclusions, ⛔ not the aggregate

All 36 check runs on head 2485a824d2: 0 pending, 0 non-green, Governed Surface Queue Guard among them at completed: success.

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 deliverable

The 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 (.extend(SpecXFields.shape) brings the spec surface in by reference while the hand-written interface restates only what renderers read) and Omit collapse (Exclude< keyof Base, K > resolving through string when Base carries the index signature). ⭐ The second was already documented for the calendar twin in packages/types/src/form.ts and pinned elsewhere — the new operator rediscovered it independently, which is evidence it reads the published face and not a convenient subset.

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: claude/issue-9711-zod-mirror-parity-undeclared-direction
Reviewed-by: session_01UanLVj6xvbS6puBCewLr8L

VERDICT: ACCEPT. Turning ready and enqueueing; card objectui#9711 closes on merge.


Generated by Claude Code

@os-sales
os-sales marked this pull request as ready for review September 17, 2026 20:25
@os-sales
os-sales added this pull request to the merge queue Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

changeset-claim-re-read — answered by RE-DERIVING each figure on this head, not by reasoning about the diff

⛔ None of the 10 is falsified by this change. 8 are still true; 2 were already ROTTED on origin/main before this branch existed and their carrier is objectui#9713, not this PR.

The instrument, its domain and its predicate

⭐ Stated because a control certifies the instrument, not the question. Domain: the interface declarations KnownDrift, UnmirroredDeclared, RuntimeOnlyDeclared, WiderThanDeclared and the WIDER_ARMS object literal, read from the TypeScript AST of packages/types/src/__tests__/zod-mirror-parity.test.ts. Predicate: entry count, key total (union arms summed), and the SHA-256 of each declaration's own source bytes. Run twice on the same instrument — once against git show 4cf57b6da: (the merge-base) and once against this branch's head.

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 — the EXCLUSIONS entry keyed to ClassNameStylePropsSchema. EXCLUSIONS untouched; the token reads 1 on both trees.
  • 6150-undeclared-but-consumed-keys.md — the TreeViewSchema slice, and RuntimeOnlyDeclared being a SUBSET of UnmirroredDeclared with their union equal to UnmirroredDeclared. Both ledgers byte-identical, and the file's own leg asserting that containment is green on this head.
  • 6175-column-state-persistence.md — onColumnReorder stays in RuntimeOnlyDeclared. Token reads 5 on both trees; ledger byte-identical.
  • 6639-objectgrid-title-mirrored.md — the seeded 121 decomposition on UnmirroredDeclared. 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 in KnownDrift. Byte-identical.
  • 7654-floating-chatbot-trigger-icon-tombstone.md — floatingConfig under complex.zod.ts#ChatbotSchema in UnmirroredDeclared. Token reads 5 on both trees. ⚠️ Checked specifically against the NEW ledger too: ChatbotSchema is 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 as 6150.
  • 8572-chatbot-body-retired.md — the body collision row in KnownDrift. Byte-identical.

ROTTED before this branch — 2. ⛔ Reported, ⛔ not repaired, and ⛔ not silently overwritten:

  • 8338-retire-toast-action.md publishes KnownDrift 42 / 64 to 41 / 63 and WiderThanDeclared 23 / 36 / 47 split 6 / 30 / 0 / 11 to 22 / 35 / 45 split 6 / 29 / 0 / 10. Re-derived on the merge-base: 46 / 85 and 19 / 29 with 29 arm rows. Already divergent on origin/main, with this branch's ledgers byte-identical to it.
  • object-view-unmirrored-keys-7779.md publishes UnmirroredDeclared 14 entries / 96 keys to 14 / 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.

⚠️ File-level disjointness re-checked against objectui#9723's live file list at the time of writing, ⛔ not assumed: it touches .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

Merged via the queue into main with commit d5f1ebd Sep 17, 2026
38 checks passed
@os-sales
os-sales deleted the claude/issue-9711-zod-mirror-parity-undeclared-direction branch September 17, 2026 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants