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 <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_015H55jmprfz4oHWXSFbX5rf
This commit is contained in:
Claudeandclaude-flow committed 2026-10-01 19:07:40 +00:00
1 parent b25729acd6
commit d31d9daba2
1 file changed
+4
+4
View File
@@ -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);
});
}