fix(merger): truncate verification output and retry via in-progress

Deterministic verification failures were embedding the raw stderr/stdout
(up to 50MB per VERIFICATION_COMMAND_MAX_BUFFER) in a second log entry,
flooding logs/stdout and crashing the app. The runVerificationCommand
helper already wrote a truncated summary, so verifyDeterministicBuild
now just references it.

When the failure surfaces in the dashboard merge handler, kick the task
back to in-progress with a steering comment so the agent can fix the
failing test/build instead of parking it in in-review with a fatal
error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-11 06:56:18 -07:00
parent 302394b5f5
commit 6dd66f6a31
2 changed files with 33 additions and 2 deletions

View File

@@ -254,7 +254,7 @@ async function runDeterministicVerification(
result.failedCommand = "testCommand";
await store.logEntry(
taskId,
`Deterministic test verification failed (exit ${testResult.exitCode}): ${testResult.stderr || testResult.stdout}`.trim(),
`Deterministic test verification failed (exit ${testResult.exitCode}) — see prior [verification] entry for truncated output`,
"VerificationError",
);
throw new VerificationError(
@@ -276,7 +276,7 @@ async function runDeterministicVerification(
result.failedCommand = "buildCommand";
await store.logEntry(
taskId,
`Deterministic build verification failed (exit ${buildResult.exitCode}): ${buildResult.stderr || buildResult.stdout}`.trim(),
`Deterministic build verification failed (exit ${buildResult.exitCode}) — see prior [verification] entry for truncated output`,
"VerificationError",
);
throw new VerificationError(