agent_patch
runs/2026-02-27__21-30-28__gpt-5-3-codex/flux-pr-4807/flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/agent-logs/agent.patch
11854 bytes
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/.husky/pre-commit b/app/.husky/pre-commit
index bcbc1dd..d78f638 100755
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/.husky/pre-commit
+++ b/app/.husky/pre-commit
@@ -1,2 +1,9 @@
+UNTRACKED_FILES=$(git ls-files --others --exclude-standard)
+if [ -n "$UNTRACKED_FILES" ]; then
+ echo "ERROR: untracked files present"
+ echo "$UNTRACKED_FILES"
+ exit 1
+fi
+
pnpm semver-check
lint-staged --verbose
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/.husky/pre-push b/app/.husky/pre-push
index a2e15d9..3842d96 100755
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/.husky/pre-push
+++ b/app/.husky/pre-push
@@ -1,3 +1,10 @@
+UNTRACKED_FILES=$(git ls-files --others --exclude-standard)
+if [ -n "$UNTRACKED_FILES" ]; then
+ echo "ERROR: untracked files present"
+ echo "$UNTRACKED_FILES"
+ exit 1
+fi
+
pnpm test
pnpm semver-check
pnpm build
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/bench/object-moltar.ts b/app/packages/bench/object-moltar.ts
index 573a2e2..1bca33a 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/bench/object-moltar.ts
+++ b/app/packages/bench/object-moltar.ts
@@ -1,5 +1,5 @@
import * as z4 from "zod/v4";
-import * as z4lib from "./node_modules/zod4/dist/esm/v4/classic/index.js";
+import * as z4lib from "zod4/v4";
import * as z3 from "zod3";
import { metabench } from "./metabench.js";
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/docs/content/basics.mdx b/app/packages/docs/content/basics.mdx
index e9f5bee..17f244c 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/docs/content/basics.mdx
+++ b/app/packages/docs/content/basics.mdx
@@ -63,7 +63,7 @@ Player.parse({ username: "billie", xp: 100 });
```
<Callout>
-**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](#refine) or [transforms](#transform), you'll need to use the `.parseAsync()` method instead.
+**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](/api#refinements) or [transforms](/api#transforms), you'll need to use the `.parseAsync()` method instead.
```ts
await Player.parseAsync({ username: "billie", xp: 100 });
@@ -139,7 +139,7 @@ if (!result.success) {
```
<Callout>
-**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](#refine) or [transforms](#transform), you'll need to use the `.safeParseAsync()` method instead.
+**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](/api#refinements) or [transforms](/api#transforms), you'll need to use the `.safeParseAsync()` method instead.
```ts
await schema.safeParseAsync("hello");
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/docs/content/ecosystem.mdx b/app/packages/docs/content/ecosystem.mdx
index 2921335..4d1af23 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/docs/content/ecosystem.mdx
+++ b/app/packages/docs/content/ecosystem.mdx
@@ -20,6 +20,7 @@ There are a growing number of tools that are built atop or support Zod natively!
- [Total TypeScript Zod Tutorial](https://www.totaltypescript.com/tutorials/zod) by [@mattpocockuk](https://x.com/mattpocockuk)
- [Fixing TypeScript's Blindspot: Runtime Typechecking](https://www.youtube.com/watch?v=rY_XqfSHock) by [@jherr](https://x.com/jherr)
+- [zod.dev package docs](https://zod.dev/packages/zod) for module and ecosystem entry points
## API Libraries
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/docs/content/parsing.mdx b/app/packages/docs/content/parsing.mdx
index 18394ff..5ad7613 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/docs/content/parsing.mdx
+++ b/app/packages/docs/content/parsing.mdx
@@ -21,7 +21,7 @@ stringSchema.parse(12); // throws error
`.parseAsync(data:unknown): Promise<T>`
-If you use asynchronous [refinements](#refine) or [transforms](#transform) (more on those later), you'll need to use `.parseAsync`.
+If you use asynchronous [refinements](/api#refinements) or [transforms](/api#transforms) (more on those later), you'll need to use `.parseAsync`.
```ts
const stringSchema = z.string().refine(async (val) => val.length <= 8);
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/resolution/tsconfig.build.json b/app/packages/resolution/tsconfig.build.json
index efabd5b..88741f9 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/resolution/tsconfig.build.json
+++ b/app/packages/resolution/tsconfig.build.json
@@ -2,6 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es6",
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
"outDir": "./dist",
"rootDir": "./src",
"declaration": true,
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/package.json b/app/packages/zod/package.json
index fac52c0..adaacef 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/package.json
+++ b/app/packages/zod/package.json
@@ -1,6 +1,6 @@
{
"name": "zod",
- "version": "3.25.69",
+ "version": "3.25.70",
"type": "module",
"author": "Colin McDonnell <zod@colinhacks.com>",
"description": "TypeScript-first schema declaration and validation library with static type inference",
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/classic/external.ts b/app/packages/zod/v4/classic/external.ts
index b226eed..c7b5f5a 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/classic/external.ts
+++ b/app/packages/zod/v4/classic/external.ts
@@ -20,6 +20,7 @@ export {
$output,
$input,
$brand,
+ NEVER,
clone,
regexes,
treeifyError,
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/classic/schemas.ts b/app/packages/zod/v4/classic/schemas.ts
index 6794b16..50c8ad6 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/classic/schemas.ts
+++ b/app/packages/zod/v4/classic/schemas.ts
@@ -1085,11 +1085,11 @@ export interface ZodObject<
*/
merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
- pick<M extends util.Exactly<util.Mask<keyof Shape>, M>>(
+ pick<M extends util.Mask<keyof Shape>>(
mask: M
): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
- omit<M extends util.Exactly<util.Mask<keyof Shape>, M>>(
+ omit<M extends util.Mask<keyof Shape>>(
mask: M
): ZodObject<util.Flatten<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
@@ -1102,7 +1102,7 @@ export interface ZodObject<
},
Config
>;
- partial<M extends util.Exactly<util.Mask<keyof Shape>, M>>(
+ partial<M extends util.Mask<keyof Shape>>(
mask: M
): ZodObject<
{
@@ -1123,7 +1123,7 @@ export interface ZodObject<
},
Config
>;
- required<M extends util.Exactly<util.Mask<keyof Shape>, M>>(
+ required<M extends util.Mask<keyof Shape>>(
mask: M
): ZodObject<
{
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/core/core.ts b/app/packages/zod/v4/core/core.ts
index 693f8ce..a3ebbf1 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/core/core.ts
+++ b/app/packages/zod/v4/core/core.ts
@@ -67,6 +67,10 @@ export type $brand<T extends string | number | symbol = string | number | symbol
export type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol> = T &
Record<"_zod", Record<"output", output<T> & $brand<Brand>>>;
+export const NEVER: never = Object.freeze({
+ status: "aborted",
+}) as never;
+
export class $ZodAsyncError extends Error {
constructor() {
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/core/util.ts b/app/packages/zod/v4/core/util.ts
index e189bd8..48c6a03 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/core/util.ts
+++ b/app/packages/zod/v4/core/util.ts
@@ -455,13 +455,16 @@ export function normalizeParams<T>(_params: T): Normalize<T> {
if (!params) return {} as any;
if (typeof params === "string") return { error: () => params } as any;
- if (params?.message !== undefined) {
- if (params?.error !== undefined) throw new Error("Cannot specify both `message` and `error` params");
- params.error = params.message;
+ if (!isObject(params)) return {} as any;
+
+ const normalized = { ...params } as any;
+ if (normalized.message !== undefined) {
+ if (normalized.error !== undefined) throw new Error("Cannot specify both `message` and `error` params");
+ normalized.error = normalized.message;
}
- delete params.message;
- if (typeof params.error === "string") return { ...params, error: () => params.error } as any;
- return params;
+ delete normalized.message;
+ if (typeof normalized.error === "string") return { ...normalized, error: () => normalized.error } as any;
+ return normalized;
}
export function createTransparentProxy<T extends object>(getter: () => T): T {
@@ -534,7 +537,12 @@ export const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, big
uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")],
};
+function assertMaskObject(mask: unknown): asserts mask is Record<string, unknown> {
+ if (!isObject(mask)) throw new Error("Mask must be an object");
+}
+
export function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any {
+ assertMaskObject(mask);
const newShape: Writeable<schemas.$ZodShape> = {};
const currDef = schema._zod.def; //.shape;
@@ -556,6 +564,7 @@ export function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>):
}
export function omit(schema: schemas.$ZodObject, mask: object): any {
+ assertMaskObject(mask);
const newShape: Writeable<schemas.$ZodShape> = { ...schema._zod.def.shape };
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
@@ -608,6 +617,7 @@ export function partial(
const shape: Writeable<schemas.$ZodShape> = { ...oldShape };
if (mask) {
+ assertMaskObject(mask);
for (const key in mask) {
if (!(key in oldShape)) {
throw new Error(`Unrecognized key: "${key}"`);
@@ -649,6 +659,7 @@ export function required(
const shape: Writeable<schemas.$ZodShape> = { ...oldShape };
if (mask) {
+ assertMaskObject(mask);
for (const key in mask) {
if (!(key in shape)) {
throw new Error(`Unrecognized key: "${key}"`);
diff --git a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/mini/external.ts b/app/packages/zod/v4/mini/external.ts
index a327b51..c2f44ab 100644
--- a/tmp/agent-patch-flux-pr-4807.1-of-1.2026-02-27__21-30-28__gpt-5-3-codex/app/packages/zod/v4/mini/external.ts
+++ b/app/packages/zod/v4/mini/external.ts
@@ -11,6 +11,7 @@ export {
$output,
$input,
$brand,
+ NEVER,
function,
clone,
regexes,