From 6489d58851d055fd7ce621000d960bb42a0e4ce0 Mon Sep 17 00:00:00 2001 From: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> Date: Fri, 9 Oct 2026 08:16:45 +0000 Subject: [PATCH] fix(javascript): keep Wakaru version stderr out of the refusal message The version-mismatch reason ends with the tool's complete stderr, which is too long for a caller-facing message. The message now names the expected and reported version and exit code; details.reason keeps the stderr. Co-Authored-By: Claude Opus 5.5 --- src/javascript/recovery/WakaruExecution.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/javascript/recovery/WakaruExecution.ts b/src/javascript/recovery/WakaruExecution.ts index 1a4c72067..2d99b46ed 100644 --- a/src/javascript/recovery/WakaruExecution.ts +++ b/src/javascript/recovery/WakaruExecution.ts @@ -70,10 +70,14 @@ const executeWakaruRecovery = async (context: RecoveryWorkspace) => { version.exit_code !== 0 || version.stdout.trim() !== `wakaru ${WAKARU_RELEASE.version}` ) { - const reason = `This adapter requires Wakaru ${WAKARU_RELEASE.version}; reported version: ${version.stdout.trim()}; exit: ${String(version.exit_code)}; stderr: ${version.stderr}`; - throw new AnalysisCapabilityUnavailableError("wakaru", OPERATION, reason, { - userMessage: reason, - }); + // The message names the mismatch; the reason also keeps the tool's stderr. + const mismatch = `This adapter requires Wakaru ${WAKARU_RELEASE.version}; reported version: ${version.stdout.trim()}; exit: ${String(version.exit_code)}`; + throw new AnalysisCapabilityUnavailableError( + "wakaru", + OPERATION, + `${mismatch}; stderr: ${version.stderr}`, + { userMessage: `${mismatch}.` }, + ); } const run = await runWakaruCommand({ ...commandContext,