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

Commit ca7a9cc

Browse files
committed
test(types): replace a predicted caricature figure with the measured one
The caricature docblock said the naive `string extends keyof T` clause "moved 40 pairs of the registry rather than 2", under a sentence reading "Measured, not predicted". The 40 was never measured — it was written from expectation before the ablation ran, which is the exact defect this file exists to catch. Measured: the naive clause moves 3 pairs where the shipped one moves 2. It does not flood the ledger, because it sits on the branch the assignability test already called clean and `Unconstrained` gates ahead of both. Its one extra report is `objectql.zod.ts#ObjectViewSchema::form`, a passthrough-object face — so the argument against it is that its single false report is the wrong KIND of finding, not that there would be many. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
1 parent 0f99492 commit ca7a9cc

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

‎packages/types/src/__tests__/zod-mirror-parity.test.ts‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -874,13 +874,24 @@ export type assertionOpenRecordWideningIsReported =
874874
* ⭐ The caricature, pinned as a NEGATIVE. A LOOSE object — what `.passthrough()`
875875
* produces, and what every declaration inheriting `BaseSchema` is — also answers
876876
* `true` to `string extends keyof T`. A clause built on that predicate alone reports
877-
* this pair, and reporting it is the failure this whole direction has to avoid: the
878-
* ledger would name most of the registry and stop meaning anything, while still
879-
* passing an assertion that the live instance is now reported.
880-
*
881-
* ⛔ This is the assertion to run against a candidate clause FIRST. Measured, not
882-
* predicted: the naive `string extends keyof T` clause was built and run, and it
883-
* moved 40 pairs of the registry rather than 2.
877+
* such a pair, and reporting it is the failure this direction has to avoid: the
878+
* ledger would fill with the `.passthrough()` tolerance that `WithoutIndexSignature`
879+
* above rules out of this file's question, while still passing an assertion that the
880+
* live instance is now reported.
881+
*
882+
* ⛔ This is the assertion to run against a candidate clause FIRST, and it fires: the
883+
* naive clause was BUILT AND RUN, and this pin reddened under it.
884+
*
885+
* ⚠️ What that run also measured, recorded because the intuition is wrong and was
886+
* wrong here first. The naive clause does NOT flood the ledger — it moved 3 registry
887+
* pairs where this one moves 2. The blast radius is small because the clause sits on
888+
* the branch the assignability test already called clean and `Unconstrained` gates
889+
* ahead of both, so nearly every loose face is spoken for before it is reached. Its
890+
* one extra report is `objectql.zod.ts#ObjectViewSchema::form`, an inline `z.lazy`
891+
* slot whose face is a passthrough object. ⇒ The argument against the naive clause is
892+
* that its single false report is a WRONG KIND of finding, not that there would be
893+
* many of them. ⛔ Do not restate this as "it reports everything"; that figure was
894+
* asserted here from prediction once and the measurement replaced it.
884895
*/
885896
type SyntheticLooseObjectMirror = { shape: { cfg: typeof BaseSchema } };
886897
interface SyntheticClosedObjectDeclaration { cfg: { type: string } }

0 commit comments

Comments
 (0)