flux-pr-4970
Zod (TypeScript) · W1 · GPT-5.1 Codex Mini
Tests passed. 3/3 commands passed. Strength: weak.
pnpm buildfind . -name vitest.config.ts -exec sed -i 's/test: {/test: { testTimeout: 30000,/' {} +npx vitest run packages/zod/src/v4/classic/tests/union.test.ts -t "surface\ continuable\ errors\ only\ if\ they\ exist"Partial score: 3/3
Trajectory
unknown · partial order onlyCanonical trajectory missing; showing coarse derived order only.
Quality
Equivalence Reasoning
stylistic
The patch implements all intended changes: union handling now only takes the non-aborted fallback when exactly one remains, literal schema construction rejects empty value lists, docs now include `normalize()` in string transforms, and versioning is bumped to 4.0.9. Differences from gold are minor (extra doc text, different error message string, added test, and slight return/value handling style) and do not appear to miss the task intent.
Code Review
Patch is close to the intended v4.0.9 changes (version bumps, literal-empty guard, normalize docs), but it likely misses a key union-state consistency detail and introduces avoidable message drift; likely not fully aligned with intended canonical change.
When exactly one non-aborted union branch remains, the code now returns that payload directly without assigning `final.value`. This diverges from prior behavior and can break call paths that inspect the shared `final` accumulator rather than only the return payload.
The thrown message for empty literal schemas uses a different text than the expected release patch wording, which may fail exact-message assertions or create avoidable API-surface drift.