fix: invalidate stale update cache after manual pulls - #21675
fix: invalidate stale update cache after manual pulls#21675taewookyang wants to merge 2 commits into
Conversation
|
Local verification on my side passed:
Also, all PR workflows currently show If a maintainer can approve/run the workflows for this PR, I can re-check CI after that. |
|
After reviewing the existing PRs, I realized this change overlaps with #18236 and #21447, which address the same stale update-check cache issue with a very similar approach. In particular, #21447 appears to cover the broader case by tracking both the local checkout state and the upstream ref, so I don't want to add more fragmentation here. I'm closing this PR to keep the discussion consolidated. For what it's worth, I did verify this fix path locally in a Termux (Android) environment with:
So at least from that environment, the reproduction and fix behavior checked out. If any of the existing PR authors want to reuse the test framing or Termux verification angle, please feel free. Thanks! |
Summary
Problem
hermes --versioncould keep showing a stale "commits behind" banner for up to 6 hours after a user manually updated a git checkout withgit pull+pip install, because.update_checkonly keyed freshness on timestamp and embedded revision.Test Plan
./venv/bin/python -m pytest tests/hermes_cli/test_update_check.py -q -o addopts=''.update_checkfile and confirmingcheck_for_updates()rewrites it tobehind=0when local HEAD changed