flux-pr-3850
Zod (TypeScript) · W2 · GPT-5.3 Codex
Tests passed. 3/3 commands passed. Strength: strong.
yarn buildfind . -name vitest.config.ts -exec sed -i 's/test: {/test: { testTimeout: 30000,/' {} +yarn testPartial score: 3/3
Trajectory
unknown · partial order onlyCanonical trajectory missing; showing coarse derived order only.
Quality
Equivalence Reasoning
stylistic
The agent patch implements the core intent: schema types now expose `~standard` metadata (`version`, `vendor`) and a `validate` hook that returns standardized success/failure payloads (`value` or `issues`) with sync-first and async fallback behavior. It also wires this into both `src` and `deno` type implementations. Differences from the gold patch (extra exports, slightly different type definitions, and async-state handling details) do not materially miss the requested functionality.
Code Review
The patch substantially implements the Standard Schema entry points, but it likely falls short of full intended behavior due to throwable `validate` paths, fragile async fallback mechanics, and spec-shape drift in the type definition.
`~validate` rethrows any error that does not match the "encountered" message check, so callers can get exceptions rather than `{ issues }`/`Promise<{ issues }>` payloads expected from the standard interface.
The implementation sets `this["~standard"].async = true` after detecting async parsing, but each call still initializes `ctx.common.async` to `false` and always attempts `_parseSync` first, causing repeated exception-driven fallback for known async schemas.
The custom `StandardSchemaV1` adds non-standard `async` metadata and narrows issue-path typing without `PathSegment` support, which can reduce compatibility with tools expecting the canonical shape.