Skip to content

fix(desktop): anchor Windows update handoff cwd - #106160

Closed
hungjoong wants to merge 1 commit into
NousResearch:mainfrom
hungjoong:fix/windows-desktop-handoff-cwd
Closed

hungjoong wants to merge 1 commit into
NousResearch:mainfrom
hungjoong:fix/windows-desktop-handoff-cwd

Conversation

@hungjoong

Copy link
Copy Markdown

Summary

  • set the Windows Desktop hand-off working directory to InstallRoot before running the updater and post-update verifier
  • prevent verify_windows_desktop_update(Path.cwd()) from searching below the packaged Electron directory and falsely reporting Hermes.exe missing
  • add a regression check for the hand-off cwd anchor

Validation

  • npm --workspace apps/desktop test -- electron/update-handoff-marker.test.ts
  • PowerShell script parse check

Observed on Windows: the Desktop update completed and relaunched successfully, but the detached updater inherited a non-checkout working directory, causing a false verification failure.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/desktop Electron desktop app (apps/desktop/*) platform/windows Native Windows-specific behavior or breakage area/install-update Installer, updater, packaging, wheels, doctor sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Sep 8, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Related: #105599 (earlier fix for the same false post-update verification failure, passes the checkout root to the verify step) and #106007 (same approach as #105599). This PR instead anchors the hand-off cwd with Set-Location -LiteralPath $InstallRoot in windows.ps1. Competing fixes for #106097 / #105587; flagging so a maintainer can pick one mechanism.

@teknium1

teknium1 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Resolved on main by #106175 (c32e0ac), salvaging @fangliquanflq’s earlier #105168 with authorship preserved. The handoff now sets the native process cwd to InstallRoot before launching update/verification children, retaining all integrity checks. Native Windows regression coverage exercises the production call: neutralizing it reproduces the wrong cwd; restoring it passes all 15 related tests. Receipt: https://github.com/NousResearch/hermes-agent/actions/runs/34293439570. Thanks @hungjoong for the fix and investigation. Closing this superseded proposal to consolidate the resolved cwd bug.

@teknium1 teknium1 closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install-update Installer, updater, packaging, wheels, doctor comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants