{
  "benchmark": "Sovereign Engineering Memory : Pillar 2 (Code-Graph & Memory Drift Token ROI)",
  "repository_indexed": {
    "node_count": 1915,
    "edge_count": 6719,
    "coverage_count": 73,
    "index_latency_ms": 6550.49
  },
  "total_tasks": 15,
  "wall_clock_seconds": 14.04,
  "summary": {
    "total_code_graph_bytes": 58601,
    "total_baseline_rg_read_bytes": 490764,
    "total_code_graph_tokens_est": 14650.2,
    "total_baseline_rg_read_tokens_est": 122691.0,
    "overall_token_savings_pct": 88.06,
    "mean_task_token_savings_pct": 87.44,
    "total_code_graph_tool_calls": 15,
    "total_baseline_tool_calls": 99,
    "tool_call_reduction_pct": 84.85,
    "ground_truth_recall": 1.0,
    "mean_code_graph_latency_ms": 157.12
  },
  "category_breakdown": {
    "call_chain_trace": {
      "task_count": 5,
      "code_graph_tokens_est": 3610.8,
      "baseline_rg_read_tokens_est": 33731.0,
      "token_savings_pct": 89.3,
      "code_graph_tool_calls": 5,
      "baseline_tool_calls": 33,
      "ground_truth_recall": 1.0,
      "mean_latency_ms": 42.24
    },
    "blast_radius_impact": {
      "task_count": 5,
      "code_graph_tokens_est": 4673.5,
      "baseline_rg_read_tokens_est": 41401.2,
      "token_savings_pct": 88.71,
      "code_graph_tool_calls": 5,
      "baseline_tool_calls": 36,
      "ground_truth_recall": 1.0,
      "mean_latency_ms": 46.64
    },
    "code_to_memory_drift": {
      "task_count": 5,
      "code_graph_tokens_est": 6366.0,
      "baseline_rg_read_tokens_est": 47558.8,
      "token_savings_pct": 86.61,
      "code_graph_tool_calls": 5,
      "baseline_tool_calls": 30,
      "ground_truth_recall": 1.0,
      "mean_latency_ms": 382.49
    }
  },
  "tasks": [
    {
      "id": "CG-01",
      "category": "call_chain_trace",
      "title": "Trace MCP `memory_save` -> `Service::save` -> `Db::insert_memory`",
      "tool_used": "code_trace",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 8,
      "code_graph_bytes": 2717,
      "baseline_rg_read_bytes": 42272,
      "code_graph_tokens_est": 679.2,
      "baseline_rg_read_tokens_est": 10568.0,
      "token_savings_pct": 93.57,
      "code_graph_latency_ms": 66.24,
      "baseline_latency_ms": 29.66,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "hops": 2,
        "path": [
          "Brutha::memory_save",
          "Service::save",
          "Db::insert_memory"
        ]
      }
    },
    {
      "id": "CG-02",
      "category": "call_chain_trace",
      "title": "Trace MCP `memory_save` -> `Service::save` -> `score_pairs` (NLI dedup)",
      "tool_used": "code_trace",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 2713,
      "baseline_rg_read_bytes": 31318,
      "code_graph_tokens_est": 678.2,
      "baseline_rg_read_tokens_est": 7829.5,
      "token_savings_pct": 91.34,
      "code_graph_latency_ms": 36.34,
      "baseline_latency_ms": 23.26,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "hops": 2,
        "path": [
          "Brutha::memory_save",
          "Service::save",
          "score_pairs"
        ]
      }
    },
    {
      "id": "CG-03",
      "category": "call_chain_trace",
      "title": "Trace MCP `memory_search` -> `Service::search` -> `snippetize` (Lever 1)",
      "tool_used": "code_trace",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 2649,
      "baseline_rg_read_bytes": 20684,
      "code_graph_tokens_est": 662.2,
      "baseline_rg_read_tokens_est": 5171.0,
      "token_savings_pct": 87.19,
      "code_graph_latency_ms": 33.79,
      "baseline_latency_ms": 22.67,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "hops": 2,
        "path": [
          "Brutha::memory_search",
          "Service::search",
          "snippetize"
        ]
      }
    },
    {
      "id": "CG-04",
      "category": "call_chain_trace",
      "title": "Trace MCP `code_impact` -> `Service::code_impact` -> `compute_change_impact_from_diff`",
      "tool_used": "code_trace",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 2778,
      "baseline_rg_read_bytes": 15266,
      "code_graph_tokens_est": 694.5,
      "baseline_rg_read_tokens_est": 3816.5,
      "token_savings_pct": 81.8,
      "code_graph_latency_ms": 37.45,
      "baseline_latency_ms": 22.85,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "hops": 2,
        "path": [
          "Brutha::code_impact",
          "Service::code_impact",
          "compute_change_impact_from_diff"
        ]
      }
    },
    {
      "id": "CG-05",
      "category": "call_chain_trace",
      "title": "Trace MCP `code_memory_context` -> `Service::code_memory_context` -> `Service::load_effective_graph` -> `build_working_tree_overlay`",
      "tool_used": "code_trace",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 7,
      "code_graph_bytes": 3586,
      "baseline_rg_read_bytes": 25384,
      "code_graph_tokens_est": 896.5,
      "baseline_rg_read_tokens_est": 6346.0,
      "token_savings_pct": 85.87,
      "code_graph_latency_ms": 37.4,
      "baseline_latency_ms": 23.97,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "hops": 3,
        "path": [
          "Brutha::code_memory_context",
          "Service::code_memory_context",
          "Service::load_effective_graph",
          "build_working_tree_overlay"
        ]
      }
    },
    {
      "id": "CG-06",
      "category": "blast_radius_impact",
      "title": "Blast radius of `Db::recall_pack` signature change across callers & HTTP routes",
      "tool_used": "code_impact",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 9,
      "code_graph_bytes": 4017,
      "baseline_rg_read_bytes": 19531,
      "code_graph_tokens_est": 1004.2,
      "baseline_rg_read_tokens_est": 4882.8,
      "token_savings_pct": 79.43,
      "code_graph_latency_ms": 51.43,
      "baseline_latency_ms": 23.61,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "impacted_symbols_count": 10,
        "impacted_routes_count": 1,
        "matched_expected_callers": [
          "Service::recall",
          "Brutha::memory_recall",
          "/recall"
        ]
      }
    },
    {
      "id": "CG-07",
      "category": "blast_radius_impact",
      "title": "Blast radius of `Service::search` modification across callers, HTTP routes & tests",
      "tool_used": "code_impact",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 8,
      "code_graph_bytes": 7445,
      "baseline_rg_read_bytes": 43157,
      "code_graph_tokens_est": 1861.2,
      "baseline_rg_read_tokens_est": 10789.2,
      "token_savings_pct": 82.75,
      "code_graph_latency_ms": 38.44,
      "baseline_latency_ms": 24.0,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "impacted_symbols_count": 20,
        "impacted_routes_count": 1,
        "matched_expected_callers": [
          "search",
          "svc_tests::save_then_search_sqlite"
        ]
      }
    },
    {
      "id": "CG-08",
      "category": "blast_radius_impact",
      "title": "Blast radius of `score_pairs` NLI dedup change across `Service::save` & `reconcile::run`",
      "tool_used": "code_impact",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 1274,
      "baseline_rg_read_bytes": 37891,
      "code_graph_tokens_est": 318.5,
      "baseline_rg_read_tokens_est": 9472.8,
      "token_savings_pct": 96.64,
      "code_graph_latency_ms": 54.86,
      "baseline_latency_ms": 22.44,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "impacted_symbols_count": 3,
        "impacted_routes_count": 0,
        "matched_expected_callers": [
          "Service::save",
          "run"
        ]
      }
    },
    {
      "id": "CG-09",
      "category": "blast_radius_impact",
      "title": "Blast radius of `snippetize` Lever-1 compaction change across `Service::search` & `Service::recall`",
      "tool_used": "code_impact",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 7,
      "code_graph_bytes": 1285,
      "baseline_rg_read_bytes": 22318,
      "code_graph_tokens_est": 321.2,
      "baseline_rg_read_tokens_est": 5579.5,
      "token_savings_pct": 94.24,
      "code_graph_latency_ms": 34.14,
      "baseline_latency_ms": 24.11,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "impacted_symbols_count": 3,
        "impacted_routes_count": 0,
        "matched_expected_callers": [
          "Service::search",
          "Service::recall"
        ]
      }
    },
    {
      "id": "CG-10",
      "category": "blast_radius_impact",
      "title": "Blast radius of `build_working_tree_overlay` across Code Graph service methods & overlay tests",
      "tool_used": "code_impact",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 4673,
      "baseline_rg_read_bytes": 42708,
      "code_graph_tokens_est": 1168.2,
      "baseline_rg_read_tokens_est": 10677.0,
      "token_savings_pct": 89.06,
      "code_graph_latency_ms": 54.32,
      "baseline_latency_ms": 15.25,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "impacted_symbols_count": 13,
        "impacted_routes_count": 0,
        "matched_expected_callers": [
          "Service::load_effective_graph",
          "Service::code_memory_context",
          "Service::code_impact"
        ]
      }
    },
    {
      "id": "CG-11",
      "category": "code_to_memory_drift",
      "title": "Detect live `changed` memory anchor status when `step_b` body is modified in working tree",
      "tool_used": "code_memory_context",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 7043,
      "baseline_rg_read_bytes": 29405,
      "code_graph_tokens_est": 1760.8,
      "baseline_rg_read_tokens_est": 7351.2,
      "token_savings_pct": 76.05,
      "code_graph_latency_ms": 478.21,
      "baseline_latency_ms": 22.47,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "expected_anchor_status": "changed",
        "observed_anchor_status": "changed",
        "overlay_active": true
      }
    },
    {
      "id": "CG-12",
      "category": "code_to_memory_drift",
      "title": "Detect live `moved` memory anchor status when `step_c` is relocated to `src/moved.rs`",
      "tool_used": "code_memory_context",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 5040,
      "baseline_rg_read_bytes": 53024,
      "code_graph_tokens_est": 1260.0,
      "baseline_rg_read_tokens_est": 13256.0,
      "token_savings_pct": 90.49,
      "code_graph_latency_ms": 466.12,
      "baseline_latency_ms": 22.4,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "expected_anchor_status": "moved",
        "observed_anchor_status": "moved",
        "memories_surfaced": 4
      }
    },
    {
      "id": "CG-13",
      "category": "code_to_memory_drift",
      "title": "Detect live `ambiguous` memory anchor status when `step_c` matches multiple candidate files",
      "tool_used": "code_memory_context",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 5061,
      "baseline_rg_read_bytes": 36411,
      "code_graph_tokens_est": 1265.2,
      "baseline_rg_read_tokens_est": 9102.8,
      "token_savings_pct": 86.1,
      "code_graph_latency_ms": 466.6,
      "baseline_latency_ms": 22.89,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "expected_anchor_status": "ambiguous",
        "observed_anchor_status": "ambiguous"
      }
    },
    {
      "id": "CG-14",
      "category": "code_to_memory_drift",
      "title": "Detect live `missing` memory anchor status when `step_c` is removed from working tree",
      "tool_used": "code_memory_context",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 5164,
      "baseline_rg_read_bytes": 41110,
      "code_graph_tokens_est": 1291.0,
      "baseline_rg_read_tokens_est": 10277.5,
      "token_savings_pct": 87.44,
      "code_graph_latency_ms": 500.3,
      "baseline_latency_ms": 20.78,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "expected_anchor_status": "missing",
        "observed_anchor_status": "missing"
      }
    },
    {
      "id": "CG-15",
      "category": "code_to_memory_drift",
      "title": "Surface generation-persisted symbol drift via `memory_staleness_hints` after `validate_token` & `step_b` change",
      "tool_used": "memory_staleness_hints",
      "code_graph_tool_calls": 1,
      "baseline_tool_calls": 6,
      "code_graph_bytes": 3156,
      "baseline_rg_read_bytes": 30285,
      "code_graph_tokens_est": 789.0,
      "baseline_rg_read_tokens_est": 7571.2,
      "token_savings_pct": 89.58,
      "code_graph_latency_ms": 1.23,
      "baseline_latency_ms": 27.06,
      "ground_truth_recall": 1.0,
      "verified_output_summary": {
        "drifted_memories_flagged": 2,
        "expected_memories_flagged": 2
      }
    }
  ],
  "dataset_name": "CodeGraph_ROI_15Tasks"
}