Repository navigation
fix(bench): ignore EPIPE when an agent exits before it reads stdin - #47
Merged
Merged
Conversation
Problem: "a mock run records one row per arm with the edit the agent made" failed on the Windows Node 24 leg of run 43267718210 (2026-11-12). bench/run.mjs ended the child's stdin after spawn; the mock agent exited before it read it, the write failed with EPIPE, and the stream had no error handler. The harness process died with an unhandled 'error' event and exit code 1, before it recorded any row. The same commit passed on the other 5 legs. Change: the child's stdin gets an error handler that ignores the failed write. The run still records the agent's exit code, output and result, so a closed pipe is not lost information. bench/agent-events.mjs, which moves with this file, reads the agent's output and needed no change. Intent: a scripted agent that exits early gives a recorded row, not a crashed harness and a red CI leg. Assisted-by: Claude
|
COMPLEX.md: 1 hotspot touched, 1 co-change partner not in this pull request.
Co-change partners not in this pull request
Read from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
a mock run records one row per arm with the edit the agent madefailed on the Windows Node 24 leg of run 43267718210 (#4, after a merge from main). The other 5 legs passed on the same commit. The harness itself crashed:bench/run.mjsends the agent's stdin right after spawn. The mock agent can exit before it reads stdin. The write then fails with EPIPE, and with no error handler on the stream, the harness process dies with exit code 1 before it records a row.bench/agent-events.mjs, which moves withrun.mjsin COMPLEX.md, reads the agent's output and needed no change.This is the second timing flake found today, after the parallel build race in #45.
How it was tested
cd cli && node --test test/bench-harness.test.js test/bench-sandbox.test.js: 19 pass, 0 fail, including the sandbox tests on a host where the sandbox runs.cd cli && npm test: exit 0, 838 pass, 0 fail.AI assistance
Assisted-by:or aCo-Authored-By:trailer.🤖 Generated with Claude Code
https://claude.ai/code/session_011jHASLngEodgNzogro3gQz