From 18d56f5321c3c5d5be40c19bcb0a0f2b25c2d459 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Tue, 13 Oct 2026 14:05:32 +0800 Subject: [PATCH] test(ghidra): restore complete installation fixtures across CI boundaries Declare application.java.min=21 at the four synthetic installation producers so profile, PSP, lifecycle and MCP workflows exercise their intended paths under fail-closed Java admission. Keep missing-bound refusal coverage intact and format the two Ghidra tests rejected by the CI static lane. Validation: all 82 tests across the 11 failing CI files passed; 66 Ghidra admission, doctor and snapshot tests passed, including missing Java bounds. No production admission policy changed. Full suite and real Ghidra lanes were not run. --- src/ghidra/GhidraDoctor.test.ts | 4 +++- src/ghidra/GhidraSnapshotCache.test.ts | 3 ++- tests/boundary/filesystem/ghidraPspExtension.test.ts | 2 +- tests/boundary/mcp/ghidraMcpHarness.ts | 2 +- tests/boundary/mcp/ghidraReopen.test.ts | 2 +- tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts | 3 ++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ghidra/GhidraDoctor.test.ts b/src/ghidra/GhidraDoctor.test.ts index 5335e4f60..e5d20f4c8 100644 --- a/src/ghidra/GhidraDoctor.test.ts +++ b/src/ghidra/GhidraDoctor.test.ts @@ -111,7 +111,9 @@ describe("Ghidra doctor integration", () => { "wrong version", inspection( { installDir: INSTALL }, - { readText: () => "application.version=11.4\napplication.java.min=21\n" }, + { + readText: () => "application.version=11.4\napplication.java.min=21\n", + }, ), "ghidra-version", ], diff --git a/src/ghidra/GhidraSnapshotCache.test.ts b/src/ghidra/GhidraSnapshotCache.test.ts index 5185054e9..9cf5c24ad 100644 --- a/src/ghidra/GhidraSnapshotCache.test.ts +++ b/src/ghidra/GhidraSnapshotCache.test.ts @@ -39,7 +39,8 @@ const fixture = (version = "12.1.4") => { { platform: "linux", architecture: "x64", - readText: () => `application.version=${version}\napplication.java.min=21\n`, + readText: () => + `application.version=${version}\napplication.java.min=21\n`, executable: () => true, probeJava: () => ({ version: "21.0.11", diff --git a/tests/boundary/filesystem/ghidraPspExtension.test.ts b/tests/boundary/filesystem/ghidraPspExtension.test.ts index 88e25939a..0e07ad629 100644 --- a/tests/boundary/filesystem/ghidraPspExtension.test.ts +++ b/tests/boundary/filesystem/ghidraPspExtension.test.ts @@ -52,7 +52,7 @@ const target = { const host: GhidraInstallationHost = { platform: "linux", architecture: "x64", - readText: () => "application.version=12.1.3\n", + readText: () => "application.version=12.1.3\napplication.java.min=21\n", executable: () => true, probeJava: () => ({ version: "21.0.12", diff --git a/tests/boundary/mcp/ghidraMcpHarness.ts b/tests/boundary/mcp/ghidraMcpHarness.ts index 7e2c3ae73..ad3565992 100644 --- a/tests/boundary/mcp/ghidraMcpHarness.ts +++ b/tests/boundary/mcp/ghidraMcpHarness.ts @@ -95,7 +95,7 @@ export const sessionEvidence = (session: BinarySession, value: unknown) => { const installationHost = (): GhidraInstallationHost => ({ platform: "linux", architecture: "x64", - readText: () => "application.version=12.1.4\n", + readText: () => "application.version=12.1.4\napplication.java.min=21\n", executable: () => true, probeJava: () => ({ version: "21.0.11", diff --git a/tests/boundary/mcp/ghidraReopen.test.ts b/tests/boundary/mcp/ghidraReopen.test.ts index bdac57233..6a90f0118 100644 --- a/tests/boundary/mcp/ghidraReopen.test.ts +++ b/tests/boundary/mcp/ghidraReopen.test.ts @@ -99,7 +99,7 @@ class FixtureLauncher implements GhidraLauncher { const installationHost: GhidraInstallationHost = { platform: "linux", architecture: "x64", - readText: () => "application.version=12.1.4\n", + readText: () => "application.version=12.1.4\napplication.java.min=21\n", executable: () => true, probeJava: () => ({ version: "21.0.11", diff --git a/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts b/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts index dc4be5ef2..56fec2151 100644 --- a/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts +++ b/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts @@ -286,7 +286,8 @@ describe.skipIf(process.platform === "win32")( { platform: process.platform, architecture: process.arch, - readText: () => "application.version=12.1.4\n", + readText: () => + "application.version=12.1.4\napplication.java.min=21\n", executable: () => true, probeJava: () => ({ version: "21.0.12",