From 3ed65d37286b1e076b7e62139bc3ef60c0b33a04 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Thu, 16 Apr 2026 19:51:59 -0400 Subject: [PATCH] fix(test): consume stdin in render_graph RENDER_ERROR fake subprocess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fake /bin/sh script in the render_error protocol test printed and exited without reading stdin, which raced the parent's write_all on Linux — EPIPE would surface as ChildCrashed (500) instead of the RenderFailed path (400) the test asserts. macOS pipe buffering masked the race. Adding `cat >/dev/null` mirrors the sibling protocol_violation test and makes the child consume the DOT input before printing the RENDER_ERROR line. Co-Authored-By: Claude Opus 4.7 (1M context) --- lib/crates/fabro-server/src/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crates/fabro-server/src/server.rs b/lib/crates/fabro-server/src/server.rs index 8ee6f5311..16765bdba 100644 --- a/lib/crates/fabro-server/src/server.rs +++ b/lib/crates/fabro-server/src/server.rs @@ -8167,7 +8167,7 @@ slug = "fabro" #[tokio::test] async fn render_graph_bytes_returns_bad_request_for_render_error_protocol() { let (_dir, script_path) = write_test_executable( - "#!/bin/sh\nprintf 'RENDER_ERROR:failed to parse DOT source'\nexit 0\n", + "#!/bin/sh\ncat >/dev/null\nprintf 'RENDER_ERROR:failed to parse DOT source'\nexit 0\n", ); let response =