diff --git a/benchmarks/aft-search/slice-descriptors/land-flake-batch-39.json b/benchmarks/aft-search/slice-descriptors/land-flake-batch-39.json new file mode 100644 index 000000000..6d3dae3ca --- /dev/null +++ b/benchmarks/aft-search/slice-descriptors/land-flake-batch-39.json @@ -0,0 +1,9 @@ +{ + "slice_class": "engine_unwired", + "targeted_mechanism": "none", + "kind": "harness", + "fixtures": [ + "crates/aft/tests/integration/tool_call_parity_test.rs" + ], + "note": "Test-only: commands/semantic_search/mod.rs changes only the poll deadline of a #[cfg(test)] helper (poll_for_backend_verdict, 5 s to 30 s). No search code path, ranking input or reply changes, so ranked rows must remain byte-identical." +} diff --git a/crates/aft/src/commands/semantic_search/mod.rs b/crates/aft/src/commands/semantic_search/mod.rs index aaf9e061f..3ed3b0fc6 100644 --- a/crates/aft/src/commands/semantic_search/mod.rs +++ b/crates/aft/src/commands/semantic_search/mod.rs @@ -11878,14 +11878,16 @@ mod tests { } /// The backend probe answers on its own thread, so a test repeats the - /// request until the verdict arrives (a refused local connect takes - /// milliseconds) and returns the first reply that carries it, or the last - /// reply after a few seconds so the caller's assertion shows what it got. + /// request until the verdict arrives and returns the first reply that + /// carries it, or the last reply once the deadline passes so the caller's + /// assertion shows what it got. A refused local connect takes milliseconds + /// on Linux and macOS but can take seconds on a loaded Windows runner, so + /// the deadline is generous. fn poll_for_backend_verdict( mut request: impl FnMut() -> serde_json::Value, arrived: impl Fn(&serde_json::Value) -> bool, ) -> serde_json::Value { - let deadline = std::time::Instant::now() + Duration::from_secs(5); + let deadline = std::time::Instant::now() + Duration::from_secs(30); loop { let reply = request(); if arrived(&reply) || std::time::Instant::now() >= deadline { diff --git a/crates/aft/src/logging.rs b/crates/aft/src/logging.rs index 8dfa880e1..36ec662a8 100644 --- a/crates/aft/src/logging.rs +++ b/crates/aft/src/logging.rs @@ -2882,7 +2882,11 @@ mod tests { let caller = thread::spawn(move || { let _ = done.send(write_terminal_log_sync("held-terminal-stderr-probe")); }); - let result = completed.recv_timeout(Duration::from_secs(1)); + // stderr stays held until after this wait, so a write that + // waited on it would time out here; the budget is generous + // because a loaded Windows runner can take over a second to + // persist the line. + let result = completed.recv_timeout(Duration::from_secs(30)); let _ = release.send(()); holder.join().unwrap(); caller.join().unwrap(); diff --git a/crates/aft/src/subc/consent_speech_end_tests.rs b/crates/aft/src/subc/consent_speech_end_tests.rs index 4f62fb2b5..12faf073b 100644 --- a/crates/aft/src/subc/consent_speech_end_tests.rs +++ b/crates/aft/src/subc/consent_speech_end_tests.rs @@ -63,7 +63,9 @@ impl ScopeEndControl { } async fn next(&mut self) -> WriterFrame { - let frame = tokio::time::timeout(Duration::from_secs(10), self.frames.recv()) + // A frame the program never sends still fails; the generous wait only + // absorbs a loaded macOS runner, which missed a 10 s budget. + let frame = tokio::time::timeout(Duration::from_secs(30), self.frames.recv()) .await .unwrap() .unwrap(); diff --git a/crates/aft/src/subc/mod.rs b/crates/aft/src/subc/mod.rs index 41d4348cc..dcb48d613 100644 --- a/crates/aft/src/subc/mod.rs +++ b/crates/aft/src/subc/mod.rs @@ -22898,7 +22898,11 @@ mod tests { } fn assert_read_works_during_database_open(executor: &Arc, fixture: &ConfiguredRoot) { - let body = database_wire_tool(executor, fixture, "read", Duration::from_secs(1)); + // A read waiting on a blocked or failed database open would never + // finish, whatever its deadline; the generous deadline only absorbs + // slow admission on a loaded Windows runner, which at 1 s refused the + // read before it ran. + let body = database_wire_tool(executor, fixture, "read", Duration::from_secs(30)); assert_eq!(body["success"], true, "{body}"); assert!(body.to_string().contains("function_0"), "{body}"); for name in [ diff --git a/crates/aft/tests/integration/github_read_restriction_responsiveness.rs b/crates/aft/tests/integration/github_read_restriction_responsiveness.rs index e4cabff32..da03ff523 100644 --- a/crates/aft/tests/integration/github_read_restriction_responsiveness.rs +++ b/crates/aft/tests/integration/github_read_restriction_responsiveness.rs @@ -502,7 +502,10 @@ fn complete_deferred(start: GithubReadStart) -> GithubReadCompletion { let GithubReadStart::Deferred(deferred) = start else { panic!("network-bound GitHub read must return a deferred response"); }; - let deadline = Instant::now() + Duration::from_secs(1); + // A positive wait: the fixture read completes on a worker thread, which a + // loaded CI runner can schedule late. What this file checks is that the + // read is deferred at all (the panic above), not how fast it finishes. + let deadline = Instant::now() + Duration::from_secs(30); loop { if let Some(result) = deferred.try_complete() { return result.expect("fixture GitHub read completes");