fix(desktop): WSL backend connects with Docker bridges and slow cold starts #6129
Closed
rehanhaider(GitHub profile, opens in a new tab)wants to merge 4 commits into
main fromrefs/pull/6129/head·opened View on GitHubShowing 2 changed files with 13 additions and 6 deletions.
x
@@ -60,7 +60,8 @@
-const DEFAULT_BACKEND_READINESS_TIMEOUT = Duration.minutes(1);
+// One-shot probe; a WSL backend over /mnt/c regularly needs 60-98s to answer.
+const DEFAULT_BACKEND_READINESS_TIMEOUT = Duration.minutes(3);
Thread on line 64
Add a focused test for the extended readiness budget
The intended slow-cold-start behavior is not covered by the existing readiness test, which supplies its own 50 ms timeout and therefore cannot detect this default being reverted or wired to the wrong backend path. Add a TestClock manager test where readiness succeeds after more than one minute but before three minutes and assert that onReady fires; otherwise this backend behavior change can regress while the focused desktop suite remains green.
AGENTS.md reference: AGENTS.md:L108-L108
Useful? React with 👍 / 👎.
@@ -688,13 +688,19 @@
- // `hostname -I` prints a space-separated list of all non-loopback
- // IPs the distro has bound. The first entry on the WSL2 default
- // network is always the eth0 vEthernet address Windows can reach
- // directly (no wslhost forwarding required).
- [...buildDistroArgs(distro), "--", "sh", "-c", "hostname -I"],
+ // `hostname -I` orders by interface, so a Docker bridge can mask the
+ // eth0 address NAT mode needs and the host address mirrored mode maps
+ // to loopback. The default route's source is printed first and wins;
+ // the `hostname -I` tail is the fallback without iproute2.