test(gate): tolerate EPIPE in the no-node test; harness asserts skill.triage
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:
co-authored by
Claude Opus 5
parent
0a2bd6f868
commit
37eb6bcad1
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user