perf(relay): cache Git pack hydration#2169
Merged
Merged
Conversation
Reuse verified immutable pack and index pairs across Git operations to avoid repeated object-store reads and index generation while keeping disk and concurrent population work bounded.
thomaspblock
marked this pull request as ready for review
July 20, 2026 14:50
wpfleger96
added a commit
that referenced
this pull request
Jul 20, 2026
…vider * origin/main: (111 commits) fix: skip membership lookup for open relays (#2107) fix(desktop): make invite QR downloadable (#2168) Archive managed agents when deleted (#2135) perf(relay): cache Git pack hydration (#2169) chore(deps): update rust crate rustls to v0.23.42 (#2151) chore(deps): update dependency @tanstack/react-virtual to v3.14.6 (#2153) Add Agent Config Core: harness capability model behind agent config surfaces (#2158) chore(deps): update all non-major dependencies (#2152) chore(deps): update rust crate getrandom to v0.4.3 (#2150) fix(relay): bound and observe Git read operations (#2167) fix(desktop): derive default clone URL for relay-hosted repos (#2166) fix(desktop): mask composer rounded corners (#2165) feat(desktop): add PR merge conflict recovery (#2164) fix(desktop): mask scrolled content behind channel and thread composers (#2163) feat(desktop): add inline PR diff comments (#2162) feat(desktop): add commit-scoped PR review decisions (#2161) fix(desktop): batch project work item queries (#2160) feat(desktop): make missing project checkouts actionable (#2159) Fix harness default model states in onboarding (#2156) relay: gate push enqueue on live leases; batch matcher pipeline (T1b/T1a-repair/T2b) (#2145) ...
wpfleger96
added a commit
that referenced
this pull request
Jul 20, 2026
…rics * origin/main: (96 commits) fix(desktop): prefer live agent mentions (#2149) fix(desktop): close focused threads on Escape (#2154) fix: skip membership lookup for open relays (#2107) fix(desktop): make invite QR downloadable (#2168) Archive managed agents when deleted (#2135) perf(relay): cache Git pack hydration (#2169) chore(deps): update rust crate rustls to v0.23.42 (#2151) chore(deps): update dependency @tanstack/react-virtual to v3.14.6 (#2153) Add Agent Config Core: harness capability model behind agent config surfaces (#2158) chore(deps): update all non-major dependencies (#2152) chore(deps): update rust crate getrandom to v0.4.3 (#2150) fix(relay): bound and observe Git read operations (#2167) fix(desktop): derive default clone URL for relay-hosted repos (#2166) fix(desktop): mask composer rounded corners (#2165) feat(desktop): add PR merge conflict recovery (#2164) fix(desktop): mask scrolled content behind channel and thread composers (#2163) feat(desktop): add inline PR diff comments (#2162) feat(desktop): add commit-scoped PR review decisions (#2161) fix(desktop): batch project work item queries (#2160) feat(desktop): make missing project checkouts actionable (#2159) ...
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.
Summary
Git clone, fetch, and push hydration now reuses verified immutable pack/index pairs instead of downloading and indexing unchanged packs for every request. Object storage remains authoritative; cache misses, eviction, and relay restarts affect performance only.
The cache is content-addressed by pack digest, coalesces concurrent misses into one population flight, and hard-links cached files into each isolated request workspace with a copy fallback. Retained bytes, population concurrency, pack/index sizes, stale sessions, and the per-pod cache volume are all bounded, with Prometheus metrics for hits, misses, coalescing, population waits, size, activity, eviction, and fallback behavior.
Operational design
Test plan
cargo clippy -p buzz-relay --all-targets -- -D warningscargo test -p buzz-relay --lib api::git::pack_cache::testscargo test -p buzz-relay --lib api::git::hydrate::testscargo test -p buzz-relay --lib api::git::transport::track_c_testscargo test -p buzz-test-client --test e2e_git -- --ignored --nocapture