Conversation
|
Thanks for addressing the updater handoff gap. The premise remains valid on current main: Desktop launches the updater with detached ignored stdio at This is an automated hermes-sweeper review. |
88f0cee to
a3c8e44
Compare
|
Salvaged and merged via #73569 (commit 03af12c) — your commit cherry-picked with authorship preserved, plus three follow-ups on top from review/CI:
The preflight design was right where it counts: reusing the CLI's canonical Closing this original in favor of the salvage PR. |
What does this PR do?
Prevents the Windows Desktop updater from silently handing off to a detached updater when another process is still using the Hermes installation venv.
The existing Desktop update flow releases only the backend processes owned by the current Desktop instance. An externally started backend, gateway, CLI session, or another venv Python process can remain alive. The Python updater detects these holders and refuses to continue, but because the staged updater is launched with detached
stdio: ignore, its diagnostic output is not visible in the Desktop UI.This PR adds a Windows-only preflight after Desktop-owned backend teardown and before updater handoff:
External processes are not automatically terminated. The user remains responsible for stopping the owning terminal, app, or service and retrying the update.
Sensitive command-line values, including API credentials and internal session keys, are redacted before being shown.
Related Issue
Fixes #63206
Testing
.\venv\Scripts\python.exe -m pytest tests/hermes_cli/test_scan_venv_blockers.py -q.\venv\Scripts\python.exe -m pytest tests/hermes_cli/test_update_venv_health.py -q -k "detect_venv_python or format_venv_holders or venv_holder_guard".\venv\Scripts\python.exe -m pytest tests/hermes_cli/test_update_concurrent_quarantine.py -qnpx --no-install tsx --test electron/venv-blocker-scan.test.tsnpm run typecheckgit diff --cached --check--session-keyvalues are redactedScope
This PR intentionally does not: