Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67 +/- ##
==========================================
+ Coverage 97.12% 97.70% +0.57%
==========================================
Files 6 7 +1
Lines 2333 3138 +805
==========================================
+ Hits 2266 3066 +800
- Misses 67 72 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
profiling
force-pushed
the
feat/background-refresh
branch
from
November 3, 2026 11:39
2e43b6a to
bb2079b
Compare
Keep refresh work bounded and preserve active Git requests during cancellation and eviction. Refs: rolandjitsu#66 Assisted-by: Codex:gpt-6.1-terra
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.
What kind of change does this PR introduce?
Summary
Clients currently wait for an upstream fetch when the fetch TTL expires, even if the mirror can already serve their request. This adds opt-in stale-while-revalidate behavior: serve cached refs within a configured maximum age and refresh the mirror in the background.
Background fetches are coalesced per repository and bounded across repositories. Cold mirrors and mirrors with unknown freshness keep the synchronous path. The default remains unchanged. This is request-triggered refresh, not a scheduled polling loop.
Closes #66.
Tests
Checklist
Breaking change?
No change with the default settings. With stale serving enabled, clients may read older objects already present in the repository mirror. Objects are never searched in other mirrors.