fix: invalidate stale update-check cache when refs change - #9951
Open
hcl271021632-creator wants to merge 1 commit into
Open
hcl271021632-creator wants to merge 1 commit into
hcl271021632-creator wants to merge 1 commit into
Conversation
23 tasks
This was referenced May 1, 2026
This was referenced May 18, 2026
cameronpyne-smith
referenced
this pull request
in cameronpyne-smith/Argus
Jun 13, 2026
The post-filing decoration re-queried issues created since a timestamp and stopped at the first non-empty result — racing GitHub's index, so the last-created issue often wasn't returned yet and went undecorated (#9951 got no type/board this round; #9944 earlier). Capture each issue number straight from `gh issue create` output and decorate exactly those — no re-query, no race, no settle delay. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
Thanks for identifying the stale update-status path. The premise remains valid on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
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.
Bug Description
hermes --versioncould report an old "N commits behind" value even after the local checkout had already been updated outsidehermes update.Root Cause
The update-check cache only stored a timestamp and the cached
behindcount. As long as the cache was still fresh, Hermes trusted it without verifying thatHEADandorigin/mainstill matched the refs from when the cache was written.Fix
HEADandorigin/mainhashes alongside the cachedbehindcountHow to Verify
python3.11 -m pytest tests/hermes_cli/test_update_check.py -o 'addopts=' -q\n2. Remove~/.hermes/.update_checkand runpython3.11 -m hermes_cli.main --version\n3. Confirm Hermes reportsUp to datewhenHEAD == origin/main, instead of reusing a stale behind count\n\n## Test Plan\n\n- [x] Added regression test for this bug\n- [x] Existing targeted tests still pass\n- [x] Manual verification of the fix\n\n## Risk Assessment\n\nLow — the change is limited to update-banner cache validation and only affects version/update status reporting.