fix(desktop): harden update handoff home resolution - #61093
Conversation
|
Rebased onto current |
2134b0d to
6fa91f5
Compare
|
Thanks for tracing the profile-scoped updater handoff. Current main still looks up the updater only at Problems
Suggested changes
Automated hermes-sweeper review. |
6fa91f5 to
f3d07ee
Compare
|
Thanks for the review. Addressed in this push:
Validated with |
|
Rebased onto current |
816f61d to
0da92cc
Compare
|
Rebased onto current |
|
Rebased onto current |
f4f4ecc to
b514ac5
Compare
|
Rebased onto current |
b514ac5 to
c325ee5
Compare
|
Rebased onto current |
|
Rebased onto current |
c325ee5 to
abbe424
Compare
|
Closing — on reflection, |
Desktop update handoff now resolves the staged updater, update marker, and updater environment from the same Hermes home, including base-home fallback when the desktop was launched from a profile-scoped home.
Shared root cause
HERMES_HOMEfor every update artifact. When the app was launched with a profile-scoped or inherited home,resolveUpdaterBinary()could miss the stagedhermes-setup(.exe), marker parking could be read from a different home than the updater wrote, and recovery handoffs could run against the wrong managed checkout.<root>/profiles/<name>layouts. The staged updater is resolved from that ladder, the updater process receives the home that contains it, PATH is built from that same home, and pre-written update markers cover every home a relaunched desktop may inspect.How this fixes each issue
hermes updatemanually while the updater exists elsewhere.How to test
node --check apps/desktop/electron/main.cjsnode --test apps/desktop/electron/windows-hermes-resolution.test.cjs apps/desktop/electron/update-marker.test.cjs/opt/homebrew/bin/timeout -k 30 480 node --test apps/desktop/electron/windows-hermes-resolution.test.cjs apps/desktop/electron/update-marker.test.cjs apps/desktop/electron/windows-child-process.test.cjsgit diff --checkpython scripts/check-windows-footguns.py apps/desktop/electron/main.cjs apps/desktop/electron/windows-hermes-resolution.test.cjs/opt/homebrew/bin/timeout -k 30 480 sh -c 'pytest tests/ -q -x --timeout=60 "$@"' sh; it aborted during collection because the local Python environment lacksfastapi/uvicornand pip lazy-install is blocked by PEP 668/external management before these changed Electron tests could run.node_modules/.bin/eslintexists in this checkout.What platforms tested on
This coordinated PR bundles a fix that spans several issues. Happy to split it back into focused per-issue PRs if you'd prefer to review them separately.
Refs #46076
Refs #46755
Refs #46782