Skip to content

fix(desktop): recover backend ready port from recent log output#60986

Open
ParaWheeler wants to merge 1 commit into
NousResearch:mainfrom
ParaWheeler:fix/desktop-ready-announcement-race
Open

fix(desktop): recover backend ready port from recent log output#60986
ParaWheeler wants to merge 1 commit into
NousResearch:mainfrom
ParaWheeler:fix/desktop-ready-announcement-race

Conversation

@ParaWheeler

Copy link
Copy Markdown

Fixes a Desktop local-backend startup race condition where the backend can print HERMES_BACKEND_READY port=<port> before the port-announcement watcher is attached. In that case the line is visible in desktop.log, but Desktop still times out waiting for the announcement.

This teaches the backend-ready parser to accept Desktop-prefixed log lines and passes recent Hermes log output into the watcher so a late-attached watcher can recover the already-announced port.

Fixes #60323.

Test plan

  • node --test apps/desktop/electron/backend-ready.test.cjs
  • git diff --check origin/main..HEAD
  • node --check apps/desktop/electron/backend-ready.cjs
  • node --check apps/desktop/electron/main.cjs
  • node --check apps/desktop/electron/backend-ready.test.cjs

@alt-glitch alt-glitch added type/bug Something isn't working comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have labels Jul 8, 2026
@ParaWheeler ParaWheeler force-pushed the fix/desktop-ready-announcement-race branch from f62a838 to 54af8ca Compare July 9, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop local backend can miss HERMES_BACKEND_READY and time out on macOS

2 participants