STET

flux-pr-4811

Zod (TypeScript) · W2 · GPT-5.3 Codex

fail_likely_equiv

Tests: unknown. 0/3 commands passed. Strength: missing.

69.2% run pass rate
Tier 1
primary equivalenceunknownneeds generated testsweak signal riskcommand source driftall commands ignoredunknown no gold pass commandsequivalentunsure
pnpm build
gold unknownagent
find . -name vitest.config.ts -exec sed -i 's/test: {/test: { testTimeout: 30000,/' {} +
gold unknownagent
npx vitest run packages/zod/src/v4/classic/tests/to-json-schema.test.ts -t "number\ constraints\ draft\-4|literal\ draft\-4"
gold unknownagent

Partial score: 0/0

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
Validation recorded
#2
equivalence
Equivalence judgment
#3

equivalent

code review
Code review judgment
#4

unsure

decision
Final decision
#5

fail_likely_equiv

Quality

equivalence
equivalent
89% confidence
code review
unsure
2 findings
footprint
medium (0.38)
behavioral
cost
$2.57 · 899K

Equivalence Reasoning

stylistic

The agent patch implements draft-04 as a supported target in docs and generator types, emits the draft-04 `$schema` URI, and handles draft-04-specific behavior for exclusive bounds, `propertyNames` omission, and `const`→single-item `enum`, while preserving draft-7/2020-12 behavior. Differences from gold are mainly refactoring/generalized conditionals (plus added tests), not a core behavioral miss.

Code Review

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

The patch is close and likely passes many cases, but it does not fully match the intended draft-04 behavior because record key processing still runs under draft-04, creating a meaningful correctness risk.

2 findings
Draft-04 record path still processes key schema and can throw unexpectedly
major

For draft-04, `propertyNames` is intentionally omitted, but the patch still computes `keySchema = this.process(def.keyType, ...)`. That can trigger unrepresentable-key errors or other side effects even though key constraints are not emitted for draft-04. The intended behavior is to skip key-type processing entirely for draft-04 records.

packages/zod/src/v4/core/to-json-schema.ts:406
Target checks are broadened via negative conditionals
minor

Using `this.target !== "draft-2020-12"` and `params.target !== "draft-2020-12"` makes behavior implicit for any future target additions, instead of explicitly enumerating supported drafts. This increases accidental behavior coupling when another target is introduced.

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