From 1ab1327f96c6565799742d9ff77eae62dfcf7ee1 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Tue, 14 Apr 2026 19:31:01 -0400 Subject: [PATCH] fix(ci): stabilize graphviz Rust checks Keep the render-graph CLI integration test explicitly documented for synchronous stdio subprocess usage, and make the garbage-stdout server test drain stdin before returning invalid output so the Linux test path stays deterministic. --- lib/crates/fabro-cli/tests/it/cmd/render_graph.rs | 5 +++++ lib/crates/fabro-server/src/server.rs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/crates/fabro-cli/tests/it/cmd/render_graph.rs b/lib/crates/fabro-cli/tests/it/cmd/render_graph.rs index 088cec424..e58c0bef7 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/render_graph.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/render_graph.rs @@ -1,3 +1,8 @@ +#![expect( + clippy::disallowed_methods, + reason = "These CLI integration tests intentionally spawn the real fabro binary and stream DOT over stdio to verify the internal render subprocess contract." +)] + use std::io::Write; use std::process::{Command, Stdio}; diff --git a/lib/crates/fabro-server/src/server.rs b/lib/crates/fabro-server/src/server.rs index f08779b90..4865d5ac6 100644 --- a/lib/crates/fabro-server/src/server.rs +++ b/lib/crates/fabro-server/src/server.rs @@ -8048,7 +8048,8 @@ slug = "fabro" #[cfg(unix)] #[tokio::test] async fn render_dot_subprocess_returns_protocol_violation_for_garbage_stdout() { - let (_dir, script_path) = write_test_executable("#!/bin/sh\nprintf 'garbage'\nexit 0\n"); + let (_dir, script_path) = + write_test_executable("#!/bin/sh\ncat >/dev/null\nprintf 'garbage'\nexit 0\n"); let result = render_dot_subprocess("digraph { a -> b }", Some(&script_path)).await;