{
  "assessment": {
    "decisions": [
      {
        "decided_by": "locality",
        "defect_id": "6",
        "finding_id": "f1",
        "id": "d1",
        "outcome": "matched",
        "reason": null
      },
      {
        "decided_by": "locality",
        "defect_id": "1",
        "finding_id": "f2",
        "id": "d2",
        "outcome": "matched",
        "reason": null
      },
      {
        "decided_by": "locality",
        "defect_id": "13",
        "finding_id": "f3",
        "id": "d3",
        "outcome": "matched",
        "reason": null
      }
    ],
    "judge": null,
    "judged": false,
    "scorer": {
      "commit": "631c4107752a97104719622800c9815e030613cf",
      "digest": "sha256:a1a935298956020ee6d767a756847abb4c00694c88c2eb80d454886ebc4acf8c",
      "id": "bench-score",
      "version": "1"
    },
    "state": "measured"
  },
  "benchmark": {
    "input_fingerprint": "69301578538a",
    "key_fingerprint": "bd331c0b144e",
    "policy_fingerprint": "c53f8cfc8c75",
    "prompt_fingerprint": "74234e98afe7",
    "subject": "proxy"
  },
  "build": {
    "commit": "b0f313c0b59a66ecc7612396dc8db0ea5da13a7a",
    "digest": null,
    "dirty": false,
    "label": "afi 0.30.0",
    "version": "0.30.0"
  },
  "configuration": {
    "fingerprint": "9e4eff5e45f8",
    "label": "default",
    "models": [
      {
        "effort": "high",
        "model": "anthropic/claude-sonnet-5",
        "protocol": null,
        "provider": "anthropic",
        "role": "agent"
      }
    ],
    "profile": null,
    "resolved": {
      "effort": "high",
      "instructions": [],
      "sandbox": {
        "backend": "macOS Seatbelt",
        "mode": "read-only",
        "network": "denied"
      },
      "source": "openrouter",
      "system_prompt": {
        "file": null,
        "mode": "builtin"
      },
      "tools": [
        "read_file",
        "write_file",
        "edit_file",
        "list_dir",
        "search_files",
        "glob_files",
        "run_bash",
        "wait_background"
      ]
    }
  },
  "coverage": {
    "chunks": null,
    "files_failed": 0,
    "files_kept": null,
    "files_skipped": 0,
    "files_unreviewed": 0,
    "hunks": null,
    "state": "measured"
  },
  "evidence": [
    {
      "digest": "sha256:ad39821394a4648417759460e71e62f393e2128fae0e9a9b13c7f3c962d03b13",
      "media_type": "application/json",
      "path": "summary.json",
      "role": "summary"
    },
    {
      "digest": "sha256:6cd6ca5bbb626a8f030ba96189d4988e031c9c3f9f42b938636c6c646b9b35b9",
      "media_type": "application/json",
      "path": "findings.json",
      "role": "findings"
    },
    {
      "digest": "sha256:eef5fb1dc8ff425d03f6cb6f8c706c361ad1fc7397e326dd65dbe7575f1ea6af",
      "media_type": "application/json",
      "path": "meta.json",
      "role": "meta"
    },
    {
      "digest": "sha256:a2a947606a3efa071988617fa4018baa99664cf5ce165a30a6a6588efa21870a",
      "media_type": "application/json",
      "path": "spend.json",
      "role": "spend"
    },
    {
      "digest": "sha256:c1e377e061589b21968d1dc9e0a54d1cba62c556b45647bc3f0be005abc144d7",
      "media_type": "application/jsonl",
      "path": "result.jsonl",
      "role": "result"
    },
    {
      "digest": "sha256:c83b3fead30bd4c44aaa2b1f94d409606decfd1dea7d9e122d155e5d346d556f",
      "media_type": "text/plain",
      "path": "stderr.txt",
      "role": "stderr"
    },
    {
      "digest": "sha256:29914d85d0292b4d00cdfeeb8c77d004407acad64fc7b7307f7055024d1be244",
      "media_type": "application/gzip",
      "path": "afi-home/logs.tar.gz",
      "role": "traffic"
    }
  ],
  "execution": {
    "billing_limit_usd": 8.0,
    "budget_usd": 8.0,
    "deadline_exceeded": false,
    "exit_code": 0,
    "finished_at": "2026-08-31T15:11:36Z",
    "started_at": "2026-08-31T15:06:16Z",
    "wall_seconds": 321.0
  },
  "extensions": {
    "afi": {
      "found_per_pass": {
        "agent": 3
      },
      "passes": null,
      "review_seconds": 318.898,
      "tier1_only": false,
      "variant_hash": null
    }
  },
  "findings": {
    "items": [
      {
        "attributes": {
          "category": "bug",
          "confidence": null,
          "evidence_quote": null,
          "suggested_fix": null
        },
        "body": "reclaim` calls `app.sweeper.sweep(dry_run)` directly instead of the async `Sweeper::run` (sweep.rs:82-85), so it never takes the `running` mutex that sweep.rs's own module doc (sweep.rs:11-13) says\u2026\n\nreclaim` calls `app.sweeper.sweep(dry_run)` directly instead of the async `Sweeper::run` (sweep.rs:82-85), so it never takes the `running` mutex that sweep.rs's own module doc (sweep.rs:11-13) says is required: \"Two of them over one directory would each decide what to remove from a total the other is already changing... they would take the store far below the ceiling either was aiming at.\" A `POST /v1/admin/cache/sweep` that lands while the periodic sweep (main.rs:116, which does use `run()`) is in flight, or two concurrent admin requests, run two unsynchronized sweeps over the same directory concurrently, defeating the exact invariant the code is built around.",
        "id": "f1",
        "locations": [
          {
            "end_line": 76,
            "path": "services/proxy/src/routes/admin.rs",
            "start_line": 76
          }
        ],
        "severity": "bug",
        "title": "bug"
      },
      {
        "attributes": {
          "category": "bug",
          "confidence": null,
          "evidence_quote": null,
          "suggested_fix": null
        },
        "body": "candidates.sort_by_key(|candidate| candidate.age)` sorts ascending, i.e. newest (smallest age) first, but the comment directly above (lines 100-101) and the documentation added in\u2026\n\ncandidates.sort_by_key(|candidate| candidate.age)` sorts ascending, i.e. newest (smallest age) first, but the comment directly above (lines 100-101) and the documentation added in docs/architecture.md:55 and docs/operations.md both state the sweep \"removes the oldest blobs\" to reclaim space. Since the loop never breaks and removes for the capacity reason in list order, once several blobs are past `min_age` the sweep evicts the ones that *just* crossed the grace period first and leaves genuinely ancient blobs cached longest - the opposite of the advertised LRU-style eviction, causing needless refetch churn on blobs that are merely old-enough while truly stale blobs sit untouched.",
        "id": "f2",
        "locations": [
          {
            "end_line": 102,
            "path": "services/proxy/src/sweep.rs",
            "start_line": 102
          }
        ],
        "severity": "bug",
        "title": "bug"
      },
      {
        "attributes": {
          "category": "bug",
          "confidence": null,
          "evidence_quote": null,
          "suggested_fix": null
        },
        "body": "values()` returns `sweep_bytes_reclaimed` at index 4 and `sweep_blobs_removed` at index 5, but `COUNTERS` (metrics.rs:50-57) lists `cairn_proxy_sweep_blobs_removed_total` at index 4 and\u2026\n\nvalues()` returns `sweep_bytes_reclaimed` at index 4 and `sweep_blobs_removed` at index 5, but `COUNTERS` (metrics.rs:50-57) lists `cairn_proxy_sweep_blobs_removed_total` at index 4 and `cairn_proxy_sweep_bytes_reclaimed_total` at index 5. `render()` zips the two arrays positionally, so the exposed Prometheus metrics are swapped: the \"blobs removed\" metric reports byte counts and the \"bytes reclaimed\" metric reports blob counts, silently breaking the exact `cairn_proxy_sweep_bytes_reclaimed_total` alerting the PR's own docs/operations.md change tells operators to watch.",
        "id": "f3",
        "locations": [
          {
            "end_line": 94,
            "path": "services/proxy/src/metrics.rs",
            "start_line": 94
          }
        ],
        "severity": "bug",
        "title": "bug"
      }
    ],
    "problems": [],
    "state": "measured"
  },
  "harness": {
    "adapter": {
      "digest": "sha256:a1a935298956020ee6d767a756847abb4c00694c88c2eb80d454886ebc4acf8c",
      "id": "afi",
      "version": "1"
    },
    "commit": "631c4107752a97104719622800c9815e030613cf",
    "digest": "sha256:a1a935298956020ee6d767a756847abb4c00694c88c2eb80d454886ebc4acf8c",
    "dirty": true,
    "id": "bench",
    "repository_url": "https://github.com/smykla-skalski/benchee",
    "version": "1"
  },
  "incremental": {
    "carried_count": null,
    "mode": "not_recorded",
    "prior_reviewed_sha": null,
    "reused_tokens": null,
    "state_source": null
  },
  "label": "sonnet-5",
  "metrics": {
    "anchor_max": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 0
    },
    "anchor_median": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 0
    },
    "anchor_missed": {
      "reason": "no judging pass has looked beyond the scored slack",
      "state": "not_recorded",
      "unit": "count",
      "value": null
    },
    "carried": {
      "reason": "the reviewer reported no reuse figure",
      "state": "not_recorded",
      "unit": "count",
      "value": null
    },
    "category_defect": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.15384615384615385
    },
    "category_maintainability": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.0
    },
    "category_performance": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.3333333333333333
    },
    "category_security": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.0
    },
    "f1": {
      "reason": "no qualified judge decided these findings, so only locality was measured",
      "state": "not_applicable",
      "unit": "ratio",
      "value": null
    },
    "finding_count": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 3
    },
    "found": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 3
    },
    "intended": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 0
    },
    "judge_bill": {
      "reason": "no qualified judge decided these findings, so only locality was measured",
      "state": "not_applicable",
      "unit": "usd",
      "value": null
    },
    "missed": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 17
    },
    "precision": {
      "reason": "no qualified judge decided these findings, so only locality was measured",
      "state": "not_applicable",
      "unit": "ratio",
      "value": null
    },
    "recall": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.15
    },
    "review_bill": {
      "reason": null,
      "state": "measured",
      "unit": "usd",
      "value": 0.940338
    },
    "seconds": {
      "reason": null,
      "state": "measured",
      "unit": "seconds",
      "value": 321.0
    },
    "tier_1": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.3333333333333333
    },
    "tier_2": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.14285714285714285
    },
    "tier_3": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.16666666666666666
    },
    "tier_4": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.0
    },
    "tokens": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 336909
    },
    "total_bill": {
      "reason": null,
      "state": "measured",
      "unit": "usd",
      "value": 0.940338
    },
    "unkeyed": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 0
    }
  },
  "producer": {
    "commit": "631c4107752a97104719622800c9815e030613cf",
    "digest": "sha256:a1a935298956020ee6d767a756847abb4c00694c88c2eb80d454886ebc4acf8c",
    "dirty": true,
    "id": "benchee",
    "repository_url": "https://github.com/smykla-skalski/benchee",
    "version": "1"
  },
  "reviewer": {
    "id": "afi",
    "label": "afi review",
    "repository_url": "https://github.com/smykla-skalski/afi",
    "tool": {
      "interface": "cli",
      "name": "afi"
    }
  },
  "run_id": "afi/sonnet-5/20260831T144455Z",
  "runtime": {
    "architecture": "arm64",
    "cache_mode": null,
    "cpus": 14,
    "memory_bytes": 38654705664,
    "os": "Darwin",
    "provider_route": "openrouter",
    "region": null,
    "runner_image": null
  },
  "schema": "benchee-run-1",
  "stamp": "20260831T144455Z",
  "status": {
    "reason": null,
    "state": "completed"
  },
  "target": {
    "base_sha": null,
    "diff_digest": "sha256:c921265207938d025d4f2fb47329c377b767144efa630b4072a3836de9cea371",
    "pull_request": 8,
    "repository_url": "https://github.com/smykla-skalski/cairn",
    "reviewed_sha": "9b51f95ef609a219e211e37b082cd2e6913190e0"
  },
  "usage": {
    "reason": null,
    "state": "measured",
    "value": {
      "cached_input_tokens": 0,
      "input_tokens": 334869,
      "models": null,
      "output_tokens": 2040,
      "reasoning_tokens": 25020,
      "requests": 12,
      "stages": []
    }
  }
}
