Skip to content

Commit 15538ee

Browse files
committed
fix(pm): let T1 express that the REMOVED value accepted everything
`check-widening-tells`'s T1 says "the accept set gains a spelling an author may now write", and it fired on a diff that takes a spelling away: a key narrowed out of `z.unknown()` — zod's universal acceptor — into `z.union([…])`. Every value the union admits was already admitted, and `'stage=won'` and `42` are refused now, so the accept set SHRANK. The finding is the control set, not the reasoning: the SAME removal declined when the replacement was spelled `z.array(z.any())` and fired when the identical narrowing was spelled `z.union([`. One semantic change, two verdicts, decided by nothing but the added value's first line. #16943's replacement budget was EARNED and then refused at the SPEND, because #17618 lets a closed-set-valued key spend only on three facts, the second of which — both member lists readable — a universal acceptor can never carry: it has no member list, which is exactly the case where no comparison is needed, since the removed set is the universe and every replacement is a subset of it by construction. So a second way to supply #17618's own requirement is added — positive, block-local evidence that the set gained nothing, carried by the REMOVED value's semantics instead of by a list comparison. Nothing about the added value's spelling is read. The class is measured, not assumed: on zod 4.4.3 `z.unknown()`, `z.any()` and both with `.optional()` accept all eight probe values, while `z.unknown().refine(…)` refuses seven — so a narrowing chain step disqualifies the line, and `z.custom()` (0 code occurrences here) is not declared. Sensitivity is unchanged and bracketed by controls that still fire: a removed acceptor on a different key, a removed value that was never universal, a `.refine()`d one, the dark control with nothing removed, an inline enum widened in place, and a genuine new key riding along on an exhausted budget. Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude <noreply@anthropic.com>
1 parent 21b7c12 commit 15538ee

1 file changed

Lines changed: 338 additions & 5 deletions

File tree

0 commit comments

Comments
 (0)