Repository navigation
fix(runtime-host): stop treating a lost launch election as a Host failure #5922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Astro-Han
merged 3 commits into
apache:main
from
Adarsh-Me:fix/5843-election-loser-wait
Oct 10, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
807a9b4
fix(runtime-host): stop treating a lost launch election as a Host fai…
Adarsh-Me 49fb766
fix(runtime-host): stop the lost election from ending the window path…
Adarsh-Me 000b70e
fix(desktop): wait the client's election window before replacing a ca…
Adarsh-Me File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: the new value goes to the remote/WSL profile path, not the local election that #5843 is about.
startProfileDesktopRuntimeHostCandidateis only reached wheninput.profileTargetis set (:383). It callsconnectRuntimeHostProfile, which serves remote SSH/WebSocket profiles (host-profile.ts:592-596) and WSLenvironmentprofiles (wsl-environment.ts:135-139). In both,readyTimeoutMsis the post-handshakewaitForRuntimeHostReadyon a Host that is already connected. It is not a launch-election window. The local candidate path already passeselectionDeadlineMstoconnectOrSpawnRuntimeHost(:1046), which resolves caller value →MAKA_RUNTIME_HOST_ELECTION_DEADLINE_MS→ 75s by itself (connect-or-spawn.ts:345-348). So the change does not touch the replace-and-reshuffle loop described in the commit message. What it does change is narrower and unstated: (a) remote/WSL Hosts that connect but never become ready now take 75s instead of 45s to fail, and (b) an env var named ELECTION_DEADLINE now also sets the remote/WSL readiness wait. For WSL, the in-distro election (if any) runs before the handshake, and that is still capped by the 45sDEFAULT_RUNTIME_HOST_WSL_STARTUP_TIMEOUT_MShandshake default unless the caller supplieshandshakeTimeoutMs. Suggest either dropping this commit from the PR, or restating its rationale as "align remote/WSL readiness with the election window" with an explicit argument for that coupling. The helper and test are fine as code; the issue is what they are justified by.