From b02b3c0f75c27f0fe4b2afefa4099d4b9683ddd5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 01:36:55 +0000 Subject: [PATCH] style(clippy): fix test file lints (zombie_processes, empty_line_after_doc_comment, useless_format, unused_variable) - tests/mcp_http_tests.rs: change module-level /// to // to fix empty_line_after_doc_comment; add child.wait().ok() before panic to fix zombie_processes (all code paths must wait on spawned child) - tests/compiler_tests.rs: prefix unused output_yaml with _ to fix fix useless_format Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/compiler_tests.rs | 4 ++-- tests/mcp_http_tests.rs | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/compiler_tests.rs b/tests/compiler_tests.rs index bb18daaa..2ecae736 100644 --- a/tests/compiler_tests.rs +++ b/tests/compiler_tests.rs @@ -43,7 +43,7 @@ This is a test agent for integration testing. fs::create_dir_all(temp_dir.join(".github/agents")).expect("Failed to create .github/agents"); // Run the compilation - let output_yaml = temp_dir.join("test-agent.yml"); + let _output_yaml = temp_dir.join("test-agent.yml"); // Note: We can't directly call compile_pipeline from here since it's not a library function // This test verifies the output structure when compile runs @@ -3730,7 +3730,7 @@ fn assert_marker_step_present( "{fixture_name}: marker line missing schema=1: {line}" ); assert!( - line.contains(&format!("\"source\":\"")) && line.contains(expected_source_suffix), + line.contains("\"source\":\"") && line.contains(expected_source_suffix), "{fixture_name}: marker line does not include source suffix {expected_source_suffix}: {line}" ); // The runtime echo on the next line should mirror the same data diff --git a/tests/mcp_http_tests.rs b/tests/mcp_http_tests.rs index 6a132844..86634ed0 100644 --- a/tests/mcp_http_tests.rs +++ b/tests/mcp_http_tests.rs @@ -2,11 +2,11 @@ use std::io::BufRead; use std::process::{Child, Command, Stdio}; use std::time::Duration; -/// Integration tests for the SafeOutputs HTTP server (`mcp-http` subcommand). -/// -/// These tests validate the HTTP transport layer that MCPG uses to reach -/// SafeOutputs. They do NOT require Docker or the MCPG gateway — they test -/// the ado-aw HTTP server directly. +// Integration tests for the SafeOutputs HTTP server (`mcp-http` subcommand). +// +// These tests validate the HTTP transport layer that MCPG uses to reach +// SafeOutputs. They do NOT require Docker or the MCPG gateway — they test +// the ado-aw HTTP server directly. /// Guard that kills the child process on drop (even on panic). struct ServerGuard { @@ -94,6 +94,7 @@ fn start_server() -> ServerGuard { } // Kill and panic if not ready child.kill().ok(); + child.wait().ok(); panic!("SafeOutputs HTTP server did not become ready within 5 s"); }