flux-pr-4811
Zod (TypeScript) · W2 · GPT-5.3 Codex
Tests: unknown. 0/3 commands passed. Strength: missing.
pnpm buildfind . -name vitest.config.ts -exec sed -i 's/test: {/test: { testTimeout: 30000,/' {} +npx vitest run packages/zod/src/v4/classic/tests/to-json-schema.test.ts -t "number\ constraints\ draft\-4|literal\ draft\-4"Partial score: 0/0
Trajectory
unknown · partial order onlyCanonical trajectory missing; showing coarse derived order only.
Quality
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
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.
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.
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.