fix: keep windows gateway cold starts on the splash - #5964
Conversation
Allow a live local Windows gateway to use the longer bundled Python cold-start window while preserving fail-fast child exits and ordinary connection deadlines. Downgrade only the Proactor connection-lost reset callback to warning noise; task-level resets still keep crash breadcrumbs.
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Faithful backport of a validated main fix; timeout widening is ownership-scoped, fail-fast child-exit paths survive, and the log downgrade fails loud if CPython internals shift. The two risky degrees of freedom are both constrained correctly: the 120s deadline applies only when [DESIGN-REVIEWED] 6444fc2 |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS A validated main fix backported intact: two named defects (false 30s failure, phantom crash report), each removed at mechanism level, nothing riding along. What this change shipsIntent: stop a healthy Windows first launch from being reported as a gateway failure/crash on the 0.4.0 Insider line — a FIX (backport of #5956, merged to main as
Root-cause placement is sound: the 55s cold start is a platform cost (first import of a freshly installed bundled Python tree on Windows), and the double-reported reset is CPython Proactor behavior — both genuinely out of scope, so deadline-widening and narrow suppression are the correct level. The pre-existing Subtractions
[FIRST-PRINCIPLES-REVIEWED] 6444fc2 |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS Removes a false first-launch failure honestly — live splash counter persists, fail-fast on real exits is kept, and no copy lies about state. Suggestions
[UX-REVIEWED] 6444fc2 |
|
|
Problem / Motivation
The Windows first-launch fix in #5956 also belongs on
release/0.4.0so thenext Insider candidate does not show a false Gateway startup failure while a
freshly installed bundled Python runtime is still starting. The same release
also reports harmless Proactor
WinError 10054connection teardown as a crash.Why it matters
Without the backport, Insider users can still see the broken first-launch
experience even after the fix is validated on
main: the desktop gives up at30 seconds, Retry succeeds after the roughly 55-second cold start, and teardown
noise makes the healthy Gateway look as though it crashed.
What changed (motivation → approach → change)
Cherry-pick the single validated commit from #5956 onto
release/0.4.0:deadline. Remote connection tabs and non-Windows launches keep 30 seconds,
and a child exit or spawn error still fails immediately.
ConnectionResetErrorreported from_ProactorBasePipeTransport._call_connection_lostto warning-only teardownnoise. Task-level and unrelated resets remain ERRORs with crash evidence.
Tests
release/0.4.0backport:test/test_crash_guard.py— 10 passed.release/0.4.0backport: Electrongateway-wait.test.js— 24 passed.mainas9dbdcd2de; this backport's releaseCI is the final validation for the
release/0.4.0baseline.Manual verification
Inspected the installed Nightly launch log: the gateway child remained alive
and became healthy after roughly 55 seconds, beyond the old 30-second Electron
deadline. The same running gateway returned HTTP 200 after Retry.
Screenshots / video
Why no screenshot: The splash rendering is unchanged; only how long it keeps waiting for a live Windows gateway changes.
Related Issues
no linked issue: this is the
release/0.4.0backport of #5956.Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)