Conversation
|
Actually me here, just want to say I am still working on this specific PR as the fixes that were generated first used VBscript and other nonsense so I am still auditing the full update path and working to shave down the PR as it has a lot of changes that don't really need to be here |
922258f to
a62cc5d
Compare
1012154 to
d9d8dd6
Compare
|
Windows reproduction / design constraint from a real affected installation:
I verified a successful Windows in-app path as: update action → Desktop clean exit → updater exit code 0 → Desktop relaunch. The durable design should retain that atomic handoff while preserving the no-broad-kill boundary. |
e270ac6 to
c912255
Compare
Select only the canonical nested PowerShell updater for the visible Update flow and fail closed to the manual command when it is absent. Preserve the staged installer solely for the existing packaged bootstrap-recovery path.
c912255 to
339504f
Compare
fix(desktop): make Windows updates complete end to end
|
|
Superseded by #92879 — rebased onto current main after ~1,700 commits of drift, and reduced to the core fix: a consent-gated, authenticated drain of the Hermes processes that block a Windows update, so a blocked update finally has a way forward instead of a dead-end dialog. The new revision extends the safeToStop blocker taxonomy that main shipped in the meantime, and answers the review feedback here in its body. |
Motivation
On Windows, a Desktop update must replace files inside the managed Hermes virtual environment. A live Python process can keep those files mapped (
.pydnative extensions, the Python launcher, or Hermes executables), so updating underneath it can leave the install half-replaced. Refusing that mutation is correct; making the user manually hunt down Hermes-owned descendants is not.The current Desktop flow already stops the backend it directly owns and verifies that
venv\\Scripts\\hermes.exeis unlocked. That does not prove the target installation has no remaining Python descendants. Field logs repeatedly show the shim unlocked while the existing venv-blocker scanner still reports 1–32 holders, including managedserve, gateway, MCP, ACP, and Python worker processes.The same incident exposed a second failure mode: after the checkout updated successfully, a content-hash shortcut could skip rebuilding the packaged Desktop and relaunch stale code. The update UI then appeared to succeed even though the packaged commit lagged
HEAD.Fix
Keep the existing Windows update architecture, but make its ownership and success gates explicit:
taskkill /T /Fon each distinct PID, settle, and re-scan for at most three passes.Hermes-Setup.exe --update --branch <branch>handoff when it exists, restoring the branded blue updater window with per-step progress and live output.scripts/desktop-update/windows.ps1only when no staged installer exists, preserving CLI/source installs.HEADwith the packagedresources/install-stamp.jsoncommit before relaunch. A mismatch is a failed update, not success.HEADeven when the renderer content hash is unchanged.This is deliberately not a system-wide Python kill. Eligibility remains owned by the existing scanner: only processes it associates with the target Hermes installation are terminated, and the final scan is still the fail-closed gate.
Why the staged installer wins
The staged Tauri installer is the visible update surface users expect. The earlier Desktop selector resolved both candidates but always chose the repository PowerShell script, so the script silently shadowed
Hermes-Setup.exewhenever both existed. Selection now has one tested precedence point: staged installer first, repository script fallback.Pre-#74782 staged installers keep the existing marker pre-write compatibility path, so restoring installer precedence does not reintroduce the self-marker deadlock.
Related bugs and prior approaches
Windows identity repair
The update path also keeps the user-visible identity repair needed after a successful rebuild:
Hermes.exewith Hermes file metadata and fail a Windows package if stamping fails;System.Title = HermesandSystem.AppUserModel.ID = com.nousresearch.hermeson Start Menu and Desktop shortcuts;Verification
Canary
The native Windows release candidate is built from
fork-integrationplus the staged-installer precedence change. The remaining live canary will record the visible click-through and verify, in one run:HEAD.No WSL path or bridge-quiesce bypass is part of the canary.