Files
hermes-agent/apps/desktop/e2e/update
Teknium cd897884d9 test(desktop-update-e2e): find the packaged app by its install dir, not its environment
Electron 44's Chromium zeroes /proc/<pid>/environ in the browser process
and every child it execs right after start (Electron 40.10.2 kept it
readable: same headless probe, PROBE_MARK=1 on 40, 0 on 44.9.3). The
update suite's install census matched processes by HERMES_HOME in that
environment, so after the Electron 44 upgrade (#142727) it stopped seeing
the installed Desktop app at all:

- app-update: "the app to relaunch itself" picked a short-lived process
  instead of the relaunched app, the SIGTERM missed the app, the
  "quits cleanly" poll passed on an empty census, and the next launch hit
  "another Hermes Desktop instance holds the single-instance lock".
- build-fail and app-update: session.close() SIGKILLs installProcesses();
  the relaunched app survived it with live connections to the spec's
  provider/edge servers, and the Playwright worker hung 300 s on stop.

The app itself is fine: the relaunched Electron 44 app quits within 1 s
of SIGTERM at every point of its boot (0.2 s to 10 s, source build).

installProcesses now adds every process whose /proc/<pid>/exe lies under
the install's release dir (install-specific, readable whatever the
environment shows), and desktopMainProcesses reads that set directly,
dropping a candidate whose parent is a candidate (a child between fork
and exec still shows the main's exe and argv).
2026-10-22 15:45:25 -07:00
..
…