[desktop] Fix desktop bootstrap existing install pinning - #39884
Closed
CHYJ1227 wants to merge 1 commit into
Closed
Conversation
CHYJ1227
marked this pull request as ready for review
June 5, 2026 14:46
1 task
14 tasks
4 tasks
Collaborator
Collaborator
|
Superseded by #61935. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Prevents packaged desktop bootstrap reruns from passing the build-stamp commit to the installer when
activeRootis already a git checkout. Fresh desktop bootstrap installs still receive the exact commit pin, but existing installs now stay on their configured branch during bootstrap repair/update instead of getting detached back to an older packaged stamp afterhermes update.I reproduced this from local desktop logs: bootstrap found an existing installation, updated to a newer HEAD, then immediately passed the packaged commit and ran
Pinning checkout to commit ..., which detached the checkout back to the packaged app build stamp.Related: #39192 also touches desktop install stamps, but it still pins official stamped commits unless
commitPinned=false. This focused fix covers existing git checkouts on currentmain.Related Issue
No issue filed.
Type of Change
Changes Made
apps/desktop/electron/bootstrap-runner.cjs: add existing-git-checkout detection and skip commit pins for existing installs while preserving branch args.apps/desktop/electron/bootstrap-runner.test.cjs: add regression coverage for fresh installs keeping commit pins and existing checkouts omitting them.How to Test
~/.hermes/hermes-agentis an existing git checkout that has been updated beyond that stamp.--commit/-Commit, so it should not detach the checkout back to the packaged stamp.Validation run locally:
node --test apps/desktop/electron/bootstrap-runner.test.cjsnpm run test:desktop:platforms --workspace apps/desktopnpx eslint electron/bootstrap-runner.cjs electron/bootstrap-runner.test.cjsfromapps/desktopgit diff --checkpython3 scripts/check-windows-footguns.py apps/desktop/electron/bootstrap-runner.cjs apps/desktop/electron/bootstrap-runner.test.cjsChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/Acli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
Local log evidence before the fix showed repeated bootstrap repository stages like:
Existing installation found, updating...HEAD is now at <newer branch head>Pinning checkout to commit <older packaged stamp>...HEAD is now at <older packaged stamp>