Files
hermes-agent/apps
Teknium ecbd3bb69c fix(desktop): probe a launcher's install root off the main thread
launcherInstallRoot ran spawnSync(launcher, ['--version'], 15 s timeout) on
Electron's main thread and cached only successes. A HERMES_DESKTOP_HERMES
launcher that never prints `Install directory:` therefore paid a fresh
blocking spawn on every backend resolve, including the pool resolves inside
the 1 s reensureDuringRestart loop; `--version` also runs the passive update
check, so each probe could take seconds.

The probe now runs through async execFile. Concurrent resolves share one
in-flight promise, a root is cached for the process lifetime (it cannot
move), and a miss is cached for 60 s only: one failure is still not
permanent, but it is no longer re-spawned on each resolve. The only caller
(resolveHermesBackend, already async) awaits it. The synchronous
launcherInstallDirectory keeps its signature for its other callers.

Review: kshitijk4poor on #139661, finding 2.
Refs #134889
Refs #139574
2026-10-16 01:54:58 -07:00
..