Session summary

default

scored

afi / afi · cli reviewed proxy at 9b51f95e with Default profile / Moonshot AI · kimi k2.7 code high on afi 0.30.0

Measurements

Unavailable values retain their exported state and reason

Quality

Recall 45%
Model-judged precision N/A
F1 N/A
Tier 1 recall 66.7%
Tier 2 recall 42.9%
Tier 3 recall 33.3%
Tier 4 recall 50%
Security recall 100%
Defect recall 46.2%
Maintainability recall 0%
Performance recall 33.3%
Median anchor distance 0
Worst anchor distance 3
Refusals a judge overturned Not recorded

Review outcomes

Distinct matched defects 9
Defects missed 11
Findings 13
Unkeyed findings 3
Intended findings 0
Carried findings Not recorded

Cost, usage, and speed

Total bill $0.0368
Review bill $0.0368
Judge bill N/A
Tokens 39094
Duration 1m 5s

Execution and identity

Lifecycle, reviewer, build, settings, and normalized execution limits

Lifecycle
completed
Lifecycle reason
Not recorded
Started
Finished
Reviewer
afi
Reviewer tool
afi · cli
Configuration
default / 372d66bf0baf
Configuration ID
config-b501a08ebedcc16a
Build
afi 0.30.0 / b0f313c0b59a66ecc7612396dc8db0ea5da13a7a
Comparison
comparison-dca0df8a4b0484b4
Build ID
build-4ceb7cbd44e9619b
Cohort ID
cohort-f79f4d833e798c10
Harness
bench 1 / 10b3b2068100b7ba429855e062500eaf83b90120 dirty
Adapter
afi 1 / sha256:a1a935298956020ee6d767a756847abb4c00694c88c2eb80d454886ebc4acf8c
Exit code
0
Wall time
65
Deadline exceeded
No
Budget
$2.00
Billing limit
$2.00

Usage

Normalized reviewer-tool usage projection

Input tokens
37933
Output tokens
1161
Cached input
0
Reasoning tokens
46
Requests
2
Models counted
Not recorded

Judge

Normalized assessment summary

Judge data is N/A for this run

Findings

Review text is escaped; normalized decisions follow each finding

Finding f1

performance

the oldest-first eviction reorders the total by file modification time, not by reference count, so an unreferenced blob kept for safety by `CAIRN_CACHE_MIN_AGE` is removed before any referenced blob… the oldest-first eviction reorders the total by file modification time, not by reference count, so an unreferenced blob kept for safety by `CAIRN_CACHE_MIN_AGE` is removed before any referenced blob even though it is already accounted as reclaimable; the loop should unreferenced blobs first before age-based eviction.

performance
Category: performance Confidence: Not recorded

services/proxy/src/sweep.rs:104-119

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 1 (locality)
Finding f2

bug

clear_partials` removes every file in `incoming` unconditionally, including partial writes for fetches that are currently active and still writing; a running fetch can be truncated into a corrupted… clear_partials` removes every file in `incoming` unconditionally, including partial writes for fetches that are currently active and still writing; a running fetch can be truncated into a corrupted cache miss or worse if the file vanishes mid-write.

bug
Category: bug Confidence: Not recorded

services/proxy/src/sweep.rs:224-238

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 17 (locality)
Finding f3

bug

the background sweep reads filesystem state without coordination with active `BlobWriter` downloads or concurrent `cache::serve` reads, so a partial/incomplete blob that finished `rename` but is… the background sweep reads filesystem state without coordination with active `BlobWriter` downloads or concurrent `cache::serve` reads, so a partial/incomplete blob that finished `rename` but is still being populated can be treated as a complete candidate and removed even though it is about to be served.

bug
Category: bug Confidence: Not recorded

services/proxy/src/sweep.rs:91-92

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 11 (locality)
Finding f4

bug

the `sweep` route holds the lock and reports success over HTTP even when `fs::remove_file` failed for every blob, so `Json(reclaimed)` tells the caller bytes were reclaimed when they were not;… the `sweep` route holds the lock and reports success over HTTP even when `fs::remove_file` failed for every blob, so `Json(reclaimed)` tells the caller bytes were reclaimed when they were not; callers acting on the number may lower the ceiling thinking space was freed.

bug
Category: bug Confidence: Not recorded

services/proxy/src/routes/admin.rs:82-84

Evidence quote

Not recorded

Suggested fix

Not recorded

rejectedNo keyed defect (scorer)
Finding f5

bug

collect` recurses into subdirectories blindly; if the blob directory contains a symlink cycle or unexpectedly deep tree, the sweep will hang or stack-overflow, and `meta.is_dir()` on a symlink to a… collect` recurses into subdirectories blindly; if the blob directory contains a symlink cycle or unexpectedly deep tree, the sweep will hang or stack-overflow, and `meta.is_dir()` on a symlink to a directory will follow it.

bug
Category: bug Confidence: Not recorded

