{
  "assessment": {
    "decisions": [
      {
        "decided_by": "scorer",
        "defect_id": null,
        "finding_id": "f1",
        "id": "d1",
        "outcome": "rejected",
        "reason": null
      },
      {
        "decided_by": "locality",
        "defect_id": "3",
        "finding_id": "f2",
        "id": "d2",
        "outcome": "matched",
        "reason": null
      },
      {
        "decided_by": "locality",
        "defect_id": "12",
        "finding_id": "f3",
        "id": "d3",
        "outcome": "matched",
        "reason": null
      },
      {
        "decided_by": "locality",
        "defect_id": "18",
        "finding_id": "f4",
        "id": "d4",
        "outcome": "matched",
        "reason": null
      }
    ],
    "judge": null,
    "judged": false,
    "scorer": {
      "commit": "510c32b5841ecbfd4f98c2e8a431b98b80327ba1",
      "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": "2116b14e41cc",
    "label": "default",
    "models": [
      {
        "effort": "high",
        "model": "minimax/minimax-m3",
        "protocol": null,
        "provider": "minimax",
        "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:9693c7d8adf4f26fe134cc476009f45af4c14f24b4b400544851783cfe1cc56f",
      "media_type": "application/json",
      "path": "summary.json",
      "role": "summary"
    },
    {
      "digest": "sha256:2117ed0689944769878d9660079c917deb13d62eafb869a70431930a00f9455f",
      "media_type": "application/json",
      "path": "findings.json",
      "role": "findings"
    },
    {
      "digest": "sha256:21956315ad428d4ea252cd68c8ab06bbd8c7812b35121b863cbd5ad3fab29e37",
      "media_type": "application/json",
      "path": "meta.json",
      "role": "meta"
    },
    {
      "digest": "sha256:b27bafda043ea4da467507aac96a79d469af3827fff0ff53bd2c9b6847fa621f",
      "media_type": "application/json",
      "path": "spend.json",
      "role": "spend"
    },
    {
      "digest": "sha256:63c44f7309372d0cf46ae748b30b7520c848bbe6ac8fc89d95da832f30f65e9e",
      "media_type": "application/jsonl",
      "path": "result.jsonl",
      "role": "result"
    },
    {
      "digest": "sha256:c60f0fc95da48a5b3866d421a16ccc53579ae13fa5e752db4513d4dba603ed23",
      "media_type": "text/plain",
      "path": "stderr.txt",
      "role": "stderr"
    },
    {
      "digest": "sha256:23a58f56f4a94dc85d4278912e6d2f504f51b30bef8be913bce3f512bcf9cb30",
      "media_type": "application/gzip",
      "path": "afi-home/logs.tar.gz",
      "role": "traffic"
    }
  ],
  "execution": {
    "billing_limit_usd": 3.0,
    "budget_usd": 3.0,
    "deadline_exceeded": false,
    "exit_code": 0,
    "finished_at": "2026-08-31T17:09:20Z",
    "started_at": "2026-08-31T17:07:23Z",
    "wall_seconds": 117.0
  },
  "extensions": {
    "afi": {
      "found_per_pass": {
        "agent": 4
      },
      "passes": null,
      "review_seconds": 114.601,
      "tier1_only": false,
      "variant_hash": null
    }
  },
  "findings": {
    "items": [
      {
        "attributes": {
          "category": "bug",
          "confidence": null,
          "evidence_quote": null,
          "suggested_fix": null
        },
        "body": "values()` reads `sweep_bytes_reclaimed` at index 4 and `sweep_blobs_removed` at index 5, but `COUNTERS` at lines 50-57 has the opposite order (`sweep_blobs_removed_total` first,\u2026\n\nvalues()` reads `sweep_bytes_reclaimed` at index 4 and `sweep_blobs_removed` at index 5, but `COUNTERS` at lines 50-57 has the opposite order (`sweep_blobs_removed_total` first, `sweep_bytes_reclaimed_total` second). The exposition will render blob counts under the bytes-reclaimed metric name and vice versa - exactly the failure mode the comment on lines 30-32 warns about.",
        "id": "f1",
        "locations": [
          {
            "end_line": 88,
            "path": "services/proxy/src/metrics.rs",
            "start_line": 88
          }
        ],
        "severity": "bug",
        "title": "bug"
      },
      {
        "attributes": {
          "category": "bug",
          "confidence": null,
          "evidence_quote": null,
          "suggested_fix": null
        },
        "body": "!index.contains_key(hex)` removes a blob when no index entry references it, but the cache write order in `store.rs` (`BlobWriter::commit` renames the blob into place, then the route writes the index\u2026\n\n!index.contains_key(hex)` removes a blob when no index entry references it, but the cache write order in `store.rs` (`BlobWriter::commit` renames the blob into place, then the route writes the index entry via `BlobStore::link`) lets a sweep running between those two steps see a blob with no index entry yet and delete it. The trailing `link` then writes a stale entry that forces a guaranteed miss on the next request; the same path also removes the orphan-safety guarantee the comment on lines 117-118 relies on.",
        "id": "f2",
        "locations": [
          {
            "end_line": 119,
            "path": "services/proxy/src/sweep.rs",
            "start_line": 119
          }
        ],
        "severity": "bug",
        "title": "bug"
      },
      {
        "attributes": {
          "category": "bug",
          "confidence": null,
          "evidence_quote": null,
          "suggested_fix": null
        },
        "body": "forget(&index, &gone)` runs unconditionally, including on a dry run, and the loop in `forget` only calls `fs::remove_file` (no `dry_run` argument).\n\nA `?dry_run=true` call to `POST /v1/admin/cache/sweep` would still delete index entries for the blobs whose bytes it did not remove, leaving the index pointing at now-removed bytes on a query the operator believed was read-only.",
        "id": "f3",
        "locations": [
          {
            "end_line": 140,
            "path": "services/proxy/src/sweep.rs",
            "start_line": 140
          }
        ],
        "severity": "bug",
        "title": "bug"
      },
      {
        "attributes": {
          "category": "bug",
          "confidence": null,
          "evidence_quote": null,
          "suggested_fix": null
        },
        "body": "The age floor (`candidate.age >= self.min_age`) is only applied to the ceiling-driven removal branch, but the second branch (`remaining >= self.max_bytes`) is checked before the first; if the store\u2026\n\nThe age floor (`candidate.age >= self.min_age`) is only applied to the ceiling-driven removal branch, but the second branch (`remaining >= self.max_bytes`) is checked before the first; if the store is already over the ceiling at sweep start, even freshly-fetched blobs that an index entry *does* name are removed as long as `remaining` stays above `max_bytes`, contradicting the docs/operations.md claim that `CAIRN_CACHE_MIN_AGE` is a grace period protecting recent fetches (the grace only protects when the store is *not* over the ceiling at sweep entry).",
        "id": "f4",
        "locations": [
          {
            "end_line": 119,
            "path": "services/proxy/src/sweep.rs",
            "start_line": 119
          }
        ],
        "severity": "bug",
        "title": "bug"
      }
    ],
    "problems": [],
    "state": "measured"
  },
  "harness": {
    "adapter": {
      "digest": "sha256:a1a935298956020ee6d767a756847abb4c00694c88c2eb80d454886ebc4acf8c",
      "id": "afi",
      "version": "1"
    },
    "commit": "510c32b5841ecbfd4f98c2e8a431b98b80327ba1",
    "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": "minimax-m3",
  "metrics": {
    "anchor_max": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 1
    },
    "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.23076923076923078
    },
    "category_maintainability": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.0
    },
    "category_performance": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.0
    },
    "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": 4
    },
    "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.04478328
    },
    "seconds": {
      "reason": null,
      "state": "measured",
      "unit": "seconds",
      "value": 117.0
    },
    "tier_1": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.3333333333333333
    },
    "tier_2": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.0
    },
    "tier_3": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.16666666666666666
    },
    "tier_4": {
      "reason": null,
      "state": "measured",
      "unit": "ratio",
      "value": 0.25
    },
    "tokens": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 53969
    },
    "total_bill": {
      "reason": null,
      "state": "measured",
      "unit": "usd",
      "value": 0.04478328
    },
    "unkeyed": {
      "reason": null,
      "state": "measured",
      "unit": "count",
      "value": 1
    }
  },
  "producer": {
    "commit": "510c32b5841ecbfd4f98c2e8a431b98b80327ba1",
    "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/minimax-m3/20260831T163154Z",
  "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": "20260831T163154Z",
  "status": {
    "reason": null,
    "state": "completed"
  },
  "target": {
    "base_sha": null,
    "diff_digest": "sha256:eb6648de72c2c54842f91c28e6791a83b671f33293da0f76aeef42c320108ec8",
    "pull_request": 8,
    "repository_url": "https://github.com/smykla-skalski/cairn",
    "reviewed_sha": "9b51f95ef609a219e211e37b082cd2e6913190e0"
  },
  "usage": {
    "reason": null,
    "state": "measured",
    "value": {
      "cached_input_tokens": 84003,
      "input_tokens": 53192,
      "models": null,
      "output_tokens": 777,
      "reasoning_tokens": 4404,
      "requests": 8,
      "stages": []
    }
  }
}
