Review text is escaped; normalized decisions follow each finding
Finding f1
bug
Duration::from_hours(1)` and `Duration::from_mins(15)` do not exist on `std::time::Duration`; this code does not compile.
🔗 relevant also at services/proxy/src/config.rs:84, 350, 351.
bug
Category: bugConfidence: Not recorded
services/proxy/src/config.rs:83
Evidence quote
Not recorded
Suggested fix
Not recorded
rejectedNo keyed
defect (scorer)
Finding f2
maintainability
Sweeper::sweep` is a synchronous filesystem walk called from an async handler (`admin::sweep` at services/proxy/src/routes/admin.rs:67) without `spawn_blocking`, blocking the Tokio runtime for the…
Sweeper::sweep` is a synchronous filesystem walk called from an async handler (`admin::sweep` at services/proxy/src/routes/admin.rs:67) without `spawn_blocking`, blocking the Tokio runtime for the entire duration of a large store walk.
remaining` starts at `held` and is only decremented after a blob is chosen for removal, so the ceiling is compared against the pre-removal total.
The first iteration removes a blob even when `held == max_bytes`, which is correct, but the loop continues removing the oldest referenced blob one byte beyond the ceiling rather than stopping once `remaining < max_bytes`. More importantly, if `held` is already below `max_bytes`, the condition `remaining >= max_bytes` is false, so no unreferenced-blob removal happens by age—but unreferenced blobs are still removed unconditionally, which is intended; the real issue is that with `held >= max_bytes`, after removing one blob, `remaining` becomes `held - size`, and if that is still >= max_bytes, another old blob is removed. This repeats until the total is strictly less than the ceiling, so the store can end up far below the configured ceiling when a single old blob is much smaller than the overage.
age_of` returns `Duration::default()` when `modified()` is missing or in the future, treating every such blob as age zero.
A blob with a bad timestamp will then never be removed by age even if the store is over its ceiling, and may silently accumulate.
clear_partials` counts every entry in `incoming` as a removed partial even during a dry run, so `Reclaimed::partials` is non-zero in dry-run output even though nothing was deleted.
the values array and `COUNTERS` were expanded to six entries, but the order of the new sweep counters in `values()` does not match their order in `COUNTERS`: `COUNTERS` has bytes then blobs, but…
the values array and `COUNTERS` were expanded to six entries, but the order of the new sweep counters in `values()` does not match their order in `COUNTERS`: `COUNTERS` has bytes then blobs, but `values()` loads bytes then blobs as well. (Actually both have bytes then blobs at offsets 4 and 5; no mismatch.) No finding here.
reclaim` calls `app.sweeper.sweep(dry_run)` synchronously.
Because `sweep` performs blocking I/O on the async thread (see above) and is not `await`ed, this also bypasses the `Mutex` ordering established by `Sweeper::run`, though the same process mutex is still held.
🟢 `maintainability` services/proxy/src/sweep.rs:199-201: `referenced` reuses the generic recursive `collect`, which collects every file including non-JSON entries and directories; fine, but worth noting it also walks any stray directories under `index` and treats all files as candidate entries.
No other concrete defects identified.