flux-pr-4811
Zod (TypeScript) · W2 · GPT-5.4
Tests passed. 3/3 commands passed. Strength: weak.
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: 3/3
Trajectory
unknown · partial order onlyCanonical trajectory missing; showing coarse derived order only.
Quality
Equivalence Reasoning
stylistic
The patch implements draft-04 support end-to-end (target typing/docs, `$schema` URI, draft-04 exclusive bound booleans, `const`→single-value `enum`, draft-aware record/property-name handling, and legacy ref/allOf behavior) while preserving draft-7 and draft-2020-12 paths. It also includes an unrelated generated vitest cache file under `node_modules`, which is extraneous but not a core behavioral miss.
Code Review
The patch largely implements draft-04 support, but it introduces extra behavioral changes in draft-4 record handling and includes a committed test-cache artifact, so it is unlikely to be accepted as-is.
For draft-4, `record` now rewrites some key schemas into `patternProperties`/`properties` and sets `additionalProperties: false`, which can reject keys that were previously accepted under the simpler downgrade path when `propertyNames` is unavailable.
The patch includes a `node_modules/.vite/.../results.json` file, which is build/test output and should not be in source control. This creates churn and CI/environment-dependent noise.