From 2af8e79fb7f0319cc491f3a5b8d3f5661cba520c Mon Sep 17 00:00:00 2001 From: Michael Zhou Date: Sun, 29 Nov 2026 17:55:22 +0800 Subject: [PATCH] Count a failure only a published image has apart from the rest The daily model check's issue counts every red row the same, and its body keeps 150 of them. A model that failed on the published image and answered on the one built from this commit is a row no change here can move: the next release carries the fix, which docs/releasing.md already says ("the `latest` rows stay red until one does"). Agno's 27 Google models were exactly that this morning, after #2384 took the Agno-internal tool field out of the request, and they spent the cap on rows nobody could act on while the eight models Google really did stop serving sat below the cut. So a failure whose model answered on `source` is counted apart and listed last, under its own heading, and the row cap is spent on what is still broken on the image this commit builds. A `source` row is never one of them: it is the next release, so its failures are always still broken. The exit code is unchanged, so the issue still opens and closes as it did. This does not make any model answer again. The eight that Google retired or moved to the Interactions API are a model-list matter, and the daily check's own lock refresh (#1858) is what takes them out of the picker. Fixes nothing in #2454; reported from it. Co-Authored-By: Claude Code --- docs/releasing.md | 4 ++ scripts/model-compat.test.ts | 110 +++++++++++++++++++++++++++++++++++ scripts/model-compat.ts | 63 +++++++++++++++++--- 3 files changed, 170 insertions(+), 7 deletions(-) diff --git a/docs/releasing.md b/docs/releasing.md index 493f5bf6f8..d0d1ceb3d7 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -1202,6 +1202,10 @@ list needs a key. accepts: fix how the harness sets up its model, or bump the framework if a newer one does. - Billing, rate limits or a refused key are the key's problem, not a client's: fix the key. +A model that failed on a published image and answered on `source` is counted apart from the rest +and listed last, under "Fixed on the source image, shipping with the next release": the issue body +keeps 150 rows, so those would otherwise spend the cap on rows no change here can move. + To run it locally (needs Docker), with keys in the environment or an env file: ```sh diff --git a/scripts/model-compat.test.ts b/scripts/model-compat.test.ts index 60f36982c2..c8bfee56f4 100644 --- a/scripts/model-compat.test.ts +++ b/scripts/model-compat.test.ts @@ -12,6 +12,8 @@ import { PROVIDERS, parseCapabilities, providersFor, + type Result, + renderSummary, renderTable, usableModels, } from "./model-compat"; @@ -372,6 +374,114 @@ test("the table escapes what would break a Markdown row", () => { expect(table).toContain("a \\| b c"); }); +const row = ( + harness: string, + tag: string, + model: string, + status: "pass" | "fail", + detail: string, +): Result => ({ + harness, + tag, + provider: "Google (key)", + providerId: "google", + model, + status, + detail, +}); + +test("a failure only a published image has is listed as shipping, not as one to fix", () => { + // The Agno harness sent Google an Agno-internal tool field until #2384: the published image + // still does, the image built from that commit does not. + const summary = renderSummary([ + row("agent-agno", "latest", "gemini-2.5-flash", "fail", "Unknown name"), + row("agent-agno", "source", "gemini-2.5-flash", "pass", "OK"), + ]); + expect(summary).toContain("1 failed"); + expect(summary).toContain( + "### Fixed on the source image, shipping with the next release", + ); + expect(summary).not.toContain("### Failed"); +}); + +test("a failure the source image also has stays a failure to fix", () => { + const summary = renderSummary([ + row( + "agent-agno", + "latest", + "gemini-omni-1.1-flash", + "fail", + "Error code: 400", + ), + row( + "agent-agno", + "source", + "gemini-omni-1.1-flash", + "fail", + "Error code: 400", + ), + ]); + expect(summary).toContain("### Failed"); + expect(summary).not.toContain("shipping with the next release"); +}); + +test("a failure on the source image is never listed as shipping", () => { + const summary = renderSummary([ + row("agent-adk", "latest", "gemini-2.5-flash", "fail", "Unknown name"), + row("agent-adk", "source", "gemini-2.5-flash", "pass", "OK"), + row( + "agent-adk", + "latest", + "gemini-omni-1.1-flash", + "fail", + "Error code: 400", + ), + row( + "agent-adk", + "source", + "gemini-omni-1.1-flash", + "fail", + "Error code: 400", + ), + ]); + const shipping = summary.split("shipping with the next release")[1] ?? ""; + expect(shipping).toContain("gemini-2.5-flash"); + expect(shipping).not.toContain("gemini-omni-1.1-flash"); +}); + +test("the issue's row cap is spent on what is still broken, not on what already ships fixed", () => { + const summary = renderSummary( + [ + row("agent-adk", "latest", "gemini-2.5-flash", "fail", "Unknown name"), + row("agent-adk", "source", "gemini-2.5-flash", "pass", "OK"), + row( + "agent-adk", + "latest", + "gemini-omni-1.1-flash", + "fail", + "Error code: 400", + ), + row( + "agent-adk", + "source", + "gemini-omni-1.1-flash", + "fail", + "Error code: 400", + ), + ], + { passed: false, maxFailed: 1 }, + ); + const failed = summary.split("### Failed")[1]?.split("###")[0] ?? ""; + expect(failed).toContain("gemini-omni-1.1-flash"); + expect(failed).not.toContain("gemini-2.5-flash"); + // Two failures are still broken on the source image and only one row is kept, so the count left + // out is of those two — the one already fixed on source does not spend the cap. + expect(summary).toContain("And 1 more failures"); + expect(summary).toContain( + "### Fixed on the source image, shipping with the next release", + ); +}); + test("every provider the Desktop offers by address is checked", () => { const picker = readFileSync( join(ROOT, "desktop/src/ProviderPicker.tsx"), diff --git a/scripts/model-compat.ts b/scripts/model-compat.ts index a2c5f32cb0..c7db12f514 100644 --- a/scripts/model-compat.ts +++ b/scripts/model-compat.ts @@ -645,10 +645,39 @@ export function renderTable(results: readonly Result[]): string { const ORDER = { fail: 0, skipped: 1, pass: 2 } as const; +/** What names one row's model across the images it was checked on: harness, provider, model. */ +const rowKey = (row: Result) => `${row.harness}|${row.providerId}|${row.model}`; + +/** + * The failures the next release already carries the fix for: a model that failed on a published + * image and answered through the `source` image built from this commit. docs/releasing.md says the + * `latest` rows stay red until a release ships the fix, so counting one of these among the + * failures spends the issue body's row cap on a row nobody can act on and hides the rows that are + * still broken on `source`, which are the only ones a change here can move. + */ +function shippingFix(results: readonly Result[]): Set { + const answered = new Set( + results + .filter((row) => row.tag === SOURCE && row.status === "pass") + .map(rowKey), + ); + return new Set( + results + .filter( + (row) => + row.tag !== SOURCE && + row.status === "fail" && + answered.has(rowKey(row)), + ) + .map(rowKey), + ); +} + /** - * The summary: what failed first, then what was skipped for want of a key, then what passed. The - * issue's copy leaves out what passed and keeps at most `maxFailed` failures, since an issue body - * holds 65,536 characters and the run's own summary has the rest. + * The summary: what failed first, then what was skipped for want of a key, then what passed, then + * the failures only a published image still has. The issue's copy leaves out what passed and keeps + * at most `maxFailed` failures, since an issue body holds 65,536 characters and the run's own + * summary has the rest. */ export function renderSummary( results: readonly Result[], @@ -667,6 +696,14 @@ export function renderSummary( const count = (status: Result["status"]) => results.filter((row) => row.status === status).length; const failed = sorted.filter((row) => row.status === "fail"); + const shipped = shippingFix(results); + // What is still broken on the image this commit builds, which is the only part a change here + // can move, and what only a published image still has. A `source` row is never the second kind: + // it is the next release, so its failures are always still broken. + const broken = failed.filter((row) => !shipped.has(rowKey(row))); + const shipping = failed.filter( + (row) => row.tag !== SOURCE && shipped.has(rowKey(row)), + ); const skipped = sorted.filter((row) => row.status === "skipped"); const passed = sorted.filter((row) => row.status === "pass"); const missing = [ @@ -684,16 +721,21 @@ export function renderSummary( `${count("fail")} failed, ${count("pass")} passed, ${count("skipped")} skipped.`, "", ]; + if (shipping.length) + parts.push( + `${shipping.length} of those failed only on a published image: the same model answered through the \`source\` image built from this commit, so the next release carries the fix. They are listed last.`, + "", + ); if (missing.length) parts.push( `Skipped for want of a key, not failed: add the repository secret${missing.length > 1 ? "s" : ""} ${missing.map((name) => `\`${name}\``).join(", ")} to check ${missing.length > 1 ? "those providers" : "that provider"}.`, "", ); - if (failed.length) { - parts.push("### Failed", "", renderTable(failed.slice(0, maxFailed)), ""); - if (failed.length > maxFailed) + if (broken.length) { + parts.push("### Failed", "", renderTable(broken.slice(0, maxFailed)), ""); + if (broken.length > maxFailed) parts.push( - `And ${failed.length - maxFailed} more failures, in the run's summary.`, + `And ${broken.length - maxFailed} more failures, in the run's summary.`, "", ); } @@ -707,6 +749,13 @@ export function renderSummary( "", "", ); + if (shipping.length) + parts.push( + "### Fixed on the source image, shipping with the next release", + "", + renderTable(shipping), + "", + ); return parts.join("\n"); }