From 6276fed55b9d30184e75137cebb1b8330345ebaa Mon Sep 17 00:00:00 2001 From: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com> Date: Wed, 14 Oct 2026 18:35:25 +0800 Subject: [PATCH] test(runtime-chat): give the refused admission 30 s instead of 1 s active_participant_rejects_new_and_exact_replay_without_blocking_or_starting gives each apply_prompt call 1 s to come back with "active local provider work". Before it refuses, apply_prompt creates the native thread, writes the binding and a turn reservation to disk with write_atomic, and then writes the reservation's release. On windows-latest the whole test normally takes 0.2-0.4 s, but it took 1.1-3.8 s in 5 of 18 passing runs since 10-13, and on main at a8e3281e0 one call went past the second: Runtime Chat admission must not deadlock behind the UI-owned writer: Elapsed(()) The refusal itself never waits: try_ensure_inference_ownership only tries to take the lease. The bound is there to catch a deadlock, and 30 s still does. It is the same 30 s bound the subagent approval tests use for the same kind of check. Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com> --- crates/tui/src/runtime_chat_relay.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tui/src/runtime_chat_relay.rs b/crates/tui/src/runtime_chat_relay.rs index 75fa369fc2..c504a4f0e0 100644 --- a/crates/tui/src/runtime_chat_relay.rs +++ b/crates/tui/src/runtime_chat_relay.rs @@ -2025,7 +2025,7 @@ mod tests { "{direct_error}" ); for attempt in 0..2 { - let error = tokio::time::timeout(Duration::from_secs(1), host.apply_prompt(&prompt)) + let error = tokio::time::timeout(Duration::from_secs(30), host.apply_prompt(&prompt)) .await .expect("Runtime Chat admission must not deadlock behind the UI-owned writer") .unwrap_err();