From 7c36f3631862e67a0751967c84abc4f423f5475c Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Mon, 13 Jul 2026 03:38:15 +0000 Subject: [PATCH] fix(analysis): accept valid final dossier pages --- src/domain/hopperValues.ts | 11 ----------- tests/enhancedTools.test.ts | 8 ++------ 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/domain/hopperValues.ts b/src/domain/hopperValues.ts index a1e1377c6..7d5e417bb 100644 --- a/src/domain/hopperValues.ts +++ b/src/domain/hopperValues.ts @@ -106,17 +106,6 @@ const boundedSchema = (item: T) => path: ["next_offset"], }); } - if ( - !value.truncated && - value.total !== null && - value.total !== value.returned - ) { - context.addIssue({ - code: "custom", - message: "a complete collection total must equal returned", - path: ["total"], - }); - } }); const referenceEdgeSchema = z .object({ diff --git a/tests/enhancedTools.test.ts b/tests/enhancedTools.test.ts index 0b441c578..765c1ca71 100644 --- a/tests/enhancedTools.test.ts +++ b/tests/enhancedTools.test.ts @@ -568,7 +568,7 @@ describe("enhanced MCP tools", () => { ); }); - it("rejects complete dossier collections with inflated totals", async () => { + it("accepts a final dossier page whose total exceeds returned", async () => { const malformedPort = fixturePort(); const client = await connect({ execute: async (name, arguments_, options) => { @@ -597,10 +597,6 @@ describe("enhanced MCP tools", () => { name: "analyze_function", arguments: { procedure: "0x1" }, }); - expect(result.isError).toBe(true); - const text = result.content.find((item) => item.type === "text"); - expect(text?.type === "text" ? text.text : "").toContain( - "AnalysisOutputError", - ); + expect(result.isError).not.toBe(true); }); });