STET

flux-commit-7af773c0

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

fail_high_conf

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

61.5% run pass rate
Tier 1
primary testsfailedcommand source driftnon equivalentfail
python3 -c "import json; c=json.load(open('jestconfig.json')); c['globals']={'ts-jest':{'diagnostics':False}}; json.dump(c,open('jestconfig.json','w'),indent=2)"
gold passagent pass
npx jest --config jestconfig.json --testPathPattern 'codegen|function|refine'
gold failagent
pytest -q tests/behavior/test_codegen_api_surface_behavior.py
gold passagent fail
pytest -q tests/behavior/test_codegen_optional_object_behavior.py
gold passagent fail
pytest -q tests/behavior/test_userpost_schema_behavior.py
gold passagent fail
pytest -q tests/behavior/test_index_and_tozod_behavior.py
gold passagent fail

Partial score: 1/5

Publishable: 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 failed
#2
equivalence
Equivalence judgment
#3

non_equivalent

code review
Code review judgment
#4

fail

decision
Final decision
#5

fail_high_conf

Quality

equivalence
non_equivalent
92% confidence
code review
fail
4 findings
footprint
low (0.22)
behavioral
20.0%
cost
$1.75 · 4.1M

Equivalence Reasoning

behavioral

The patch covers part of the intent (adds `void` type file, new exports, and a codegen class), but it misses core behavior needed for the new test paths. Key gaps include: `toZod` object typing was not updated to the stronger `ZodObject<..., ..., T>` form (and `ZodObject` itself was not extended with the extra generic), which is important for recursive schema typing; `codegen.dump()` returns internal objects instead of TypeScript declarations (different generator surface/behavior); and optionality logic for intersections differs (`||` vs expected `&&`), which can produce incorrect generated TS shapes.

Code Review

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

The patch partially addresses exports and void support, but it likely does not satisfy the intended change end-to-end due to mismatched codegen output behavior, incorrect optionality for intersections, and incomplete recursive/object typing alignment.

4 findings
Codegen dump API returns internal array instead of TypeScript declaration text
major

The implementation returns `this.seen` directly, while the intended flow requires emitting TS alias text for generated types. This likely breaks codegen usage tests that expect string output suitable for compilation or snapshot comparison.

src/codegen.ts:37
Intersection optionality logic is inverted
major

For intersections, optionality is computed with `||`; the intended behavior requires both sides to be optional. Current logic can incorrectly mark required properties as optional in object generation.

src/codegen.ts:18
Recursive sample schemas are not constrained with toZod typing
major

The recursive `User`/`Post` schemas are declared without `z.toZod<...>` annotations, reducing the intended compile-time guarantees for recursive typing examples exercised by tests.

src/userpost.ts:15
toZod object mapping was not updated to preserve target object type parameter
major

The `toZod` object branch keeps the older `ZodObject<{...}>` form instead of the stricter object signature that carries the concrete target type through generics. This can break recursive/object inference paths targeted by the task.

src/toZod.ts:20