Skip to content

fix(config): ignore stale docker install-method stamp when .git exists (#35835)#36254

Open
Tranquil-Flow wants to merge 1 commit into
NousResearch:mainfrom
Tranquil-Flow:fix/35835-docker-update-stale-stamp
Open

fix(config): ignore stale docker install-method stamp when .git exists (#35835)#36254
Tranquil-Flow wants to merge 1 commit into
NousResearch:mainfrom
Tranquil-Flow:fix/35835-docker-update-stale-stamp

Conversation

@Tranquil-Flow

Copy link
Copy Markdown
Contributor

Summary

When detect_install_method() reads a stale .install_method stamp from a shared $HERMES_HOME bin directory, it incorrectly reports 'docker' even when a .git directory proves this is a pip install. The fix checks for .git existence first before trusting the stamp.

Test Plan

  • Regression tests pass
  • Fail-without-fix verified
  • One focused commit ahead of upstream/main

Fixes #35835

NousResearch#35835)

When $HERMES_HOME is a shared bind-mounted volume, the .install_method
stamp from a prior official-image run persists after the user switches to
a custom container that installed Hermes via git.  The published image
excludes .git via .dockerignore, so a .git directory at project_root is
definitive proof the stamp is stale.

- detect_install_method(): when stamp says 'docker' and .git exists,
  ignore the stale stamp and fall through to real detection
- Auto-correct the stamp to the detected method so the user doesn't
  hit the stale-stamp guard again on next run
- Updated test_stamp_file_takes_precedence to test the valid case
  (no .git dir → stamp wins)
- Added test_stale_docker_stamp_with_git_falls_through for the
  stale-stamp recovery path with auto-correction verification
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard labels Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: hermes update doesn't apply inside the Docker container.

2 participants