STET

flux-pr-4970

Zod (TypeScript) · W1 · GPT-5.1 Codex Mini

pass_with_warn

Tests passed. 3/3 commands passed. Strength: weak.

run pass rate
Tier
primary equivalencepassedequivalentneeds generated testsweak signal riskcommand source drift
pnpm build
gold passagent pass
find . -name vitest.config.ts -exec sed -i 's/test: {/test: { testTimeout: 30000,/' {} +
gold passagent pass
npx vitest run packages/zod/src/v4/classic/tests/union.test.ts -t "surface\ continuable\ errors\ only\ if\ they\ exist"
gold passagent pass

Partial score: 3/3

Publishable: noWeak signal risk: yesCache: miss

Trajectory

unknown · partial order only

Canonical trajectory missing; showing coarse derived order only.

patch written
Patch captured
#1

Stet captured agent.patch for this trial.

validation
Tests passed
#2
equivalence
Equivalence judgment
#3

equivalent

code review
Code review judgment
#4

unsure

decision
Final decision
#5

pass_with_warn

Quality

equivalence
equivalent
83% confidence
code review
unsure · 60/100
2 findings
footprint
low (0.31)
behavioral
cost
$1.77

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

correctness: 2/4introduced bug risk: 2/4edge case handling: 3/4maintainability idioms: 3/4

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.

2 findings
Union single-nonaborted path no longer updates `final.value`
major

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.

packages/zod/src/v4/core/schemas.ts:1916
Literal constructor error string differs from canonical release wording
minor

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.

packages/zod/src/v4/core/schemas.ts:2782