flux-pr-3535
Zod (TypeScript) · W2 · GPT-5.4
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 readonly support for discriminated union options in both `src/types.ts` and `deno/lib/types.ts`, and adds tests proving `as const` readonly options work with correct inferred union types. The approach differs from gold (introduces a `ZodDiscriminatedUnionOptions` alias and applies it more broadly), but it satisfies the intended behavior change.
Code Review
The patch is likely to satisfy the intended readonly-options change for common readonly tuple usage and appears functionally correct, with a minor remaining gap for broader readonly-array typing ergonomics.
The new `ZodDiscriminatedUnionOptions` type is a readonly non-empty tuple (`Readonly<[...]>`), so callers with values typed as `readonly Option[]` may still face assignability friction even though readonly tuple literals now work.