{
  "timestamp": "2026-05-26T09:41:56.635Z",
  "benchmark": "codegraph-replication",
  "codebasePath": "/Users/ufukaltinok/.local/share/cortexkit/alfonso/worktrees/d4d1353f0512127b/bg_1e2cc588",
  "codegraphSha": "1be8e7830f7ca37e42a378186b0274e684b1d4d8",
  "aftSha": "c6dac3b6d1c6be88271924f3ea4a666445313e8e",
  "driver": "ripgrep",
  "corpus": "codegraph",
  "corpusPath": "/Users/ufukaltinok/.local/share/cortexkit/alfonso/worktrees/d4d1353f0512127b/bg_1e2cc588/benchmarks/codegraph-replication/corpora/codegraph.json",
  "topK": 10,
  "runs": 1,
  "summary": {
    "total": 12,
    "passed": 6,
    "failed": 6,
    "skipped": 0,
    "meanRecall": 0.520833,
    "meanMRR": 0.583333,
    "meanPrecisionAt1": 0.583333,
    "meanPrecisionAt5": 0.4,
    "meanPrecisionAt10": 0.366667,
    "latencyMsMedian": 33.207,
    "latencyMsP95": 36.407
  },
  "results": [
    {
      "caseId": "search-class-exact",
      "api": "searchNodes",
      "driver": "ripgrep",
      "pass": true,
      "recall": 1,
      "mrr": 1,
      "precisionAtK": {
        "p1": 1,
        "p5": 1,
        "p10": 1
      },
      "foundSymbols": [
        "BinaryBridge"
      ],
      "missedSymbols": [],
      "foundFiles": [],
      "missedFiles": [
        "packages/aft-bridge/src/bridge.ts"
      ],
      "latencyMs": 31.308,
      "latencySamplesMs": [
        31.308
      ],
      "latencyMsMedian": 31.308,
      "latencyMsP95": 31.308,
      "resultCount": 10,
      "results": [
        {
          "rank": 1,
          "file": "README.md",
          "line": 268,
          "kind": "line",
          "text": "| `BinaryBridge` | 31.0ms | 1.3ms | **24x** |"
        },
        {
          "rank": 2,
          "file": "ARCHITECTURE.md",
          "line": 85,
          "kind": "line",
          "text": "**BinaryBridge:**"
        },
        {
          "rank": 3,
          "file": "packages/pi-plugin/src/index.ts",
          "line": 259,
          "kind": "line",
          "text": "  bridge: Pick<import(\"@cortexkit/aft-bridge\").BinaryBridge, \"send\">;"
        },
        {
          "rank": 4,
          "file": "packages/pi-plugin/src/notifications.ts",
          "line": 2,
          "kind": "line",
          "text": "  type BinaryBridge,"
        },
        {
          "rank": 5,
          "file": "packages/pi-plugin/src/notifications.ts",
          "line": 23,
          "kind": "line",
          "text": "  bridge: Pick<BinaryBridge, \"send\">;"
        },
        {
          "rank": 6,
          "file": "packages/pi-plugin/src/notifications.ts",
          "line": 52,
          "kind": "line",
          "text": "  bridge: Pick<BinaryBridge, \"send\">,"
        },
        {
          "rank": 7,
          "file": "packages/pi-plugin/src/notifications.ts",
          "line": 69,
          "kind": "line",
          "text": "async function hasWarnedFor(bridge: Pick<BinaryBridge, \"send\">, key: string): Promise<boolean> {"
        },
        {
          "rank": 8,
          "file": "packages/pi-plugin/src/notifications.ts",
          "line": 74,
          "kind": "line",
          "text": "async function recordWarning(bridge: Pick<BinaryBridge, \"send\">, key: string): Promise<void> {"
        },
        {
          "rank": 9,
          "file": "benchmarks/codegraph-replication/src/drivers.ts",
          "line": 3,
          "kind": "line",
          "text": "import { BinaryBridge } from \"../../../packages/aft-bridge/src/index.ts\";"
        },
        {
          "rank": 10,
          "file": "benchmarks/codegraph-replication/src/drivers.ts",
          "line": 26,
          "kind": "line",
          "text": "  private bridge: BinaryBridge | null = null;"
        }
      ]
    },
    {
      "caseId": "search-method-qualified",
      "api": "searchNodes",
      "driver": "ripgrep",
      "pass": true,
      "recall": 1,
      "mrr": 1,
      "precisionAtK": {
        "p1": 1,
        "p5": 0.4,
        "p10": 0.2
      },
      "foundSymbols": [
        "send"
      ],
      "missedSymbols": [],
      "foundFiles": [],
      "missedFiles": [
        "packages/aft-bridge/src/bridge.ts"
      ],
      "latencyMs": 36.407,
      "latencySamplesMs": [
        36.407
      ],
      "latencyMsMedian": 36.407,
      "latencyMsP95": 36.407,
      "resultCount": 2,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 22,
          "kind": "line",
          "text": "      \"query\": \"BinaryBridge send\","
        },
        {
          "rank": 2,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 29,
          "kind": "line",
          "text": "      \"notes\": \"Qualified method lookup translated from TransportService sendRequest to BinaryBridge send.\""
        }
      ]
    },
    {
      "caseId": "search-interface",
      "api": "searchNodes",
      "driver": "ripgrep",
      "pass": true,
      "recall": 1,
      "mrr": 1,
      "precisionAtK": {
        "p1": 1,
        "p5": 1,
        "p10": 1
      },
      "foundSymbols": [
        "BridgeOptions"
      ],
      "missedSymbols": [],
      "foundFiles": [
        "packages/aft-bridge/src/bridge.ts"
      ],
      "missedFiles": [],
      "latencyMs": 34.358,
      "latencySamplesMs": [
        34.358
      ],
      "latencyMsMedian": 34.358,
      "latencyMsP95": 34.358,
      "resultCount": 10,
      "results": [
        {
          "rank": 1,
          "file": "packages/aft-bridge/src/index.ts",
          "line": 15,
          "kind": "line",
          "text": "  BridgeOptions,"
        },
        {
          "rank": 2,
          "file": "packages/aft-bridge/src/protocol.ts",
          "line": 61,
          "kind": "line",
          "text": " * and dispatches them through {@link BridgeOptions.onPushFrame} rather than"
        },
        {
          "rank": 3,
          "file": "packages/aft-bridge/src/bridge.ts",
          "line": 134,
          "kind": "line",
          "text": "/** Context passed to {@link BridgeOptions.onConfigureWarnings} after the first successful configure. */"
        },
        {
          "rank": 4,
          "file": "packages/aft-bridge/src/bridge.ts",
          "line": 156,
          "kind": "line",
          "text": "export interface BridgeOptions {"
        },
        {
          "rank": 5,
          "file": "packages/aft-bridge/src/bridge.ts",
          "line": 318,
          "kind": "line",
          "text": "    options?: BridgeOptions,"
        },
        {
          "rank": 6,
          "file": "packages/aft-bridge/src/pool.ts",
          "line": 4,
          "kind": "line",
          "text": "import { BinaryBridge, type BridgeOptions } from \"./bridge.js\";"
        },
        {
          "rank": 7,
          "file": "packages/aft-bridge/src/pool.ts",
          "line": 71,
          "kind": "line",
          "text": "export interface PoolOptions extends BridgeOptions {"
        },
        {
          "rank": 8,
          "file": "packages/aft-bridge/src/pool.ts",
          "line": 125,
          "kind": "line",
          "text": "  private readonly bridgeOptions: BridgeOptions;"
        },
        {
          "rank": 9,
          "file": "benchmarks/aft-search/baseline.json",
          "line": 1389,
          "kind": "line",
          "text": "          \"name\": \"BridgeOptions\","
        },
        {
          "rank": 10,
          "file": "packages/opencode-plugin/src/__tests__/e2e/helpers.ts",
          "line": 6,
          "kind": "line",
          "text": "import { BinaryBridge, type BridgeOptions, setActiveLogger } from \"@cortexkit/aft-bridge\";"
        }
      ]
    },
    {
      "caseId": "search-enum",
      "api": "searchNodes",
      "driver": "ripgrep",
      "pass": true,
      "recall": 1,
      "mrr": 1,
      "precisionAtK": {
        "p1": 1,
        "p5": 1,
        "p10": 1
      },
      "foundSymbols": [
        "SemanticIndexStatus"
      ],
      "missedSymbols": [],
      "foundFiles": [
        "crates/aft/src/context.rs"
      ],
      "missedFiles": [],
      "latencyMs": 34.114,
      "latencySamplesMs": [
        34.114
      ],
      "latencyMsMedian": 34.114,
      "latencyMsP95": 34.114,
      "resultCount": 10,
      "results": [
        {
          "rank": 1,
          "file": "crates/aft/src/context.rs",
          "line": 88,
          "kind": "line",
          "text": "pub enum SemanticIndexStatus {"
        },
        {
          "rank": 2,
          "file": "crates/aft/src/context.rs",
          "line": 309,
          "kind": "line",
          "text": "    semantic_index_status: RefCell<SemanticIndexStatus>,"
        },
        {
          "rank": 3,
          "file": "crates/aft/src/context.rs",
          "line": 381,
          "kind": "line",
          "text": "            semantic_index_status: RefCell::new(SemanticIndexStatus::Disabled),"
        },
        {
          "rank": 4,
          "file": "crates/aft/src/context.rs",
          "line": 839,
          "kind": "line",
          "text": "    pub fn semantic_index_status(&self) -> &RefCell<SemanticIndexStatus> {"
        },
        {
          "rank": 5,
          "file": "crates/aft/src/commands/configure.rs",
          "line": 16,
          "kind": "line",
          "text": "use crate::context::{AppContext, SemanticIndexEvent, SemanticIndexStatus};"
        },
        {
          "rank": 6,
          "file": "crates/aft/src/commands/configure.rs",
          "line": 1447,
          "kind": "line",
          "text": "    *ctx.semantic_index_status().borrow_mut() = SemanticIndexStatus::Disabled;"
        },
        {
          "rank": 7,
          "file": "crates/aft/src/commands/configure.rs",
          "line": 1456,
          "kind": "line",
          "text": "    // `SemanticIndexStatus::Failed`. If that ever becomes inconsistent UX"
        },
        {
          "rank": 8,
          "file": "crates/aft/src/commands/configure.rs",
          "line": 1458,
          "kind": "line",
          "text": "    // semantic state from the live SemanticIndexStatus, not the reasons."
        },
        {
          "rank": 9,
          "file": "crates/aft/src/commands/configure.rs",
          "line": 1596,
          "kind": "line",
          "text": "        *ctx.semantic_index_status().borrow_mut() = SemanticIndexStatus::Building {"
        },
        {
          "rank": 10,
          "file": "crates/aft/src/commands/status.rs",
          "line": 4,
          "kind": "line",
          "text": "use crate::context::SemanticIndexStatus;"
        }
      ]
    },
    {
      "caseId": "search-exception",
      "api": "searchNodes",
      "driver": "ripgrep",
      "pass": true,
      "recall": 1,
      "mrr": 1,
      "precisionAtK": {
        "p1": 1,
        "p5": 1,
        "p10": 1
      },
      "foundSymbols": [
        "HomeProjectRootError"
      ],
      "missedSymbols": [],
      "foundFiles": [
        "packages/aft-bridge/src/pool.ts"
      ],
      "missedFiles": [],
      "latencyMs": 33.078,
      "latencySamplesMs": [
        33.078
      ],
      "latencyMsMedian": 33.078,
      "latencyMsP95": 33.078,
      "resultCount": 10,
      "results": [
        {
          "rank": 1,
          "file": "packages/aft-bridge/src/index.ts",
          "line": 59,
          "kind": "line",
          "text": "export { BridgePool, HomeProjectRootError, isHomeDirectoryRoot } from \"./pool.js\";"
        },
        {
          "rank": 2,
          "file": "packages/aft-bridge/src/__tests__/pool-home-guard.test.ts",
          "line": 34,
          "kind": "line",
          "text": "import { BridgePool, HomeProjectRootError, isHomeDirectoryRoot } from \"../pool.js\";"
        },
        {
          "rank": 3,
          "file": "packages/aft-bridge/src/__tests__/pool-home-guard.test.ts",
          "line": 95,
          "kind": "line",
          "text": "describe(\"HomeProjectRootError (legacy export)\", () => {"
        },
        {
          "rank": 4,
          "file": "packages/aft-bridge/src/__tests__/pool-home-guard.test.ts",
          "line": 99,
          "kind": "line",
          "text": "    const err = new HomeProjectRootError(\"/fake/home\");"
        },
        {
          "rank": 5,
          "file": "packages/aft-bridge/src/__tests__/pool-home-guard.test.ts",
          "line": 100,
          "kind": "line",
          "text": "    expect(err.name).toBe(\"HomeProjectRootError\");"
        },
        {
          "rank": 6,
          "file": "packages/aft-bridge/src/pool.ts",
          "line": 29,
          "kind": "line",
          "text": "export class HomeProjectRootError extends Error {"
        },
        {
          "rank": 7,
          "file": "packages/aft-bridge/src/pool.ts",
          "line": 36,
          "kind": "line",
          "text": "    this.name = \"HomeProjectRootError\";"
        },
        {
          "rank": 8,
          "file": "packages/aft-bridge/src/pool.ts",
          "line": 198,
          "kind": "line",
          "text": "    // degraded mode — see HomeProjectRootError doc-comment above."
        },
        {
          "rank": 9,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 58,
          "kind": "line",
          "text": "      \"query\": \"HomeProjectRootError\","
        },
        {
          "rank": 10,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 61,
          "kind": "line",
          "text": "      \"expectedSymbols\": [\"HomeProjectRootError\"],"
        }
      ]
    },
    {
      "caseId": "search-nested-class",
      "api": "searchNodes",
      "driver": "ripgrep",
      "pass": true,
      "recall": 1,
      "mrr": 1,
      "precisionAtK": {
        "p1": 1,
        "p5": 0.2,
        "p10": 0.1
      },
      "foundSymbols": [
        "BridgeReplacedDuringVersionCheck"
      ],
      "missedSymbols": [],
      "foundFiles": [],
      "missedFiles": [
        "packages/aft-bridge/src/bridge.ts"
      ],
      "latencyMs": 32.759,
      "latencySamplesMs": [
        32.759
      ],
      "latencyMsMedian": 32.759,
      "latencyMsP95": 32.759,
      "resultCount": 1,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 70,
          "kind": "line",
          "text": "      \"query\": \"BinaryBridge BridgeReplacedDuringVersionCheck\","
        }
      ]
    },
    {
      "caseId": "explore-plugin-bridge",
      "api": "findRelevantContext",
      "driver": "ripgrep",
      "pass": false,
      "recall": 0,
      "mrr": 0,
      "precisionAtK": {
        "p1": 0,
        "p5": 0,
        "p10": 0
      },
      "foundSymbols": [],
      "missedSymbols": [
        "callBridge",
        "bridgeFor",
        "BinaryBridge",
        "BridgePool"
      ],
      "foundFiles": [],
      "missedFiles": [
        "packages/opencode-plugin/src/tools/_shared.ts",
        "packages/aft-bridge/src/bridge.ts",
        "packages/aft-bridge/src/pool.ts"
      ],
      "latencyMs": 32.991,
      "latencySamplesMs": [
        32.991
      ],
      "latencyMsMedian": 32.991,
      "latencyMsP95": 32.991,
      "resultCount": 1,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 82,
          "kind": "line",
          "text": "      \"query\": \"How do OpenCode plugin tools call into the AFT bridge?\","
        }
      ]
    },
    {
      "caseId": "explore-semantic-search",
      "api": "findRelevantContext",
      "driver": "ripgrep",
      "pass": false,
      "recall": 0,
      "mrr": 0,
      "precisionAtK": {
        "p1": 0,
        "p5": 0,
        "p10": 0
      },
      "foundSymbols": [],
      "missedSymbols": [
        "semanticTools",
        "handle_semantic_search",
        "SemanticIndex",
        "SearchIndex"
      ],
      "foundFiles": [],
      "missedFiles": [
        "packages/opencode-plugin/src/tools/semantic.ts",
        "crates/aft/src/commands/semantic_search.rs",
        "crates/aft/src/semantic_index.rs",
        "crates/aft/src/search_index.rs"
      ],
      "latencyMs": 34.291,
      "latencySamplesMs": [
        34.291
      ],
      "latencyMsMedian": 34.291,
      "latencyMsP95": 34.291,
      "resultCount": 1,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 98,
          "kind": "line",
          "text": "      \"query\": \"How does AFT semantic search execute from tool request to indexed results?\","
        }
      ]
    },
    {
      "caseId": "explore-background-bash",
      "api": "findRelevantContext",
      "driver": "ripgrep",
      "pass": false,
      "recall": 0,
      "mrr": 0,
      "precisionAtK": {
        "p1": 0,
        "p5": 0,
        "p10": 0
      },
      "foundSymbols": [],
      "missedSymbols": [
        "BgTaskRegistry",
        "PersistedTask",
        "replay_session",
        "write_task"
      ],
      "foundFiles": [],
      "missedFiles": [
        "crates/aft/src/bash_background/registry.rs",
        "crates/aft/src/bash_background/persistence.rs"
      ],
      "latencyMs": 30.168,
      "latencySamplesMs": [
        30.168
      ],
      "latencyMsMedian": 30.168,
      "latencyMsP95": 30.168,
      "resultCount": 1,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 115,
          "kind": "line",
          "text": "      \"query\": \"How are background bash tasks persisted and restored after restart?\","
        }
      ]
    },
    {
      "caseId": "explore-lsp-diagnostics",
      "api": "findRelevantContext",
      "driver": "ripgrep",
      "pass": false,
      "recall": 0,
      "mrr": 0,
      "precisionAtK": {
        "p1": 0,
        "p5": 0,
        "p10": 0
      },
      "foundSymbols": [],
      "missedSymbols": [
        "LspManager",
        "wait_for_diagnostics",
        "pull_file_diagnostics",
        "PostEditWaitOutcome"
      ],
      "foundFiles": [],
      "missedFiles": [
        "crates/aft/src/lsp/manager.rs"
      ],
      "latencyMs": 33.208,
      "latencySamplesMs": [
        33.208
      ],
      "latencyMsMedian": 33.208,
      "latencyMsP95": 33.208,
      "resultCount": 1,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 130,
          "kind": "line",
          "text": "      \"query\": \"How does AFT wait for LSP diagnostics and pull server responses?\","
        }
      ]
    },
    {
      "caseId": "explore-bridge-search",
      "api": "findRelevantContext",
      "driver": "ripgrep",
      "pass": false,
      "recall": 0.25,
      "mrr": 1,
      "precisionAtK": {
        "p1": 1,
        "p5": 0.2,
        "p10": 0.1
      },
      "foundSymbols": [
        "BinaryBridge"
      ],
      "missedSymbols": [
        "send",
        "semanticTools",
        "handle_semantic_search"
      ],
      "foundFiles": [],
      "missedFiles": [
        "packages/aft-bridge/src/bridge.ts",
        "packages/opencode-plugin/src/tools/semantic.ts",
        "crates/aft/src/commands/semantic_search.rs"
      ],
      "latencyMs": 33.207,
      "latencySamplesMs": [
        33.207
      ],
      "latencyMsMedian": 33.207,
      "latencyMsP95": 33.207,
      "resultCount": 1,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 142,
          "kind": "line",
          "text": "      \"query\": \"How does BinaryBridge connect plugin tool calls to semantic search?\","
        }
      ]
    },
    {
      "caseId": "explore-import-organization",
      "api": "findRelevantContext",
      "driver": "ripgrep",
      "pass": false,
      "recall": 0,
      "mrr": 0,
      "precisionAtK": {
        "p1": 0,
        "p5": 0,
        "p10": 0
      },
      "foundSymbols": [],
      "missedSymbols": [
        "handle_organize_imports",
        "parse_imports",
        "classify_group",
        "generate_import_line"
      ],
      "foundFiles": [],
      "missedFiles": [
        "crates/aft/src/commands/organize_imports.rs",
        "crates/aft/src/imports.rs"
      ],
      "latencyMs": 33.562,
      "latencySamplesMs": [
        33.562
      ],
      "latencyMsMedian": 33.562,
      "latencyMsP95": 33.562,
      "resultCount": 1,
      "results": [
        {
          "rank": 1,
          "file": "benchmarks/codegraph-replication/corpora/codegraph.json",
          "line": 158,
          "kind": "line",
          "text": "      \"query\": \"What are the import organization components for parsing, grouping, and generating imports?\","
        }
      ]
    }
  ],
  "metadata": {
    "binaryPath": "/Users/ufukaltinok/.local/share/cortexkit/alfonso/worktrees/d4d1353f0512127b/bg_1e2cc588/target/release/aft",
    "latencyNote": "latencySamplesMs are wall-clock measurements around each actual driver dispatch",
    "harnessDir": "/Users/ufukaltinok/.local/share/cortexkit/alfonso/worktrees/d4d1353f0512127b/bg_1e2cc588/benchmarks/codegraph-replication",
    "methodology": "AFT replication of codegraph/__tests__/evaluation structured retrieval-quality eval"
  }
}
