bug
candidates.sort_by_key(|candidate| candidate.age)` sorts ascending, so the smallest `age` (most recently modified, i.e. newest) blob is first and the largest `age` (oldest, longest-unwanted) blob is… candidates.sort_by_key(|candidate| candidate.age)` sorts ascending, so the smallest `age` (most recently modified, i.e. newest) blob is first and the largest `age` (oldest, longest-unwanted) blob is last. The removal loop that follows walks the vector front-to-back and stops once `remaining < self.max_bytes`, so it evicts the *newest* blobs first and leaves the truly stale ones in place until every newer blob has already gone — the opposite of the "oldest blobs go, this morning's fetch stays" behaviour the comment above it and `docs/operations.md`/`docs/architecture.md` describe. Fix by sorting oldest-first, e.g. `sort_by_key(|c| std::cmp::Reverse(c.age))`.
services/proxy/src/sweep.rs:102
Evidence quote
Not recorded
Suggested fix
Not recorded