fix(analysis): bind overview document identity to the active target (#1094)

* fix(analysis): bind overview document identity to the active target

* fix(analysis): refresh legacy overview snapshot results
This commit is contained in:
Ysopwnable
2026-10-09 00:57:28 +08:00
committed by GitHub
parent 4a1837d9d5
commit 81b5104276
10 changed files with 292 additions and 129 deletions
+14
View File
@@ -346,6 +346,10 @@ try {
requireSuccessfulTool(overview, "binary_overview"),
"binary_overview",
);
if (firstOverview.document !== currentDocument)
throw new Error(
"binary_overview did not identify the selected Hopper document",
);
const firstAnalysis = await verifyCurrentTarget(client, options);
const fixtureAnalysis = await verifyRealHopperFixture({
client,
@@ -382,6 +386,16 @@ try {
await client.callTool({ name: "list_documents", arguments: {} }, options),
"list_documents after target switch",
);
const secondDocument = await requireCurrentDocument(
client,
options,
documentsAfterTargetSwitch,
requireSuccessfulTool,
);
if (verifiedSecondOverview.document !== secondDocument)
throw new Error(
"binary_overview retained another document after target switch",
);
const expectedDocumentsAfterTargetSwitch =
process.platform === "linux"
? firstDocuments.length