Finding f1bug
forget(&index, &gone)` runs unconditionally, and `gone` is filled at line 137 even when `dry_run` is true — so `POST /v1/admin/cache/sweep?dry_run=true` deletes every index entry naming a blob the…
forget(&index, &gone)` runs unconditionally, and `gone` is filled at line 137 even when `dry_run` is true — so `POST /v1/admin/cache/sweep?dry_run=true` deletes every index entry naming a blob the sweep *would* have removed (`fs::remove_file(path)` at line 252 has no dry-run guard). The route documented as "reports what one would reclaim without removing anything" (docs/operations.md, admin.rs:87) silently unlinks the name index, turning the next build's hits into a full refetch storm against upstreams.
bug Category: bug Confidence: Not recorded
services/proxy/src/sweep.rs:140
Evidence quote
Not recorded
Suggested fix
Not recorded
Finding f2bug
clear_partials` unlinks *every* file in `incoming` with no age or liveness test, but that directory holds the in-flight temporary of each running fetch (`BlobStore::temp_path`, store.rs:204) and of…
clear_partials` unlinks *every* file in `incoming` with no age or liveness test, but that directory holds the in-flight temporary of each running fetch (`BlobStore::temp_path`, store.rs:204) and of each index write (store.rs:147). A sweep — automatic every `CAIRN_SWEEP_INTERVAL`, 15m by default — deletes the temp of a download that is proceeding fine; the writer's `fs::rename(&temp, &target)` at store.rs:259 then fails with ENOENT and the client gets a 500 on a perfectly good artifact. The doc comment's premise ("a fetch that is not coming back") is untrue for anything currently streaming.
bug Category: bug Confidence: Not recorded
services/proxy/src/sweep.rs:232
Evidence quote
Not recorded
Suggested fix
Not recorded
Category: bug Confidence: Not recorded
services/proxy/src/sweep.rs:102
Evidence quote
Not recorded
Suggested fix
Not recorded
Category: bug Confidence: Not recorded
services/proxy/src/metrics.rs:94
Evidence quote
Not recorded
Suggested fix
Not recorded
Category: performance Confidence: Not recorded
services/proxy/src/routes/admin.rs:76
Evidence quote
Not recorded
Suggested fix
Not recorded
Finding f6bug
the HTTP route bypasses the `running` mutex by calling `sweep()` instead of `run()`, so the "one sweep at a time" invariant the lock exists to keep (sweep.rs:10-12, 65-67) does not hold for the…
the HTTP route bypasses the `running` mutex by calling `sweep()` instead of `run()`, so the "one sweep at a time" invariant the lock exists to keep (sweep.rs:10-12, 65-67) does not hold for the on-demand route. Two concurrent admin sweeps, or one racing the interval sweep, each compute `remaining` from a total the other is already shrinking and together take the store far below the ceiling.
bug Category: bug Confidence: Not recorded
services/proxy/src/routes/admin.rs:76
Evidence quote
Not recorded
Suggested fix
Not recorded
Category: bug Confidence: Not recorded
services/proxy/src/sweep.rs:119
Evidence quote
Not recorded
Suggested fix
Not recorded
Finding f8bug
fs::metadata` follows symlinks, contradicting the comment directly above it (a symlink is counted at its target's size, not the link's) and, worse, making `collect` recurse into symlinked…
fs::metadata` follows symlinks, contradicting the comment directly above it (a symlink is counted at its target's size, not the link's) and, worse, making `collect` recurse into symlinked directories — a link pointing at an ancestor inside `CAIRN_BLOB_DIR` recurses until the stack overflows. Use `fs::symlink_metadata`.
bug Category: bug Confidence: Not recorded
services/proxy/src/sweep.rs:164
Evidence quote
Not recorded
Suggested fix
Not recorded
Category: bug Confidence: Not recorded
services/proxy/src/sweep.rs:134
Evidence quote
Not recorded
Suggested fix
Not recorded
Category: bug Confidence: Not recorded
services/proxy/src/sweep.rs:120
Evidence quote
Not recorded
Suggested fix
Not recorded