Skip to content

feat: add LRU disk eviction of idle mirrors - #22

Open
rolandjitsu wants to merge 1 commit into
mainfrom
feat/add-lru-eviction
Open

feat: add LRU disk eviction of idle mirrors#22
rolandjitsu wants to merge 1 commit into
mainfrom
feat/add-lru-eviction

Conversation

@rolandjitsu

Copy link
Copy Markdown
Owner

What kind of change does this PR introduce?

  • fix
  • feat
  • refactor
  • perf
  • docs
  • test
  • build / ci
  • chore

Summary

Add LRU based eviction for repos.

Tests

  • Added / updated tests (unit, plus integration where it fits)
  • Not relevant, because: ...

Checklist

  • CI is green locally: cargo fmt --all --check, cargo clippy --all-targets --all-features --locked -- -D warnings, cargo test --all-features
  • Commits follow Conventional Commits; AI-assisted commits carry an Assisted-by: trailer (see CONTRIBUTING.md / AGENTS.md)
  • Preserves the read-only, pull-only invariant (no push or proactive replication to upstream)
  • Docs / README updated if behavior or flags changed

Breaking change?

No.

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.64499% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.51%. Comparing base (b80662e) to head (7dde0d5).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/evict.rs 98.33% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
+ Coverage   93.25%   95.51%   +2.26%     
==========================================
  Files           4        5       +1     
  Lines         504      870     +366     
==========================================
+ Hits          470      831     +361     
- Misses         34       39       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Bound the on-disk cache with an optional byte cap (--cache-max-mb,
default 0 = unlimited). A clone/fetch flags the mirror; a background
task measures it and evicts least-recently-used idle mirrors until
under the cap, off the request path. Evicted mirrors re-clone
transparently on the next request.

Assisted-by: Claude:claude-opus-4-8
@rolandjitsu
rolandjitsu force-pushed the feat/add-lru-eviction branch from 2a762cd to 7dde0d5 Compare August 16, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant