hermes-agent/apps/desktop/electron
brooklyn! 4b7a186003
fix(desktop): retry the self-update rebuild once so the app relaunches (#48122)
The desktop self-update runs `hermes update` then `hermes desktop
--build-only`, and only relaunches if the rebuild returns 0. The first
`--build-only` can exit nonzero on a still-settling post-update tree or a
network-blocked Electron fetch that the installer's self-heal repaired
mid-run — so both updaters (the Tauri setup binary and the in-app POSIX
path) bailed before the relaunch step. The update landed but the app
never restarted; a manual launch worked because the heal had completed.

Retry `--build-only` once in both paths before failing, mirroring the
retry-once `hermes update` already does (and the CLI `hermes update`'s
own desktop rebuild). A second run builds clean off the healed dist and
is a near-no-op when the first actually succeeded (content-hash stamp).

- update.rs: retry stage 2; add rebuild_needs_retry() + test
- main.cjs: retry via new update-rebuild.cjs helper (behavior-tested)
2026-06-17 19:33:27 -05:00
..
backend-env.cjs
backend-env.test.cjs
backend-probes.cjs
backend-probes.test.cjs
backend-ready.cjs
bootstrap-platform.cjs
bootstrap-platform.test.cjs
bootstrap-runner.cjs
bootstrap-runner.test.cjs
connection-config.cjs
connection-config.test.cjs
dashboard-token.cjs
dashboard-token.test.cjs
desktop-uninstall.cjs
desktop-uninstall.test.cjs
entitlements.mac.inherit.plist
entitlements.mac.plist
fs-read-dir.cjs
fs-read-dir.test.cjs
gateway-ws-probe.cjs
gateway-ws-probe.test.cjs
git-root.cjs
git-root.test.cjs
git-worktrees.cjs
hardening.cjs
hardening.test.cjs
main.cjs
oauth-net-request.cjs
oauth-net-request.test.cjs
preload.cjs
session-windows.cjs
session-windows.test.cjs
update-rebuild.cjs
update-rebuild.test.cjs
update-remote.cjs
update-remote.test.cjs
vscode-marketplace.cjs
vscode-marketplace.test.cjs
windows-child-process.test.cjs
windows-user-env.cjs
windows-user-env.test.cjs
workspace-cwd.cjs
workspace-cwd.test.cjs