hermes - 💡(How to fix) Fix Update check cache can report stale commits-behind after git pull [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Bug Description

After a git-based Hermes install is fast-forwarded to origin/main, hermes --version can keep reporting the old commits-behind count for up to six hours because ~/.hermes/.update_check is keyed only by timestamp and embedded revision. For normal git installs HERMES_REVISION is unset, so the cache does not notice that local HEAD changed.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug Description

After a git-based Hermes install is fast-forwarded to origin/main, hermes --version can keep reporting the old commits-behind count for up to six hours because ~/.hermes/.update_check is keyed only by timestamp and embedded revision. For normal git installs HERMES_REVISION is unset, so the cache does not notice that local HEAD changed.

Reproduction

  1. Have a git checkout with a fresh ~/.hermes/.update_check containing a non-zero behind value.
  2. Fast-forward the checkout to origin/main outside hermes update, or by any path that does not invalidate the cache.
  3. Run hermes --version before the six-hour cache TTL expires.

Actual Behavior

The banner/version output still says the old value, for example Update available: 203 commits behind, even when git rev-parse HEAD origin/main is identical.

Expected Behavior

The update-check cache should be invalidated when the active checkout HEAD changes, or include the checked HEAD in the cache key. After a pull to current origin/main, hermes --version should say Up to date.

Observed Evidence

Local checkout reached HEAD == origin/main, but ~/.hermes/.update_check still contained {"behind": 203, "rev": null} and hermes --version trusted it until the cache file was deleted.

Proposed Fix

Store the active git HEAD in .update_check for local git installs and only reuse the cached result when both the embedded revision and local HEAD match. Existing cache files without this field should be treated as stale once.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Update check cache can report stale commits-behind after git pull [1 pull requests]