STET

flux-pr-4970

Zod (TypeScript) · W2 · GPT-5.3 Codex

pass

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

69.2% run pass rate
Tier 1
primary equivalencepassedneeds generated testsweak signal riskcommand source driftequivalentpass
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

pass

decision
Final decision
#5

pass

Quality

equivalence
equivalent
96% confidence
code review
pass
1 finding
footprint
medium (0.42)
behavioral
100.0%
cost
$3.41 · 1.5M

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

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

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.

1 finding
Literal empty-value guard duplicated across layers
minor

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.

packages/zod/src/v4/core/api.ts:1256