flux-pr-4970
Zod (TypeScript) · W2 · GPT-5.3 Codex
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 agent patch implements all core intent: union handling now only returns a branch when exactly one non-aborted result remains, literal schemas reject empty value sets, docs include `normalize()` in string transforms, and versioning is bumped to 4.0.9. Differences from gold are minor (error message text and extra guard/tests in `core/api.ts`).
Code Review
The agent patch very likely satisfies the intended release changes (union determinism, non-empty literals, normalize docs, version bump), with only a minor maintainability concern around duplicated literal validation logic.
Empty-literal validation and the error string are implemented in both `_literal` (API layer) and `$ZodLiteral` constructor (schema layer), creating drift risk if one path changes message or behavior later.