STET

flux-pr-4567

Zod (TypeScript) · W2 · GPT-5.4

pass_with_warn

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

69.2% run pass rate
Tier 1
primary testspassednon equivalentdecision conflictfail
pnpm build
gold passagent pass
find . -name vitest.config.ts -exec sed -i 's/test: {/test: { testTimeout: 30000,/' {} +
gold passagent pass
pnpm test -- --maxWorkers 1 --maxConcurrency 1 --retry 2
gold passagent pass

Partial score: 3/3

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 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
93% confidence
code review
fail · 50/100
3 findings
footprint
low (0.23)
behavioral
100.0%
cost
$0.88 · 1.4M

Equivalence Reasoning

behavioral

The agent does make `z.file()` representable and adds docs, but it encodes constraints with nonstandard JSON Schema keys (`minSize`, `maxSize`, `mime`) instead of schema-enforceable JSON Schema constructs (as in the gold approach with `minLength`/`maxLength`, content metadata, and MIME handling via standard fields/structure). That misses the core intent of producing constraints that downstream JSON Schema tooling can enforce consistently.

Code Review

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

The patch partially addresses the task by adding file schema export and docs, but it likely misses the intended interoperability goal because emitted constraints are mostly nonstandard and not reliably enforceable by downstream JSON Schema tooling.

3 findings
File size constraints emitted as nonstandard JSON Schema keywords
major

The generator writes `minSize`/`maxSize` for file schemas. Standard JSON Schema validators do not enforce these keys, so file size rules are not machine-enforceable as intended.

packages/zod/src/v4/core/to-json-schema.ts:442
Multiple MIME types are not represented as enforceable schema alternatives
major

For multiple MIME types, the output stores a custom `mime` array but does not encode constraints via standard combinators (for example `anyOf` with `contentMediaType` per branch), so validators cannot enforce MIME membership.

packages/zod/src/v4/core/to-json-schema.ts:444
Docs/tests lock in custom file-schema keywords
minor

Documentation and snapshots explicitly define `minSize`, `maxSize`, and `mime` output, reinforcing nonstandard semantics and making later migration to interoperable JSON Schema harder.

packages/docs/content/json-schema.mdx:79