fix(update): keep passive checks from locking shallow clones - #66438
fix(update): keep passive checks from locking shallow clones#66438sppburke-DA wants to merge 1 commit into
Conversation
Related to #63041: that PR protects the mutating updater from an existing |
|
Thanks for the focused update-check fix. The premise is present on current main: The PR base Automated hermes-sweeper review. |
|
Thanks @sppburke-DA — main has landed most of this direction: official SSH-remote checkouts now do a fully passive probe (HTTPS |
What
Official-checkout passive update checks now compare local
HEADwith the public upstream tip through the existing read-onlygit ls-remotepath for both HTTPS and SSH origins. They no longer run a mutatinggit fetch.Fork checkouts keep the existing origin-fetch behavior, including exact counts for full clones and presence-only reporting for shallow clones.
Why
On a shallow installer checkout,
git fetch --depth 1creates.git/shallow.lock. The passive checker has a 10-second timeout; when that timeout kills Git, the lock can survive and block the real update path:This was observed with a nine-day-old orphaned lock on an ARM64 git install and reproduced again by running
hermes --version: the passive fetch reached its timeout, leftshallow.lock, and the immediately followinghermes update --checkfailed. No Git process held either lock afterward.A public
ls-remotecan still time out or fail offline, but it never mutates or locks the checkout, so a passive freshness check cannot strand a future update.Related to #3523 and complementary to #63041, which covers
index.lockpreflight on the mutating updater path.Validation
scripts/run_tests.sh tests/hermes_cli/test_update_check.py -q— 16 passeduv run ruff check hermes_cli/banner.py tests/hermes_cli/test_update_check.pygit diff --checkThe regression test covers both official HTTPS and SSH origin forms and asserts that neither emits any
git fetchcommand.