Finding
Electron caches backendHealthyPromise globally and never clears it when the backend exits or a health check times out. A failed startup can poison later render attempts in the same app session.
Evidence
- electron/main.ts waitForHealthz returns cached backendHealthyPromise.
- backendProcess.on('exit') only clears backendProcess, not backendHealthyPromise.
- The timeout rejection path leaves the rejected promise cached.
Acceptance criteria
- Clear backendHealthyPromise on backend exit/error and after health timeout/failure.
- Preserve successful health caching while the backend process remains alive.
- npm run build:electron passes.
Finding
Electron caches backendHealthyPromise globally and never clears it when the backend exits or a health check times out. A failed startup can poison later render attempts in the same app session.
Evidence
Acceptance criteria