Skip to content

fix(update): refresh pinnedCommit in .hermes-bootstrap-complete after git pull - #66905

Open
hotter909 wants to merge 1 commit into
NousResearch:mainfrom
hotter909:fix/refresh-bootstrap-pin-on-update
Open

fix(update): refresh pinnedCommit in .hermes-bootstrap-complete after git pull#66905
hotter909 wants to merge 1 commit into
NousResearch:mainfrom
hotter909:fix/refresh-bootstrap-pin-on-update

Conversation

@hotter909

Copy link
Copy Markdown

The Desktop app keys off .hermes-bootstrap-complete — when pinnedCommit matches HEAD it skips CLI verification and goes straight to createActiveBackend(). After hermes update runs git pull, HEAD changes but the pin stays stale, so the next Desktop launch from a desktop entry (clean PATH, no proxy) falls through to CLI verification or bootstrap, both of which fail.

Adds _refresh_bootstrap_pin() that updates pinnedCommit + completedAt to match the new HEAD, called at the end of _cmd_update_impl after ✓ Update complete!.

⋅⋅⋅

… git pull

The Desktop app uses .hermes-bootstrap-complete to decide whether to
skip CLI verification and go straight to createActiveBackend(). When
hermes update runs git pull, HEAD changes but the pinnedCommit stays
stale, so the next Desktop launch from a desktop entry (clean PATH,
no proxy env) falls through to CLI verification or bootstrap — both
eventually fail.

Add _refresh_bootstrap_pin() that reads the marker, updates
pinnedCommit and completedAt to match the new HEAD, and calls it
at the end of _cmd_update_impl after ✓ Update complete!.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to the Desktop bootstrap-marker repair family in #38529 and #53036, but this fixes a distinct post-update stale pinnedCommit path.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracing the bootstrap marker/update interaction. The proposed condition is not used by current Desktop startup.

Problems

  • apps/desktop/electron/main.ts:3057-3064 deliberately does not compare pinnedCommit with checkout HEAD; it treats the marker as evidence that bootstrap completed and instead requires a runnable active runtime.
  • apps/desktop/electron/main.ts:3330-3331 calls createActiveBackend() whenever that check succeeds. Rewriting pinnedCommit after hermes update therefore does not change the backend-selection path.

Suggested changes

  • Please remove this refresh, or re-scope it to a currently reproducible failure in the runtime-usability checks and cover that behavior with a regression test.

Automated hermes-sweeper review.

Comment thread hermes_cli/main.py
@teknium1 teknium1 added sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users area/install-update Installer, updater, packaging, wheels, doctor labels Jul 19, 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/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants