From d31d9daba2cac6c7653ffa9be3ecceb63e08ace1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Oct 2026 19:07:40 +0000 Subject: [PATCH] fix(nightly-sota): ignore stdin EPIPE from children that never read input runProcess() ends the child's stdin with no error handler. A child that never reads stdin (git check-ignore) can exit and close the pipe before the write flushes; the unhandled EPIPE then crashes `agent.mjs validate`. This failed harness/ruview (node 22) on PR #2062 and reproduces 12/12 locally under CPU load (0/12 after this change). The command's real outcome is still reported by the 'close' handler; this mirrors the existing handler in harness/ruview/src/process-runner.js. Co-Authored-By: claude-flow Claude-Session: https://claude.ai/code/session_015H55jmprfz4oHWXSFbX5rf --- .github/scripts/nightly-sota/agent.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/scripts/nightly-sota/agent.mjs b/.github/scripts/nightly-sota/agent.mjs index 646b9dad3..bc2c3e7dc 100644 --- a/.github/scripts/nightly-sota/agent.mjs +++ b/.github/scripts/nightly-sota/agent.mjs @@ -135,6 +135,10 @@ async function runProcess(command, args, { resolve(result); }); }); + // A child that never reads stdin (e.g. `git check-ignore`) may exit and + // close the pipe before this write flushes; the resulting EPIPE is not a + // failure of the command, whose real outcome the 'close' handler reports. + child.stdin.on('error', () => {}); child.stdin.end(input); }); }