From 2be2d006b8d4f949dfc58c6952b04d5ba70bd9c0 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Thu, 5 Nov 2026 17:36:02 +0800 Subject: [PATCH] test(ghidra): check regex recovery at its owning boundary (#8578) --- scripts/lib/real-ghidra-boundaries.mjs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/lib/real-ghidra-boundaries.mjs b/scripts/lib/real-ghidra-boundaries.mjs index 7a6776f837..67787e5d2d 100644 --- a/scripts/lib/real-ghidra-boundaries.mjs +++ b/scripts/lib/real-ghidra-boundaries.mjs @@ -10,6 +10,7 @@ import { access, readFile, readdir, stat } from "node:fs/promises"; import { dirname, join } from "node:path"; import { setTimeout as delay } from "node:timers/promises"; import { promisify } from "node:util"; +import { GHIDRA_ANNOTATIONS_RETAINED } from "../../dist/ghidra/GhidraProviderClient.js"; import Ajv from "ajv/dist/2020.js"; import addFormats from "ajv-formats"; @@ -547,12 +548,10 @@ export async function verifyGhidraBoundaries( regexError.remediation.action, /literal mode or simplify the regex/u, ); - // The retry advice lives in the remediation; the reason states that the - // session survived the overflow. - assert.match( - regexError.details.reason, - /exhausted its stack.*session and annotations remain available/u, - ); + // The producer reason describes the failure; continuing-session guidance + // is projected separately and the following live calls verify it. + assert.match(regexError.details.reason, /stack while matching pattern/u); + assert.ok(regexError.message.includes(GHIDRA_ANNOTATIONS_RETAINED)); rejectedCalls++; const nestedPattern = "(".repeat(12000) + "a" + ")".repeat(12000); const compileFailure = await client.callTool(