STET

agent_patch

runs/2026-02-20__00-10-38__gpt-5-1-codex-mini/flux-pr-4970/flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/agent-logs/agent.patch

5455 bytes

Back to adjudication
diff --git a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/docs/content/api.mdx b/app/packages/docs/content/api.mdx
index 1bcb69d..4c9502e 100644
--- a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/docs/content/api.mdx
+++ b/app/packages/docs/content/api.mdx
@@ -134,6 +134,9 @@ colors.values; // => Set<"red" | "green" | "blue">
 </Tab>
 </Tabs>
 
+Unicode normalization is available via `normalize()`, which defaults to `NFC` but also accepts `"NFD"`, `"NFKC"`, or `"NFKD"`, so you can standardize string input before applying the other helpers.
+
+
 
 
 ## Strings
@@ -205,6 +208,7 @@ To perform some simple string transforms:
 <Tab value="Zod">
 ```ts
 z.string().trim(); // trim whitespace
+z.string().normalize(); // normalize (default: NFC)
 z.string().toLowerCase(); // toLowerCase
 z.string().toUpperCase(); // toUpperCase
 ```
@@ -212,12 +216,15 @@ z.string().toUpperCase(); // toUpperCase
 <Tab value="Zod Mini">
 ```ts
 z.string().check(z.trim()); // trim whitespace
+z.string().check(z.normalize()); // normalize (default: NFC)
 z.string().check(z.toLowerCase()); // toLowerCase
 z.string().check(z.toUpperCase()); // toUpperCase
 ```
 </Tab>
 </Tabs>
 
+Unicode normalization is available via `normalize()`, which defaults to `NFC` but also accepts `"NFD"`, `"NFKC"`, or `"NFKD"`, so you can standardize string input before applying the other helpers.
+
 ## String formats
 
 To validate against some common string formats:
@@ -2742,4 +2749,3 @@ const MyFunction = z.function({
 
 const computeTrimmedLength = MyFunction.implement((input) => input.trim.length);
 ```
-
diff --git a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/jsr.json b/app/packages/zod/jsr.json
index 4005c45..20e6e2a 100644
--- a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/jsr.json
+++ b/app/packages/zod/jsr.json
@@ -1,6 +1,6 @@
 {
   "name": "@zod/zod",
-  "version": "4.0.8",
+  "version": "4.0.9",
   "exports": {
     "./package.json": "./package.json",
     ".": "./src/index.ts",
diff --git a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/package.json b/app/packages/zod/package.json
index d079aab..751c4e0 100644
--- a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/package.json
+++ b/app/packages/zod/package.json
@@ -1,6 +1,6 @@
 {
   "name": "zod",
-  "version": "4.0.8",
+  "version": "4.0.9",
   "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-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/src/v4/classic/tests/literal.test.ts b/app/packages/zod/src/v4/classic/tests/literal.test.ts
index 8c48b20..7563a8c 100644
--- a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/src/v4/classic/tests/literal.test.ts
+++ b/app/packages/zod/src/v4/classic/tests/literal.test.ts
@@ -55,6 +55,10 @@ test("invalid_literal should return custom message", () => {
   expect(issue.message).toEqual(`That's not a tuna`);
 });
 
+test("literal requires at least one value", () => {
+  expect(() => z.literal([] as const)).toThrow("Literal schemas must include at least one value.");
+});
+
 test("literal default error message", () => {
   const result = z.literal("Tuna").safeParse("Trout");
   expect(result.success).toEqual(false);
diff --git a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/src/v4/core/schemas.ts b/app/packages/zod/src/v4/core/schemas.ts
index 0622c5d..618d15a 100644
--- a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/src/v4/core/schemas.ts
+++ b/app/packages/zod/src/v4/core/schemas.ts
@@ -1906,13 +1906,13 @@ function handleUnionResults(results: ParsePayload[], final: ParsePayload, inst:
   for (const result of results) {
     if (result.issues.length === 0) {
       final.value = result.value;
+      final.issues.length = 0;
       return final;
     }
   }
 
-  const nonaborted = results.filter((r) => !util.aborted(r));
-  if (nonaborted.length > 0) {
-    final.value = nonaborted[0].value;
+  const nonaborted = results.filter((result) => !util.aborted(result));
+  if (nonaborted.length === 1) {
     return nonaborted[0];
   }
 
@@ -2782,6 +2782,10 @@ export const $ZodLiteral: core.$constructor<$ZodLiteral> = /*@__PURE__*/ core.$c
   (inst, def) => {
     $ZodType.init(inst, def);
 
+    if (def.values.length === 0) {
+      throw new Error("Literal schemas must include at least one value.");
+    }
+
     inst._zod.values = new Set<util.Literal>(def.values);
     inst._zod.pattern = new RegExp(
       `^(${def.values
diff --git a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/src/v4/core/versions.ts b/app/packages/zod/src/v4/core/versions.ts
index ce46253..c2f6e4d 100644
--- a/tmp/agent-patch-flux-pr-4970.1-of-1.2026-02-20__00-10-38__gpt-5-1-codex-mini/app/packages/zod/src/v4/core/versions.ts
+++ b/app/packages/zod/src/v4/core/versions.ts
@@ -1,5 +1,5 @@
 export const version = {
   major: 4,
   minor: 0,
-  patch: 8 as number,
+  patch: 9 as number,
 } as const;