Repository navigation
feat(git): serve CI fetches from the mirror with client fallback - #51
Open
christianayscue-pplx wants to merge 3 commits into
Open
christianayscue-pplx wants to merge 3 commits into
christianayscue-pplx wants to merge 3 commits into
Conversation
Add per-repository client-fallback mode to the git strategy (RFC 019) so CI fetches can be served directly from Cachew's local git mirror instead of proxying to GitHub, failing fast when the mirror is stale or missing a commit so the client can fall back to origin. Co-authored-by: Perplexity <noreply@perplexity.ai>
Co-authored-by: Perplexity <noreply@perplexity.ai>
…guard Co-authored-by: Perplexity <noreply@perplexity.ai>
christianayscue-pplx
marked this pull request as ready for review
November 30, 2026 01:04
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.
Adds per-repository
client-fallbackmode to thegitstrategy (RFC 019), moving the patch previously carried in ppl-ai/agi#302423 into theperplexityai/cachewfork.What changed
client-fallback = trueserves read-only smart-HTTP (info/refs,git-upload-pack) from the local mirror instead of proxying to GitHub.fresh-refs(e.g.,refs/heads/main,refs/heads/trunk-merge/) are compared with upstream via a scopedls-remoteeveryref-check-interval(default10s), with a background job keeping the mirror within that interval. Unlisted branches never mark the mirror stale.max-staleness(default5m): serves from the mirror while its last successful sync is younger than this; once exceeded, returns503so the client falls back to GitHub.missing-commit-timeout(default20s): awantfor a commit missing from the mirror triggers one coalesced upstream fetch per commit; if it does not arrive in time, returns503instead of hanging.git-receive-pack) to aclient-fallbackrepository return403rather than proxying upstream.cachew.git.client_fallback_requests_total(by outcome) andcachew.git.mirror_staleness_seconds.Deploy impact
None until a repository enables
client-fallback = truein Cachew configuration. Once this merges, ppl-ai/agi#302423 can bump thegithub.com/block/cachewpin and droptools/third_party/go/patches/cachew-ci-client-fallback.patch.Testing
ensure-refsare included ininternal/strategy/git/info_refs_test.go; fulljust fmt,just lint, andjust testrun in GitHub Actions CI on this PR.Created with Perplexity