Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

95.5 KB
Raw Blame
{
  "opportunities": [
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 3,
      "affected_files_total": 1,
      "biomarker_type": "nested_loop_with_io",
      "biomarker_types": [
        "io_in_loop",
        "nested_loop_with_io"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/jobs.py",
          "finding_id": "finding_0bbb5976a0db9ce5c38b",
          "function_name": "drain",
          "line_end": 40,
          "line_start": 40,
          "path": [],
          "provenance": "direct",
          "reason": "one_loop_mixed_shapes: io_in_loop at src/app/jobs.py:40 repeats work per iteration."
        },
        {
          "biomarker_type": "nested_loop_with_io",
          "file_path": "src/app/jobs.py",
          "finding_id": "finding_4920d985db7b900b6d9a",
          "function_name": "drain",
          "line_end": 42,
          "line_start": 42,
          "path": [],
          "provenance": "direct",
          "reason": "one_loop_mixed_shapes: nested_loop_with_io at src/app/jobs.py:42 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/jobs.py",
          "finding_id": "finding_2789a72f7acb87f86cdc",
          "function_name": "drain",
          "line_end": 44,
          "line_start": 44,
          "path": [
            "src/app/jobs.py::drain",
            "src/app/db.py::save"
          ],
          "provenance": "call-site",
          "reason": "one_loop_mixed_shapes: io_in_loop at src/app/jobs.py:44 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "quadratic",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "entry_reachable",
        "growth_source": "none",
        "leverage": "local",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/jobs.py::drain",
      "may_lead": false,
      "observations_total": 3,
      "opportunity_id": "perf3_d41b04897cfde2a9eed6",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 4,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 6,
        "provenance": 3
      },
      "rank_score": 21,
      "reliable_entry_reachability": true,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/jobs.py::drain",
        "src/app/db.py::save"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::save",
      "terminal_sinks": [
        "src/app/db.py::save"
      ],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 6,
          "value": "nested_loop_with_io"
        },
        {
          "factor": "affected_call_sites",
          "points": 4,
          "value": 3
        },
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 2,
      "affected_files_total": 1,
      "biomarker_type": "nested_loop_with_io",
      "biomarker_types": [
        "io_in_loop",
        "nested_loop_with_io"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/reindex.py",
          "finding_id": "finding_dd1107d677ac5244c707",
          "function_name": "one",
          "line_end": 212,
          "line_start": 210,
          "path": [
            "src/app/reindex.py::one",
            "src/app/reindex.py::_write",
            "src/app/db.py::upsert"
          ],
          "provenance": "call-site",
          "reason": "cost_shape_merge: io_in_loop at src/app/reindex.py:210 repeats work per iteration."
        },
        {
          "biomarker_type": "nested_loop_with_io",
          "file_path": "src/app/reindex.py",
          "finding_id": "finding_e7a60ff74d2f2b7ca67b",
          "function_name": "many",
          "line_end": 217,
          "line_start": 215,
          "path": [
            "src/app/reindex.py::many",
            "src/app/reindex.py::_write",
            "src/app/db.py::upsert"
          ],
          "provenance": "call-site",
          "reason": "cost_shape_merge: nested_loop_with_io at src/app/reindex.py:215 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "quadratic",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "local",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "shared_helper",
      "intervention_symbol": "src/app/reindex.py::_write",
      "may_lead": false,
      "observations_total": 2,
      "opportunity_id": "perf3_a123c4c38fdb1cabaa6a",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 3,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 6,
        "provenance": 3
      },
      "rank_score": 20,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/reindex.py::_write",
        "src/app/db.py::upsert"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::upsert",
      "terminal_sinks": [
        "src/app/db.py::upsert"
      ],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 6,
          "value": "nested_loop_with_io"
        },
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "affected_call_sites",
          "points": 3,
          "value": 2
        }
      ]
    },
    {
      "actionability_reason": "proven_strategy",
      "actionability_state": "plan_ready",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/owners.py",
          "finding_id": "finding_c7e0cff49d2e4944af6c",
          "function_name": "load_owners",
          "line_end": 22,
          "line_start": 20,
          "path": [],
          "provenance": "direct",
          "reason": "batch_form_equivalent: io_in_loop at src/app/owners.py:20 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "high",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "loop",
        "leverage": "isolated",
        "loop_magnitude": "grows_with_data"
      },
      "fix": {
        "api": ".in_(\"repo_id\", keys)",
        "rationale": "Every call filters on the loop's own key, so .in_(\"repo_id\", keys) covers the same rows, and nothing else in the loop can observe the difference.",
        "safety": "proven",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/owners.py::load_owners",
      "may_lead": true,
      "observations_total": 1,
      "opportunity_id": "perf3_83d258547498bed60226",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 2,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 19,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 3,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/ledger.py",
          "finding_id": "finding_bb8108f2272355e7bb47",
          "function_name": "apply",
          "line_end": 587,
          "line_start": 587,
          "path": [
            "src/app/ledger.py::apply",
            "src/app/ledger.py::_move"
          ],
          "provenance": "call-site",
          "reason": "one_loop_many_sinks: io_in_loop at src/app/ledger.py:587 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/ledger.py",
          "finding_id": "finding_6679c8c4aeba8ea75c58",
          "function_name": "apply",
          "line_end": 590,
          "line_start": 590,
          "path": [
            "src/app/ledger.py::apply",
            "src/app/ledger.py::_fold_one"
          ],
          "provenance": "call-site",
          "reason": "one_loop_many_sinks: io_in_loop at src/app/ledger.py:590 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/ledger.py",
          "finding_id": "finding_b80478e54b854ac7d586",
          "function_name": "apply",
          "line_end": 591,
          "line_start": 591,
          "path": [
            "src/app/ledger.py::apply",
            "src/app/ledger.py::_write_alias"
          ],
          "provenance": "call-site",
          "reason": "one_loop_many_sinks: io_in_loop at src/app/ledger.py:591 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "entry_reachable",
        "growth_source": "none",
        "leverage": "local",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/ledger.py::apply",
      "may_lead": false,
      "observations_total": 3,
      "opportunity_id": "perf3_2719b6813419ad35948b",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 4,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 19,
      "reliable_entry_reachability": true,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [
        "src/app/ledger.py::_fold_one",
        "src/app/ledger.py::_move",
        "src/app/ledger.py::_write_alias"
      ],
      "why_ranked": [
        {
          "factor": "affected_call_sites",
          "points": 4,
          "value": 3
        },
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        }
      ]
    },
    {
      "actionability_reason": "no_supported_strategy",
      "actionability_state": "investigate",
      "affected_call_sites_total": 2,
      "affected_files_total": 1,
      "biomarker_type": "blocking_io_under_lock",
      "biomarker_types": [
        "blocking_io_under_lock"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "blocking_io_under_lock",
          "file_path": "src/app/pool.py",
          "finding_id": "finding_2cca2a2e17c82f868f98",
          "function_name": "reaper",
          "line_end": 132,
          "line_start": 130,
          "path": [
            "src/app/pool.py::reaper",
            "src/app/store.py::flush_all",
            "src/app/store.py::flush"
          ],
          "provenance": "call-site",
          "reason": "distinct_lock_owners: blocking_io_under_lock at src/app/pool.py:130 repeats work per iteration."
        },
        {
          "biomarker_type": "blocking_io_under_lock",
          "file_path": "src/app/pool.py",
          "finding_id": "finding_401246625d2b912b7c5c",
          "function_name": "writer",
          "line_end": 132,
          "line_start": 130,
          "path": [
            "src/app/pool.py::writer",
            "src/app/store.py::flush_all",
            "src/app/store.py::flush"
          ],
          "provenance": "call-site",
          "reason": "distinct_lock_owners: blocking_io_under_lock at src/app/pool.py:130 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "local",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "shared_helper",
      "intervention_symbol": "src/app/store.py::flush_all",
      "may_lead": false,
      "observations_total": 2,
      "opportunity_id": "perf3_d3dace3672249fc9bd03",
      "performance_model_version": 3,
      "prerequisites": [
        "single_lock_owner"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 3,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 5,
        "provenance": 3
      },
      "rank_score": 19,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/store.py::flush_all",
        "src/app/store.py::flush"
      ],
      "siblings": [],
      "terminal_sink": "src/app/store.py::flush",
      "terminal_sinks": [
        "src/app/store.py::flush"
      ],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 5,
          "value": "blocking_io_under_lock"
        },
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "affected_call_sites",
          "points": 3,
          "value": 2
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 2,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/entry.py",
          "finding_id": "finding_d1b7702a840faaee6230",
          "function_name": "a",
          "line_end": 252,
          "line_start": 250,
          "path": [
            "src/app/entry.py::a",
            "src/app/entry.py::_hit",
            "src/app/db.py::reach_sink"
          ],
          "provenance": "call-site",
          "reason": "reachability_states: io_in_loop at src/app/entry.py:250 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/entry.py",
          "finding_id": "finding_66292afa8823b8db693a",
          "function_name": "b",
          "line_end": 257,
          "line_start": 255,
          "path": [
            "src/app/entry.py::b",
            "src/app/entry.py::_hit",
            "src/app/db.py::reach_sink"
          ],
          "provenance": "call-site",
          "reason": "reachability_states: io_in_loop at src/app/entry.py:255 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "entry_reachable",
        "growth_source": "none",
        "leverage": "local",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "shared_helper",
      "intervention_symbol": "src/app/entry.py::_hit",
      "may_lead": false,
      "observations_total": 2,
      "opportunity_id": "perf3_6690af4c5e3f269c266e",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 3,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 18,
      "reliable_entry_reachability": true,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/entry.py::_hit",
        "src/app/db.py::reach_sink"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::reach_sink",
      "terminal_sinks": [
        "src/app/db.py::reach_sink"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "affected_call_sites",
          "points": 3,
          "value": 2
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 2,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/api.py",
          "finding_id": "finding_165492e638f0ce198bad",
          "function_name": "list_users",
          "line_end": 32,
          "line_start": 30,
          "path": [
            "src/app/api.py::list_users",
            "src/app/repo.py::fetch_page",
            "src/app/db.py::execute"
          ],
          "provenance": "call-site",
          "reason": "specific_shared_helper: io_in_loop at src/app/api.py:30 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/api.py",
          "finding_id": "finding_7a74222fa7b3681d4b81",
          "function_name": "list_orders",
          "line_end": 33,
          "line_start": 31,
          "path": [
            "src/app/api.py::list_orders",
            "src/app/repo.py::fetch_page",
            "src/app/db.py::execute"
          ],
          "provenance": "call-site",
          "reason": "specific_shared_helper: io_in_loop at src/app/api.py:31 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "entry_reachable",
        "growth_source": "none",
        "leverage": "local",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "shared_helper",
      "intervention_symbol": "src/app/repo.py::fetch_page",
      "may_lead": false,
      "observations_total": 2,
      "opportunity_id": "perf3_8456a319d03ac90c6041",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 3,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 18,
      "reliable_entry_reachability": true,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/repo.py::fetch_page",
        "src/app/db.py::execute"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::execute",
      "terminal_sinks": [
        "src/app/db.py::execute"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "affected_call_sites",
          "points": 3,
          "value": 2
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 2,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/sync.py",
          "finding_id": "finding_3181306320c607f836ff",
          "function_name": "sync_one",
          "line_end": 72,
          "line_start": 70,
          "path": [
            "src/app/sync.py::sync_one",
            "src/app/sync.py::_load",
            "src/app/db.py::query"
          ],
          "provenance": "call-site",
          "reason": "same_file_db_helper: io_in_loop at src/app/sync.py:70 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/sync.py",
          "finding_id": "finding_77b2373b82e9257f6ee4",
          "function_name": "sync_all",
          "line_end": 73,
          "line_start": 71,
          "path": [
            "src/app/sync.py::sync_all",
            "src/app/sync.py::_load",
            "src/app/db.py::query"
          ],
          "provenance": "call-site",
          "reason": "same_file_db_helper: io_in_loop at src/app/sync.py:71 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "local",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "shared_helper",
      "intervention_symbol": "src/app/sync.py::_load",
      "may_lead": false,
      "observations_total": 2,
      "opportunity_id": "perf3_8845956c083937dad1ec",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 3,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 18,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/sync.py::_load",
        "src/app/db.py::query"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::query",
      "terminal_sinks": [
        "src/app/db.py::query"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "affected_call_sites",
          "points": 3,
          "value": 2
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "blocking_io_under_lock",
      "biomarker_types": [
        "blocking_io_under_lock"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "blocking_io_under_lock",
          "file_path": "src/app/cache.py",
          "finding_id": "finding_8ea43b76f67150954aef",
          "function_name": "refresh",
          "line_end": 112,
          "line_start": 110,
          "path": [
            "src/app/cache.py::refresh",
            "src/app/db.py::write"
          ],
          "provenance": "call-site",
          "reason": "single_lock_owner: blocking_io_under_lock at src/app/cache.py:110 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "I/O under the lock is proven, but shared-state ordering must be validated before moving it.",
        "safety": "advisory",
        "strategy": "shrink_lock_scope"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/cache.py::refresh",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_600194da489eff07f26a",
      "performance_model_version": 3,
      "prerequisites": [
        "shared_state_ordering"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 5,
        "provenance": 3
      },
      "rank_score": 18,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/cache.py::refresh",
        "src/app/db.py::write"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::write",
      "terminal_sinks": [
        "src/app/db.py::write"
      ],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 5,
          "value": "blocking_io_under_lock"
        },
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "proven_strategy",
      "actionability_state": "plan_ready",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "serial_await_in_loop",
      "biomarker_types": [
        "serial_await_in_loop"
      ],
      "boundary_kind": "network",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "serial_await_in_loop",
          "file_path": "src/app/fetch.py",
          "finding_id": "finding_f8f8bae754849200b18a",
          "function_name": "fetch_each",
          "line_end": 42,
          "line_start": 40,
          "path": [],
          "provenance": "direct",
          "reason": "bounded_fan_out: serial_await_in_loop at src/app/fetch.py:40 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "high",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "api": "self._sem",
        "rationale": "Iterations are independent and each await already runs under self._sem.",
        "safety": "proven",
        "strategy": "parallelize_independent_awaits"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/fetch.py::fetch_each",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_877f87ea6dac79fd92fc",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "network"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "serial_await_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/commits.py",
          "finding_id": "finding_67809361ebc8f5a864d8",
          "function_name": "first_commit_each",
          "line_end": 32,
          "line_start": 30,
          "path": [],
          "provenance": "direct",
          "reason": "batch_form_limited: io_in_loop at src/app/commits.py:30 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "api": ".in_(\"repo_id\", keys)",
        "rationale": "Every call filters on the loop's own key, so .in_(\"repo_id\", keys) is the bulk form; the per-key call limits, orders or shares the loop with other I/O.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/commits.py::first_commit_each",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_2a6f52da25a5ede16116",
      "performance_model_version": 3,
      "prerequisites": [
        "result_equivalence"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "serial_await_in_loop",
      "biomarker_types": [
        "serial_await_in_loop"
      ],
      "boundary_kind": "network",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "serial_await_in_loop",
          "file_path": "src/app/fanout.py",
          "finding_id": "finding_2fd4157a8e2822d774f3",
          "function_name": "gather_all",
          "line_end": 92,
          "line_start": 90,
          "path": [],
          "provenance": "direct",
          "reason": "async_serial_awaits: serial_await_in_loop at src/app/fanout.py:90 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "Iteration independence is proven; the concurrency the fan-out would create is not bounded by anything this group can see.",
        "safety": "advisory",
        "strategy": "parallelize_independent_awaits"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/fanout.py::gather_all",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_445b62193f1ff0db3cb4",
      "performance_model_version": 3,
      "prerequisites": [
        "bounded_concurrency"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "network"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "serial_await_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/job.py",
          "finding_id": "finding_a4ca438d1238f8956526",
          "function_name": "run",
          "line_end": 202,
          "line_start": 200,
          "path": [
            "src/app/job.py::run",
            "src/app/db.py::get_session"
          ],
          "provenance": "call-site",
          "reason": "context_split: io_in_loop at src/app/job.py:200 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/job.py::run",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_4e3feb071c73aa51a6a4",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/job.py::run",
        "src/app/db.py::get_session"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::get_session",
      "terminal_sinks": [
        "src/app/db.py::get_session"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/lone.py",
          "finding_id": "finding_9cfd6311dc82a0049c6a",
          "function_name": "run",
          "line_end": 11,
          "line_start": 9,
          "path": [
            "src/app/db.py::only_sink"
          ],
          "provenance": "call-site",
          "reason": "sink_without_caller: io_in_loop at src/app/lone.py:9 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/lone.py::run",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_919d91fe15e89966b389",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/db.py::only_sink"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::only_sink",
      "terminal_sinks": [
        "src/app/db.py::only_sink"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "lazy_load_in_loop",
      "biomarker_types": [
        "lazy_load_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "lazy_load_in_loop",
          "file_path": "app/incidents/service.py",
          "finding_id": "finding_b8a85cd0da954d3af1b7",
          "function_name": "notify_owners",
          "line_end": 50,
          "line_start": 50,
          "path": [],
          "provenance": "direct",
          "reason": "lazy_load_by_orm: lazy_load_in_loop at app/incidents/service.py:50 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The relationship is declared lazy and the query that produced the rows does not load it; whether every iteration reaches the access, and whether another layer loads it first, is not proven.",
        "safety": "advisory",
        "strategy": "eager_load_relationship"
      },
      "intervention_kind": "function",
      "intervention_symbol": "app/incidents/service.py::notify_owners",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_93a53323a7db0544017f",
      "performance_model_version": 3,
      "prerequisites": [
        "relationship_not_loaded_elsewhere"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "lazy_load_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "lazy_load_in_loop",
      "biomarker_types": [
        "lazy_load_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "lazy_load_in_loop",
          "file_path": "app/issues/views.py",
          "finding_id": "finding_c99dea746d7bfeb433cd",
          "function_name": "issue_list",
          "line_end": 30,
          "line_start": 30,
          "path": [],
          "provenance": "direct",
          "reason": "lazy_load_by_orm: lazy_load_in_loop at app/issues/views.py:30 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The relationship is declared lazy and the query that produced the rows does not load it; whether every iteration reaches the access, and whether another layer loads it first, is not proven.",
        "safety": "advisory",
        "strategy": "eager_load_relationship"
      },
      "intervention_kind": "function",
      "intervention_symbol": "app/issues/views.py::issue_list",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_942cceadc50a644175e4",
      "performance_model_version": 3,
      "prerequisites": [
        "relationship_not_loaded_elsewhere"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "lazy_load_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/orders.py",
          "finding_id": "finding_8277702ee7a1de73ddf9",
          "function_name": "handle",
          "line_end": 12,
          "line_start": 10,
          "path": [
            "src/app/orders.py::handle",
            "src/app/db.py::get_session"
          ],
          "provenance": "call-site",
          "reason": "generic_infra_sink: io_in_loop at src/app/orders.py:10 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "not_entry_reachable",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/orders.py::handle",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_95567b0824b33141361d",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": false,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/orders.py::handle",
        "src/app/db.py::get_session"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::get_session",
      "terminal_sinks": [
        "src/app/db.py::get_session"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/reports.py",
          "finding_id": "finding_8e1d9d853534ecd57392",
          "function_name": "handle",
          "line_end": 14,
          "line_start": 12,
          "path": [
            "src/app/reports.py::handle",
            "src/app/db.py::get_session"
          ],
          "provenance": "call-site",
          "reason": "generic_infra_sink: io_in_loop at src/app/reports.py:12 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "not_entry_reachable",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/reports.py::handle",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_a0ebb8db3cb33a2c555f",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": false,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/reports.py::handle",
        "src/app/db.py::get_session"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::get_session",
      "terminal_sinks": [
        "src/app/db.py::get_session"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/billing.py",
          "finding_id": "finding_afbcfc0c666017b74c22",
          "function_name": "handle",
          "line_end": 13,
          "line_start": 11,
          "path": [
            "src/app/billing.py::handle",
            "src/app/db.py::get_session"
          ],
          "provenance": "call-site",
          "reason": "generic_infra_sink: io_in_loop at src/app/billing.py:11 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "not_entry_reachable",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/billing.py::handle",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_debc1e358c095e5fd0d8",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": false,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/billing.py::handle",
        "src/app/db.py::get_session"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::get_session",
      "terminal_sinks": [
        "src/app/db.py::get_session"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "no_supported_strategy",
      "actionability_state": "investigate",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "resource_construction_in_loop",
      "biomarker_types": [
        "resource_construction_in_loop"
      ],
      "boundary_kind": "network",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "resource_construction_in_loop",
          "file_path": "src/app/clients.py",
          "finding_id": "finding_b3099686f4d36c75f964",
          "function_name": "each_varying",
          "line_end": 182,
          "line_start": 180,
          "path": [],
          "provenance": "direct",
          "reason": "resource_construction: resource_construction_in_loop at src/app/clients.py:180 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "src/app/clients.py::each_varying",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_0bf2ff36ef95d9cf96f2",
      "performance_model_version": 3,
      "prerequisites": [
        "loop_invariant_construction_proof"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "network"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "resource_construction_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "no_supported_strategy",
      "actionability_state": "investigate",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "serial_await_in_loop",
      "biomarker_types": [
        "serial_await_in_loop"
      ],
      "boundary_kind": "network",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "serial_await_in_loop",
          "file_path": "src/app/fanout.py",
          "finding_id": "finding_6f5702e6e6af64656121",
          "function_name": "gather_seq",
          "line_end": 97,
          "line_start": 95,
          "path": [],
          "provenance": "direct",
          "reason": "async_serial_awaits: serial_await_in_loop at src/app/fanout.py:95 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "src/app/fanout.py::gather_seq",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_350ba04f50fc0faf0d81",
      "performance_model_version": 3,
      "prerequisites": [
        "loop_carried_dependence_proof"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "network"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "serial_await_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "no_supported_strategy",
      "actionability_state": "investigate",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "resource_construction_in_loop",
      "biomarker_types": [
        "resource_construction_in_loop"
      ],
      "boundary_kind": "network",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "resource_construction_in_loop",
          "file_path": "src/app/clients.py",
          "finding_id": "finding_840a26ef5269b670f5a2",
          "function_name": "each",
          "line_end": 172,
          "line_start": 170,
          "path": [],
          "provenance": "direct",
          "reason": "resource_construction: resource_construction_in_loop at src/app/clients.py:170 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "src/app/clients.py::each",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_c6604021414ce017f289",
      "performance_model_version": 3,
      "prerequisites": [
        "loop_invariant_construction_proof"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "network"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "resource_construction_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "inherent_to_boundary",
      "actionability_state": "expected",
      "affected_call_sites_total": 4,
      "affected_files_total": 4,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "filesystem",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/formatter.py",
          "finding_id": "finding_74b3cc4ea0afc2828ead",
          "function_name": "run",
          "line_end": 24,
          "line_start": 22,
          "path": [
            "src/app/formatter.py::run",
            "src/app/parse.py::_get_query",
            "src/app/parse.py::_load_compiled_query"
          ],
          "provenance": "call-site",
          "reason": "shared_dominator_fan_in: io_in_loop at src/app/formatter.py:22 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/lexer.py",
          "finding_id": "finding_f1d7e9138afa40a0f1b7",
          "function_name": "run",
          "line_end": 22,
          "line_start": 20,
          "path": [
            "src/app/lexer.py::run",
            "src/app/parse.py::_get_query",
            "src/app/parse.py::_load_compiled_query"
          ],
          "provenance": "call-site",
          "reason": "shared_dominator_fan_in: io_in_loop at src/app/lexer.py:20 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/linter.py",
          "finding_id": "finding_04801d753f6bc1eb8675",
          "function_name": "run",
          "line_end": 23,
          "line_start": 21,
          "path": [
            "src/app/linter.py::run",
            "src/app/parse.py::_get_query",
            "src/app/parse.py::_load_compiled_query"
          ],
          "provenance": "call-site",
          "reason": "shared_dominator_fan_in: io_in_loop at src/app/linter.py:21 repeats work per iteration."
        },
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/resolver.py",
          "finding_id": "finding_1bb5c282969f6d4c8f99",
          "function_name": "run",
          "line_end": 25,
          "line_start": 23,
          "path": [
            "src/app/resolver.py::run",
            "src/app/parse.py::_get_query",
            "src/app/parse.py::_load_compiled_query"
          ],
          "provenance": "call-site",
          "reason": "shared_dominator_fan_in: io_in_loop at src/app/resolver.py:23 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "moderate",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "shared",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "shared_helper",
      "intervention_symbol": "src/app/parse.py::_get_query",
      "may_lead": false,
      "observations_total": 4,
      "opportunity_id": "perf3_a20111da61b63349e305",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 4,
        "boundary_kind": 2,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/parse.py::_get_query",
        "src/app/parse.py::_load_compiled_query"
      ],
      "siblings": [],
      "terminal_sink": "src/app/parse.py::_load_compiled_query",
      "terminal_sinks": [
        "src/app/parse.py::_load_compiled_query"
      ],
      "why_ranked": [
        {
          "factor": "affected_call_sites",
          "points": 4,
          "value": 4
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "bounded_loop",
      "actionability_state": "expected",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "network",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/retry.py",
          "finding_id": "finding_0e8c0794491c7384f4c4",
          "function_name": "post_with_retry",
          "line_end": 52,
          "line_start": 50,
          "path": [],
          "provenance": "direct",
          "reason": "retry_loop: io_in_loop at src/app/retry.py:50 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "bounded"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "src/app/retry.py::post_with_retry",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_bd36a05060a6d02a1245",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 17,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "network"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "scripts/backfill.py",
          "finding_id": "finding_d8a564a824ecf8f12ecb",
          "function_name": "run",
          "line_end": 202,
          "line_start": 200,
          "path": [
            "scripts/backfill.py::run",
            "src/app/db.py::get_session"
          ],
          "provenance": "call-site",
          "reason": "context_split: io_in_loop at scripts/backfill.py:200 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "tooling",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "scripts/backfill.py::run",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_d5225971c0220c77ee7b",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 2,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 16,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "scripts/backfill.py::run",
        "src/app/db.py::get_session"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::get_session",
      "terminal_sinks": [
        "src/app/db.py::get_session"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "call-site"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "medium",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/edge.py",
          "finding_id": "finding_323137fff890d9e629dc",
          "function_name": "run",
          "line_end": 232,
          "line_start": 230,
          "path": [
            "src/app/edge.py::run",
            "src/app/db.py::reliable_sink"
          ],
          "provenance": "reliable-edge",
          "reason": "provenance_mix: io_in_loop at src/app/edge.py:230 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/edge.py::run",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_dc2d9734ec9693504602",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "reliable-edge",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 2
      },
      "rank_score": 16,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/edge.py::run",
        "src/app/db.py::reliable_sink"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::reliable_sink",
      "terminal_sinks": [
        "src/app/db.py::reliable_sink"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "tests/test_job.py",
          "finding_id": "finding_e34ca4ba22d5f482348d",
          "function_name": "run",
          "line_end": 202,
          "line_start": 200,
          "path": [
            "tests/test_job.py::run",
            "src/app/db.py::get_session"
          ],
          "provenance": "call-site",
          "reason": "context_split: io_in_loop at tests/test_job.py:200 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "test",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "tests/test_job.py::run",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_91d25fc7b3e4e8ad00c1",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence"
      ],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 1,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 15,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "tests/test_job.py::run",
        "src/app/db.py::get_session"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::get_session",
      "terminal_sinks": [
        "src/app/db.py::get_session"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "call-site"
        }
      ]
    },
    {
      "actionability_reason": "inherent_to_boundary",
      "actionability_state": "expected",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "filesystem",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/walker.py",
          "finding_id": "finding_57d0612e4678a6b34b8d",
          "function_name": "index",
          "line_end": 53,
          "line_start": 51,
          "path": [
            "src/app/walker.py::index",
            "src/app/fsio.py::read_text"
          ],
          "provenance": "call-site",
          "reason": "filesystem_fan_out: io_in_loop at src/app/walker.py:51 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "src/app/walker.py::index",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_9c136e77dd1c7e4e69bf",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 2,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 15,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/walker.py::index",
        "src/app/fsio.py::read_text"
      ],
      "siblings": [],
      "terminal_sink": "src/app/fsio.py::read_text",
      "terminal_sinks": [
        "src/app/fsio.py::read_text"
      ],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "call-site"
        }
      ]
    },
    {
      "actionability_reason": "inherent_to_boundary",
      "actionability_state": "expected",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "filesystem",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/walker.py",
          "finding_id": "finding_a609e571a99e409b1aab",
          "function_name": "scan",
          "line_end": 52,
          "line_start": 50,
          "path": [
            "src/app/walker.py::scan",
            "src/app/fsio.py::read_text"
          ],
          "provenance": "call-site",
          "reason": "filesystem_fan_out: io_in_loop at src/app/walker.py:50 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "src/app/walker.py::scan",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_9fea1c21a0c25dd7af23",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "call-site",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 2,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 15,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/walker.py::scan",
        "src/app/fsio.py::read_text"
      ],
      "siblings": [],
      "terminal_sink": "src/app/fsio.py::read_text",
      "terminal_sinks": [
        "src/app/fsio.py::read_text"
      ],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "call-site"
        }
      ]
    },
    {
      "actionability_reason": "low_evidence_confidence",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "db",
      "confidence": "low",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "src/app/guess.py",
          "finding_id": "finding_e287cbc148e5a8ea8ca8",
          "function_name": "run",
          "line_end": 242,
          "line_start": 240,
          "path": [
            "src/app/guess.py::run",
            "src/app/db.py::guessed_sink"
          ],
          "provenance": "name-fallback",
          "reason": "provenance_mix: io_in_loop at src/app/guess.py:240 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The shared I/O sink is proven; no concrete batch API or result-equivalence proof is available.",
        "safety": "advisory",
        "strategy": "batch_or_prefetch_io"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/guess.py::run",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_b4b1621506e7231c520b",
      "performance_model_version": 3,
      "prerequisites": [
        "batch_api_contract",
        "result_equivalence",
        "reliable_call_path"
      ],
      "provenance": "name-fallback",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 4,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 0
      },
      "rank_score": 14,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [
        "src/app/guess.py::run",
        "src/app/db.py::guessed_sink"
      ],
      "siblings": [],
      "terminal_sink": "src/app/db.py::guessed_sink",
      "terminal_sinks": [
        "src/app/db.py::guessed_sink"
      ],
      "why_ranked": [
        {
          "factor": "boundary_kind",
          "points": 4,
          "value": "db"
        },
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        }
      ]
    },
    {
      "actionability_reason": "inherent_to_boundary",
      "actionability_state": "expected",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "filesystem",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "bootstrap.py",
          "finding_id": "finding_a88c49a6ad4cfd7bc111",
          "function_name": "main",
          "line_end": 16,
          "line_start": 14,
          "path": [],
          "provenance": "direct",
          "reason": "unclassified_context: io_in_loop at bootstrap.py:14 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "unknown",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "bootstrap.py::main",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_b328704ea27ecd3de70a",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 2,
        "execution_context": 1,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 13,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "direct"
        },
        {
          "factor": "affected_call_sites",
          "points": 2,
          "value": 1
        }
      ]
    },
    {
      "actionability_reason": "inherent_to_boundary",
      "actionability_state": "expected",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "io_in_loop",
      "biomarker_types": [
        "io_in_loop"
      ],
      "boundary_kind": "filesystem",
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "io_in_loop",
          "file_path": "docs/snippets/walk.py",
          "finding_id": "finding_d0b10a5d5eeb35e40893",
          "function_name": "demo",
          "line_end": 10,
          "line_start": 8,
          "path": [],
          "provenance": "direct",
          "reason": "unclassified_context: io_in_loop at docs/snippets/walk.py:8 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "unknown",
      "facets": {
        "actionability_confidence": "low",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": null,
      "intervention_kind": "function",
      "intervention_symbol": "docs/snippets/walk.py::demo",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_b3b3f1bd1707d53f5d6e",
      "performance_model_version": 3,
      "prerequisites": [],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 2,
        "execution_context": 1,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 4,
        "provenance": 3
      },
      "rank_score": 13,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "multiplier_shape",
          "points": 4,
          "value": "io_in_loop"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "direct"
        },
        {
          "factor": "affected_call_sites",
          "points": 2,
          "value": 1
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "membership_test_against_list_in_loop",
      "biomarker_types": [
        "membership_test_against_list_in_loop"
      ],
      "boundary_kind": null,
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "membership_test_against_list_in_loop",
          "file_path": "src/app/filters.py",
          "finding_id": "finding_9fa77c322fa3d741a8c4",
          "function_name": "select",
          "line_end": 152,
          "line_start": 150,
          "path": [],
          "provenance": "direct",
          "reason": "membership_scan: membership_test_against_list_in_loop at src/app/filters.py:150 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "The collection is proven list-backed; element hashability and ordering/identity use still require validation.",
        "safety": "advisory",
        "strategy": "replace_membership_collection"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/filters.py::select",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_68f6614ac285d1e8cb4a",
      "performance_model_version": 3,
      "prerequisites": [
        "element_hashability",
        "ordering_and_identity_use"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 0,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 3,
        "provenance": 3
      },
      "rank_score": 12,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        },
        {
          "factor": "multiplier_shape",
          "points": 3,
          "value": "membership_test_against_list_in_loop"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "direct"
        }
      ]
    },
    {
      "actionability_reason": "strategy_requires_validation",
      "actionability_state": "advisory",
      "affected_call_sites_total": 1,
      "affected_files_total": 1,
      "biomarker_type": "string_concat_in_loop",
      "biomarker_types": [
        "string_concat_in_loop"
      ],
      "boundary_kind": null,
      "confidence": "high",
      "evidence": [
        {
          "biomarker_type": "string_concat_in_loop",
          "file_path": "src/app/render.py",
          "finding_id": "finding_ffee3cf5c3bbf22b87ba",
          "function_name": "to_csv",
          "line_end": 162,
          "line_start": 160,
          "path": [],
          "provenance": "direct",
          "reason": "string_accumulation: string_concat_in_loop at src/app/render.py:160 repeats work per iteration."
        }
      ],
      "evidence_truncated": false,
      "execution_context": "production",
      "facets": {
        "actionability_confidence": "medium",
        "amplification": "per_iteration",
        "change_risk": "contained",
        "execution_role": "unknown",
        "exposure": "unknown",
        "growth_source": "none",
        "leverage": "isolated",
        "loop_magnitude": "unknown"
      },
      "fix": {
        "rationale": "Repeated string accumulation is proven; intermediate accumulator observations still require validation.",
        "safety": "advisory",
        "strategy": "buffer_string_accumulation"
      },
      "intervention_kind": "function",
      "intervention_symbol": "src/app/render.py::to_csv",
      "may_lead": false,
      "observations_total": 1,
      "opportunity_id": "perf3_ea095ac8d3d612777176",
      "performance_model_version": 3,
      "prerequisites": [
        "accumulator_not_observed"
      ],
      "provenance": "direct",
      "rank_factors": {
        "affected_call_sites": 2,
        "boundary_kind": 0,
        "execution_context": 3,
        "execution_role": 1,
        "loop_magnitude": 0,
        "multiplier_shape": 3,
        "provenance": 3
      },
      "rank_score": 12,
      "reliable_entry_reachability": null,
      "resource_fingerprints": [],
      "shared_path_suffix": [],
      "siblings": [],
      "terminal_sink": null,
      "terminal_sinks": [],
      "why_ranked": [
        {
          "factor": "execution_context",
          "points": 3,
          "value": "production"
        },
        {
          "factor": "multiplier_shape",
          "points": 3,
          "value": "string_concat_in_loop"
        },
        {
          "factor": "provenance",
          "points": 3,
          "value": "direct"
        }
      ]
    }
  ]
}