test(gate): tolerate EPIPE in the no-node test; harness asserts skill.triage
deploy / test (push) Successful in 5m2s
deploy / build (push) Successful in 5m35s

The no-node test runs the hook with an empty PATH, so cat is missing too
and the script exits before reading stdin; on Linux the test's write can
lose that race (CI run 6483). The child exiting unread is the no-node
path working. Harness: assert_skill_triage on chain and microvm — the
event must exist; agreement with what the agent read is reported.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WZb5A2kfVfjpdwSochkuHz
This commit is contained in:
Omar Sobh
2026-09-21 10:13:05 -05:00
co-authored by Claude Opus 5
parent 0a2bd6f868
commit 37eb6bcad1
2 changed files with 45 additions and 8 deletions
+9 -8
View File
@@ -890,14 +890,15 @@ mod shell_tests {
.stderr(Stdio::piped())
.spawn()
.expect("spawn sh");
child
.stdin
.as_mut()
.unwrap()
.write_all(
br#"{"tool_name":"Bash","tool_input":{"command":"git push --force origin main"}}"#,
)
.unwrap();
// With an empty PATH `cat` is missing too, so the script never reads
// its stdin and may exit before this write lands. EPIPE here IS the
// no-node path succeeding, not a failure: CI run 6483 lost that race
// on Linux after every earlier run had won it.
if let Err(e) = child.stdin.as_mut().unwrap().write_all(
br#"{"tool_name":"Bash","tool_input":{"command":"git push --force origin main"}}"#,
) {
assert_eq!(e.kind(), std::io::ErrorKind::BrokenPipe, "{e}");
}
let out = child.wait_with_output().expect("wait");
assert_eq!(