Repository navigation
fix(wsl-host): a runtime-call reconnect never boots a distro that stopped meanwhile (E9 follow-up) - #34050
Merged
Conversation
…pped meanwhile (E9) ensureForRuntimeCall reconnects only to a distro confirmed running, but the distro could stop between that read and the reconnect, which would then boot it. A runtime call now asks for a no-boot connect: the connector supplies a running-list check that the connection manager runs right before anything spawns in the distro, refusing with WslDistroNotRunningError (and starting nothing) when the distro isn't confirmed running. The generation is read before that await, so a close during it still supersedes the connect. Co-Authored-By: Claude <[email protected]>
…on errors Co-Authored-By: Claude <[email protected]>
… failure, re-verify (E9 review) Review of #34050: - A connect that may boot (focus, Connect) joined an in-flight no-boot connect and so inherited its refusal. It now waits for that one and runs its own. - A no-boot refusal published 'failed'. It now publishes nothing from the manager; the supervisor, whose connect had already disarmed the entry, re-verifies instead of arming the incumbent (which would dial into the distro), so liveness gives the verdict and parks a stopped distro. - The generation is checked right after the running-list read, so a close during it supersedes the connect before anything deploys. Co-Authored-By: Claude <[email protected]>
nwparker
force-pushed
the
nwparker/wsl-host-no-boot-reconnect
branch
from
October 26, 2026 20:24
3789b44 to
5c23ffb
Compare
nwparker
changed the base branch from
nwparker/wsl-host-visible-work-policy
to
main
October 26, 2026 20:24
This was referenced Oct 26, 2026
Merged
nwparker
added a commit
that referenced
this pull request
Oct 26, 2026
…er boots (E9 follow-up) Two lows from the #34050 review: - A no-boot connect published "Connecting" before its running-list read, and a quiet refusal then left the row on "Connecting". It no longer publishes the pending state. - Liveness recovery reconnects only after confirming the distro runs, but that read could go stale before the reconnect spawned anything. Recovery now passes the same running check to the connection manager, which re-reads it right before spawning. Co-Authored-By: Claude <[email protected]>
nwparker
added a commit
that referenced
this pull request
Oct 26, 2026
…er boots (E9 follow-up) (#34093) * fix(wsl-host): no-boot connects stay quiet, and liveness recovery never boots (E9 follow-up) Two lows from the #34050 review: - A no-boot connect published "Connecting" before its running-list read, and a quiet refusal then left the row on "Connecting". It no longer publishes the pending state. - Liveness recovery reconnects only after confirming the distro runs, but that read could go stale before the reconnect spawned anything. Recovery now passes the same running check to the connection manager, which re-reads it right before spawning. Co-Authored-By: Claude <[email protected]> * fix(wsl-host): a no-boot recovery connect still publishes its own pending status Only the default "Connecting" is skipped for a no-boot connect; an explicit status (liveness recovery's "retrying now") is still published. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
#33838 makes background requests (git status, PR badges and so on) reconnect to a WSL host only when its distro is confirmed running, so they never switch a distro on. There was still a tiny gap: the distro could stop between that check and the reconnect, and the reconnect would then switch it back on. This closes the gap.
What Changed
noBoot(WslHostService.ensureForRuntimeCall).requireRunning).assertWslDistroMayStart).WslDistroNotRunningErrorand starts nothing.failedstatus. The supervisor, whose connect had already disarmed the entry, re-verifies: liveness gives the verdict and parks a stopped distro. It doesn't arm the old connection, because that would dial into the distro.wsl-orcad-connection.ts, and the supervisor's entry creation, were each folded onto fewer lines so both files stay within their line limits.Why
wsl.exehas no "don't start the distro" flag, so the check sits immediately before the first spawn.Linked Issue
WSL re-write, gate E9. Based on main (#33838 merged).
Visual Proof
N/A: no UI.
Testing
wsl-orcad-connection.test.ts:failed;wsl-orcad-liveness-supervisor.test.ts: after a no-boot refusal, the supervisor re-verifies and publishesdistro-stopped.wsl-host-service.test.ts: a runtime-call reconnect asks fornoBoot.src/main/wslpasses.pnpm tc:nodeandcheck:code-quality:changedpass; CI runs the full lint (the machine is too loaded to run it locally).Review
Self-reviewed.
Agent skill upstream boundary
Notes
Gated like all WSL host code. No wire change.