Repository navigation
test(extension-host): kill the host under a command with the default deadline - #6977
Conversation
…deadline
a_slow_command_is_cancelled_and_a_killed_host_fails_it_as_down runs both
halves on one manager whose command_run_deadline is 300 ms. The second
half starts a slow command, sleeps 100 ms, kills the host and expects
"extension host is down: exited:". That leaves the kill 200 ms to land.
On windows-latest taskkill has taken longer twice since 10-10, and the
command then ends on its own deadline instead:
timed out after 0s and was cancelled
The kill half now runs on a second manager from supervised_manager, which
keeps the default 30 s command deadline, so the only thing that ends the
command there is the host going away. The tool tests are already split
this way (a_call_past_its_method_deadline_is_cancelled_and_the_host_stays_usable
and killed_host_fails_calls_once_and_replays_with_fresh_owners). The first
half is unchanged and still runs against the 300 ms deadline.
The comment about the kill landing inside the 300 ms deadline no longer
describes anything and is removed.
Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thank you, @Lstarsky0, for separating the explicit 300 ms cancellation check from the killed-host check under the default 30 s command deadline. That preserves the host-down, restart identity, stale-generation refusal and fresh-echo assertions while removing the artificial deadline competition in the second half. Your PR has merged as its own work in 88b4c58dfb; the source branch is retained. Exact PR-head CI completed with macOS 19,038 passed / 0 failed / 33 skipped, Ubuntu 19,035 / 0 / 34, Windows 18,304 passed (one existing browser-launcher leak) / 0 failed / 27 skipped, plus CI-flags Clippy and all ratchets. The changed fixture and owner-crash recovery passed on each native platform. This is verification of the PR source, not final installed-package or VM acceptance. It is carried toward 0.10.2, which has not shipped yet. Thank you for making the Windows coverage more useful without weakening the original cancellation assertions. |
Folds 26 main commits (incl. #6924 Runtime stores/workspace drivers, #6977, #6943, #6959, #6958, #6956) into PR #6968's lane. The only conflicts were web/data/agent-docs.generated.json and features.generated.json, regenerated with web/scripts/derive-facts.mjs (check-facts OK, version 0.10.2). Verified: scripts/dev-cargo.sh check --locked -p codewhale-tui --all-targets finished in 9m00s with no errors. nextest -p codewhale-tui --lib on the overlap filter (runtime_api|rlm::turn|runtime_threads|workspace_lease|snapshot): 902 passed, 0 failed, 14427 skipped (80.1s). Full suite left to hosted CI. Branch exception: founder-authorized 2026-10-15 for this lane, recorded in CW/coordination/BRANCH_EXCEPTIONS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NBKbhx19BRbZtvWK8rVKjz
What and why
extension_host::tests::a_slow_command_is_cancelled_and_a_killed_host_fails_it_as_downhas failed twice on windows-latest since 10-10, once on main:The test runs both of its halves on one manager whose
command_run_deadlineis 300 ms. The first half needs that: it checks the deadline cancels a slow command. The second half starts a slow command, sleeps 100 ms, kills the host withtaskkilland expectsextension host is down: exited:. That leaves the kill 200 ms to land. When it takes longer, the command ends on its own deadline first, which is the message above.The kill half now runs on a second manager from
supervised_manager, which keeps the default 30 s command deadline, so the only thing that ends the command there is the host going away. The tool-side tests are already split this way (a_call_past_its_method_deadline_is_cancelled_and_the_host_stays_usableandkilled_host_fails_calls_once_and_replays_with_fresh_owners). The first half is unchanged.The comment about the kill landing inside the 300 ms deadline no longer describes anything, so it is removed.
Issue
No-Issue: Windows CI flake, no issue filed for it
How I tested it
cargo fmt --all -- --check,cargo clippy -p codewhale-tui --all-targets --all-featureswith CI's flags, andcargo check -p codewhale-tui --all-targets: clean. Clippy also on 1.99, pluscargo +1.89.0 check -p codewhale-tui.cargo nextest run -p codewhale-tui --lib: 15286 passed, none failed.No new tests; this changes one existing test.
Checklist
maincargo fmt --allpasses, and tests cover new or changed behaviordocs/features.toml(cargo test -p codewhale-tui --test feature_registrychecks it) — n/a