Skip to content

fix: Skip post-fetch mirror scan without URL - #4172

Merged
pda merged 1 commit into
mainfrom
pda/remote-mirror-no-url-post-fetch-c275
Aug 4, 2026
Merged

fix: Skip post-fetch mirror scan without URL#4172
pda merged 1 commit into
mainfrom
pda/remote-mirror-no-url-post-fetch-c275

Conversation

@pda

@pda pda commented Aug 4, 2026

Copy link
Copy Markdown
Member

Description

The first no-URL mirror hotfix restored the fast path only when the requested commit was already present. When a canonical fetch added a missing commit, checkout still ran the final global for-each-ref --contains safety scan. On a production mirror that added another 3 minutes 15 seconds after a one-second fetch.

Skip that final reachability scan for the same resolved no-url attempt state. The unpinned-object safeguard remains unchanged whenever a remote mirror URL is configured.

Context

Changes

  • Reuse the no-URL attempt predicate for both the warm-hit and post-fetch paths.
  • Bypass the final global reachability scan only for no-URL attempts.
  • Add a PR-ref regression that verifies canonical fetch succeeds without invoking for-each-ref.

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Focused warm-hit, post-fetch, URL-repair, and configured-remote retry regressions pass under the race detector.

Disclosures / Credits

Cursor Agent correlated the second production trace with the remaining code path, implemented the focused correction and regression coverage, and ran independent ship-risk, maintainability, and simplicity reviews.

Open in Web Open in Cursor 

@pda
pda requested review from a team as code owners August 4, 2026 09:04
Co-authored-by: Paul Annesley <pda@users.noreply.github.com>
@cursor
cursor Bot force-pushed the pda/remote-mirror-no-url-post-fetch-c275 branch from ed7c062 to d3c28fc Compare August 4, 2026 09:07
@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Rebased and force-pushed the hotfix as d3c28fc3fb49d48774558767af688a4e49dac7f2. The branch is now based directly on 75683492d8057fe3eb0d4ac78ceaed2b1e1930a6; the unrelated 11e51bcf / #4165 merge is no longer in its history. The focused no-URL warm-hit and post-fetch regressions pass on the corrected base.

@pda pda added the bug label Aug 4, 2026
@pda
pda merged commit c5785c3 into main Aug 4, 2026
5 of 6 checks passed
@pda
pda deleted the pda/remote-mirror-no-url-post-fetch-c275 branch August 4, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants