From 2e54513ca1688ae1efade1d24a688a4d3d477729 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 16:50:25 +0000 Subject: [PATCH 1/3] fix(evals): Report why security corpus hunks failed A failed hunk showed as "Warden did not finish: [] (1 failed hunks)", which dropped the reason. The harness output now carries the report's hunk failures, and the error lists each failure's code and message. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com> --- packages/evals/src/harness.ts | 4 +++- packages/evals/src/security-corpus.eval.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/evals/src/harness.ts b/packages/evals/src/harness.ts index 10074ab1a..0397e0125 100644 --- a/packages/evals/src/harness.ts +++ b/packages/evals/src/harness.ts @@ -12,7 +12,7 @@ import { runJudge, type JudgeOptions } from './judge.js'; import { runEvalSkill, type RunEvalOptions } from './runner.js'; import { evalPassed, type EvalMeta, type JudgeResponse } from './types.js'; import { usageToSummary } from './usage.js'; -import { FindingSchema, type Finding, type SkillReport, type UsageStats } from '@sentry/warden'; +import { FindingSchema, HunkFailureSchema, type Finding, type SkillReport, type UsageStats } from '@sentry/warden'; export const WardenEvalOutputSchema = z.object({ name: z.string(), @@ -23,6 +23,7 @@ export const WardenEvalOutputSchema = z.object({ findings: z.array(FindingSchema), failedHunks: z.number().int().nonnegative().optional(), failedExtractions: z.number().int().nonnegative().optional(), + hunkFailures: z.array(HunkFailureSchema).optional(), }); export type WardenEvalOutput = z.infer; @@ -48,6 +49,7 @@ function reportToOutput(name: string, report: SkillReport): WardenEvalOutput { findings: report.findings, failedHunks: report.failedHunks, failedExtractions: report.failedExtractions, + hunkFailures: report.hunkFailures, }; } diff --git a/packages/evals/src/security-corpus.eval.ts b/packages/evals/src/security-corpus.eval.ts index 211d77b2c..d23425100 100644 --- a/packages/evals/src/security-corpus.eval.ts +++ b/packages/evals/src/security-corpus.eval.ts @@ -86,7 +86,8 @@ describeEval( // A failed run is an error, never a miss. const output = WardenEvalOutputSchema.parse(result.output); if (result.errors.length > 0 || output.failedHunks) { - throw new Error(`Warden did not finish: ${JSON.stringify(result.errors)} (${output.failedHunks ?? 0} failed hunks)`); + const hunks = (output.hunkFailures ?? []).map((f) => `${f.code}: ${f.message}`); + throw new Error(`Warden did not finish: ${JSON.stringify([...result.errors, ...hunks])}`); } }); } From 2cc98618da6cedcfac4ca6bcafd4cbb985bbe3c3 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 16:57:53 +0000 Subject: [PATCH 2/3] fix(deps): Override every zod below 4.6.6 The vercel CLI dev dependency of warden-service pulled in zod 3.22.4, which has GHSA-mrhx-c7xc-m3w5. No 3.x release has the fix, so the override now maps every zod below 4.6.6 to 4.6.7. The vercel CLI and the @vercel packages that import zod still load. --- package.json | 2 +- pnpm-lock.yaml | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3df558f65..1417b43b9 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "undici@5.28.4": "6.28.1", "undici@5.29.0": "6.28.1", "undici@>=8.0.0 <8.10.2": "8.10.2", - "zod@>=4.0.0 <4.6.6": "4.6.7", + "zod@<4.6.6": "4.6.7", "react": "19.2.6", "react-dom": "19.2.6" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 273650fbd..f0d5588c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,7 @@ overrides: undici@5.28.4: 6.28.1 undici@5.29.0: 6.28.1 undici@>=8.0.0 <8.10.2: 8.10.2 - zod@>=4.0.0 <4.6.6: 4.6.7 + zod@<4.6.6: 4.6.7 react: 19.2.6 react-dom: 19.2.6 @@ -6449,9 +6449,6 @@ packages: peerDependencies: zod: 4.6.7 - zod@3.22.4: - resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - zod@4.6.7: resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} @@ -8740,7 +8737,7 @@ snapshots: srvx: 0.11.16 ts-morph: 12.0.0 tsx: 4.21.0 - zod: 3.22.4 + zod: 4.6.7 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -8820,7 +8817,7 @@ snapshots: fs-extra: 11.1.0 path-to-regexp: 8.4.2 ts-morph: 12.0.0 - zod: 3.22.4 + zod: 4.6.7 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -8907,7 +8904,7 @@ snapshots: fs-extra: 11.1.0 path-to-regexp: 8.4.2 ts-morph: 12.0.0 - zod: 3.22.4 + zod: 4.6.7 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -9029,7 +9026,7 @@ snapshots: js-yaml: 4.3.2 minimatch: 10.2.5 smol-toml: 1.9.0 - zod: 3.22.4 + zod: 4.6.7 '@vercel/python@9.2.0(@vercel/build-utils@14.5.1)': dependencies: @@ -12915,8 +12912,6 @@ snapshots: dependencies: zod: 4.6.7 - zod@3.22.4: {} - zod@4.6.7: {} zwitch@2.0.4: {} From 20f9bd7a9176d8ebadac2088482fa03a30d71332 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 17:27:33 +0000 Subject: [PATCH 3/3] Revert "fix(deps): Override every zod below 4.6.6" Main no longer resolves zod 3 since #597 dropped the vercel CLI, so the wider override is not needed. --- package.json | 2 +- pnpm-lock.yaml | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1417b43b9..3df558f65 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "undici@5.28.4": "6.28.1", "undici@5.29.0": "6.28.1", "undici@>=8.0.0 <8.10.2": "8.10.2", - "zod@<4.6.6": "4.6.7", + "zod@>=4.0.0 <4.6.6": "4.6.7", "react": "19.2.6", "react-dom": "19.2.6" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0d5588c8..273650fbd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,7 @@ overrides: undici@5.28.4: 6.28.1 undici@5.29.0: 6.28.1 undici@>=8.0.0 <8.10.2: 8.10.2 - zod@<4.6.6: 4.6.7 + zod@>=4.0.0 <4.6.6: 4.6.7 react: 19.2.6 react-dom: 19.2.6 @@ -6449,6 +6449,9 @@ packages: peerDependencies: zod: 4.6.7 + zod@3.22.4: + resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + zod@4.6.7: resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} @@ -8737,7 +8740,7 @@ snapshots: srvx: 0.11.16 ts-morph: 12.0.0 tsx: 4.21.0 - zod: 4.6.7 + zod: 3.22.4 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -8817,7 +8820,7 @@ snapshots: fs-extra: 11.1.0 path-to-regexp: 8.4.2 ts-morph: 12.0.0 - zod: 4.6.7 + zod: 3.22.4 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -8904,7 +8907,7 @@ snapshots: fs-extra: 11.1.0 path-to-regexp: 8.4.2 ts-morph: 12.0.0 - zod: 4.6.7 + zod: 3.22.4 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -9026,7 +9029,7 @@ snapshots: js-yaml: 4.3.2 minimatch: 10.2.5 smol-toml: 1.9.0 - zod: 4.6.7 + zod: 3.22.4 '@vercel/python@9.2.0(@vercel/build-utils@14.5.1)': dependencies: @@ -12912,6 +12915,8 @@ snapshots: dependencies: zod: 4.6.7 + zod@3.22.4: {} + zod@4.6.7: {} zwitch@2.0.4: {}