diff --git a/src/android/JadxRelease.ts b/src/android/JadxRelease.ts index 3e48adf558..4123d6f1ae 100644 --- a/src/android/JadxRelease.ts +++ b/src/android/JadxRelease.ts @@ -14,7 +14,7 @@ export const JADX_BRIDGE_IDENTITY = Object.freeze({ }); /** Remediation when `REA_JADX_MCP_JAR` is missing or not an absolute path. */ -export const JADX_JAR_CONFIGURATION_REMEDIATION = `Set REA_JADX_MCP_JAR to the absolute path of a caller-supplied jadx-headless-mcp ${JADX_RELEASE.version} JAR. REA does not download or install it.`; +export const JADX_JAR_CONFIGURATION_REMEDIATION = `Download the jadx-headless-mcp ${JADX_RELEASE.version} release JAR from ${JADX_RELEASE.url}, verify SHA-256 ${JADX_RELEASE.sha256}, and set REA_JADX_MCP_JAR to its absolute path. REA does not download or install it.`; /** Remediation when the selected Java runtime cannot satisfy the JADX bridge. */ export const JADX_JAVA_RUNTIME_REMEDIATION = diff --git a/src/application/CapabilityInventory.ts b/src/application/CapabilityInventory.ts index c0ff145bb6..1ca915e89a 100644 --- a/src/application/CapabilityInventory.ts +++ b/src/application/CapabilityInventory.ts @@ -748,7 +748,7 @@ const workflowAvailabilityFor = ( : "provider_missing", remediation: policy.androidAnalysisAvailability?.remediation ?? - "Set REA_JADX_MCP_JAR to a caller-supplied jadx-headless-mcp 0.7.1 JAR and provide a full JDK on Linux, macOS, or Windows x64 with its matching bundled native controls.", + "Set REA_JADX_MCP_JAR to the jadx-headless-mcp 0.7.1 release JAR (rea doctor --provider jadx names its download URL and SHA-256) and provide a full JDK on Linux, macOS, or Windows x64 with its matching bundled native controls.", }; if (kind === "adb-provider") return ownerProbeAvailability( diff --git a/src/server/registerSessionTools.ts b/src/server/registerSessionTools.ts index ee49fbab43..b943376b8a 100644 --- a/src/server/registerSessionTools.ts +++ b/src/server/registerSessionTools.ts @@ -520,6 +520,6 @@ const missingAndroidAvailability = async (): Promise => ({ code: "not_configured", reason: "No Android JADX analysis provider is configured.", remediation: - "Set REA_JADX_MCP_JAR to a caller-supplied jadx-headless-mcp 0.7.1 JAR and provide a full JDK on Linux, macOS, or Windows x64 with its matching bundled native controls.", + "Set REA_JADX_MCP_JAR to the jadx-headless-mcp 0.7.1 release JAR (rea doctor --provider jadx names its download URL and SHA-256) and provide a full JDK on Linux, macOS, or Windows x64 with its matching bundled native controls.", diagnostics: { configured: false }, }); diff --git a/tests/boundary/android/jadxDoctor.test.ts b/tests/boundary/android/jadxDoctor.test.ts index f48c86d341..2b21e1dccc 100644 --- a/tests/boundary/android/jadxDoctor.test.ts +++ b/tests/boundary/android/jadxDoctor.test.ts @@ -5,6 +5,7 @@ import { join } from "node:path"; import { expect, it as test, onTestFinished } from "vitest"; import { inspectJadxProvider as inspectProvider } from "../../../src/android/JadxDoctor.js"; +import { JADX_RELEASE } from "../../../src/android/JadxRelease.js"; import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js"; import { writeJadxJarInventory } from "../../fixtures/android/jadxJar.js"; import { writeOrderedZip } from "../../fixtures/artifactEntryOrder.js"; @@ -131,6 +132,9 @@ it("publishes no registration environment when REA_JADX_MCP_JAR is unset", async }, ], }); + // The recovery names where to obtain the exact audited JAR. + expect(inspection.checks[0]?.remediation).toContain(JADX_RELEASE.url); + expect(inspection.checks[0]?.remediation).toContain(JADX_RELEASE.sha256); }); it("reports a relative REA_JADX_MCP_JAR as a rejected selection, not an unset one", async () => {