From 5420a866a338d81411f1df5985749c8d15d75c04 Mon Sep 17 00:00:00 2001 From: ualtinok <94532+ualtinok@users.noreply.github.com> Date: Mon, 26 Oct 2026 10:27:57 +0100 Subject: [PATCH 1/2] Give bash test completion waits a CI-safe budget bash_streams_progress_and_returns_final_response failed on main's Windows integration shard (run 40296340355): 'echo hello' through PowerShell had not finished within the test's 5 s wait on a loaded runner. The test checks what a finished task reports, not shell start latency, so its completion wait (and the two others in the file) now share a 30 s budget and report the last status when they expire. Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> --- crates/aft/tests/integration/bash_test.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/crates/aft/tests/integration/bash_test.rs b/crates/aft/tests/integration/bash_test.rs index 08eaa7ef81..58bc36d531 100644 --- a/crates/aft/tests/integration/bash_test.rs +++ b/crates/aft/tests/integration/bash_test.rs @@ -54,6 +54,11 @@ impl TestPty { } } +/// How long a test waits for a task it expects to finish. Generous because a +/// loaded CI runner can take seconds to start a shell (PowerShell on Windows +/// especially); waits that expect nothing to happen stay short. +const POSITIVE_COMPLETION_WAIT: std::time::Duration = std::time::Duration::from_secs(30); + #[cfg(unix)] fn wait_for_terminal_status(aft: &mut AftProcess, task_id: &str) -> serde_json::Value { let started = std::time::Instant::now(); @@ -73,7 +78,7 @@ fn wait_for_terminal_status(aft: &mut AftProcess, task_id: &str) -> serde_json:: return status; } assert!( - started.elapsed() < std::time::Duration::from_secs(5), + started.elapsed() < POSITIVE_COMPLETION_WAIT, "timed out waiting for terminal bash status: {status:?}" ); std::thread::sleep(std::time::Duration::from_millis(50)); @@ -468,7 +473,13 @@ fn bash_streams_progress_and_returns_final_response() { if status["status"] == "completed" { break status; } - assert!(started.elapsed() < std::time::Duration::from_secs(5)); + // This test checks what a finished task reports, not how fast the shell + // starts; a task that never finishes still fails here, with its last + // status. + assert!( + started.elapsed() < POSITIVE_COMPLETION_WAIT, + "task did not complete within {POSITIVE_COMPLETION_WAIT:?}; last status: {status:?}" + ); std::thread::sleep(std::time::Duration::from_millis(50)); }; assert_eq!( @@ -888,7 +899,10 @@ fn bash_timeout_terminates_shell_process_group_grandchild() { if status["status"] == "timed_out" { break; } - assert!(started.elapsed() < std::time::Duration::from_secs(5)); + assert!( + started.elapsed() < POSITIVE_COMPLETION_WAIT, + "task did not time out within {POSITIVE_COMPLETION_WAIT:?}; last status: {status:?}" + ); std::thread::sleep(std::time::Duration::from_millis(50)); } let pid: i32 = std::fs::read_to_string(&pid_file) From eb1cfc2afb26b3cd5913cea6d243c49eaf035e63 Mon Sep 17 00:00:00 2001 From: ualtinok <94532+ualtinok@users.noreply.github.com> Date: Mon, 26 Oct 2026 10:33:35 +0100 Subject: [PATCH 2/2] search-quality descriptor for bash-progress-test-wait Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com> --- .../slice-descriptors/land-bash-progress-test-wait.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 benchmarks/aft-search/slice-descriptors/land-bash-progress-test-wait.json diff --git a/benchmarks/aft-search/slice-descriptors/land-bash-progress-test-wait.json b/benchmarks/aft-search/slice-descriptors/land-bash-progress-test-wait.json new file mode 100644 index 0000000000..ebd574711e --- /dev/null +++ b/benchmarks/aft-search/slice-descriptors/land-bash-progress-test-wait.json @@ -0,0 +1,8 @@ +{ + "targeted_mechanism": "none", + "kind": "harness", + "slice_class": "non_ranking", + "fixtures": [ + "harness-goldens" + ] +}