STET

flux-pr-5578

Zod (TypeScript) · W2 · GPT-5.4

pass_with_warn

Tests passed. 1/2 commands passed. Strength: weak.

69.2% run pass rate
Tier 1
primary equivalencepassednon equivalentdecision conflictfailneeds generated testsweak signal risk
pnpm build
gold passagent pass
pnpm test -- --testTimeout 20000 --maxWorkers 1 --maxConcurrency 1 --retry 2
gold failagent

Partial score: 1/1

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

non_equivalent

code review
Code review judgment
#4

fail

decision
Final decision
#5

pass_with_warn

Quality

equivalence
non_equivalent
89% confidence
code review
fail · 30/100
3 findings
footprint
low (0.25)
behavioral
100.0%
cost
$0.94 · 1.5M

Equivalence Reasoning

behavioral

The patch improves metadata lookup (`source` + recursive `getMetadataForJSONSchema`) but does not implement the core parent/ref emission tracking and flattening behavior needed for wrapped/cloned schemas. It leaves `finalize` merge/dedup logic unchanged, does not add separate `parent` tracking in `Seen`, and does not handle parent `$ref` propagation/de-duplication in wrapper/refinement chains, so redundant/missing JSON Schema context can still occur.

Code Review

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

The patch likely does not satisfy the intended change: it adds metadata-recursion helpers and tests, but misses the core parent/ref tracking and flattening behavior needed to consistently preserve child overrides while avoiding duplicated parent schema replay.

3 findings
Child schema JSON-schema processors are bypassed when a parent exists
major

In `process`, cloned schemas still enter the `if (parent)` branch and skip child `processJSONSchema`/processor execution. This drops child-specific wrapper/refinement JSON-schema behavior instead of preserving child overrides.

packages/zod/src/v4/core/to-json-schema.ts:193
Seen-state model still lacks explicit parent-chain tracking for ref propagation
major

The patch keeps `Seen` centered on `ref` and adds metadata recursion, but does not add separate parent tracking in seen state. That misses wrapper chains where extracted parent definitions must propagate `$ref` without replaying parent properties.

packages/zod/src/v4/core/to-json-schema.ts:80
Metadata inheritance is moved to registry recursion but does not solve duplicate schema replay
major

The new `getMetadataForJSONSchema` recursively merges metadata (and strips `id`), but this only changes metadata assignment and does not implement the required JSON-schema inheritance/dedup at ref-flattening time. The stated parent/child duplication issue therefore remains largely unaddressed.

packages/zod/src/v4/core/to-json-schema.ts:80