services/proxy/src/sweep.rs:153-176

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 4 (locality)
Finding f6

maintainability

values()` reads `sweep_bytes_reclaimed` before `sweep_blobs_removed`, but `COUNTERS` renders `sweep_blobs_removed_total` before `sweep_bytes_reclaimed_total`, so the name/help mismatch metric names… values()` reads `sweep_bytes_reclaimed` before `sweep_blobs_removed`, but `COUNTERS` renders `sweep_blobs_removed_total` before `sweep_bytes_reclaimed_total`, so the name/help mismatch metric names to values; the existing "side by side" ordering is broken by the new counters.

maintainability
Category: maintainability Confidence: Not recorded

services/proxy/src/metrics.rs:88-96

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 13 (locality)
Finding f7

bug

after the loop terminates `remaining` may still exceed `max_bytes` because unreferenced blobs and all old-enough blobs were removed while newer referenced blobs were kept; the sweep claims success… after the loop terminates `remaining` may still exceed `max_bytes` because unreferenced blobs and all old-enough blobs were removed while newer referenced blobs were kept; the sweep claims success without warning that the ceiling was not reached.

bug
Category: bug Confidence: Not recorded

services/proxy/src/sweep.rs:104-119

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 3 (locality)
Finding f8

security

candidate.path.file_name()` is used as the hex digest key, but if the blob tree contains directories prefixed or suffixed (e.g. sharding), two different files could map to the same hex and one being… candidate.path.file_name()` is used as the hex digest key, but if the blob tree contains directories prefixed or suffixed (e.g. sharding), two different files could map to the same hex and one being "unreferenced" could cause removal of a file another entry points at; the key should be derived from the full blob layout, not just the filename.

security
Category: security Confidence: Not recorded

services/proxy/src/sweep.rs:110-112

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 18 (locality)
Finding f9

maintainability

referenced` reads every index file synchronously on the async runtime thread; although intended as synchronous, this blocks the Tokio worker during the whole sweep instead of using `spawn_blocking`,… referenced` reads every index file synchronously on the async runtime thread; although intended as synchronous, this blocks the Tokio worker during the whole sweep instead of using `spawn_blocking`, contradicting the module comment that claims "One pass of standard-library calls costs less than the scheduling would" while still blocking the runtime.

maintainability
Category: maintainability Confidence: Not recorded

services/proxy/src/sweep.rs:199-216

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 17 (locality)
Finding f10

maintainability

the `spawn_sweeps` task is detached and never joined; on graceful shutdown an in-progress sweep may be killed mid-unlink, leaving linked index entries (`forget`) running after the process is already… the `spawn_sweeps` task is detached and never joined; on graceful shutdown an in-progress sweep may be killed mid-unlink, leaving linked index entries (`forget`) running after the process is already dropping state.

maintainability
Category: maintainability Confidence: Not recorded

services/proxy/src/main.rs:88-121

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 6 (locality)
Finding f11

maintainability

sweep` is an `async fn` but the handler body calls the synchronous `reclaim` directly without `spawn_blocking`, so the HTTP worker thread is blocked for the entire filesystem walk and any concurrent… sweep` is an `async fn` but the handler body calls the synchronous `reclaim` directly without `spawn_blocking`, so the HTTP worker thread is blocked for the entire filesystem walk and any concurrent requests stall on the same executor.

maintainability
Category: maintainability Confidence: Not recorded

services/proxy/src/routes/admin.rs:61-71

Evidence quote

Not recorded

Suggested fix

Not recorded

matchedDefect 10 (locality)
Finding f12

maintainability

Duration::from_hours(1)` and `Duration::from_mins(15)` are used, but these helpers do not exist in `std::time::Duration` on the stable Rust version implied by the crate (they were stabilized in Rust… Duration::from_hours(1)` and `Duration::from_mins(15)` are used, but these helpers do not exist in `std::time::Duration` on the stable Rust version implied by the crate (they were stabilized in Rust 1.80); this will fail to compile unless the project already requires Rust 1.80+.

maintainability
Category: maintainability Confidence: Not recorded

services/proxy/src/config.rs:83-84

Evidence quote

Not recorded

Suggested fix

Not recorded

rejectedNo keyed defect (scorer)
Finding f13

maintainability

the directory constants duplicate the layout defined in `store.rs`; if the layout ever changes (e.g. adding another digest algorithm), this module will silently operate on the wrong paths.

maintainability
Category: maintainability Confidence: Not recorded

services/proxy/src/sweep.rs:34-37

Evidence quote

Not recorded

Suggested fix

Not recorded

rejectedNo keyed defect (scorer)

Source artifacts

Open a row to inspect or download evidence from this atomically published local run

findings present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

meta present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

record present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

result present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

spend present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

stderr present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

summary present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

traffic present

Open verified source artifact

Open this path at the exported commit

The artifact is present; its content is available through the verified source link

benchee benchee-dashboard-1 built from 10f4ec58 Static benchmark evidence ·