STET

flux-pr-4672

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

pass_with_warn

Tests passed. 1/1 commands passed. Strength: strong.

61.5% run pass rate
Tier 1
primary testspassednon equivalentfail
pnpm test
gold passagent pass

Partial score: 1/1

Publishable: noCache: 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

non_equivalent

code review
Code review judgment
#4

fail

decision
Final decision
#5

pass_with_warn

Quality

equivalence
non_equivalent
92% confidence
code review
fail
3 findings
footprint
low (0.20)
behavioral
100.0%
cost
$0.91 · 2.3M

Equivalence Reasoning

behavioral

The agent patch does not implement the core intended refactor scope (removing redundant assertions across validation helpers and schema-parsing paths in `v3`/`v4` core utilities). It instead changes `v4/classic/parse.ts` and heavily rewrites `v4/core/errors.ts`, leaving most targeted helper/schema assertion sites untouched. This is not an equivalent implementation of the described change.

Code Review

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

The agent patch is unlikely to satisfy the intended task: it largely edits different files/concerns than requested, introduces broader typing rewrites, and still uses forced casts at key return points.

3 findings
Patch scope does not match the requested assertion-removal refactor
major

The task targets validation helpers and schema parsing assertion cleanup (including contextual error-map handling), but this patch only edits v4 classic parse wrappers and v4 core error-formatting internals. That makes the intended refactor likely incomplete/unmet.

packages/zod/src/v4/classic/parse.ts:10
New error-formatting rewrite still relies on terminal type assertions
major

Despite introducing multiple helper types, both `formatError` and `treeifyError` still end with explicit casts to target return types, which undercuts the stated goal of relying on inferred types instead of forced assertions.

packages/zod/src/v4/core/errors.ts:289
Public overload signatures were changed in a non-minimal refactor
major

The overloads for `formatError`/`treeifyError` were changed from optional mapper generic signatures to required mapper in the generic overload, while implementation remains optional. This broad API typing change is risky and not necessary for the stated assertion cleanup.

packages/zod/src/v4/core/errors.ts:252