Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
feat(mcp): one next-call shape for actions, Fix first, health summaries and get_risk (#2849)
Raghav Chamadiyac989ef7943c7
diff --git a/docs/agent/MCP_TOOLS.md b/docs/agent/MCP_TOOLS.mdindex b26df3fbd..e1100617e 100644--- a/docs/agent/MCP_TOOLS.md+++ b/docs/agent/MCP_TOOLS.md@@ -572,6 +572,8 @@ When `changed_files` is passed, the exact serialized response starts with a `dir- `conformance_violations`: declared dependency-rule breaches the diff's repo participates in, each with the offending `source`/`target` services, the `rule` (e.g. `frontend !-> db`), and `edge_kind`. See [Architecture Conformance](../scale/WORKSPACES.md#architecture-conformance).- `dependency_cycles`: circular service dependencies involving this repo, each with the participating `nodes` and `length`.+`directive.next_calls` names what to call next, built from this response alone: `get_change_risk()` for the diff itself, then `get_context(targets=<first five may_break>, include=["callers"])` when `may_break` is non-empty. `tests_to_run` is already the answer to which tests, so it gets no call. Each entry has the shape every next call has (see `get_health`'s `fix_first`).+> **Output-schema change.** `directive.will_break` is now `directive.may_break`,> and `directive.will_break_tests` is now `directive.may_break_tests`. Both are> a reverse-import reachability walk: `get_risk` is given a file list, never a@@ -1184,7 +1186,14 @@ The opt-in enrichments:- A refactoring reaches a bare `get_health()` through `fix_first`, whose`next_call` is the exact `opportunity_id` call that opens it. **`refactoring_summary`**(`only=["refactoring_summary"]`) is the rollup by type, effort, confidence,- lifecycle and mechanical-vs-judgment, with facets.+ lifecycle and mechanical-vs-judgment, with facets, and a `next_call` that+ lists the opportunities.+- Every next call (Fix first's `next_call`, the refactoring and performance+ summaries' `next_call`, actions' `commands`, `get_risk`'s+ `directive.next_calls`) has one shape: `purpose`, `mcp` (the call as text,+ e.g. `get_health(opportunity_id="refop3_...")`), `cli` (the terminal line+ that gives the same answer, or null), and `tool` + `arguments`, the same call+ structured.- **`refactoring_plans`** is the raw per-detector list, unchanged and stilladdressable by `plan_id`, but **opt-in**: name it in `only` to get it. Itreturns ranked, structured refactoring plans (not templatediff --git a/packages/cli/src/repowise/cli/commands/risk_cmd.py b/packages/cli/src/repowise/cli/commands/risk_cmd.pyindex e316e76b5..27847bde4 100644--- a/packages/cli/src/repowise/cli/commands/risk_cmd.py+++ b/packages/cli/src/repowise/cli/commands/risk_cmd.py@@ -184,6 +184,8 @@ def _render_target_risk(projected: dict, requested: tuple[str, ...]) -> None:key,truncated=directive.get(f"{key}_truncated") or 0,)+ calls = directive.get("next_calls") or []+ _print_list("Then run", [c["cli"] for c in calls if c.get("cli")])targets = projected.get("targets") or {}for name in requested:diff --git a/packages/core/src/repowise/core/agent_prompts/fix_first.py b/packages/core/src/repowise/core/agent_prompts/fix_first.pyindex c1baa34f8..d2a874918 100644--- a/packages/core/src/repowise/core/agent_prompts/fix_first.py+++ b/packages/core/src/repowise/core/agent_prompts/fix_first.py@@ -8,8 +8,6 @@ already worded; the sentences themselves come from ``fix_first.text``. Port offrom __future__ import annotations-import json-import mathfrom collections.abc import Mappingfrom typing import Any@@ -30,25 +28,6 @@ _EXPECTED = ()-def _js_value(v: Any) -> Any:- """Values as ``JSON.stringify`` sees them: a whole float has no ``.0`` and a- non-finite one is null. Ceiling: exponent spelling (``1e-07`` vs ``1e-7``)- still differs; call arguments are ids, paths and small counts."""- if isinstance(v, float):- if not math.isfinite(v):- return None- return int(v) if v.is_integer() else v- if isinstance(v, Mapping):- return {k: _js_value(x) for k, x in v.items()}- if isinstance(v, (list, tuple)):- return [_js_value(x) for x in v]- return v---def _js_json(v: Any) -> str:- return json.dumps(_js_value(v), ensure_ascii=False, separators=(",", ":"))--def _where(target: Mapping[str, Any]) -> str:start = target.get("line_start")loc = f"`{target['file_path']}{f':{start}' if start else ''}`"@@ -84,9 +63,7 @@ def _step(s: Mapping[str, Any]) -> str:def render_fix_item(item: Mapping[str, Any], flavor: str = "generic", repo_name: str | None = None) -> str:use_mcp = flavor == "claude-code-mcp"- next_call = item["next_call"]- args = ", ".join(f"{k}={_js_json(v)}" for k, v in next_call["arguments"].items())- call = f"{next_call['tool']}({args})"+ call = item["next_call"]["mcp"]action = item["action"]steps = [_step(s) for s in action["steps"]]more_steps = action["steps_total"] - len(action["steps"])diff --git a/packages/core/src/repowise/core/analysis/actions/model.py b/packages/core/src/repowise/core/analysis/actions/model.pyindex 1b1498f1c..df8e89020 100644--- a/packages/core/src/repowise/core/analysis/actions/model.py+++ b/packages/core/src/repowise/core/analysis/actions/model.py@@ -10,6 +10,8 @@ import hashlibfrom dataclasses import dataclassfrom typing import Any, Literal, get_args+from repowise.core.analysis.next_call import ActionCommand+ActionRule = Literal["live_secret","fresh_regressions",@@ -108,18 +110,6 @@ class ActionDetail:}-@dataclass(frozen=True, slots=True)-class ActionCommand:- """A way to see more: the MCP call an agent makes, the CLI line a person runs."""-- purpose: str- mcp: str | None = None- cli: str | None = None-- def as_dict(self) -> dict[str, Any]:- return {"purpose": self.purpose, "mcp": self.mcp, "cli": self.cli}--#: Evidence rows carried per action. The total says how many there were.DETAILS_CAP = 40diff --git a/packages/core/src/repowise/core/analysis/actions/rules/_text.py b/packages/core/src/repowise/core/analysis/actions/rules/_text.pyindex a8372c06f..634496b2f 100644--- a/packages/core/src/repowise/core/analysis/actions/rules/_text.py+++ b/packages/core/src/repowise/core/analysis/actions/rules/_text.py@@ -23,8 +23,3 @@ def plural(n: int, noun: str) -> str:def humanize(token: str) -> str:return token.replace("_", " ")---def py_list(items: list[str]) -> str:- """A list literal for an MCP call line: ``["a.py", "b.py"]``."""- return "[" + ", ".join(f'"{i}"' for i in items) + "]"diff --git a/packages/core/src/repowise/core/analysis/actions/rules/code.py b/packages/core/src/repowise/core/analysis/actions/rules/code.pyindex e094eac0e..2eae69b68 100644--- a/packages/core/src/repowise/core/analysis/actions/rules/code.py+++ b/packages/core/src/repowise/core/analysis/actions/rules/code.py@@ -9,7 +9,7 @@ from datetime import datetimefrom ..context import RepoContextfrom ..facts import FileFacts, RepoFactsfrom ..model import Action, ActionCommand, ActionDetail, RuleOutcome, WhyFact, fingerprint-from ._text import code, plural, py_list+from ._text import code, plural#: Files that tell the week's story as well as the quarter's: busy fragile#: files someone touched this week, strongest first.@@ -136,19 +136,22 @@ def _regression_details(found: list) -> tuple[ActionDetail, ...]:def _regression_commands(paths: list[str], sha: str) -> tuple[ActionCommand, ...]:first = paths[0]return (- ActionCommand(+ ActionCommand.call("Every open finding in these files, with its line and reason",- mcp=f'get_health(targets={py_list(paths[:10])}, include=["biomarkers"])',+ "get_health",+ {"targets": paths[:10], "include": ["biomarkers"]},cli=f"repowise health --file {first}",),- ActionCommand(+ ActionCommand.call("The commit that last made the first file worse, and what it put at risk",- mcp=f'get_change_risk(revspec="{sha}")',+ "get_change_risk",+ {"revspec": sha},cli=f"git show {sha[:12]} -- {first}",),- ActionCommand(+ ActionCommand.call("A file's structure and callers before editing it",- mcp=f'get_context(targets=["{first}"], include=["skeleton", "callers"])',+ "get_context",+ {"targets": [first], "include": ["skeleton", "callers"]},cli=f"repowise context {first}",),)@@ -309,14 +312,16 @@ def fragile_file(facts: RepoFacts, ctx: RepoContext) -> RuleOutcome:else ()),commands=(- ActionCommand(+ ActionCommand.call("Its bug-fix history, co-change partners and test gaps",- mcp=f'get_risk(targets=["{f.path}"])',+ "get_risk",+ {"targets": [f.path]},cli=f"repowise risk -t {f.path}",),- ActionCommand(+ ActionCommand.call("Every open finding in the file",- mcp=f'get_health(targets=["{f.path}"], include=["biomarkers"])',+ "get_health",+ {"targets": [f.path], "include": ["biomarkers"]},cli=f"repowise health --file {f.path}",),),@@ -429,14 +434,16 @@ def fix_concentration(facts: RepoFacts, ctx: RepoContext) -> RuleOutcome:for p in members),commands=(- ActionCommand(+ ActionCommand.call("Bug-fix history and co-change partners for the most fixed files",- mcp=f"get_risk(targets={py_list(members[:5])})",+ "get_risk",+ {"targets": members[:5]},cli="repowise risk " + " ".join(f"-t {p}" for p in members[:5]),),- ActionCommand(+ ActionCommand.call("Why the folder is shaped this way",- mcp=f'get_why(targets=["{folder}/"])',+ "get_why",+ {"targets": [f"{folder}/"]},cli=f"repowise why {folder}/",),),@@ -506,9 +513,10 @@ def fix_first(facts: RepoFacts, ctx: RepoContext) -> RuleOutcome:),details_total=item.action.steps_total,commands=(- ActionCommand(+ ActionCommand.call("The full item: steps, tests to run, risk",- mcp=f'get_health(fix_id="{item.id}")',+ "get_health",+ {"fix_id": item.id},cli="repowise health",),),diff --git a/packages/core/src/repowise/core/analysis/actions/rules/hygiene.py b/packages/core/src/repowise/core/analysis/actions/rules/hygiene.pyindex 5f13ede5d..a1350cc88 100644--- a/packages/core/src/repowise/core/analysis/actions/rules/hygiene.py+++ b/packages/core/src/repowise/core/analysis/actions/rules/hygiene.py@@ -118,9 +118,10 @@ def live_secret(facts: RepoFacts, ctx: RepoContext) -> RuleOutcome:for s in found),commands=(- ActionCommand(+ ActionCommand.call("Where the value is read and who calls it",- mcp=f'get_context(targets=["{path}"], include=["callers"])',+ "get_context",+ {"targets": [path], "include": ["callers"]},cli=f"repowise context {path}",),),@@ -191,9 +192,10 @@ def broken_doc_refs(facts: RepoFacts, ctx: RepoContext) -> RuleOutcome:for d in found),commands=(- ActionCommand(+ ActionCommand.call("Every broken reference, with a likely replacement where one is known",- mcp=f'get_context(targets=["{doc}"], include=["doc_drift"])',+ "get_context",+ {"targets": [doc], "include": ["doc_drift"]},cli="repowise doc-drift",),),@@ -272,9 +274,10 @@ def dead_code_batch(facts: RepoFacts, ctx: RepoContext) -> RuleOutcome:),details_total=len(found),commands=(- ActionCommand(+ ActionCommand.call("The deletion-ready list with the evidence for each",- mcp="get_dead_code(safe_only=True)",+ "get_dead_code",+ {"safe_only": True},cli="repowise dead-code --safe-only",),),@@ -310,9 +313,10 @@ def stale_decision(facts: RepoFacts, ctx: RepoContext) -> RuleOutcome:confidence="medium",done_when="The decision is re-accepted, amended or superseded.",commands=(- ActionCommand(+ ActionCommand.call("The decision, the code it governs, and how it drifted",- mcp=f'get_why(id="{d.id}")',+ "get_why",+ {"id": d.id},cli="repowise decision health",),),diff --git a/packages/core/src/repowise/core/analysis/health/fix_first/build.py b/packages/core/src/repowise/core/analysis/health/fix_first/build.pyindex a80715c8a..cd786d2d2 100644--- a/packages/core/src/repowise/core/analysis/health/fix_first/build.py+++ b/packages/core/src/repowise/core/analysis/health/fix_first/build.py@@ -61,6 +61,7 @@ from repowise.core.analysis.health.refactoring.extract_helper import _is_generatfrom repowise.core.analysis.health.rows import detail_map, field, json_fieldfrom repowise.core.analysis.health.scoring import biomarker_dimensionfrom repowise.core.analysis.health.suggestions import suggestion_for+from repowise.core.analysis.next_call import ActionCommandfrom . import textfrom .model import (@@ -78,7 +79,6 @@ from .model import (FixFirstQueue,FixGain,FixItem,- FixNextCall,FixRankFact,FixRisk,FixSource,@@ -782,8 +782,10 @@ def _refactor_unit(plan_ids,tuple(details.get("lead_finding_ids") or ()),),- "next_call": FixNextCall(- "get_health", {"opportunity_id": field(row, "opportunity_id")}+ "next_call": ActionCommand.call(+ "The full plan: ordered steps, validation and evidence",+ "get_health",+ {"opportunity_id": field(row, "opportunity_id")},),}@@ -1030,8 +1032,10 @@ def _perf_unit("verify": _verify(plan.get("validation")),"context": files.context(path),"source": FixSource(field(lead, "opportunity_id")),- "next_call": FixNextCall(- "get_health", {"opportunity_id": field(lead, "opportunity_id")}+ "next_call": ActionCommand.call(+ "The full opportunity: ordered steps, validation and other causes here",+ "get_health",+ {"opportunity_id": field(lead, "opportunity_id")},),}@@ -1113,8 +1117,11 @@ def _finding_unit(lead: Any, files: _Files, first: FixStep) -> _Unit:"verify": _verify(None),"context": files.context(path),"source": FixSource(None, (), (public_id,) if public_id else ()),- "next_call": FixNextCall(- "get_health", {"targets": [path], "include": ["biomarkers"]}+ "next_call": ActionCommand.call(+ "Every open finding in the file, with its line and reason",+ "get_health",+ {"targets": [path], "include": ["biomarkers"]},+ cli=f"repowise health --file {path}",),}diff --git a/packages/core/src/repowise/core/analysis/health/fix_first/model.py b/packages/core/src/repowise/core/analysis/health/fix_first/model.pyindex 6d4ad25b2..922710627 100644--- a/packages/core/src/repowise/core/analysis/health/fix_first/model.py+++ b/packages/core/src/repowise/core/analysis/health/fix_first/model.py@@ -10,6 +10,8 @@ import hashlibfrom dataclasses import asdict, dataclass, fieldfrom typing import Any, Literal, get_args+from repowise.core.analysis.next_call import ActionCommand+#: Bumped when ranking, eligibility or the item shape changes meaning.FIX_FIRST_MODEL_VERSION = 1@@ -163,12 +165,6 @@ class FixSource:finding_ids: tuple[str, ...] = ()-@dataclass(frozen=True, slots=True)-class FixNextCall:- tool: str- arguments: dict[str, Any]--@dataclass(frozen=True, slots=True)class FixItem:id: str@@ -188,7 +184,7 @@ class FixItem:verify: FixVerifycontext: tuple[FixContext, ...]source: FixSource- next_call: FixNextCall+ next_call: ActionCommandwhy_ranked: tuple[FixRankFact, ...] = ()def as_dict(self) -> dict[str, Any]:@@ -206,7 +202,7 @@ class FixItem:"gain": self.gain.text,"effort": self.effort.bucket,"confidence": self.confidence.level,- "next_call": asdict(self.next_call),+ "next_call": self.next_call.as_dict(),}@@ -277,7 +273,6 @@ __all__ = ["FixFirstQueue","FixGain","FixItem",- "FixNextCall","FixRankFact","FixRisk","FixSource",diff --git a/packages/core/src/repowise/core/analysis/next_call.py b/packages/core/src/repowise/core/analysis/next_call.pynew file mode 100644index 000000000..d40251cd6--- /dev/null+++ b/packages/core/src/repowise/core/analysis/next_call.py@@ -0,0 +1,74 @@+"""What to call next: one shape for every surface that hands an agent its next call.++Actions, Fix first, the ``get_health`` pillar summaries and the ``get_risk`` PR+directive all carry :class:`ActionCommand`. It lives in a leaf module because+``analysis.health.fix_first`` needs it and ``analysis.actions`` imports+``fix_first`` back.+"""++from __future__ import annotations++import json+from collections.abc import Mapping+from dataclasses import dataclass+from typing import Any+++def _value(v: Any) -> str:+ # bool before int: ``True`` is an int too.+ if v is None or isinstance(v, bool):+ return repr(v)+ if isinstance(v, (int, float)):+ return str(v)+ if isinstance(v, Mapping):+ return "{" + ", ".join(f"{_value(str(k))}: {_value(x)}" for k, x in v.items()) + "}"+ if isinstance(v, (list, tuple)):+ return "[" + ", ".join(_value(x) for x in v) + "]"+ return json.dumps(str(v), ensure_ascii=False)+++def render_call(tool: str, arguments: Mapping[str, Any] | None = None) -> str:+ """``tool(key=value, ...)`` as an agent types it: strings double-quoted, lists+ ``["a", "b"]``, ``True``/``None`` as Python literals, numbers plain."""+ args = ", ".join(f"{k}={_value(v)}" for k, v in (arguments or {}).items())+ return f"{tool}({args})"+++@dataclass(frozen=True, slots=True)+class ActionCommand:+ """A way to see more: the MCP call an agent makes, the CLI line a person runs.++ ``tool`` and ``arguments`` are the structured call; ``mcp`` is that call+ rendered by :func:`render_call`. Build one with :meth:`call`.+ """++ purpose: str+ mcp: str | None = None+ cli: str | None = None+ tool: str | None = None+ arguments: Mapping[str, Any] | None = None++ @classmethod+ def call(+ cls,+ purpose: str,+ tool: str,+ arguments: Mapping[str, Any] | None = None,+ *,+ cli: str | None = None,+ ) -> ActionCommand:+ arguments = dict(arguments or {})+ return cls(purpose, render_call(tool, arguments), cli, tool, arguments)++ def as_dict(self) -> dict[str, Any]:+ out: dict[str, Any] = {"purpose": self.purpose, "mcp": self.mcp, "cli": self.cli}+ if self.tool is not None:+ out["tool"] = self.tool+ out["arguments"] = dict(self.arguments or {})+ return out++ def __hash__(self) -> int:+ # ``arguments`` is a dict; the rendered call stands in for it, so equal+ # commands still hash equal and ``Action``/``FixItem`` stay hashable.+ args = render_call("", self.arguments) if self.arguments is not None else None+ return hash((self.purpose, self.mcp, self.cli, self.tool, args))diff --git a/packages/server/src/repowise/server/mcp_server/_budget/contracts.py b/packages/server/src/repowise/server/mcp_server/_budget/contracts.pyindex b6b9e62cd..c982916ea 100644--- a/packages/server/src/repowise/server/mcp_server/_budget/contracts.py+++ b/packages/server/src/repowise/server/mcp_server/_budget/contracts.py@@ -100,6 +100,7 @@ _CONTRACTS: dict[str, ResponseBudgetContract] = {"directive.test_recommendations[]","directive.tests_to_run[]","directive.may_break[]",+ "directive.next_calls[]","targets[]",),protected=("directive", "targets"),@@ -116,6 +117,7 @@ _CONTRACTS: dict[str, ResponseBudgetContract] = {"directive.test_recommendations[]","directive.tests_to_run[]","directive.may_break[]",+ "directive.next_calls[]","pr_blast_radius","pr_blast_radius.guarding_tests",),diff --git a/packages/server/src/repowise/server/mcp_server/_change_health.py b/packages/server/src/repowise/server/mcp_server/_change_health.pyindex c9bf32df3..164530ae0 100644--- a/packages/server/src/repowise/server/mcp_server/_change_health.py+++ b/packages/server/src/repowise/server/mcp_server/_change_health.py@@ -244,5 +244,6 @@ def _skipped(skipped: dict[str, str]) -> dict[str, Any]:def _call(revspec: str | None, *, extra: str) -> str:+ # Single-quoted by contract (tests and clients pin it); new calls use next_call.render_call.ref = f"revspec={revspec!r}, " if revspec else ""return f"get_change_risk({ref}{extra})"diff --git a/packages/server/src/repowise/server/mcp_server/tool_health/paging.py b/packages/server/src/repowise/server/mcp_server/tool_health/paging.pyindex 14cc5a411..b6071de65 100644--- a/packages/server/src/repowise/server/mcp_server/tool_health/paging.py+++ b/packages/server/src/repowise/server/mcp_server/tool_health/paging.py@@ -165,6 +165,9 @@ def _stamp_nested_collections(value: Any) -> None:if not isinstance(value, dict):returnfor key, child in list(value.items()):+ # A next call's keyword arguments: a count stamped there becomes an argument.+ if key == "arguments":+ continueif isinstance(child, list):total_key = f"{key}_total"emitted_key = f"{key}_emitted"diff --git a/packages/server/src/repowise/server/mcp_server/tool_health/pillars.py b/packages/server/src/repowise/server/mcp_server/tool_health/pillars.pyindex 66da4e61e..ed1c4f708 100644--- a/packages/server/src/repowise/server/mcp_server/tool_health/pillars.py+++ b/packages/server/src/repowise/server/mcp_server/tool_health/pillars.py@@ -5,6 +5,7 @@ from __future__ import annotationsfrom dataclasses import dataclass, fieldfrom typing import Any+from repowise.core.analysis.next_call import ActionCommandfrom repowise.server.mcp_server.tool_health.paging import Pagerfrom repowise.server.mcp_server.tool_health.request import HealthRequestfrom repowise.server.services.performance_health import (@@ -202,10 +203,11 @@ def _render_refactoring(**refactoring.summary,"facets": page.facets if page else {},"view": req.refactoring_view,- "next_call": (- "get_health(include=['refactoring'], "- "only=['refactoring_opportunities'], limit=6)"- ),+ "next_call": ActionCommand.call(+ "The ranked refactoring opportunities, lead first",+ "get_health",+ {"include": ["refactoring"], "only": ["refactoring_opportunities"], "limit": 6},+ ).as_dict(),}@@ -230,8 +232,9 @@ def _render_performance(result["performance_summary"] = {**performance.summary,"facets": page.facets if page else {},- "next_call": (- "get_health(include=['performance'], "- "only=['performance_opportunities'], limit=6)"- ),+ "next_call": ActionCommand.call(+ "The ranked performance opportunities, lead first",+ "get_health",+ {"include": ["performance"], "only": ["performance_opportunities"], "limit": 6},+ ).as_dict(),}diff --git a/packages/server/src/repowise/server/mcp_server/tool_risk/directives.py b/packages/server/src/repowise/server/mcp_server/tool_risk/directives.pyindex e7f0c7d6c..d9c5fab4d 100644--- a/packages/server/src/repowise/server/mcp_server/tool_risk/directives.py+++ b/packages/server/src/repowise/server/mcp_server/tool_risk/directives.py@@ -6,6 +6,7 @@ from typing import Anyfrom sqlalchemy import select+from repowise.core.analysis.next_call import ActionCommandfrom repowise.core.analysis.risk_semantics import structural_impact_contractfrom repowise.core.persistence.crud.authority import decision_currenciesfrom repowise.core.persistence.database import get_session@@ -658,6 +659,25 @@ def _build_pr_directive(f"this repo.")+ # What to call next, from this response alone. ``tests_to_run`` is already+ # the answer to "which tests", so it gets no call of its own.+ next_calls = [+ ActionCommand.call(+ "The diff itself: review priority, health delta and impacted tests",+ "get_change_risk",+ cli="repowise risk",+ )+ ]+ if may_break:+ next_calls.append(+ ActionCommand.call(+ "How the files that may break use the changed code",+ "get_context",+ {"targets": may_break[:5], "include": ["callers"]},+ cli=f"repowise context {' '.join(may_break[:5])} --include callers",+ )+ )+directive = {"may_break": may_break,"may_break_tests": may_break_tests,@@ -706,6 +726,7 @@ def _build_pr_directive("conformance_violations": conformance_violations,"dependency_cycles": dependency_cycles,"governance_risk": governance_risk,+ "next_calls": [c.as_dict() for c in next_calls],"summary": (f"PR touches {len(changed_files)} file(s). "f"~{len(may_break)} downstream file(s) may be affected, "diff --git a/packages/server/src/repowise/server/schemas/actions.py b/packages/server/src/repowise/server/schemas/actions.pyindex a62c5d00f..a1d98980b 100644--- a/packages/server/src/repowise/server/schemas/actions.py+++ b/packages/server/src/repowise/server/schemas/actions.py@@ -7,6 +7,8 @@ from typing import Literalfrom pydantic import BaseModel, Field+from repowise.core.analysis.next_call import ActionCommand+class ActionWhy(BaseModel):label: str@@ -30,12 +32,6 @@ class ActionDetail(BaseModel):ref: str | None = None-class ActionCommand(BaseModel):- purpose: str- mcp: str | None = None- cli: str | None = None--class NextAction(BaseModel):id: strrule: strdiff --git a/packages/types/src/actions.ts b/packages/types/src/actions.tsindex a6ef39310..ad62dc6db 100644--- a/packages/types/src/actions.ts+++ b/packages/types/src/actions.ts@@ -65,11 +65,16 @@ export interface ActionDetail {ref: string | null;}-/** A way to see more: the MCP call for an agent, the CLI line for a person. */+/**+ * A way to see more: the MCP call for an agent, the CLI line for a person.+ * `tool` and `arguments` are the structured call `mcp` renders, when one exists.+ */export interface ActionCommand {purpose: string;mcp: string | null;cli: string | null;+ tool?: string | null;+ arguments?: Record<string, unknown> | null;}export interface NextAction {diff --git a/packages/types/src/fix-first.ts b/packages/types/src/fix-first.tsindex b36348c31..e1ba8995f 100644--- a/packages/types/src/fix-first.ts+++ b/packages/types/src/fix-first.ts@@ -6,6 +6,8 @@* Python twins disagree.*/+import type { ActionCommand } from "./actions.js";+export type FixTier = "now" | "next" | "later";export type FixKind = "refactor" | "perf_fix" | "finding";@@ -64,11 +66,6 @@ export interface FixStep {mechanical: boolean;}-export interface FixNextCall {- tool: string;- arguments: Record<string, unknown>;-}-export interface FixItem {/** `fix1_<20 hex>`: stable while the item's source id is. */id: string;@@ -96,7 +93,7 @@ export interface FixItem {/** History signals: shown beside the item, never ranked on. */context: { label: string; value: string }[];source: { opportunity_id: string | null; plan_ids: string[]; finding_ids: string[] };- next_call: FixNextCall;+ next_call: ActionCommand;/** The value inputs and the tier reason, so the order is explainable. */why_ranked: { factor: string; value: string }[];}@@ -112,7 +109,7 @@ export interface FixItemCompact {gain: string;effort: FixEffort;confidence: FixLevel;- next_call: FixNextCall;+ next_call: ActionCommand;}export interface FixFirstTotals {diff --git a/packages/types/src/generated/http.ts b/packages/types/src/generated/http.tsindex a31cf095e..d3194b472 100644--- a/packages/types/src/generated/http.ts+++ b/packages/types/src/generated/http.ts@@ -13,6 +13,8 @@ export interface ActionCommand {purpose: string;mcp?: string | null;cli?: string | null;+ tool?: string | null;+ arguments?: Record<string, unknown> | null;}export interface ActionContext {@@ -1603,15 +1605,10 @@ export interface FixItem {verify: FixVerify;context: FixContext[];source: FixSource;- next_call: FixNextCall;+ next_call: ActionCommand;why_ranked?: FixRankFact[];}-export interface FixNextCall {- tool: string;- arguments: Record<string, unknown>;-}-export interface FixRankFact {factor: string;value: string;diff --git a/packages/types/src/refactoring.ts b/packages/types/src/refactoring.tsindex 33ab6489b..287bd6a72 100644--- a/packages/types/src/refactoring.ts+++ b/packages/types/src/refactoring.ts@@ -1,5 +1,6 @@/** Canonical wire contract for structured refactoring recommendations. */+import type { ActionCommand } from "./actions.js";import type { FixExclusion } from "./fix-first.js";import type { Paginated } from "./pagination.js";@@ -354,7 +355,7 @@ export interface RefactoringRollupAvailable {analyzed_commit: string | null;/** Present on the MCP block only. */facets?: Record<string, Record<string, number>>;- next_call?: string;+ next_call?: ActionCommand;}export type RefactoringOpportunityRollup =diff --git a/packages/ui/__tests__/health/fixtures/fix-first.ts b/packages/ui/__tests__/health/fixtures/fix-first.tsindex 0af3957af..5d0f9ba6a 100644--- a/packages/ui/__tests__/health/fixtures/fix-first.ts+++ b/packages/ui/__tests__/health/fixtures/fix-first.ts@@ -129,6 +129,9 @@ export const FIX_FIRST_QUEUE: FixFirstQueue = {]},"next_call": {+ "purpose": "The full plan: ordered steps, validation and evidence",+ "mcp": "get_health(opportunity_id=\"refop3_8ba13d978db910d160b1\")",+ "cli": null,"tool": "get_health","arguments": {"opportunity_id": "refop3_8ba13d978db910d160b1"@@ -254,6 +257,9 @@ export const FIX_FIRST_QUEUE: FixFirstQueue = {]},"next_call": {+ "purpose": "Every open finding in the file, with its line and reason",+ "mcp": "get_health(targets=[\"packages/ui/src/graph/graph-flow.tsx\"], include=[\"biomarkers\"])",+ "cli": "repowise health --file packages/ui/src/graph/graph-flow.tsx","tool": "get_health","arguments": {"targets": [@@ -405,6 +411,9 @@ export const FIX_FIRST_QUEUE: FixFirstQueue = {"finding_ids": []},"next_call": {+ "purpose": "The full opportunity: ordered steps, validation and other causes here",+ "mcp": "get_health(opportunity_id=\"perf2_5ca551b7b7c3293951d0\")",+ "cli": null,"tool": "get_health","arguments": {"opportunity_id": "perf2_5ca551b7b7c3293951d0"@@ -559,6 +568,9 @@ export const FIX_FIRST_QUEUE: FixFirstQueue = {]},"next_call": {+ "purpose": "The full plan: ordered steps, validation and evidence",+ "mcp": "get_health(opportunity_id=\"refop3_8ba13d978db910d160b1\")",+ "cli": null,"tool": "get_health","arguments": {"opportunity_id": "refop3_8ba13d978db910d160b1"diff --git a/packages/ui/src/health/ai-prompts/fix-first-prompt.ts b/packages/ui/src/health/ai-prompts/fix-first-prompt.tsindex 71dd81076..8bb068d70 100644--- a/packages/ui/src/health/ai-prompts/fix-first-prompt.ts+++ b/packages/ui/src/health/ai-prompts/fix-first-prompt.ts@@ -68,9 +68,7 @@ export function buildFixItemPrompt({repoName,}: BuildFixItemPromptOptions): string {const useMcp = flavor === "claude-code-mcp";- const call = `${item.next_call.tool}(${Object.entries(item.next_call.arguments)- .map(([k, v]) => `${k}=${JSON.stringify(v)}`)- .join(", ")})`;+ const call = item.next_call.mcp;const steps = item.action.steps.map((s) =>`${s.order}. ${s.text} (\`${s.file_path}${s.line ? `:${s.line}` : ""}\`)${diff --git a/packages/web/src/components/code-health/fix-first-section.test.tsx b/packages/web/src/components/code-health/fix-first-section.test.tsxindex 2acbd404b..3d3c405bd 100644--- a/packages/web/src/components/code-health/fix-first-section.test.tsx+++ b/packages/web/src/components/code-health/fix-first-section.test.tsx@@ -33,7 +33,13 @@ function item(overrides: Partial<FixItem>): FixItem {verify: { tests: [], tests_total: 0, command: null, basis: "unknown" },context: [],source: { opportunity_id: "refop3_x", plan_ids: [], finding_ids: ["finding_1", "finding_2"] },- next_call: { tool: "get_health", arguments: { opportunity_id: "refop3_x" } },+ next_call: {+ purpose: "The full plan: ordered steps, validation and evidence",+ mcp: 'get_health(opportunity_id="refop3_x")',+ cli: null,+ tool: "get_health",+ arguments: { opportunity_id: "refop3_x" },+ },why_ranked: [],...overrides,};diff --git a/scripts/measure_mcp_response_sizes.py b/scripts/measure_mcp_response_sizes.pyindex d6c624bdc..0b6058d1a 100644--- a/scripts/measure_mcp_response_sizes.py+++ b/scripts/measure_mcp_response_sizes.py@@ -49,6 +49,7 @@ CASES: list[tuple[str, str, dict[str, Any]]] = [("get_health", "limit-100", {"limit": 100}),("get_health", "all-includes", {"include": ["files", "refactoring", "performance"], "limit": 100}),("get_risk", "one-target", {"targets": ["{file}"]}),+ ("get_risk", "pr-mode", {"targets": ["{file}"], "changed_files": ["{file}", "{file2}"]}),("get_change_risk", "head", {"revspec": "HEAD"}),("get_why", "targets", {"targets": ["{file}"]}),("get_dead_code", "default", {}),diff --git a/tests/fixtures/agent_prompts/fix_items.json b/tests/fixtures/agent_prompts/fix_items.jsonindex 2cd204579..f9d674686 100644--- a/tests/fixtures/agent_prompts/fix_items.json+++ b/tests/fixtures/agent_prompts/fix_items.json@@ -23,6 +23,9 @@"context": [],"source": {"opportunity_id": "perfop_1", "plan_ids": [], "finding_ids": []},"next_call": {+ "purpose": "Every argument shape a call can carry",+ "mcp": "get_health(query=\"say \\\"hi\\\" \\\\path\\nnext\\ttab … ünï \\u0001\", limit=5, ratio=2.5, whole=3.0, flag=True, off=False, none=None, targets=[\"a.py\", \"b \\\"c\\\".py\"], nested={\"k\": [1, 2.0, \"x\"]})",+ "cli": null,"tool": "get_health","arguments": {"query": "say \"hi\" \\path\nnext\ttab … ünï \u0001",@@ -80,7 +83,13 @@},"context": [{"label": "changes in 90 days", "value": "5"}],"source": {"opportunity_id": "refop3_1", "plan_ids": ["refac3_1"], "finding_ids": []},- "next_call": {"tool": "get_health", "arguments": {"opportunity_id": "refop3_1"}},+ "next_call": {+ "purpose": "The full plan: ordered steps, validation and evidence",+ "mcp": "get_health(opportunity_id=\"refop3_1\")",+ "cli": null,+ "tool": "get_health",+ "arguments": {"opportunity_id": "refop3_1"}+ },"why_ranked": [{"factor": "value", "value": "3"}]}},@@ -117,7 +126,13 @@},"context": [],"source": {"opportunity_id": null, "plan_ids": [], "finding_ids": ["finding_1"]},- "next_call": {"tool": "get_health", "arguments": {}},+ "next_call": {+ "purpose": "The full item",+ "mcp": "get_health()",+ "cli": "repowise health",+ "tool": "get_health",+ "arguments": {}+ },"why_ranked": []}}diff --git a/tests/fixtures/agent_prompts/golden.json b/tests/fixtures/agent_prompts/golden.jsonindex a7abe0f86..5454d53aa 100644--- a/tests/fixtures/agent_prompts/golden.json+++ b/tests/fixtures/agent_prompts/golden.json@@ -29,7 +29,7 @@"no_tests_mixed_args": {"generic": "You are a senior engineer in this repository. Repowise, a code-intelligence index, ranked the change below first among the work it found. Its facts come from stored analysis; treat them as leads to confirm against the code, not as ground truth.\n## Fix first (`acme/api`)\n**Batch the queries in load_rows**\nload_rows runs one query per row — 3 call sites reach it.\n## Facts\n- Target: `src/rows.py`\n- Gain: fewer round trips\n- Effort: M (one function)\n- Risk: Touches 1 file.\n- Confidence: medium. the loop is static\n## Verify\nNo guarding tests found. Write a test that pins the current behaviour before you change anything.\n## Hard constraints\n- **Confirm before changing.** The analysis is stored, not live; the code may have moved since it ran.\n- **Keep behaviour.** This is a structural or performance change; what the code returns must not change.\n- **Run Verify before and after.** If no guarding test exists, write one that pins today's behaviour first.\n- **Say when it is wrong.** If the problem does not hold, or the change costs more than it saves, report that and stop.\n## What I expect back\n1. Whether the problem held, and what you changed.\n2. The Verify run, before and after, with its result.\n3. Anything you left undone, and why.","claude-code": "You are Claude Code in this repository. Repowise, a code-intelligence index, ranked the change below first among the work it found. Confirm each fact with Read and Grep before editing, and track the steps with TodoWrite.\n## Fix first (`acme/api`)\n**Batch the queries in load_rows**\nload_rows runs one query per row — 3 call sites reach it.\n## Facts\n- Target: `src/rows.py`\n- Gain: fewer round trips\n- Effort: M (one function)\n- Risk: Touches 1 file.\n- Confidence: medium. the loop is static\n## Verify\nNo guarding tests found. Write a test that pins the current behaviour before you change anything.\n## Hard constraints\n- **Confirm before changing.** The analysis is stored, not live; the code may have moved since it ran.\n- **Keep behaviour.** This is a structural or performance change; what the code returns must not change.\n- **Run Verify before and after.** If no guarding test exists, write one that pins today's behaviour first.\n- **Say when it is wrong.** If the problem does not hold, or the change costs more than it saves, report that and stop.\n## What I expect back\n1. Whether the problem held, and what you changed.\n2. The Verify run, before and after, with its result.\n3. Anything you left undone, and why.",- "claude-code-mcp": "You are Claude Code in this repository, which Repowise indexes and serves over MCP. Repowise ranked the change below first among the work it found. Call the MCP lookup under \"Look closer\" for the full record before reading files by hand, then confirm each fact against the code.\n## Fix first (`acme/api`)\n**Batch the queries in load_rows**\nload_rows runs one query per row — 3 call sites reach it.\n## Facts\n- Target: `src/rows.py`\n- Gain: fewer round trips\n- Effort: M (one function)\n- Risk: Touches 1 file.\n- Confidence: medium. the loop is static\n## Verify\nNo guarding tests found. Write a test that pins the current behaviour before you change anything.\n## Look closer (Repowise MCP)\n`get_health(query=\"say \\\"hi\\\" \\\\path\\nnext\\ttab … ünï \\u0001\", limit=5, ratio=2.5, whole=3, flag=true, off=false, none=null, targets=[\"a.py\",\"b \\\"c\\\".py\"], nested={\"k\":[1,2,\"x\"]})`\n## Hard constraints\n- **Confirm before changing.** The analysis is stored, not live; the code may have moved since it ran.\n- **Keep behaviour.** This is a structural or performance change; what the code returns must not change.\n- **Run Verify before and after.** If no guarding test exists, write one that pins today's behaviour first.\n- **Say when it is wrong.** If the problem does not hold, or the change costs more than it saves, report that and stop.\n## What I expect back\n1. Whether the problem held, and what you changed.\n2. The Verify run, before and after, with its result.\n3. Anything you left undone, and why.",+ "claude-code-mcp": "You are Claude Code in this repository, which Repowise indexes and serves over MCP. Repowise ranked the change below first among the work it found. Call the MCP lookup under \"Look closer\" for the full record before reading files by hand, then confirm each fact against the code.\n## Fix first (`acme/api`)\n**Batch the queries in load_rows**\nload_rows runs one query per row — 3 call sites reach it.\n## Facts\n- Target: `src/rows.py`\n- Gain: fewer round trips\n- Effort: M (one function)\n- Risk: Touches 1 file.\n- Confidence: medium. the loop is static\n## Verify\nNo guarding tests found. Write a test that pins the current behaviour before you change anything.\n## Look closer (Repowise MCP)\n`get_health(query=\"say \\\"hi\\\" \\\\path\\nnext\\ttab … ünï \\u0001\", limit=5, ratio=2.5, whole=3.0, flag=True, off=False, none=None, targets=[\"a.py\", \"b \\\"c\\\".py\"], nested={\"k\": [1, 2.0, \"x\"]})`\n## Hard constraints\n- **Confirm before changing.** The analysis is stored, not live; the code may have moved since it ran.\n- **Keep behaviour.** This is a structural or performance change; what the code returns must not change.\n- **Run Verify before and after.** If no guarding test exists, write one that pins today's behaviour first.\n- **Say when it is wrong.** If the problem does not hold, or the change costs more than it saves, report that and stop.\n## What I expect back\n1. Whether the problem held, and what you changed.\n2. The Verify run, before and after, with its result.\n3. Anything you left undone, and why.","cursor": "Work in this repository. Repowise, a code-intelligence index, ranked the change below first among the work it found. Open the target with @file, confirm each fact, then make the change.\n## Fix first (`acme/api`)\n**Batch the queries in load_rows**\nload_rows runs one query per row — 3 call sites reach it.\n## Facts\n- Target: `src/rows.py`\n- Gain: fewer round trips\n- Effort: M (one function)\n- Risk: Touches 1 file.\n- Confidence: medium. the loop is static\n## Verify\nNo guarding tests found. Write a test that pins the current behaviour before you change anything.\n## Hard constraints\n- **Confirm before changing.** The analysis is stored, not live; the code may have moved since it ran.\n- **Keep behaviour.** This is a structural or performance change; what the code returns must not change.\n- **Run Verify before and after.** If no guarding test exists, write one that pins today's behaviour first.\n- **Say when it is wrong.** If the problem does not hold, or the change costs more than it saves, report that and stop.\n## What I expect back\n1. Whether the problem held, and what you changed.\n2. The Verify run, before and after, with its result.\n3. Anything you left undone, and why."},"tests_and_steps_over_cap": {diff --git a/tests/fixtures/mcp/token_calibration_responses.json b/tests/fixtures/mcp/token_calibration_responses.jsonindex f7f18ff6d..af0ed9fff 100644--- a/tests/fixtures/mcp/token_calibration_responses.json+++ b/tests/fixtures/mcp/token_calibration_responses.json@@ -1 +1 @@-{"get_answer:how-question":{"_meta":{"cached":true,"completeness":{"capped":true,"reason":"confidence_projection_and_deduplication","shown":1,"total":15},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","projection":{"recovery":{"arguments":{"include":["evidence"],"question":"How does index the repository work?"},"tool":"get_answer"}},"response_budget":{"limit_chars":24000,"serialized_chars":4391,"tier":"default"},"scope_hint":"Unrelated to what was served: Contributor 11 (1,478 files), Contributor 2 (641), Contributor 6 (261).","timing_ms":11.19},"answer":"## What \u201cindexing\u201d means here\n\nThe retrieved code describes the **read side of an already-created repository index**, rather than the process that parses a repository from scratch. Ingestion writes each repository\u2019s `.repowise/wiki.db`; `RepoIndex` opens that database and exposes convenient lookup APIs over its contents (`packages/core/src/repowise/core/workspace/repo_index.py`).\n\n## Opening an index\n\nFor one repository, callers use:\n\n```python\nawait open_repo_index(alias, repo_path) -> RepoIndex | None\n```\n\n`open_repo_index` opens the repository\u2019s `wiki.db` read side and returns `None` when the repository has not been indexed (`packages/core/src/repowise/core/workspace/repo_index.py`).\n\nFor a workspace, `open_workspace_index(...)` opens the indexed repositories and returns a `WorkspaceIndex`. The workspace object maps repository aliases to `RepoIndex` instances; callers retrieve one with `get(alias)`. Repositories that fail to open are skipped, and an optional alias filter can restrict which repositories are opened.\n\nEach `RepoIndex` owns one database session/connection. The implementation stores:\n\n- the repository alias, path, and `repo_id`;\n- an in-memory index by file (`_by_file`);\n- an in-memory index by symbol name (`_by_name`);\n- external-import records (`_externals`).\n\nIts `_load` method queries `WikiSymbol` rows and graph-edge data from the database. After loading, accessors are pure in-memory reads, so worker-thread dialects can call them without issuing additional database queries. The `repo_id` is required so repository-scoped queries cannot accidentally return unrelated rows.\n\n## Lookup capabilities\n\nThe exposed API supports:\n\n- `symbols_for_file(rel_path)` \u2014 symbols declared in a POSIX, repo-relative file, outermost first;\n- `symbol_at(rel_path, line)` \u2014 symbol covering a line;\n- `declared_symbol_at(...)` \u2014 declaration-specific lookup;\n- `symbol_named(expression)` \u2014 resolve qualified or unqualified symbol expressions;\n- access to external imports and the underlying session.\n\nThe index stores source locations from ingestion. Those spans can become stale if files change afterward, so callers extracting source must bound or validate spans against the current content; `extractors.from_index` provides the related safety behavior. The connection is closed explicitly through `RepoIndex.close()` or `WorkspaceIndex.close()`.","candidates_emitted":0,"candidates_reduced_reason":"confidence_projection_and_deduplication","candidates_total":5,"citations":["packages/core/src/repowise/core/workspace/repo_index.py"],"confidence":"high","fallback_targets_emitted":0,"fallback_targets_reduced_reason":"confidence_projection_and_deduplication","fallback_targets_total":5,"flow_path":["packages/core/src/repowise/core/persistence/crud/repository.py -> packages/core/src/repowise/core/workspace/repo_index.py","packages/server/src/repowise/server/schemas/repository.py -> packages/core/src/repowise/core/ingestion/languages/specs/json.py -> packages/core/src/repowise/core/persistence/crud/repository.py"],"next_action_hint":"Use the answer and citations directly.","note":"High confidence: the top retrieval result clearly dominates, by 0.83 points over the runner-up (top score 5.27). Both scores are strong, so the gap is the measure here and not the ratio. Cite this answer; do not re-read the source unless a specific detail is missing.","quotes":[{"lines":[79,81],"path":"packages/core/src/repowise/core/workspace/repo_index.py","quote":"class RepoIndex:\n \"\"\"Read-only accessor over one repo's ``wiki.db``.\n"}],"quotes_emitted":1,"quotes_reduced_reason":"confidence_projection_and_deduplication","quotes_total":5,"retrieval_quality":"high"},"get_architecture:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":295,"tier":"default"},"runtime_breakage_proven":false},"error":"get_architecture is only available in workspace mode."},"get_blast_radius:one-target":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":295,"tier":"default"},"runtime_breakage_proven":false},"error":"get_blast_radius is only available in workspace mode."},"get_change_risk:head":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#fede8a95b801"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":275},"response_budget":{"limit_chars":24000,"serialized_chars":6116,"tier":"default"},"source":"live_git","state":{"truncated":true},"timing_ms":1412.0},"branch_overlap":{"base":"origin/main","branches":[{"ahead":2,"behind":2,"branch":"perf/mcp-startup-floor","files":[{"basis":"same file","file":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py"},{"basis":"same file","file":"packages/core/src/repowise/core/workspace/__init__.py"},{"basis":"same file","file":"packages/cli/src/repowise/cli/commands/mcp_cmd.py"},{"basis":"same file","file":"tests/unit/workspace/test_lazy_workspace_exports.py"}],"last_commit":"2026-09-09"},{"ahead":12,"behind":2,"branch":"origin/feat/index-freshness-hook","files":[{"basis":"same file","file":"packages/cli/src/repowise/cli/commands/mcp_cmd.py"},{"basis":"co-change pair, 3 of 6 commits","file":"packages/server/src/repowise/server/mcp_server/_meta.py","partner":"packages/core/src/repowise/core/workspace/__init__.py"}],"last_commit":"2026-09-09"}],"current":"fix/mcp-budget-accounting","scanned":50,"summary":"2 of 50 open branches (1068 exist) edit files this change also edits.","total":1068,"truncated":true},"change_shape":{"classification":"Typical","diagnostics_via":"get_change_risk(include=['diagnostics'])","fallback_band":null,"independent_changes":{"basis":"no import, call, type reference or co-change pair in the index links one group to another","count":3,"groups":[{"bridging_files":[],"files":["packages/cli/src/repowise/cli/commands/mcp_cmd.py"]},{"bridging_files":[],"files":["packages/cli/src/repowise/cli/editor_integrations/claude_config.py"]},{"bridging_files":[],"files":["packages/core/src/repowise/core/workspace/__init__.py"]}],"summary":"This diff is 3 independent changes: 1 file, 1 file and 1 file. 1 changed file is left out of the grouping: docs, config, tests, files not in the index, or files it has never linked.","ungrouped_files":["tests/unit/workspace/test_lazy_workspace_exports.py"]},"is_fix":false,"measures":"diff size and spread, not danger","review_priority":"moderate","risk_percentile":40.9,"score":8.2},"classification":"Typical","directive":{"headline":"No supported new findings surfaced in the analyzed scope.","next_actions":["Run: tests/unit/workspace/test_lazy_workspace_exports.py tests/unit/cli/test_agent_target_baseline.py tests/unit/cli/test_agent_targets.py"],"reasons":[],"status":"clear_in_analyzed_scope"},"exclude_patterns":[],"fallback_band":null,"fix_history":{"available":true,"density":0.768,"files":[{"churn":9,"fix_pressure":4.35,"path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py"},{"churn":5,"fix_pressure":1.94,"path":"packages/cli/src/repowise/cli/commands/mcp_cmd.py"},{"churn":226,"fix_pressure":0.88,"path":"packages/core/src/repowise/core/workspace/__init__.py"}],"percentile":21.2},"health_delta":{"analyzer":{"analyzer_version":10,"performance_model_version":2,"rules_fingerprint":"3e9c9fe763b725f9bb1d493656de4afd4ee75e189f42c98e96b0e4233630fe47"},"base":{"kind":"commit","ref":"HEAD^","sha":"7791e6401fa9da72b285bd224a6cf3257121e3da"},"basis":"both_sides_analyzed","by_dimension":{},"by_severity":{},"explanation":"No supported new findings surfaced in the analyzed scope.","findings_emitted":0,"findings_total":0,"head":{"kind":"commit","ref":"HEAD","sha":"920d1c973d647a5df41165225dae38b514b03ae1"},"introduced":0,"limits":["Both sides are analysed over the changed files only, so cross-file detectors (duplication, cross-function performance) see no wider context."],"resolved":1,"scope":{"analyzed":4,"changed":4,"eligible":4,"failed":0,"skipped":0},"status":"available","top_findings":[],"worsened":0},"impacted_tests":{"basis":"inferred","line_coverage":{"covered":[],"no_coverage_data":[],"stale_test_candidates":[],"untested_changes":[]},"map_present":false,"status":"inferred","summary":"29 test file(s) reach the changed files in the graph; showing first 10. Inferred from the dependency graph, not measured. For the line-precise answer build the map with `coverage run --contexts=test` then `repowise coverage add`.","tests_to_run":["tests/unit/workspace/test_lazy_workspace_exports.py","tests/unit/cli/test_agent_target_baseline.py","tests/unit/cli/test_agent_targets.py","tests/unit/cli/test_commands.py","tests/unit/cli/test_doctor_embed_recipe.py","tests/unit/cli/test_doctor_fts_drift.py","tests/unit/cli/test_doctor_honours_exclusions.py","tests/unit/cli/test_doctor_information_floor.py","tests/unit/cli/test_doctor_mcp_smoke.py","tests/unit/cli/test_doctor_page_cap.py"],"total":29,"truncated":true},"is_fix":false,"omission_marker":"[repowise#fede8a95b801: 25 lines omitted (~275 tokens); restore: repowise expand fede8a95b801]","prior_fixes":{"changed_lines_in_fixed_files":98,"concentration":"packages/core/src/repowise/core/workspace/__init__.py carries 50% of the changed lines and 1 past bug fix(es).","files":[{"changed_lines":4,"file_path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py","fix_count":5,"last_fix_days_ago":32,"overlapping_lines":0,"share_of_change":0.022},{"changed_lines":4,"file_path":"packages/cli/src/repowise/cli/commands/mcp_cmd.py","fix_count":2,"last_fix_days_ago":3,"overlapping_lines":0,"share_of_change":0.022},{"changed_lines":90,"file_path":"packages/core/src/repowise/core/workspace/__init__.py","fix_count":1,"last_fix_days_ago":68,"overlapping_lines":0,"share_of_change":0.5}],"files_with_fixes":3,"line_overlap":"approximate","summary":"8 past bug-fix commit(s) touched 3 of the changed file(s). Line overlap is approximate (past ranges are numbered on their own parent commit); the per-file counts are not.","total_fixes":8,"truncated":false},"ref":"HEAD","review_priority":"moderate","risk_percentile":40.9,"score":8.2,"working_tree":false},"get_conformance:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":294,"tier":"default"},"runtime_breakage_proven":false},"error":"get_conformance is only available in workspace mode."},"get_context:many-targets":{"_meta":{"completeness":{"capped":true},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#6c9c3e123777"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":4507},"replaced_tokens":48638,"response_budget":{"limit_chars":32000,"serialized_chars":14278,"tier":"expanded"},"scope_hint":"Unrelated to what was served: Contributor 11 (1,478 files), Contributor 2 (641), Contributor 6 (261).","state":{"truncated":true},"timing_ms":62.24,"tokens_saved":45004},"dropped_symbols":{},"dropped_targets":[],"targets":{"packages/cli/src/repowise/cli/commands/update_cmd/command.py":{"_call_graph_note":"File-level rollup: importing files plus inbound cross-file call counts. For symbol-precise callers pass 'file.py::Symbol'.","architectural_layer":{"description":"Contains the command-line application runtime, command definitions, platform clients, agent targets, helpers, and telemetry handling.","name":"Contributor 15","role":"edge_connector"},"callers":[{"file":"tests/integration/test_cli.py","imports":true,"inbound_calls":2},{"file":"tests/unit/cli/test_update_reindex_notice.py","imports":true,"inbound_calls":2},{"file":"tests/unit/cli/test_update_renderer_gate.py","imports":true,"inbound_calls":2},{"file":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/update_cmd/workspace.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/watch_cmd.py","imports":true,"inbound_calls":1},{"file":"tests/unit/cli/test_update_full_dry_run.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/update_cmd/__init__.py","imports":true},{"file":"tests/unit/cli/test_docs_pointer.py","imports":true},{"file":"tests/unit/cli/test_editor_setup.py","imports":true},{"file":"tests/unit/cli/test_update_up_to_date_lock.py","imports":true},{"file":"tests/unit/cli/test_workspace_docs_pointer.py","imports":true}],"docs":{"summary":"`repowise update` \u2014 incremental wiki regeneration for changed files.","title":"File: packages/cli/src/repowise/cli/commands/update_cmd/command.py"},"episodes":26,"fix_history":{"bug_magnet":true,"fix_count":27,"last_fix_days_ago":1},"freshness":{"confidence_score":1.0,"freshness_status":"stale","is_stale":true},"hotspot":true,"parent_page":{"section":"14.2.2","target_path":"packages/cli/src/repowise/cli/commands/health_cmd","title":"Code Health Commands"},"path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","skeleton":{"bodies_kept":["run_update","_current_renderer_fingerprint","_renderer_inputs","_surface_reindex_recommendation","_docs_provider_prompt_allowed"],"full_tokens":23489,"mode":"smart","pct_of_full":8.9,"text":"\"\"\"``repowise update`` \u2014 incremental wiki regeneration for changed files.\n\nThis module holds the Click command + single-repo orchestration. The standalone\nhelpers it relies on live in sibling modules: mode resolution (:mod:`.mode`),\ncore delegators (:mod:`.incremental`), persistence + re-score\n(:mod:`.persistence`), the workspace flow (:mod:`.workspace`), and report\nrendering (:mod:`.reporting`).\n\"\"\"\nfrom __future__ import annotations\nimport sys\nimport time\nfrom enum import StrEnum\nfrom pathlib import Path\nfrom typing import Any\nimport click\nimport structlog\nfrom repowise.cli._setup import configure_cli_logging\nfrom repowise.cli.helpers import (\n ... 19 lines (23-41)\nfrom repowise.core.docs_mode import docs_mode_state_fields, resolve_docs_mode\nfrom repowise.core.pipeline import PhaseTimings, timed\nfrom repowise.core.reasoning import REASONING_MODES\nfrom .incremental import (\n ... 8 lines (47-54)\nfrom .mode import _resolve_index_only_mode\nfrom .persistence import (\n ... 6 lines (57-62)\nfrom .reporting import (\n ... 7 lines (64-70)\nfrom .workspace import _workspace_update\nlog = structlog.get_logger(__name__)\n... 6 lines (74-79)\n_EFFICACY_LOOKBACK_SECONDS = 7 * 86400.0\n\n\ndef _docs_provider_prompt_allowed(emitter: Any) -> bool:\n \"\"\"Whether a docs run may block on an interactive provider prompt.\n\n Requires a real terminal on *both* ends: a terminal stdout (so the table\n renders) and a tty stdin (so the answer can actually be read). The stdin\n check is what keeps a background post-commit hook or CI run from hanging\n even when it inherits a ``FORCE_COLOR`` that makes ``console.is_terminal``\n report True. ``--progress json`` (emitter set) is always non-interactive.\n \"\"\"\n return console.is_terminal and sys.stdin.isatty() and emitter is None\n\n\ndef _record_update_outcome(\n *,\n index_only: bool,\n changed_count: int,\n provider: Any = None,\n generated_pages: list | None = None,\n docs_mode: str | None = None,\n) -> None:\n \"\"\"Attach an anonymous update-shape outcome to the ``command_run`` event.\n... 30 lines (104-133)\n\n\ndef _refresh_editor_stamp(\n repo_path: Any, agents_md: bool | None, degraded: list[str] | None = None\n) -> None:\n \"\"\"Re-stamp managed editor files (CLAUDE.md / AGENTS.md), best-effort.\n... 21 lines (140-160)\n\n\ndef _surface_release_news(*, written_by: str | None) -> None:\n \"\"\"Show a post-upgrade \"what's new\" panel and a cached PyPI advisory.\n... 23 lines (165-187)\n\n\ndef _surface_reindex_recommendation(repo_path, verdict, *, emitter: Any, dry_run: bool) -> None:\n \"\"\"Show the once-per-store reindex recommendation for *verdict*, if any.\n\n Read-only except for the shown-notice ledger, so it is safe to call on the\n no-op (\"already up to date\") path as well as the main assessment path. It\n never runs the verdict's auto actions \u2014 those stay behind the single-flight\n lock in the main path. Interactive-terminal only, so a background post-commit\n update never burns the one-shot into a log the user never reads; `doctor`\n reports the recommendation on demand regardless.\n \"\"\"\n from repowise.cli.upgrade import (\n record_reindex_notice_shown,\n reindex_notice_already_shown,\n )\n\n if not (verdict.reindex_recommended and verdict.reindex_command):\n return\n ... 139 lines (207-345)\ndef update_command(\n ... 49 lines (347-395)\n\n\nclass UpdateOutcome(StrEnum):\n \"\"\"What a single-repo :func:`run_update` actually did.\n... 11 lines (400-410)\n\n\ndef _render_full_upgrade_dry_run(\n repo_path: Path,\n *,\n provider_name: str | None,\n model: str | None,\n) -> None:\n \"\"\"Describe a full upgrade without resolving providers or touching the store.\"\"\"\n ... 20 lines (420-439)\n\n\ndef _renderer_inputs(repo_path):\n \"\"\"The (language, style fingerprint, style template dir) a file page uses.\n\n Read from the persisted config so the fingerprint computed at the \"up to\n date\" gate matches the one the pages actually store. A wrong triple here\n would make every page look stale on every run (or none ever), so all three\n come from the same place generation reads them. The template dir is a\n custom style's own ``templates/`` (``None`` for a built-in style), tried\n ahead of the shipped template exactly as the generator's Jinja loader does.\n \"\"\"\n from repowise.cli.helpers import load_config\n from repowise.core.generation.styles import resolve_style\n\n cfg = load_config(repo_path)\n style = resolve_style(cfg.get(\"wiki_style\", \"comprehensive\"), repo_path=repo_path)\n return cfg.get(\"language\", \"en\"), style.fingerprint, style.template_dir\n\n\ndef _head_commit_ts(repo_path) -> float | None:\n \"\"\"Committer timestamp of the repo's HEAD, or None when git is unavailable.\n... 9 lines (462-470)\n\n\ndef _current_renderer_fingerprint(repo_path) -> str:\n \"\"\"This release's fingerprint for the structural renderers, or '' on failure.\n\n Covers every template with no model path behind it, because this value is\n what decides whether a repository with no new commits is \"already up to\n date\". Fingerprinting only the file page meant a release that improved the\n spotlight template alone returned before doing anything, and the change\n never reached an existing wiki.\n\n Cheap: reads the templates and a few constants, no parse. An empty result\n disables the renderer-staleness gate for this run rather than risking a\n spurious full re-render, which is the safe direction.\n \"\"\"\n try:\n from repowise.core.generation.page_generator.structural import (\n FILE_PAGE_TEMPLATE,\n SYMBOL_SPOTLIGHT_TEMPLATE,\n structural_fingerprint,\n )\n\n language, style_fp, template_dir = _renderer_inputs(repo_path)\n return \":\".join(\n structural_fingerprint(\n template,\n language=language,\n style_fingerprint=style_fp,\n template_dir=template_dir,\n ... 6 lines (500-505)\n\n\ndef _stale_renderer_paths(repo_path, parsed_files) -> list[str]:\n \"\"\"File paths whose stored pages predate the current structural renderers.\n... 37 lines (510-546)\n\n\ndef run_update(\n path: str | None,\n provider_name: str | None,\n model: str | None,\n since: str | None,\n reasoning: str | None,\n cascade_budget: int | None,\n dry_run: bool,\n workspace: bool,\n no_workspace: bool,\n repo_alias: str | None,\n index_only: bool = False,\n docs_flag: bool | None = None,\n full: bool = False,\n yes: bool = False,\n agents_md: bool | None = None,\n concurrency: int = 10,\n no_cost_tracking: bool = False,\n verbose: bool = False,\n progress: str = \"rich\",\n skip_cross_repo_hooks: bool = False,\n include_working_tree: bool = False,\n) -> UpdateOutcome:\n \"\"\"Incrementally update wiki pages for files changed since last sync.\n\n If `since` is None, the base commit is read from state.json's last_sync_commit.\n\n ``skip_cross_repo_hooks`` is set only by the workspace docs flow, which\n calls this per repo and then runs the cross-repo hooks once over every\n updated repo instead of once per repo.\n\n ``include_working_tree`` folds uncommitted work (staged, unstaged and\n untracked) into the change set on top of the commit range. Off by default,\n because every other caller is anchored to a commit \u2014 the post-commit hook,\n a webhook, a manual sync \u2014 and indexing a half-finished edit under those is\n not what the user asked for. ``repowise watch`` sets it: watching for file\n saves and then only ever diffing commit-to-commit is what made the watcher\n a no-op until you committed.\n \"\"\"\n start = time.monotonic()\n # Per-stage wall clock for this run, written to ``state.json`` as\n # ``phase_timings`` by the paths that rebuild the index. ``run`` is the\n # denominator; stages nest and overlap, so compare each against it and\n # never against their sum. The fast paths (already up to date, no changed\n # files, config-only re-score) do not record: they do no stage work and\n # would overwrite the last real run's numbers with nothing.\n timings = PhaseTimings()\n timings.start(\"run\")\n\n # --- Machine-readable progress (--progress json) --------------------\n # Silence structlog/stdlib logging and redirect the shared Rich console\n ... 1530 lines (600-2129)\n","tokens":2095,"verified":true},"target":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","type":"file"},"packages/core/src/repowise/core/ingestion/call_resolver.py":{"_call_graph_note":"File-level rollup: importing files plus inbound cross-file call counts. For symbol-precise callers pass 'file.py::Symbol'.","architectural_layer":{"description":"Implements repository ingestion, language parsing, code analysis, health evaluation, domain modeling, and supporting application utilities across the codebase.","name":"Contributor 4","role":"edge_connector"},"callers":[{"file":"tests/unit/ingestion/test_return_type_chain_resolution.py","imports":true,"inbound_calls":20},{"file":"tests/unit/ingestion/test_bare_name_index_kinds.py","imports":true,"inbound_calls":4},{"file":"tests/unit/ingestion/test_call_resolver_strategies.py","imports":true,"inbound_calls":3},{"file":"packages/core/src/repowise/core/ingestion/graph/_resolvers.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_elixir_bare_name_scope.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_enclosing_class_calls.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_jvm_calls.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_overload_set_uniqueness.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_php_luau_receivers.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_resolver_merged_index.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_self_call_resolution.py","imports":true,"inbound_calls":2}],"docs":{"summary":"Three-tier call resolution engine for the symbol-level dependency graph.","title":"File: packages/core/src/repowise/core/ingestion/call_resolver.py"},"episodes":21,"fix_history":{"bug_magnet":true,"fix_count":22,"last_fix_days_ago":10},"freshness":{"confidence_score":1.0,"freshness_status":"stale","is_stale":true},"hotspot":true,"parent_page":{"section":"17.4","target_path":"packages/core/src/repowise/core/ingestion","title":"Ingestion Overview"},"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","skeleton":{"bodies_kept":[],"full_tokens":25149,"mode":"smart","omitted":true,"pct_of_full":17.9,"text":"[repowise#6c9c3e123777: 508 lines omitted (~4507 tokens); restore: repowise expand 6c9c3e123777]","tokens":4507,"verified":true},"target":"packages/core/src/repowise/core/ingestion/call_resolver.py","type":"file"}},"truncated":true},"get_context:one-file":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","response_budget":{"limit_chars":24000,"serialized_chars":11328,"tier":"default"},"scope_hint":"Unrelated to what was served: Contributor 11 (1,478 files), Contributor 2 (641), Contributor 6 (261).","timing_ms":22.87},"targets":{"packages/core/src/repowise/core/ingestion/call_resolver.py":{"architectural_layer":{"description":"Implements repository ingestion, language parsing, code analysis, health evaluation, domain modeling, and supporting application utilities across the codebase.","name":"Contributor 4","role":"edge_connector"},"docs":{"summary":"Three-tier call resolution engine for the symbol-level dependency graph.","symbols":[{"kind":"variable","line":64,"name":"log","signature":"log = structlog.get_logger(__name__)","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::log"},{"kind":"constant","line":69,"name":"_IMPLICIT_RECEIVER_LANGUAGES","signature":"_IMPLICIT_RECEIVER_LANGUAGES = frozenset({\"java\", \"csharp\", \"cpp\", \"kotlin\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_IMPLICIT_RECEIVER_LANGUAGES"},{"kind":"constant","line":87,"name":"_INHERITED_LANGUAGES","signature":"_INHERITED_LANGUAGES = frozenset({\"kotlin\", \"python\", \"typescript\", \"swift\", \"csharp\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_INHERITED_LANGUAGES"},{"kind":"constant","line":103,"name":"_MAX_ANCESTOR_EXPAND_DEPTH","signature":"_MAX_ANCESTOR_EXPAND_DEPTH = 3","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_MAX_ANCESTOR_EXPAND_DEPTH"},{"kind":"class","line":107,"name":"_LanguageCallStrategies","signature":"class _LanguageCallStrategies","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_LanguageCallStrategies"},{"kind":"constant","line":122,"name":"_NO_LANGUAGE_STRATEGIES","signature":"_NO_LANGUAGE_STRATEGIES = _LanguageCallStrategies()","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_NO_LANGUAGE_STRATEGIES"},{"kind":"constant","line":124,"name":"_TYPED_RECEIVER","signature":"_TYPED_RECEIVER = (\"_resolve_typed_receiver\",)","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_TYPED_RECEIVER"},{"kind":"constant","line":129,"name":"_TYPE_KINDS","signature":"_TYPE_KINDS = frozenset({\"class\", \"struct\", \"interface\", \"enum\", \"trait\", \"impl\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_TYPE_KINDS"},{"kind":"constant","line":130,"name":"_FUNCTION_KINDS","signature":"_FUNCTION_KINDS = frozenset({\"function\", \"method\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_FUNCTION_KINDS"},{"kind":"constant","line":148,"name":"_NON_CALLABLE_KINDS","signature":"_NON_CALLABLE_KINDS = frozenset({\"property\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_NON_CALLABLE_KINDS"},{"kind":"constant","line":163,"name":"_JVM_STRATEGIES","signature":"_JVM_STRATEGIES = _LanguageCallStrategies(","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_JVM_STRATEGIES"},{"kind":"constant","line":173,"name":"_CPP_STRATEGIES","signature":"_CPP_STRATEGIES = _LanguageCallStrategies(","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_CPP_STRATEGIES"},{"kind":"constant","line":180,"name":"_LANGUAGE_CALL_STRATEGIES","signature":"_LANGUAGE_CALL_STRATEGIES: dict[str, _LanguageCallStrategies] = {","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_LANGUAGE_CALL_STRATEGIES"},{"kind":"constant","line":212,"name":"_SOURCE_CACHE_FILES","signature":"_SOURCE_CACHE_FILES = 4","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_SOURCE_CACHE_FILES"},{"kind":"constant","line":213,"name":"_BODY_TYPE_CACHE_ENTRIES","signature":"_BODY_TYPE_CACHE_ENTRIES = 2048","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_BODY_TYPE_CACHE_ENTRIES"},{"kind":"constant","line":217,"name":"PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES","signature":"PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES: frozenset[str] = frozenset({\"cpp\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES"},{"kind":"class","line":221,"name":"ResolvedCall","signature":"class ResolvedCall","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::ResolvedCall"},{"kind":"class","line":247,"name":"CallResolver","signature":"class CallResolver","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver"},{"kind":"method","line":260,"name":"__init__","signature":"def __init__( self, parsed_files: dict[str, ParsedFile], import_targets: dict[str, set[str]], *, repo_path: str | None = None, import_maps: Any | None = None, heritage_parents: dict[str, set[str]] | None = None, return_type_chain_languages: frozenset[str] | None = None, ) -> None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::__init__"},{"kind":"method","line":409,"name":"_follow_barrel_exports","signature":"def _follow_barrel_exports(self) -> None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_follow_barrel_exports"},{"kind":"method","line":511,"name":"_get_rust_crate_src","signature":"def _get_rust_crate_src(self) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_rust_crate_src"},{"kind":"method","line":533,"name":"_get_go_index","signature":"def _get_go_index(self) -> Any","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_go_index"},{"kind":"method","line":562,"name":"_strategies_for","signature":"def _strategies_for(self, file_path: str) -> _LanguageCallStrategies","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_strategies_for"},{"kind":"method","line":568,"name":"_get_cpp_index","signature":"def _get_cpp_index(self) -> Any","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_cpp_index"},{"kind":"method","line":640,"name":"_resolve_cpp_same_target","signature":"def _resolve_cpp_same_target( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_cpp_same_target"},{"kind":"method","line":663,"name":"_get_jvm_index","signature":"def _get_jvm_index(self) -> Any","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_jvm_index"},{"kind":"method","line":684,"name":"_resolve_jvm_same_package","signature":"def _resolve_jvm_same_package( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_jvm_same_package"},{"kind":"method","line":744,"name":"_resolve_jvm_receiver_same_package","signature":"def _resolve_jvm_receiver_same_package( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_jvm_receiver_same_package"},{"kind":"method","line":767,"name":"_resolve_go_package_call","signature":"def _resolve_go_package_call( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_go_package_call"},{"kind":"method","line":796,"name":"_resolve_go_same_package","signature":"def _resolve_go_same_package( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_go_same_package"},{"kind":"method","line":824,"name":"_build_indices","signature":"def _build_indices(self, parsed_files: dict[str, ParsedFile]) -> None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_build_indices"},{"kind":"method","line":879,"name":"_link_declarations","signature":"def _link_declarations( self, declarations: list[tuple[str, str, tuple[str | None, str]]], definitions: dict[tuple[str | None, str], list[tuple[str, str]]], ) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_link_declarations"},{"kind":"method","line":930,"name":"declaration_definitions","signature":"def declaration_definitions(self) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::declaration_definitions"},{"kind":"method","line":939,"name":"_redirect_to_definition","signature":"def _redirect_to_definition(self, resolved: ResolvedCall) -> ResolvedCall","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_redirect_to_definition"},{"kind":"method","line":961,"name":"_published","signature":"def _published(self, file_path: str, name: str) -> str | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_published"},{"kind":"method","line":978,"name":"_merged_symbols_for","signature":"def _merged_symbols_for(self, file_path: str) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_merged_symbols_for"},{"kind":"method","line":1017,"name":"_merged_methods_for","signature":"def _merged_methods_for(self, file_path: str) -> dict[tuple[str, str], str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_merged_methods_for"},{"kind":"method","line":1030,"name":"resolve_file","signature":"def resolve_file(self, file_path: str, calls: list[CallSite]) -> list[ResolvedCall]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::resolve_file"},{"kind":"method","line":1052,"name":"_resolve_one","signature":"def _resolve_one(self, file_path: str, call: CallSite) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_one"},{"kind":"method","line":1083,"name":"_resolve_return_typed_chain","signature":"def _resolve_return_typed_chain( self, file_path: str, call: CallSite, caller_id: str, language: str, ) -> tuple[bool, ResolvedCall | None]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_return_typed_chain"}],"symbols_truncated":{"hint":"Call with compact=False or include=['full_doc'] for the full list.","shown":40,"total":89},"title":"File: packages/core/src/repowise/core/ingestion/call_resolver.py"},"episodes":21,"fix_history":{"bug_magnet":true,"fix_count":22,"last_fix_days_ago":10},"freshness":{"confidence_score":1.0,"freshness_status":"stale","is_stale":true},"hotspot":true,"parent_page":{"section":"17.4","target_path":"packages/core/src/repowise/core/ingestion","title":"Ingestion Overview"},"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","target":"packages/core/src/repowise/core/ingestion/call_resolver.py","type":"file"}}},"get_dead_code:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#b20f4f25756c"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":4031},"response_budget":{"limit_chars":24000,"serialized_chars":13223,"tier":"default"},"state":{"truncated":true}},"impact":{"recommendation":"Start with the 'high' tier \u2014 these have no references in the graph and are the strongest cleanup candidates. Confirm each (runtime-loaded config/bootstrap/database files are flagged but never auto-marked safe), then review 'medium' tier with your team.","safe_lines_reclaimable":0,"total_lines_reclaimable":2013},"omission_marker":"[repowise#b20f4f25756c: 35 lines omitted (~4031 tokens); restore: repowise expand b20f4f25756c]","summary":{"by_kind":{"unreachable_file":25,"unused_export":27,"unused_internal":508},"call_resolution_basis":[{"guessed_share":0.0,"language":"javascript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":2,"unresolved_call_sites":null},{"guessed_share":0.03,"language":"python","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":49295,"unresolved_call_sites":null},{"guessed_share":0.04,"language":"typescript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":5364,"unresolved_call_sites":null}],"deletable_lines":0,"filtered_findings":52,"safe_to_delete_count":1,"scope":"total_findings, by_kind, deletable_lines and safe_to_delete_count cover every open finding; filtered_findings and tiers cover what the filters kept (min_confidence defaults to 0.4)","total_findings":560},"tiers":{"high":{"count":1,"description":"High confidence (>=0.8): No references found in the codebase. Strong cleanup candidates \u2014 review (especially runtime-loaded files) before deleting.","findings":[{"age_days":100,"commit_count_90d":0,"confidence":0.8,"end_line":null,"file_path":"packages/core/src/repowise/core/analysis/decision_gate.py","id":"finding_a6c9a04ac7c39bae9231","kind":"unreachable_file","last_commit_at":"2026-05-27T10:27:47","last_meaningful_change":"2026-05-27T10:27:47+00:00","lines":0,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":true,"start_line":null,"symbol_kind":null,"symbol_name":null}],"lines":0,"safe_count":1,"truncated":false},"low":{"count":51,"description":"Low confidence (<0.5): Potentially used via dynamic imports or reflection. Investigate first.","findings":[{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_readme_hero.py","id":"finding_0f040cd55166f823bccf","kind":"unreachable_file","last_commit_at":"2026-08-12T15:52:24","last_meaningful_change":"2026-08-12T15:52:24+00:00","lines":350,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_plugin_content.py","id":"finding_29369eff6365a1b0293f","kind":"unreachable_file","last_commit_at":"2026-08-12T14:19:38","last_meaningful_change":"2026-08-12T14:19:38+00:00","lines":190,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":5,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_agent_matrix.py","id":"finding_4e063ba4bc6f9980ff00","kind":"unreachable_file","last_commit_at":"2026-08-24T11:59:28","last_meaningful_change":"2026-08-24T11:59:28+00:00","lines":180,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":18,"commit_count_90d":4,"confidence":0.4,"end_line":352,"file_path":"packages/server/src/repowise/server/mcp_server/_graph_utils.py","id":"finding_7866e0a83040cdca646e","kind":"unused_export","last_commit_at":"2026-09-04T06:25:06","last_meaningful_change":"2026-09-04T06:25:06+00:00","lines":138,"primary_owner":"Contributor 19","reason":"Public symbol 'build_visual_context' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":214,"symbol_kind":"function","symbol_name":"build_visual_context"},{"age_days":4,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/generate_http_types.py","id":"finding_c1cedf34ddebe7d261cb","kind":"unreachable_file","last_commit_at":"2026-08-31T03:51:20","last_meaningful_change":"2026-08-31T03:51:20+00:00","lines":130,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":87,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/ui/scripts/contrast-check.py","id":"finding_1b9b8063b93def0ff331","kind":"unreachable_file","last_commit_at":"2026-06-08T15:01:45","last_meaningful_change":"2026-06-08T15:01:45+00:00","lines":120,"primary_owner":"Contributor 22","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":21,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/uninstall_cmd.py","id":"finding_4d056697ef3263430455","kind":"unreachable_file","last_commit_at":"2026-08-13T06:48:25","last_meaningful_change":"2026-08-13T06:48:25+00:00","lines":100,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":13,"commit_count_90d":4,"confidence":0.4,"end_line":117,"file_path":"packages/server/src/repowise/server/mcp_server/tool_refactoring.py","id":"finding_4368b4710bdc7ab05fcc","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":86,"primary_owner":"Contributor 19","reason":"Public symbol 'generate_refactoring_code' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":31,"symbol_kind":"function","symbol_name":"generate_refactoring_code"},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_3393e63b818004f15f8d","kind":"unreachable_file","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":3,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/measure_mcp_response_sizes.py","id":"finding_16a533bd7dba51d593b6","kind":"unreachable_file","last_commit_at":"2026-08-31T09:13:01","last_meaningful_change":"2026-08-31T09:13:01+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":10,"commit_count_90d":2,"confidence":0.4,"end_line":100,"file_path":"packages/server/src/repowise/server/mcp_server/tool_architecture.py","id":"finding_63e9ee35b2c0edb37176","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":68,"primary_owner":"Contributor 19","reason":"Public symbol 'get_architecture' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":32,"symbol_kind":"function","symbol_name":"get_architecture"},{"age_days":73,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/telemetry_cmd.py","id":"finding_f6e27d31e8b93df85fd9","kind":"unreachable_file","last_commit_at":"2026-06-22T11:35:27","last_meaningful_change":"2026-06-22T11:35:27+00:00","lines":50,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":24,"commit_count_90d":2,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/ui/result_panels.py","id":"finding_2f1914812c29533dd062","kind":"unreachable_file","last_commit_at":"2026-08-14T17:16:16","last_meaningful_change":"2026-08-14T17:16:16+00:00","lines":50,"primary_owner":"Contributor 22","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":63,"commit_count_90d":5,"confidence":0.4,"end_line":null,"file_path":"packages/vscode/src/extension.ts","id":"finding_e900c8cb8978cb1bd8ee","kind":"unreachable_file","last_commit_at":"2026-07-04T17:35:07","last_meaningful_change":"2026-07-04T17:35:07+00:00","lines":40,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":102,"commit_count_90d":0,"confidence":0.4,"end_line":null,"file_path":"scripts/benchmark_upgrade.py","id":"finding_2a035f9742fa48fd2731","kind":"unreachable_file","last_commit_at":"2026-05-24T06:00:26","last_meaningful_change":"2026-05-24T06:00:26+00:00","lines":40,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":10,"commit_count_90d":3,"confidence":0.4,"end_line":103,"file_path":"packages/server/src/repowise/server/mcp_server/tool_repos.py","id":"finding_9849407bdffedca12fbb","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":35,"primary_owner":"joptimus","reason":"Public symbol 'list_repos' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":68,"symbol_kind":"function","symbol_name":"list_repos"},{"age_days":10,"commit_count_90d":3,"confidence":0.4,"end_line":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_repos.py","id":"finding_237d674ac8ed2dae134d","kind":"unreachable_file","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":30,"primary_owner":"joptimus","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":57,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_fda1711f7fc7dbcba35e","kind":"unused_export","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":22,"primary_owner":"Contributor 19","reason":"Public symbol 'useC4DocsPathSet' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":35,"symbol_kind":"function","symbol_name":"useC4DocsPathSet"},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":87,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_f0e29b2242ddf3a75783","kind":"unused_export","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":22,"primary_owner":"Contributor 19","reason":"Public symbol 'useC4SelectionContext' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":65,"symbol_kind":"function","symbol_name":"useC4SelectionContext"},{"age_days":10,"commit_count_90d":2,"confidence":0.4,"end_line":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_architecture.py","id":"finding_de52d15beb2b3cbcbf97","kind":"unreachable_file","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":20,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null}],"lines":2013,"safe_count":0,"truncated":true},"medium":{"count":0,"description":"Medium confidence (0.5-0.8): Likely unused but may have indirect references. Review before deleting.","findings":[],"lines":0,"safe_count":0,"truncated":false}}},"get_dead_code:limit-200":{"_meta":{"completeness":{"capped":true,"reason":"response_budget","shown":36,"total":50},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#1ee5d92d3242","repowise#31ab8534db9e"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":69631},"reductions":[],"response_budget":{"limit_chars":24000,"serialized_chars":22533,"tier":"default"},"state":{"truncated":true}},"limit_note":"Requested limit=200 exceeded the MCP transport budget and was clamped to 25. Use tier/directory/owner filters or paginate to see more findings.","omission_marker":"[repowise#31ab8534db9e: 299 lines omitted (~2233 tokens); restore: repowise expand 31ab8534db9e]","summary":{"by_kind":{"unreachable_file":25,"unused_export":27,"unused_internal":508},"call_resolution_basis":[{"guessed_share":0.0,"language":"javascript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":2,"unresolved_call_sites":null},{"guessed_share":0.03,"language":"python","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":49295,"unresolved_call_sites":null},{"guessed_share":0.04,"language":"typescript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":5364,"unresolved_call_sites":null}],"deletable_lines":0,"filtered_findings":560,"filters":{"excluded_kinds":[],"min_confidence":0.0},"safe_to_delete_count":1,"scope":"total_findings, by_kind, deletable_lines and safe_to_delete_count cover every open finding; filtered_findings and tiers cover what the filters kept (min_confidence defaults to 0.4)","total_findings":560},"tiers":{"high":{"count":1,"description":"High confidence (>=0.8): No references found in the codebase. Strong cleanup candidates \u2014 review (especially runtime-loaded files) before deleting.","findings":[{"age_days":100,"commit_count_90d":0,"confidence":0.8,"end_line":null,"file_path":"packages/core/src/repowise/core/analysis/decision_gate.py","id":"finding_a6c9a04ac7c39bae9231","kind":"unreachable_file","last_commit_at":"2026-05-27T10:27:47","last_meaningful_change":"2026-05-27T10:27:47+00:00","lines":0,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":true,"start_line":null,"symbol_kind":null,"symbol_name":null}],"lines":0,"safe_count":1,"truncated":false},"low":{"count":51,"description":"Low confidence (<0.5): Potentially used via dynamic imports or reflection. Investigate first.","findings":[{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_readme_hero.py","id":"finding_0f040cd55166f823bccf","kind":"unreachable_file","last_commit_at":"2026-08-12T15:52:24","last_meaningful_change":"2026-08-12T15:52:24+00:00","lines":350,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_plugin_content.py","id":"finding_29369eff6365a1b0293f","kind":"unreachable_file","last_commit_at":"2026-08-12T14:19:38","last_meaningful_change":"2026-08-12T14:19:38+00:00","lines":190,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":5,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_agent_matrix.py","id":"finding_4e063ba4bc6f9980ff00","kind":"unreachable_file","last_commit_at":"2026-08-24T11:59:28","last_meaningful_change":"2026-08-24T11:59:28+00:00","lines":180,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":18,"commit_count_90d":4,"confidence":0.4,"end_line":352,"file_path":"packages/server/src/repowise/server/mcp_server/_graph_utils.py","id":"finding_7866e0a83040cdca646e","kind":"unused_export","last_commit_at":"2026-09-04T06:25:06","last_meaningful_change":"2026-09-04T06:25:06+00:00","lines":138,"primary_owner":"Contributor 19","reason":"Public symbol 'build_visual_context' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":214,"symbol_kind":"function","symbol_name":"build_visual_context"},{"age_days":4,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/generate_http_types.py","id":"finding_c1cedf34ddebe7d261cb","kind":"unreachable_file","last_commit_at":"2026-08-31T03:51:20","last_meaningful_change":"2026-08-31T03:51:20+00:00","lines":130,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":87,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/ui/scripts/contrast-check.py","id":"finding_1b9b8063b93def0ff331","kind":"unreachable_file","last_commit_at":"2026-06-08T15:01:45","last_meaningful_change":"2026-06-08T15:01:45+00:00","lines":120,"primary_owner":"Contributor 22","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":21,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/uninstall_cmd.py","id":"finding_4d056697ef3263430455","kind":"unreachable_file","last_commit_at":"2026-08-13T06:48:25","last_meaningful_change":"2026-08-13T06:48:25+00:00","lines":100,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":13,"commit_count_90d":4,"confidence":0.4,"end_line":117,"file_path":"packages/server/src/repowise/server/mcp_server/tool_refactoring.py","id":"finding_4368b4710bdc7ab05fcc","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":86,"primary_owner":"Contributor 19","reason":"Public symbol 'generate_refactoring_code' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":31,"symbol_kind":"function","symbol_name":"generate_refactoring_code"},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_3393e63b818004f15f8d","kind":"unreachable_file","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":3,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/measure_mcp_response_sizes.py","id":"finding_16a533bd7dba51d593b6","kind":"unreachable_file","last_commit_at":"2026-08-31T09:13:01","last_meaningful_change":"2026-08-31T09:13:01+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":10,"commit_count_90d":2,"confidence":0.4,"end_line":100,"file_path":"packages/server/src/repowise/server/mcp_server/tool_architecture.py","id":"finding_63e9ee35b2c0edb37176","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":68,"primary_owner":"Contributor 19","reason":"Public symbol 'get_architecture' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":32,"symbol_kind":"function","symbol_name":"get_architecture"},{"age_days":73,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/telemetry_cmd.py","id":"finding_f6e27d31e8b93df85fd9","kind":"unreachable_file","last_commit_at":"2026-06-22T11:35:27","last_meaningful_change":"2026-06-22T11:35:27+00:00","lines":50,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null}],"findings_emitted":12,"findings_omitted":13,"findings_reduced_reason":"response_budget","findings_total":25,"findings_truncated":true,"lines":2013,"safe_count":0,"truncated":true},"medium":{"count":508,"description":"Medium confidence (0.5-0.8): Likely unused but may have indirect references. Review before deleting.","findings":[{"age_days":19,"commit_count_90d":1,"confidence":0.65,"end_line":224,"file_path":"packages/vscode/webview/src/views/settings/App.tsx","id":"finding_b075fd8305a7974411b7","kind":"unused_internal","last_commit_at":"2026-08-15T04:52:49","last_meaningful_change":"2026-08-15T04:52:49+00:00","lines":175,"primary_owner":"Contributor 19","reason":"Private symbol 'GROUPS' is not used anywhere","repository":"default","risk_factors":["config"],"safe_to_delete":false,"start_line":49,"symbol_kind":"constant","symbol_name":"GROUPS"},{"age_days":21,"commit_count_90d":4,"confidence":0.65,"end_line":638,"file_path":"packages/core/src/repowise/core/generation/onboarding/subkinds/key_concepts.py","id":"finding_be86c5b82740d8059283","kind":"unused_internal","last_commit_at":"2026-08-17T08:07:51","last_meaningful_change":"2026-08-17T08:07:51+00:00","lines":159,"primary_owner":"Contributor 19","reason":"Private symbol '_build' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":479,"symbol_kind":"function","symbol_name":"_build"},{"age_days":101,"commit_count_90d":2,"confidence":0.65,"end_line":173,"file_path":"packages/ui/src/c4/nodes/LayerClusterNode.tsx","id":"finding_c6ddde3060cf14ca3310","kind":"unused_internal","last_commit_at":"2026-06-23T10:24:32","last_meaningful_change":"2026-06-23T10:24:32+00:00","lines":147,"primary_owner":"Contributor 22","reason":"Private symbol 'LayerClusterNodeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":26,"symbol_kind":"function","symbol_name":"LayerClusterNodeImpl"},{"age_days":22,"commit_count_90d":3,"confidence":0.65,"end_line":589,"file_path":"packages/core/src/repowise/core/ingestion/sfc_source.py","id":"finding_27b06007ec3b456791b8","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":144,"primary_owner":"Contributor 19","reason":"Private symbol '_razor_byte_scan' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":445,"symbol_kind":"function","symbol_name":"_razor_byte_scan"},{"age_days":101,"commit_count_90d":1,"confidence":0.65,"end_line":148,"file_path":"packages/ui/src/c4/nodes/ArchFileNode.tsx","id":"finding_7897e8b0e5b192dc04f3","kind":"unused_internal","last_commit_at":"2026-06-06T13:25:45","last_meaningful_change":"2026-06-06T13:25:45+00:00","lines":125,"primary_owner":"Contributor 22","reason":"Private symbol 'ArchFileNodeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":23,"symbol_kind":"function","symbol_name":"ArchFileNodeImpl"},{"age_days":22,"commit_count_90d":3,"confidence":0.65,"end_line":484,"file_path":"packages/core/src/repowise/core/persistence/database.py","id":"finding_f8da2bf875ed65e153ee","kind":"unused_internal","last_commit_at":"2026-09-05T13:30:40","last_meaningful_change":"2026-09-05T13:30:40+00:00","lines":118,"primary_owner":"Contributor 19","reason":"Private symbol '_reconcile_schema' is not used anywhere","repository":"default","risk_factors":["database"],"safe_to_delete":false,"start_line":366,"symbol_kind":"function","symbol_name":"_reconcile_schema"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":508,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_97db30e3d8a29e1f728f","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":96,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_c_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":412,"symbol_kind":"function","symbol_name":"_resolve_c_type_refs"},{"age_days":101,"commit_count_90d":2,"confidence":0.65,"end_line":115,"file_path":"packages/ui/src/c4/nodes/ArchContainerNode.tsx","id":"finding_4cf23634a04a6a87e7f8","kind":"unused_internal","last_commit_at":"2026-06-23T10:24:32","last_meaningful_change":"2026-06-23T10:24:32+00:00","lines":95,"primary_owner":"Contributor 22","reason":"Private symbol 'ArchContainerNodeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":20,"symbol_kind":"function","symbol_name":"ArchContainerNodeImpl"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":638,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_3494eba7bab882eb59ec","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":91,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_ts_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":547,"symbol_kind":"function","symbol_name":"_resolve_ts_type_refs"},{"age_days":19,"commit_count_90d":1,"confidence":0.65,"end_line":151,"file_path":"packages/core/src/repowise/core/generation/onboarding/subkinds/active_landscape.py","id":"finding_de7b2aff5fc207d79981","kind":"unused_internal","last_commit_at":"2026-08-15T09:40:34","last_meaningful_change":"2026-08-15T09:40:34+00:00","lines":87,"primary_owner":"Contributor 19","reason":"Private symbol '_build' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":64,"symbol_kind":"function","symbol_name":"_build"},{"age_days":101,"commit_count_90d":1,"confidence":0.65,"end_line":142,"file_path":"packages/ui/src/graph-primitives/edge-renderer.tsx","id":"finding_eade40e87507df4bdae7","kind":"unused_internal","last_commit_at":"2026-06-06T13:25:45","last_meaningful_change":"2026-06-06T13:25:45+00:00","lines":87,"primary_owner":"Contributor 22","reason":"Private symbol 'ArchEdgeRendererImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":55,"symbol_kind":"function","symbol_name":"ArchEdgeRendererImpl"},{"age_days":22,"commit_count_90d":11,"confidence":0.65,"end_line":1208,"file_path":"packages/core/src/repowise/core/ingestion/parser_helpers.py","id":"finding_798475db14d41278d3f8","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":86,"primary_owner":"Contributor 19","reason":"Private symbol '_ts_head_type_identifier' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":1122,"symbol_kind":"function","symbol_name":"_ts_head_type_identifier"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":366,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_0320a6bd2eeb4c7b9686","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":83,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_go_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":283,"symbol_kind":"function","symbol_name":"_resolve_go_type_refs"},{"age_days":76,"commit_count_90d":1,"confidence":0.65,"end_line":94,"file_path":"packages/ui/src/workspace/system-map/system-map-edge.tsx","id":"finding_cde5d1605847ffe10cd1","kind":"unused_internal","last_commit_at":"2026-06-19T07:53:16","last_meaningful_change":"2026-06-19T07:53:16+00:00","lines":74,"primary_owner":"Contributor 19","reason":"Private symbol 'SystemMapEdgeInner' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":20,"symbol_kind":"function","symbol_name":"SystemMapEdgeInner"},{"age_days":161,"commit_count_90d":1,"confidence":0.65,"end_line":213,"file_path":"packages/core/src/repowise/core/ingestion/special_handlers.py","id":"finding_a72b31224fbeb674507a","kind":"unused_internal","last_commit_at":"2026-07-04T11:15:25","last_meaningful_change":"2026-07-04T11:15:25+00:00","lines":72,"primary_owner":"Contributor 19","reason":"Private symbol '_parse_dockerfile' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":141,"symbol_kind":"function","symbol_name":"_parse_dockerfile"},{"age_days":109,"commit_count_90d":2,"confidence":0.65,"end_line":90,"file_path":"packages/ui/src/c4/edges/RelationEdge.tsx","id":"finding_d11a1aeaa4becb88db2c","kind":"unused_internal","last_commit_at":"2026-06-23T10:24:32","last_meaningful_change":"2026-06-23T10:24:32+00:00","lines":72,"primary_owner":"Contributor 19","reason":"Private symbol 'RelationEdgeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":18,"symbol_kind":"function","symbol_name":"RelationEdgeImpl"},{"age_days":9,"commit_count_90d":4,"confidence":0.65,"end_line":831,"file_path":"packages/server/src/repowise/server/job_executor.py","id":"finding_ea3a8bb0f7e7024be0d4","kind":"unused_internal","last_commit_at":"2026-09-07T11:41:26","last_meaningful_change":"2026-09-07T11:41:26+00:00","lines":71,"primary_owner":"Contributor 19","reason":"Private symbol '_persist_initial_index_state' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":760,"symbol_kind":"function","symbol_name":"_persist_initial_index_state"},{"age_days":161,"commit_count_90d":1,"confidence":0.65,"end_line":125,"file_path":"packages/core/src/repowise/core/ingestion/special_handlers.py","id":"finding_4c6222d665b3595e0493","kind":"unused_internal","last_commit_at":"2026-07-04T11:15:25","last_meaningful_change":"2026-07-04T11:15:25+00:00","lines":70,"primary_owner":"Contributor 19","reason":"Private symbol '_parse_openapi' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":55,"symbol_kind":"function","symbol_name":"_parse_openapi"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":741,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_60313f5eee105a75790e","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":68,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_jvm_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":673,"symbol_kind":"function","symbol_name":"_resolve_jvm_type_refs"},{"age_days":20,"commit_count_90d":3,"confidence":0.65,"end_line":112,"file_path":"packages/core/src/repowise/core/ingestion/graph_warmups.py","id":"finding_56627b474c7331f636f9","kind":"unused_internal","last_commit_at":"2026-09-04T13:27:00","last_meaningful_change":"2026-09-04T13:27:00+00:00","lines":62,"primary_owner":"Contributor 19","reason":"Private symbol '_warmup_jvm' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":50,"symbol_kind":"function","symbol_name":"_warmup_jvm"},{"age_days":22,"commit_count_90d":11,"confidence":0.65,"end_line":1060,"file_path":"packages/core/src/repowise/core/ingestion/parser_helpers.py","id":"finding_f2ff92755f90a64d9b11","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":62,"primary_owner":"Contributor 19","reason":"Private symbol '_go_head_type_identifier' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":998,"symbol_kind":"function","symbol_name":"_go_head_type_identifier"},{"age_days":22,"commit_count_90d":11,"confidence":0.65,"end_line":1276,"file_path":"packages/core/src/repowise/core/ingestion/parser_helpers.py","id":"finding_391c43bb421d142b8094","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":61,"primary_owner":"Contributor 19","reason":"Private symbol '_java_head_type_identifier' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":1215,"symbol_kind":"function","symbol_name":"_java_head_type_identifier"},{"age_days":161,"commit_count_90d":1,"confidence":0.65,"end_line":285,"file_path":"packages/core/src/repowise/core/ingestion/special_handlers.py","id":"finding_f3d3afff206d3be963cf","kind":"unused_internal","last_commit_at":"2026-07-04T11:15:25","last_meaningful_change":"2026-07-04T11:15:25+00:00","lines":59,"primary_owner":"Contributor 19","reason":"Private symbol '_parse_makefile' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":226,"symbol_kind":"function","symbol_name":"_parse_makefile"},{"age_days":20,"commit_count_90d":3,"confidence":0.65,"end_line":173,"file_path":"packages/core/src/repowise/core/ingestion/graph_warmups.py","id":"finding_d645a649dd73cd608107","kind":"unused_internal","last_commit_at":"2026-09-04T13:27:00","last_meaningful_change":"2026-09-04T13:27:00+00:00","lines":58,"primary_owner":"Contributor 19","reason":"Private symbol '_warmup_cpp' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":115,"symbol_kind":"function","symbol_name":"_warmup_cpp"}],"findings_emitted":24,"findings_omitted":1,"findings_reduced_reason":"response_budget","findings_total":25,"findings_truncated":true,"lines":5444,"safe_count":0,"truncated":true}},"truncated":true},"get_dependency_path:two-files":{"_meta":{"completeness":{"capped":false},"contract_version":1,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":2005,"tier":"default"},"runtime_breakage_proven":false},"distance":-1,"explanation":"No direct dependency path found","path":[],"visual_context":{"bridge_suggestions":[{"node":"external:typing","pagerank":0.02358},{"node":"external:dataclasses","pagerank":0.02038},{"node":"tests/conftest.py","pagerank":0.02011},{"node":"external:pathlib","pagerank":0.01869},{"node":"external:collections.abc","pagerank":0.01618}],"community":{"same_community":false,"source_community":3,"target_community":2},"disconnected":false,"nearest_common_ancestors":[{"distance_from_source":1,"distance_from_target":1,"node":"external:typing"},{"distance_from_source":1,"distance_from_target":1,"node":"external:structlog"},{"distance_from_source":1,"distance_from_target":1,"node":"external:pathlib"},{"distance_from_source":2,"distance_from_target":1,"node":"packages/core/src/repowise/core/docs_mode.py"},{"distance_from_source":2,"distance_from_target":1,"node":"packages/cli/src/repowise/cli/commands/upgrade_flow.py"}],"reverse_path":{"distance":5,"exists":true,"note":"A path exists in the reverse direction (packages/cli/src/repowise/cli/commands/update_cmd/command.py -> packages/core/src/repowise/core/ingestion/call_resolver.py). The dependency flows the other way.","path":["packages/cli/src/repowise/cli/commands/update_cmd/command.py","packages/core/src/repowise/core/ingestion/__init__.py","packages/core/src/repowise/core/ingestion/graph/__init__.py","packages/core/src/repowise/core/ingestion/graph/builder.py","packages/core/src/repowise/core/ingestion/graph/_resolvers.py","packages/core/src/repowise/core/ingestion/call_resolver.py"]},"shared_neighbors":["external:pathlib","external:structlog","external:typing"],"suggestion":"No direct path, but both nodes connect through 'external:typing'. This shared dependency may be the architectural bridge point."}},"get_execution_flows:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","hint":"Use get_context(include=['callers','callees']) on any trace node for detail.","index_age_days":0,"indexed_commit":"920d1c973d64","replaced_tokens":2160,"response_budget":{"limit_chars":24000,"serialized_chars":4969,"tier":"default"},"runtime_breakage_proven":false,"timing_ms":1155.0,"tokens_saved":870},"flows":[{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/vscode/webview/src/views/graph/App.tsx::App","entry_point_name":"App","entry_point_score":0.95,"termination":"no_callees","trace":["packages/vscode/webview/src/views/graph/App.tsx::App","packages/vscode/webview/src/views/graph/App.tsx::CommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::GraphCommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::FactGrid","packages/ui/src/graph/graph-community-panel.tsx::FactValue"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","entry_point_name":"execute","entry_point_score":0.928,"termination":"no_callees","trace":["packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::_announce_total","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_announce_paid"],"trace_via":["self_scope","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/git.py::get_risk_range","entry_point_name":"get_risk_range","entry_point_score":0.843,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/git.py::get_risk_range","packages/server/src/repowise/server/routers/git.py::_revision_exists"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","entry_point_name":"HealthOverviewCard","entry_point_score":0.838,"termination":"no_callees","trace":["packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","packages/ui/src/dashboard/health-overview-card.tsx::AccuracyStrip"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/costs.py::get_distill_savings","entry_point_name":"get_distill_savings","entry_point_score":0.831,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/costs.py::get_distill_savings","packages/server/src/repowise/server/routers/costs.py::_parse_since"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/git/ownership-table.tsx::OwnershipTable","entry_point_name":"OwnershipTable","entry_point_score":0.83,"termination":"no_callees","trace":["packages/ui/src/git/ownership-table.tsx::OwnershipTable","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","entry_point_name":"DecisionsTimeline","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","packages/ui/src/lib/format.ts::formatRelativeTime","packages/ui/src/lib/format.ts::parseDate"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","entry_point_name":"HotspotsMini","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","packages/ui/src/dashboard/hotspots-mini.tsx::getChurnColor"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","entry_point_name":"ModuleMinimap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","entry_point_name":"OwnershipTreemap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]}],"total_entry_points":10},"get_execution_flows:top-100-depth-20":{"_meta":{"completeness":{"capped":true,"reason":"response_budget","shown":45,"total":50},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","hint":"Use get_context(include=['callers','callees']) on any trace node for detail.","index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#54b10477a47c","repowise#94e97218a71a"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":761},"replaced_tokens":6000,"response_budget":{"limit_chars":24000,"serialized_chars":22639,"tier":"default"},"runtime_breakage_proven":false,"state":{"truncated":true},"timing_ms":1286.0,"tokens_saved":102},"flows":[{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/vscode/webview/src/views/graph/App.tsx::App","entry_point_name":"App","entry_point_score":0.95,"termination":"no_callees","trace":["packages/vscode/webview/src/views/graph/App.tsx::App","packages/vscode/webview/src/views/graph/App.tsx::CommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::GraphCommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::FactGrid","packages/ui/src/graph/graph-community-panel.tsx::FactValue"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","entry_point_name":"execute","entry_point_score":0.928,"termination":"no_callees","trace":["packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::_announce_total","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_announce_paid"],"trace_via":["self_scope","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/git.py::get_risk_range","entry_point_name":"get_risk_range","entry_point_score":0.843,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/git.py::get_risk_range","packages/server/src/repowise/server/routers/git.py::_revision_exists"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","entry_point_name":"HealthOverviewCard","entry_point_score":0.838,"termination":"no_callees","trace":["packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","packages/ui/src/dashboard/health-overview-card.tsx::AccuracyStrip"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/costs.py::get_distill_savings","entry_point_name":"get_distill_savings","entry_point_score":0.831,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/costs.py::get_distill_savings","packages/server/src/repowise/server/routers/costs.py::_parse_since"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/git/ownership-table.tsx::OwnershipTable","entry_point_name":"OwnershipTable","entry_point_score":0.83,"termination":"no_callees","trace":["packages/ui/src/git/ownership-table.tsx::OwnershipTable","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","entry_point_name":"DecisionsTimeline","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","packages/ui/src/lib/format.ts::formatRelativeTime","packages/ui/src/lib/format.ts::parseDate"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","entry_point_name":"HotspotsMini","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","packages/ui/src/dashboard/hotspots-mini.tsx::getChurnColor"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","entry_point_name":"ModuleMinimap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","entry_point_name":"OwnershipTreemap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/graph/community.py::get_community_detail","entry_point_name":"get_community_detail","entry_point_score":0.825,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/graph/community.py::get_community_detail","packages/server/src/repowise/server/mcp_server/_graph_utils.py::community_cohesion","packages/server/src/repowise/server/mcp_server/_graph_utils.py::parse_community_meta"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/health/kpi-cards.tsx::HealthKpiCards","entry_point_name":"HealthKpiCards","entry_point_score":0.821,"termination":"no_callees","trace":["packages/ui/src/health/kpi-cards.tsx::HealthKpiCards","packages/ui/src/health/kpi-cards.tsx::InlineStat","packages/ui/src/health/sparkline.tsx::Sparkline"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":0,"entry_point":"packages/ui/src/health/ai-prompt-builder.ts::buildGalaxyMapAiPrompt","entry_point_name":"buildGalaxyMapAiPrompt","entry_point_score":0.821,"termination":"no_callees","trace":["packages/ui/src/health/ai-prompt-builder.ts::buildGalaxyMapAiPrompt"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/modules.py::get_module_health","entry_point_name":"get_module_health","entry_point_score":0.821,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/modules.py::get_module_health","packages/server/src/repowise/server/routers/modules.py::_decision_refs","packages/server/src/repowise/server/schemas/ownership.py::GoverningDecisionRef"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_plan_page","entry_point_name":"get_refactoring_plan_page","entry_point_score":0.821,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_plan_page","packages/server/src/repowise/server/routers/refactoring.py::RefactoringPlanPageResponse"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_mermaid","entry_point_name":"get_c4_mermaid","entry_point_score":0.816,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_mermaid","packages/server/src/repowise/server/services/c4_builder/mermaid.py::to_mermaid_l1","packages/server/src/repowise/server/services/c4_builder/mermaid.py::_emit_externals","packages/server/src/repowise/server/services/c4_builder/mermaid.py::_external_line","packages/server/src/repowise/server/services/c4_builder/mermaid.py::_ext_kind"],"trace_via":["import_scoped","same_file","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/workspace.py::get_workspace_graph","entry_point_name":"get_workspace_graph","entry_point_score":0.816,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/workspace.py::get_workspace_graph","packages/server/src/repowise/server/routers/workspace.py::_query_repo_stats","packages/core/src/repowise/core/docs_mode.py::resolve_docs_mode"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/commits-mini.tsx::CommitsMini","entry_point_name":"CommitsMini","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/dashboard/commits-mini.tsx::CommitsMini","packages/ui/src/lib/format.ts::formatRelativeTime","packages/ui/src/lib/format.ts::parseDate"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/module-overview-grid.tsx::ModuleOverviewGrid","entry_point_name":"ModuleOverviewGrid","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/dashboard/module-overview-grid.tsx::ModuleOverviewGrid","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/savings-mini.tsx::SavingsMini","entry_point_name":"SavingsMini","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/dashboard/savings-mini.tsx::SavingsMini","packages/ui/src/lib/format.ts::formatCost"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/git/contributors-strip.tsx::ContributorsStrip","entry_point_name":"ContributorsStrip","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/git/contributors-strip.tsx::ContributorsStrip","packages/ui/src/git/contributors-strip.tsx::firstName"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/graph/graph-context-drawer.tsx::GraphContextDrawer","entry_point_name":"GraphContextDrawer","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/graph/graph-context-drawer.tsx::GraphContextDrawer","packages/ui/src/graph/node-badges.tsx::NodeBadges","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_l1","entry_point_name":"get_c4_l1","entry_point_score":0.81,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_l1","packages/server/src/repowise/server/routers/c4.py::_person","packages/server/src/repowise/server/schemas/c4.py::C4PersonResponse"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_l3","entry_point_name":"get_c4_l3","entry_point_score":0.81,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_l3","packages/server/src/repowise/server/routers/c4.py::_component","packages/server/src/repowise/server/schemas/c4.py::C4ComponentResponse"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/decisions.py::get_decision_graph","entry_point_name":"get_decision_graph","entry_point_score":0.81,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/decisions.py::get_decision_graph","packages/server/src/repowise/server/schemas/decisions.py::DecisionCodeEdge"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/cli/src/repowise/cli/commands/init_cmd/command.py::init_command","entry_point_name":"init_command","entry_point_score":0.809,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/init_cmd/command.py::init_command","packages/cli/src/repowise/cli/commands/init_cmd/command.py::_print_structural_plan","packages/cli/src/repowise/cli/commands/init_cmd/generation.py::page_type_label"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/graph/centrality-leaderboard.tsx::CentralityLeaderboard","entry_point_name":"CentralityLeaderboard","entry_point_score":0.807,"termination":"no_callees","trace":["packages/ui/src/graph/centrality-leaderboard.tsx::CentralityLeaderboard","packages/ui/src/graph/centrality-leaderboard.tsx::score"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/cli/src/repowise/cli/commands/health_cmd/command.py::health_command","entry_point_name":"health_command","entry_point_score":0.805,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/health_cmd/command.py::health_command","packages/cli/src/repowise/cli/_setup.py::configure_cli_logging"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/vscode/webview/src/views/decisions/App.tsx::App","entry_point_name":"App","entry_point_score":0.805,"termination":"confidence_filtered","termination_detail":{"global_unique":1},"trace":["packages/vscode/webview/src/views/decisions/App.tsx::App","packages/vscode/webview/src/views/decisions/App.tsx::DecisionsSkeleton"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/web/src/app/repos/[id]/overview/page.tsx::OverviewPage","entry_point_name":"OverviewPage","entry_point_score":0.804,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/overview/page.tsx::OverviewPage","packages/web/src/app/repos/[id]/overview/page.tsx::safeFetch"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/web/src/app/repos/[id]/costs/page.tsx::CostsPage","entry_point_name":"CostsPage","entry_point_score":0.803,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/costs/page.tsx::CostsPage","packages/api-client/src/costs.ts::getCostSummary","packages/api-client/src/client.ts::apiGet","packages/api-client/src/client.ts::buildHeaders","packages/api-client/src/client.ts::resolveToken"],"trace_via":["import_scoped","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/vscode/src/extension.ts::activate","entry_point_name":"activate","entry_point_score":0.802,"termination":"confidence_filtered","termination_detail":{"global_unique":1},"trace":["packages/vscode/src/extension.ts::activate","packages/vscode/src/extension.ts::checkSetup"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_l2","entry_point_name":"get_c4_l2","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_l2","packages/server/src/repowise/server/routers/c4.py::_container","packages/server/src/repowise/server/schemas/c4.py::C4ContainerResponse"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/knowledge_map.py::get_knowledge_map","entry_point_name":"get_knowledge_map","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/knowledge_map.py::get_knowledge_map","packages/server/src/repowise/server/schemas/ownership.py::KnowledgeMapOwner"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_targets","entry_point_name":"get_refactoring_targets","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_targets","packages/server/src/repowise/server/routers/refactoring.py::RefactoringSummary"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/server/src/repowise/server/routers/repos.py::create_repo","entry_point_name":"create_repo","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/repos.py::create_repo","packages/server/src/repowise/server/routers/repos.py::_enqueue_index_job","packages/server/src/repowise/server/routers/repos.py::_launch_job_task","packages/server/src/repowise/server/routers/repos.py::_resolve_repo_session_factory","packages/server/src/repowise/server/deps.py::resolve_session_factory"],"trace_via":["same_file","same_file","same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/workspace.py::get_workspace","entry_point_name":"get_workspace","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/workspace.py::get_workspace","packages/server/src/repowise/server/routers/workspace.py::_query_repo_stats","packages/core/src/repowise/core/docs_mode.py::resolve_docs_mode"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":3,"entry_point":"packages/server/src/repowise/server/routers/graph/intelligence.py::get_execution_flows","entry_point_name":"get_execution_flows","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/graph/intelligence.py::get_execution_flows","packages/server/src/repowise/server/mcp_server/_graph_utils.py::bfs_trace","packages/server/src/repowise/server/mcp_server/_graph_utils.py::_node_id_is_excluded","packages/core/src/repowise/core/analysis/execution_graph.py::is_excluded_execution_path"],"trace_via":["import_scoped","same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/workspace.py::get_contract_detail","entry_point_name":"get_contract_detail","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/workspace.py::get_contract_detail","packages/server/src/repowise/server/routers/workspace.py::_contract_entry","packages/server/src/repowise/server/schemas/workspace.py::WorkspaceContractEntry"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/cli/src/repowise/cli/commands/saved_cmd.py::saved_command","entry_point_name":"saved_command","entry_point_score":0.799,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/saved_cmd.py::saved_command","packages/cli/src/repowise/cli/commands/saved_cmd.py::_estimate_usd","packages/core/src/repowise/core/generation/cost_tracker.py::get_model_pricing","packages/core/src/repowise/core/generation/cost_tracker.py::_get_pricing","packages/core/src/repowise/core/generation/cost_tracker.py::_family_pricing"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/web/src/app/repos/[id]/code-health/page.tsx::CodeHealthPage","entry_point_name":"CodeHealthPage","entry_point_score":0.799,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/code-health/page.tsx::CodeHealthPage","packages/web/src/app/repos/[id]/code-health/page.tsx::ViewSelect","packages/ui/src/ui/select.tsx::Select"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/cli/src/repowise/cli/commands/dead_code_cmd.py::dead_code_command","entry_point_name":"dead_code_command","entry_point_score":0.798,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/dead_code_cmd.py::dead_code_command","packages/cli/src/repowise/cli/helpers.py::load_state","packages/cli/src/repowise/cli/helpers.py::get_repowise_dir"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/cli/src/repowise/cli/commands/restyle_cmd.py::restyle_command","entry_point_name":"restyle_command","entry_point_score":0.798,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/restyle_cmd.py::restyle_command","packages/cli/src/repowise/cli/commands/restyle_cmd.py::_print_styles","packages/core/src/repowise/core/generation/styles/registry.py::list_styles","packages/core/src/repowise/core/generation/styles/registry.py::_load_custom_style","packages/core/src/repowise/core/generation/styles/registry.py::_clip"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/web/src/app/repos/[id]/refactoring/page.tsx::RefactoringPage","entry_point_name":"RefactoringPage","entry_point_score":0.797,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/refactoring/page.tsx::RefactoringPage","packages/web/src/app/repos/[id]/refactoring/page.tsx::leadTypeFor"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/vscode/webview/src/views/risk/App.tsx::App","entry_point_name":"App","entry_point_score":0.797,"termination":"no_callees","trace":["packages/vscode/webview/src/views/risk/App.tsx::App","packages/vscode/webview/src/views/risk/App.tsx::ChangeImpact","packages/vscode/webview/src/views/risk/App.tsx::DirectRiskRow"],"trace_via":["same_file","same_file"]}],"flows_emitted":45,"flows_omitted":5,"flows_reduced_reason":"response_budget","flows_total":50,"flows_truncated":true,"omission_marker":"[repowise#94e97218a71a: 26 lines omitted (~201 tokens); restore: repowise expand 94e97218a71a]","total_entry_points":50,"truncated":true},"get_health:all-includes":{"_meta":{"completeness":{"capped":true,"reason":"collection_cap_and_response_budget","shown":80,"total":1855},"contract_version":2,"embedder":"mock","embedder_degraded":false,"health_analysis":{"analyzed_at":"2026-09-30T14:04:24.529401","analyzed_commit":"547df91a7e7b","analyzed_commits_distinct":2,"live_verification":{"basis":"index_commit_and_live_git_head","source_bytes_verified":false},"recomputed_this_call":false,"refresh":{"command":"repowise update","precondition":"commit health-relevant working-tree changes first","required_before_comparison":true},"source":"stored_health_analysis","status":"available"},"health_analyzed_at":"2026-09-30T14:04:24.529401","health_analyzed_commit":"547df91a7e7b","health_analyzed_commits_distinct":2,"index_age_days":0,"index_behind":true,"index_scope":{"content_provenance":"model","fingerprint":"4a1aa5b83bd6","full":"get_overview()","git_tier":"full","projection":"compact","run_mode":"standard","status":"partial","version":1},"indexed_commit":"eaf9fb2638af","live_head":"303f55f1785c","omitted":{"refs":["repowise#7c7d4b4978b4","repowise#b0df000b1f03"],"restore":"`repowise expand <ref>`, or get_symbol(\"repowise#<ref>\", query=...)","tokens":22235},"reductions":[{"emitted":0,"field":"performance_summary.facets.context","reason":"response_budget","total":3},{"emitted":0,"field":"performance_summary.facets.boundary","reason":"response_budget","total":5},{"emitted":0,"field":"performance_summary.facets.confidence","reason":"response_budget","total":1},{"emitted":0,"field":"performance_summary.facets.actionability","reason":"response_budget","total":3},{"emitted":0,"field":"performance_summary.facets.plan_state","reason":"response_budget","total":2}],"response_budget":{"limit_chars":32000,"serialized_chars":30504,"tier":"expanded"},"semantic_search":false,"stale_warning":"Index is behind live HEAD \u2014 run `repowise update`.","state":{"truncated":true},"timing_ms":1515.0},"counts":"everything","distribution":{"bands":{"at_risk":{"files":180,"nloc":103273,"pct":13.6},"excellent":{"files":3312,"nloc":388454,"pct":51.0},"fair":{"files":261,"nloc":78236,"pct":10.3},"good":{"files":570,"nloc":140575,"pct":18.4},"needs_work":{"files":138,"nloc":51446,"pct":6.8}},"total_files":4461,"total_nloc":761984},"fix_first":{"basis":{"analyzed_commit":"547df91a7e7ba6e01f7457ac2172e09a36ad47a6","health_analyzed_at":"2026-09-30T14:04:24.529401"},"by_improves":{"defect":768,"maintainability":157,"performance":122},"detail_call":"get_health(fix_id='fix1_97d425a56a911cf78db4')","items":[{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_d21fb1bde221e8df007e","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ae647f629da0ef35d96e"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","line_end":208,"line_start":152,"symbol":"walk_file"},"tier":"now","title":"Extract a helper from walk_file","why":"walk_file has more branches than its tests can easily cover; 8 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_fba1d37b9cbd137f45e7","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_f679a97d234a223b34f5"},"tool":"get_health"},"target":{"file_path":"packages/web/src/components/code-health/triage-tab.tsx","line_end":121,"line_start":71,"symbol":"TriageTab"},"tier":"now","title":"Extract a helper from TriageTab","why":"TriageTab has more branches than its tests can easily cover; it changed 6 times in 90 days, so the cost recurs."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_26c2da3b4c98f8fdef56","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_5ca551b7b7c3293951d0"},"tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/repo_db.py","line_end":null,"line_start":null,"symbol":"ensure_repo_registration"},"tier":"next","title":"Batch the database calls loops make through ensure_repo_registration","why":"ensure_repo_registration makes a database call once per loop iteration; 2 call sites reach it, an entry point reaches it, the loop grows with the data."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_f17556ad6537b1c26c98","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_29080eb5a091e8eeb79d"},"tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/job_executor.py","line_end":null,"line_start":null,"symbol":"_start_job"},"tier":"next","title":"Move the database call in _start_job out of its loop","why":"_start_job makes a database call once per loop iteration; an entry point reaches it, the loop grows with the data."}],"items_emitted":5,"items_total":5,"lead":{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},"model_version":1,"totals":{"candidates":2834,"eligible":1047,"excluded":{"below_min_worth":428,"expected":148,"generated":4,"history_only":137,"no_plan":12,"test":804,"tooling":254},"shown":5}},"gap_analysis":{"files_below_target":860,"files_for_half_gap":22,"files_to_reach_target":57,"target_score":8.0,"weighted_gap_points":324845,"weighted_gross_gap_points":925602},"high_leverage_files":[{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":69.6,"maintainability_score":1.3,"max_ccn":249,"max_nesting":5,"module":"packages/cli","nloc":1810,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"run_update nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":1.4,"total_deduction":9.213,"weighted_deficit":12670},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/incremental.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.35,"maintainability_score":2.0,"max_ccn":54,"max_nesting":5,"module":"packages/core","nloc":1727,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_incremental_index nests 5 levels deep","score":1.41,"share_of_repo_gap_pct":1.2,"total_deduction":8.569,"weighted_deficit":11381},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":75.35,"maintainability_score":2.8,"max_ccn":162,"max_nesting":4,"module":"packages/cli","nloc":1535,"performance_score":10.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: init_command is 739 lines, CCN 162, in a file imported by 7 others","score":1.01,"share_of_repo_gap_pct":1.2,"total_deduction":8.985,"weighted_deficit":10730},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/workspace_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":72.45,"maintainability_score":1.3,"max_ccn":29,"max_nesting":4,"module":"packages/cli","nloc":1341,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"workspace_scan nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":1.0,"total_deduction":9.1,"weighted_deficit":9387},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_test_file":true,"is_test":false,"line_coverage_pct":92.35,"maintainability_score":3.1,"max_ccn":25,"max_nesting":6,"module":"packages/core","nloc":1460,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_find_parent nests 6 levels deep","score":1.74,"share_of_repo_gap_pct":1.0,"total_deduction":8.258,"weighted_deficit":9140},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":1.3,"max_ccn":74,"max_nesting":5,"module":"packages/cli","nloc":1279,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_persist_full_update_async nests 5 levels deep","score":1.11,"share_of_repo_gap_pct":1.0,"total_deduction":8.538,"weighted_deficit":8812},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/dead_code/analyzer.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.47,"maintainability_score":4.2,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":1352,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_get_unsatisfied_prop_guard nests 5 levels deep","score":1.71,"share_of_repo_gap_pct":0.9,"total_deduction":8.291,"weighted_deficit":8504},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/helpers.py","has_test_file":true,"is_test":false,"line_coverage_pct":78.67,"maintainability_score":2.0,"max_ccn":24,"max_nesting":4,"module":"packages/cli","nloc":1121,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"validate_provider_config nests 4 levels deep","score":1.15,"share_of_repo_gap_pct":0.8,"total_deduction":8.85,"weighted_deficit":7679},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_change_risk.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":2.8,"max_ccn":46,"max_nesting":4,"module":"packages/server","nloc":1173,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_cross_repo_block nests 4 levels deep","score":2.01,"share_of_repo_gap_pct":0.8,"total_deduction":7.99,"weighted_deficit":7026},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/engine.py","has_test_file":true,"is_test":false,"line_coverage_pct":81.77,"maintainability_score":1.7,"max_ccn":30,"max_nesting":4,"module":"packages/core","nloc":1013,"performance_score":9.58,"primary_biomarker":"god_class","primary_reason":"HealthAnalyzer is a god class: 669 lines across 19 methods, including a brain method (analyze_async, CCN 30)","score":1.12,"share_of_repo_gap_pct":0.8,"total_deduction":8.73,"weighted_deficit":6969},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/git_indexer/indexer.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.98,"maintainability_score":2.0,"max_ccn":42,"max_nesting":4,"module":"packages/core","nloc":1047,"performance_score":10.0,"primary_biomarker":"god_class","primary_reason":"GitIndexer is a god class: 760 lines across 24 methods, including a brain method (index_changed_files, CCN 42)","score":1.44,"share_of_repo_gap_pct":0.7,"total_deduction":8.555,"weighted_deficit":6868},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/graph-flow.tsx","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":260,"max_nesting":7,"module":"packages/ui","nloc":1235,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"GraphFlow nests 7 levels deep","score":2.5,"share_of_repo_gap_pct":0.7,"total_deduction":7.5,"weighted_deficit":6792},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/resolvers/ts_workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.68,"maintainability_score":2.5,"max_ccn":43,"max_nesting":7,"module":"packages/core","nloc":1001,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"find_npm_script_entry_targets nests 7 levels deep","score":1.43,"share_of_repo_gap_pct":0.7,"total_deduction":8.571,"weighted_deficit":6577},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/workspace/update.py","has_test_file":true,"is_test":false,"line_coverage_pct":87.58,"maintainability_score":2.0,"max_ccn":31,"max_nesting":6,"module":"packages/core","nloc":968,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_merged_repo_excludes nests 6 levels deep","score":1.5,"share_of_repo_gap_pct":0.7,"total_deduction":8.499,"weighted_deficit":6292},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/persist.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.47,"maintainability_score":1.3,"max_ccn":35,"max_nesting":5,"module":"packages/core","nloc":1819,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_analysis nests 5 levels deep","score":4.57,"share_of_repo_gap_pct":0.7,"total_deduction":5.089,"weighted_deficit":6239},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/decision_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":16.05,"maintainability_score":7.7,"max_ccn":8,"max_nesting":3,"module":"packages/cli","nloc":877,"performance_score":10.0,"primary_biomarker":"coverage_gap","primary_reason":"204/243 lines uncovered (16% line coverage)","score":1.0,"share_of_repo_gap_pct":0.7,"total_deduction":9.151,"weighted_deficit":6139},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/ui/provider_selection.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.2,"maintainability_score":3.1,"max_ccn":22,"max_nesting":4,"module":"packages/cli","nloc":851,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_interactive_openai_compatible_select nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.919,"weighted_deficit":5957},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/security_scan.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.82,"maintainability_score":3.1,"max_ccn":52,"max_nesting":5,"module":"packages/core","nloc":828,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"scan_source nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.597,"weighted_deficit":5796},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/context/assembler.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.71,"maintainability_score":2.8,"max_ccn":32,"max_nesting":5,"module":"packages/core","nloc":898,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"assemble_repo_overview nests 5 levels deep","score":1.59,"share_of_repo_gap_pct":0.6,"total_deduction":8.414,"weighted_deficit":5756},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/perf/dialects/python.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":3.3,"max_ccn":28,"max_nesting":4,"module":"packages/core","nloc":892,"performance_score":10.0,"primary_biomarker":"complex_conditional","primary_reason":"if condition combines 5 boolean operators","score":1.61,"share_of_repo_gap_pct":0.6,"total_deduction":8.045,"weighted_deficit":5700},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/doctor_cmd/repo_checks.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":1.3,"max_ccn":69,"max_nesting":4,"module":"packages/cli","nloc":884,"performance_score":9.3,"primary_biomarker":"brain_method","primary_reason":"Brain Method: _run_repo_checks is 468 lines, CCN 69, in a file imported by 15 others","score":1.65,"share_of_repo_gap_pct":0.6,"total_deduction":8.002,"weighted_deficit":5613},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.32,"maintainability_score":2.5,"max_ccn":18,"max_nesting":5,"module":"packages/cli","nloc":850,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"claude_code_leftover_reason nests 5 levels deep","score":1.42,"share_of_repo_gap_pct":0.6,"total_deduction":8.422,"weighted_deficit":5593},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_context/targets.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.59,"maintainability_score":4.0,"max_ccn":176,"max_nesting":5,"module":"packages/server","nloc":942,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_resolve_one_target nests 5 levels deep","score":2.16,"share_of_repo_gap_pct":0.6,"total_deduction":7.838,"weighted_deficit":5501}],"high_leverage_files_emitted":23,"high_leverage_files_omitted":755,"high_leverage_files_reduced_reason":"limit_and_response_budget","high_leverage_files_total":778,"high_leverage_files_truncated":true,"kpis":{"average_health":7.57,"average_health_unweighted":8.79,"average_health_weighting":"nloc","band":"good","file_count":4461,"history_average":1.0,"hotspot_health":5.84,"maintainability_average":8.08,"performance_analyzed_files":4459,"performance_average":9.74,"performance_coverage_pct":100.0,"performance_covered_files":4452,"performance_findings":1061,"performance_findings_density_per_10k_loc":13.93,"performance_skipped_files":7,"performance_unsupported_languages":[["shell",7]],"performance_unsupported_languages_emitted":1,"performance_unsupported_languages_total":1,"structure_average":1.43,"worst_performer_path":"packages/cli/src/repowise/cli/commands/serve_cmd.py","worst_performer_score":1.0,"worst_test_path":"packages/core/src/repowise/core/analysis/test_impact.py","worst_test_score":2.0},"mode":"dashboard","omission_marker":"[repowise#b0df000b1f03: 25 lines omitted (~172 tokens); restore: repowise expand b0df000b1f03]","performance_opportunities":[{"actionability_reason":"strategy_requires_validation","actionability_state":"advisory","affected_call_sites_total":8,"affected_files_total":5,"biomarker_type":"io_in_loop","biomarker_types":["io_in_loop"],"biomarker_types_emitted":1,"biomarker_types_total":1,"boundary_kind":"db","confidence":"high","evidence":[{"biomarker_type":"io_in_loop","file_path":"packages/core/src/repowise/core/persistence/crud/decision_ingest.py","finding_id":"finding_a28156f45bdc525925d3","function_name":"bulk_upsert_decisions","line_end":208,"line_start":208,"path":["packages/core/src/repowise/core/persistence/crud/decision_ingest.py::bulk_upsert_decisions","packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"path_emitted":3,"path_total":3,"provenance":"call-site","reason":"a database call is reached once per loop iteration through bulk_upsert_decisions -> sync_links_from_record -> sync_decision_node_links (cross-function N+1 query)"},{"biomarker_type":"io_in_loop","file_path":"packages/core/src/repowise/core/persistence/crud/decision_staleness.py","finding_id":"finding_87e3241ec84d98ad4eb2","function_name":"recompute_decision_staleness","line_end":93,"line_start":93,"path":["packages/core/src/repowise/core/persistence/crud/decision_staleness.py::recompute_decision_staleness","packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"path_emitted":3,"path_total":3,"provenance":"call-site","reason":"a database call is reached once per loop iteration through recompute_decision_staleness -> sync_links_from_record -> sync_decision_node_links (cross-function N+1 query)"},{"biomarker_type":"io_in_loop","file_path":"packages/core/src/repowise/core/persistence/decision_dedupe.py","finding_id":"finding_f403adb11591ee210497","function_name":"apply_dedupe","line_end":393,"line_start":393,"path":["packages/core/src/repowise/core/persistence/decision_dedupe.py::apply_dedupe","packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"path_emitted":3,"path_total":3,"provenance":"call-site","reason":"a database call is reached once per loop iteration through apply_dedupe -> sync_links_from_record -> sync_decision_node_links (cross-function N+1 query)"}],"evidence_emitted":3,"evidence_next_cursor":3,"evidence_reduced_reason":"evidence_page","evidence_total":8,"evidence_truncated":true,"execution_context":"production","facets":{"actionability_confidence":"medium","amplification":"per_iteration","change_risk":"wide","exposure":"entry_reachable","leverage":"shared","loop_magnitude":"grows_with_data"},"file_path":"packages/core/src/repowise/core/persistence/decision_graph.py","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_symbol":"packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","observations_total":8,"opportunity_id":"perf2_e4f7e2faf8f17903562d","performance_model_version":2,"plan_economics":{"benefit":2.996,"cost":5.0,"effort_bucket":"XL","risk":3.889},"plan_id":"f4b65c2839824c29801d866006483a8f","plan_reason":"A stored performance plan addresses this exact opportunity.","plan_reference":"refac2_8cdc4ea10cf6c05d400d","plan_status":"available","plan_steps":[{"action":"Add a form of sync_links_from_record that takes every key at once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_graph.py","line":null,"order":1,"symbol":"packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/crud/decision_ingest.py","line":208,"order":2,"symbol":"bulk_upsert_decisions"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/crud/decision_staleness.py","line":93,"order":3,"symbol":"recompute_decision_staleness"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_dedupe.py","line":393,"order":4,"symbol":"apply_dedupe"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_manifest.py","line":322,"order":5,"symbol":"import_manifest"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_manifest.py","line":330,"order":6,"symbol":"import_manifest"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_migration.py","line":382,"order":7,"symbol":"apply_migration"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_migration.py","line":587,"order":8,"symbol":"backfill_decision_node_links"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_migration.py","line":653,"order":9,"symbol":"prune_unindexed_scope_files"}],"plan_steps_emitted":9,"plan_steps_total":9,"prerequisites":["batch_api_contract","result_equivalence"],"prerequisites_emitted":2,"prerequisites_total":2,"provenance":"call-site","rank_factors":{"affected_call_sites":6,"boundary_kind":4,"entry_reachability":3,"execution_context":3,"loop_magnitude":2,"multiplier_shape":4,"provenance":3},"rank_position":0,"rank_score":25,"reliable_entry_reachability":true,"resource_fingerprints":[],"resource_fingerprints_emitted":0,"resource_fingerprints_total":0,"shared_path_suffix":["packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"shared_path_suffix_emitted":2,"shared_path_suffix_total":2,"siblings":[],"siblings_emitted":0,"siblings_total":0,"terminal_sink":"packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links","validation":{"basis":"inferred","commands":["pytest tests/unit/persistence/test_decision_acceptance_provenance.py tests/unit/persistence/test_decision_authority.py tests/unit/persistence/test_decision_candidate_meta_capture.py tests/unit/persistence/test_decision_conventions_persist.py tests/unit/persistence/test_decision_evidence.py tests/unit/persistence/test_decision_evolution_update.py tests/unit/persistence/test_decision_graph.py tests/unit/persistence/test_decision_kinds.py tests/unit/persistence/test_decision_manifest.py tests/unit/persistence/test_decision_migration.py tests/unit/persistence/test_decision_scope_basis.py tests/unit/persistence/test_decision_semantic_dedup.py"],"commands_emitted":1,"commands_total":1,"tests":["tests/unit/persistence/test_decision_acceptance_provenance.py","tests/unit/persistence/test_decision_authority.py","tests/unit/persistence/test_decision_candidate_meta_capture.py","tests/unit/persistence/test_decision_conventions_persist.py","tests/unit/persistence/test_decision_evidence.py","tests/unit/persistence/test_decision_evolution_update.py","tests/unit/persistence/test_decision_graph.py","tests/unit/persistence/test_decision_kinds.py","tests/unit/persistence/test_decision_manifest.py","tests/unit/persistence/test_decision_migration.py","tests/unit/persistence/test_decision_scope_basis.py","tests/unit/persistence/test_decision_semantic_dedup.py"],"tests_emitted":12,"tests_total":12,"total":69,"via":"call-graph"},"why_ranked":[{"factor":"affected_call_sites","points":6,"value":8},{"factor":"boundary_kind","points":4,"value":"db"},{"factor":"multiplier_shape","points":4,"value":"io_in_loop"}],"why_ranked_emitted":3,"why_ranked_total":3}],"performance_opportunities_emitted":1,"performance_opportunities_omitted":202,"performance_opportunities_reduced_reason":"collection_cap_and_response_budget","performance_opportunities_total":203,"performance_opportunities_truncated":true,"recovery":{"high_leverage_files":{"call":"get_health(targets=[], include=['files', 'refactoring', 'performance'], repo=None, limit=50, only=['high_leverage_files'], refactoring_view='diversified', cursor=100)","remaining":678},"performance_opportunities":{"call":"get_health(targets=[], include=['files', 'refactoring', 'performance'], repo=None, limit=6, only=['performance_opportunities'], refactoring_view='diversified', cursor=6)","remaining":197},"refactoring_opportunities":{"call":"get_health(targets=[], include=['files', 'refactoring', 'performance'], repo=None, limit=6, only=['refactoring_opportunities'], refactoring_view='diversified', cursor=6)","remaining":794}},"refactoring_opportunities":[{"addresses_primary_problem":true,"affected_files_total":1,"confidence":"high","dependents":8,"effort_bucket":"S","evidence_total":0,"file_nloc":218,"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","judgment_steps":0,"lead_biomarker":"complex_method","lead_refactoring_type":"extract_method","mechanical_steps":1,"opportunity_id":"refop2_ae647f629da0ef35d96e","queue_position":0,"rank_factors":{"benefit":1.694,"cost":1.0,"mechanical_share":0.5,"primary_problem":0.5,"risk":0.0},"rank_position":0,"rank_score":1.694,"recoverable_health":1.694,"refactoring_model_version":2,"status":"open","step_count":1,"steps":[{"applicability":{"classification":"mechanical","facts":{"affected_file_count":1,"blast_size":0,"confidence":"high","cross_file":false,"local_scope":true},"reasons":["dataflow_proved_local_extraction"],"reasons_emitted":1,"reasons_total":1,"unknowns":[],"unknowns_emitted":0,"unknowns_total":0},"confidence":"high","effort_bucket":"S","file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","finding_ids":["finding_2b453a22e0c1b5255f17"],"finding_ids_emitted":1,"finding_ids_total":1,"impact_delta":1.694,"line_end":208,"line_start":94,"plan_id":"refac2_9346327bc364ff91125c","refactoring_type":"extract_method","relocated_by":null,"source_biomarker":"complex_method","target_symbol":"walk_file","validation_profile_id":"validation_987b19c9e18ff1bb"}],"steps_emitted":1,"steps_total":1,"why_ranked":[{"factor":"benefit","value":1.694},{"factor":"cost","value":1.0},{"factor":"mechanical_share","value":0.5}],"why_ranked_emitted":3,"why_ranked_total":3}],"refactoring_opportunities_emitted":1,"refactoring_opportunities_omitted":799,"refactoring_opportunities_reduced_reason":"collection_cap_and_response_budget","refactoring_opportunities_total":800,"refactoring_opportunities_truncated":true,"scope":"all","secondary_rankings":{"modules":{"call":"get_health(repo=None, only=['modules'], limit=50)","total":13},"test_findings":{"call":"get_health(repo=None, only=['test_findings'], limit=50)","total":464},"test_worst_files":{"call":"get_health(repo=None, only=['test_worst_files'], limit=50)","total":1736},"top_findings":{"call":"get_health(repo=None, only=['top_findings'], limit=50)","total":597},"worst_files":{"call":"get_health(repo=None, only=['worst_files'], limit=50)","total":2725}},"truncated":true,"unknown_include_keys":["files"],"unknown_include_keys_emitted":1,"unknown_include_keys_total":1,"unscored_files":0},"get_health:default":{"_meta":{"completeness":{"capped":true,"reason":"limit","shown":26,"total":784},"contract_version":2,"embedder":"mock","embedder_degraded":false,"health_analysis":{"analyzed_at":"2026-09-30T14:04:24.529401","analyzed_commit":"547df91a7e7b","analyzed_commits_distinct":2,"live_verification":{"basis":"index_commit_and_live_git_head","source_bytes_verified":false},"recomputed_this_call":false,"refresh":{"command":"repowise update","precondition":"commit health-relevant working-tree changes first","required_before_comparison":true},"source":"stored_health_analysis","status":"available"},"health_analyzed_at":"2026-09-30T14:04:24.529401","health_analyzed_commit":"547df91a7e7b","health_analyzed_commits_distinct":2,"index_age_days":0,"index_behind":true,"index_scope":{"content_provenance":"model","fingerprint":"4a1aa5b83bd6","full":"get_overview()","git_tier":"full","projection":"compact","run_mode":"standard","status":"partial","version":1},"indexed_commit":"eaf9fb2638af","live_head":"303f55f1785c","response_budget":{"limit_chars":24000,"serialized_chars":16878,"tier":"default"},"semantic_search":false,"stale_warning":"Index is behind live HEAD \u2014 run `repowise update`.","timing_ms":1036.0},"counts":"everything","distribution":{"bands":{"at_risk":{"files":180,"nloc":103273,"pct":13.6},"excellent":{"files":3312,"nloc":388454,"pct":51.0},"fair":{"files":261,"nloc":78236,"pct":10.3},"good":{"files":570,"nloc":140575,"pct":18.4},"needs_work":{"files":138,"nloc":51446,"pct":6.8}},"total_files":4461,"total_nloc":761984},"fix_first":{"basis":{"analyzed_commit":"547df91a7e7ba6e01f7457ac2172e09a36ad47a6","health_analyzed_at":"2026-09-30T14:04:24.529401"},"by_improves":{"defect":768,"maintainability":157,"performance":122},"detail_call":"get_health(fix_id='fix1_97d425a56a911cf78db4')","items":[{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_d21fb1bde221e8df007e","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ae647f629da0ef35d96e"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","line_end":208,"line_start":152,"symbol":"walk_file"},"tier":"now","title":"Extract a helper from walk_file","why":"walk_file has more branches than its tests can easily cover; 8 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_fba1d37b9cbd137f45e7","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_f679a97d234a223b34f5"},"tool":"get_health"},"target":{"file_path":"packages/web/src/components/code-health/triage-tab.tsx","line_end":121,"line_start":71,"symbol":"TriageTab"},"tier":"now","title":"Extract a helper from TriageTab","why":"TriageTab has more branches than its tests can easily cover; it changed 6 times in 90 days, so the cost recurs."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_26c2da3b4c98f8fdef56","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_5ca551b7b7c3293951d0"},"tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/repo_db.py","line_end":null,"line_start":null,"symbol":"ensure_repo_registration"},"tier":"next","title":"Batch the database calls loops make through ensure_repo_registration","why":"ensure_repo_registration makes a database call once per loop iteration; 2 call sites reach it, an entry point reaches it, the loop grows with the data."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_f17556ad6537b1c26c98","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_29080eb5a091e8eeb79d"},"tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/job_executor.py","line_end":null,"line_start":null,"symbol":"_start_job"},"tier":"next","title":"Move the database call in _start_job out of its loop","why":"_start_job makes a database call once per loop iteration; an entry point reaches it, the loop grows with the data."}],"items_emitted":5,"items_total":5,"lead":{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},"model_version":1,"totals":{"candidates":2834,"eligible":1047,"excluded":{"below_min_worth":428,"expected":148,"generated":4,"history_only":137,"no_plan":12,"test":804,"tooling":254},"shown":5}},"gap_analysis":{"files_below_target":860,"files_for_half_gap":22,"files_to_reach_target":57,"target_score":8.0,"weighted_gap_points":324845,"weighted_gross_gap_points":925602},"high_leverage_files":[{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":69.6,"maintainability_score":1.3,"max_ccn":249,"max_nesting":5,"module":"packages/cli","nloc":1810,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"run_update nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":1.4,"total_deduction":9.213,"weighted_deficit":12670},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/incremental.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.35,"maintainability_score":2.0,"max_ccn":54,"max_nesting":5,"module":"packages/core","nloc":1727,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_incremental_index nests 5 levels deep","score":1.41,"share_of_repo_gap_pct":1.2,"total_deduction":8.569,"weighted_deficit":11381},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":75.35,"maintainability_score":2.8,"max_ccn":162,"max_nesting":4,"module":"packages/cli","nloc":1535,"performance_score":10.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: init_command is 739 lines, CCN 162, in a file imported by 7 others","score":1.01,"share_of_repo_gap_pct":1.2,"total_deduction":8.985,"weighted_deficit":10730},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/workspace_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":72.45,"maintainability_score":1.3,"max_ccn":29,"max_nesting":4,"module":"packages/cli","nloc":1341,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"workspace_scan nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":1.0,"total_deduction":9.1,"weighted_deficit":9387},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_test_file":true,"is_test":false,"line_coverage_pct":92.35,"maintainability_score":3.1,"max_ccn":25,"max_nesting":6,"module":"packages/core","nloc":1460,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_find_parent nests 6 levels deep","score":1.74,"share_of_repo_gap_pct":1.0,"total_deduction":8.258,"weighted_deficit":9140},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":1.3,"max_ccn":74,"max_nesting":5,"module":"packages/cli","nloc":1279,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_persist_full_update_async nests 5 levels deep","score":1.11,"share_of_repo_gap_pct":1.0,"total_deduction":8.538,"weighted_deficit":8812},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/dead_code/analyzer.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.47,"maintainability_score":4.2,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":1352,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_get_unsatisfied_prop_guard nests 5 levels deep","score":1.71,"share_of_repo_gap_pct":0.9,"total_deduction":8.291,"weighted_deficit":8504},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/helpers.py","has_test_file":true,"is_test":false,"line_coverage_pct":78.67,"maintainability_score":2.0,"max_ccn":24,"max_nesting":4,"module":"packages/cli","nloc":1121,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"validate_provider_config nests 4 levels deep","score":1.15,"share_of_repo_gap_pct":0.8,"total_deduction":8.85,"weighted_deficit":7679},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_change_risk.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":2.8,"max_ccn":46,"max_nesting":4,"module":"packages/server","nloc":1173,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_cross_repo_block nests 4 levels deep","score":2.01,"share_of_repo_gap_pct":0.8,"total_deduction":7.99,"weighted_deficit":7026},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/engine.py","has_test_file":true,"is_test":false,"line_coverage_pct":81.77,"maintainability_score":1.7,"max_ccn":30,"max_nesting":4,"module":"packages/core","nloc":1013,"performance_score":9.58,"primary_biomarker":"god_class","primary_reason":"HealthAnalyzer is a god class: 669 lines across 19 methods, including a brain method (analyze_async, CCN 30)","score":1.12,"share_of_repo_gap_pct":0.8,"total_deduction":8.73,"weighted_deficit":6969},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/git_indexer/indexer.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.98,"maintainability_score":2.0,"max_ccn":42,"max_nesting":4,"module":"packages/core","nloc":1047,"performance_score":10.0,"primary_biomarker":"god_class","primary_reason":"GitIndexer is a god class: 760 lines across 24 methods, including a brain method (index_changed_files, CCN 42)","score":1.44,"share_of_repo_gap_pct":0.7,"total_deduction":8.555,"weighted_deficit":6868},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/graph-flow.tsx","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":260,"max_nesting":7,"module":"packages/ui","nloc":1235,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"GraphFlow nests 7 levels deep","score":2.5,"share_of_repo_gap_pct":0.7,"total_deduction":7.5,"weighted_deficit":6792},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/resolvers/ts_workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.68,"maintainability_score":2.5,"max_ccn":43,"max_nesting":7,"module":"packages/core","nloc":1001,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"find_npm_script_entry_targets nests 7 levels deep","score":1.43,"share_of_repo_gap_pct":0.7,"total_deduction":8.571,"weighted_deficit":6577},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/workspace/update.py","has_test_file":true,"is_test":false,"line_coverage_pct":87.58,"maintainability_score":2.0,"max_ccn":31,"max_nesting":6,"module":"packages/core","nloc":968,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_merged_repo_excludes nests 6 levels deep","score":1.5,"share_of_repo_gap_pct":0.7,"total_deduction":8.499,"weighted_deficit":6292},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/persist.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.47,"maintainability_score":1.3,"max_ccn":35,"max_nesting":5,"module":"packages/core","nloc":1819,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_analysis nests 5 levels deep","score":4.57,"share_of_repo_gap_pct":0.7,"total_deduction":5.089,"weighted_deficit":6239},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/decision_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":16.05,"maintainability_score":7.7,"max_ccn":8,"max_nesting":3,"module":"packages/cli","nloc":877,"performance_score":10.0,"primary_biomarker":"coverage_gap","primary_reason":"204/243 lines uncovered (16% line coverage)","score":1.0,"share_of_repo_gap_pct":0.7,"total_deduction":9.151,"weighted_deficit":6139},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/ui/provider_selection.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.2,"maintainability_score":3.1,"max_ccn":22,"max_nesting":4,"module":"packages/cli","nloc":851,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_interactive_openai_compatible_select nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.919,"weighted_deficit":5957},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/security_scan.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.82,"maintainability_score":3.1,"max_ccn":52,"max_nesting":5,"module":"packages/core","nloc":828,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"scan_source nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.597,"weighted_deficit":5796},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/context/assembler.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.71,"maintainability_score":2.8,"max_ccn":32,"max_nesting":5,"module":"packages/core","nloc":898,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"assemble_repo_overview nests 5 levels deep","score":1.59,"share_of_repo_gap_pct":0.6,"total_deduction":8.414,"weighted_deficit":5756},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/perf/dialects/python.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":3.3,"max_ccn":28,"max_nesting":4,"module":"packages/core","nloc":892,"performance_score":10.0,"primary_biomarker":"complex_conditional","primary_reason":"if condition combines 5 boolean operators","score":1.61,"share_of_repo_gap_pct":0.6,"total_deduction":8.045,"weighted_deficit":5700}],"high_leverage_files_emitted":20,"high_leverage_files_reduced_reason":"limit","high_leverage_files_total":778,"kpis":{"average_health":7.57,"average_health_unweighted":8.79,"average_health_weighting":"nloc","band":"good","file_count":4461,"history_average":1.0,"hotspot_health":5.84,"maintainability_average":8.08,"performance_analyzed_files":4459,"performance_average":9.74,"performance_coverage_pct":100.0,"performance_covered_files":4452,"performance_findings":1061,"performance_findings_density_per_10k_loc":13.93,"performance_skipped_files":7,"performance_unsupported_languages":[["shell",7]],"performance_unsupported_languages_emitted":1,"performance_unsupported_languages_total":1,"structure_average":1.43,"worst_performer_path":"packages/cli/src/repowise/cli/commands/serve_cmd.py","worst_performer_score":1.0,"worst_test_path":"packages/core/src/repowise/core/analysis/test_impact.py","worst_test_score":2.0},"mode":"dashboard","recovery":{"high_leverage_files":{"call":"get_health(targets=[], include=[], repo=None, limit=50, only=['high_leverage_files'], refactoring_view='diversified', cursor=20)","remaining":758}},"scope":"all","secondary_rankings":{"modules":{"call":"get_health(repo=None, only=['modules'], limit=50)","total":13},"test_findings":{"call":"get_health(repo=None, only=['test_findings'], limit=50)","total":1072},"test_worst_files":{"call":"get_health(repo=None, only=['test_worst_files'], limit=50)","total":1736},"top_findings":{"call":"get_health(repo=None, only=['top_findings'], limit=50)","total":9408},"worst_files":{"call":"get_health(repo=None, only=['worst_files'], limit=50)","total":2725}},"unscored_files":0},"get_health:limit-100":{"_meta":{"completeness":{"capped":true,"reason":"limit_and_response_budget","shown":37,"total":784},"contract_version":2,"embedder":"mock","embedder_degraded":false,"health_analysis":{"analyzed_at":"2026-09-30T14:04:24.529401","analyzed_commit":"547df91a7e7b","analyzed_commits_distinct":2,"live_verification":{"basis":"index_commit_and_live_git_head","source_bytes_verified":false},"recomputed_this_call":false,"refresh":{"command":"repowise update","precondition":"commit health-relevant working-tree changes first","required_before_comparison":true},"source":"stored_health_analysis","status":"available"},"health_analyzed_at":"2026-09-30T14:04:24.529401","health_analyzed_commit":"547df91a7e7b","health_analyzed_commits_distinct":2,"index_age_days":0,"index_behind":true,"index_scope":{"content_provenance":"model","fingerprint":"4a1aa5b83bd6","full":"get_overview()","git_tier":"full","projection":"compact","run_mode":"standard","status":"partial","version":1},"indexed_commit":"eaf9fb2638af","live_head":"303f55f1785c","omitted":{"refs":["repowise#c3e68e923dea","repowise#b2756974b788"],"restore":"`repowise expand <ref>`, or get_symbol(\"repowise#<ref>\", query=...)","tokens":9566},"response_budget":{"limit_chars":24000,"serialized_chars":22580,"tier":"default"},"semantic_search":false,"stale_warning":"Index is behind live HEAD \u2014 run `repowise update`.","state":{"truncated":true},"timing_ms":2005.0},"counts":"everything","distribution":{"bands":{"at_risk":{"files":180,"nloc":103273,"pct":13.6},"excellent":{"files":3312,"nloc":388454,"pct":51.0},"fair":{"files":261,"nloc":78236,"pct":10.3},"good":{"files":570,"nloc":140575,"pct":18.4},"needs_work":{"files":138,"nloc":51446,"pct":6.8}},"total_files":4461,"total_nloc":761984},"fix_first":{"basis":{"analyzed_commit":"547df91a7e7ba6e01f7457ac2172e09a36ad47a6","health_analyzed_at":"2026-09-30T14:04:24.529401"},"by_improves":{"defect":768,"maintainability":157,"performance":122},"detail_call":"get_health(fix_id='fix1_97d425a56a911cf78db4')","items":[{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_d21fb1bde221e8df007e","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ae647f629da0ef35d96e"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","line_end":208,"line_start":152,"symbol":"walk_file"},"tier":"now","title":"Extract a helper from walk_file","why":"walk_file has more branches than its tests can easily cover; 8 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_fba1d37b9cbd137f45e7","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_f679a97d234a223b34f5"},"tool":"get_health"},"target":{"file_path":"packages/web/src/components/code-health/triage-tab.tsx","line_end":121,"line_start":71,"symbol":"TriageTab"},"tier":"now","title":"Extract a helper from TriageTab","why":"TriageTab has more branches than its tests can easily cover; it changed 6 times in 90 days, so the cost recurs."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_26c2da3b4c98f8fdef56","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_5ca551b7b7c3293951d0"},"tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/repo_db.py","line_end":null,"line_start":null,"symbol":"ensure_repo_registration"},"tier":"next","title":"Batch the database calls loops make through ensure_repo_registration","why":"ensure_repo_registration makes a database call once per loop iteration; 2 call sites reach it, an entry point reaches it, the loop grows with the data."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_f17556ad6537b1c26c98","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_29080eb5a091e8eeb79d"},"tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/job_executor.py","line_end":null,"line_start":null,"symbol":"_start_job"},"tier":"next","title":"Move the database call in _start_job out of its loop","why":"_start_job makes a database call once per loop iteration; an entry point reaches it, the loop grows with the data."}],"items_emitted":5,"items_total":5,"lead":{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},"model_version":1,"totals":{"candidates":2834,"eligible":1047,"excluded":{"below_min_worth":428,"expected":148,"generated":4,"history_only":137,"no_plan":12,"test":804,"tooling":254},"shown":5}},"gap_analysis":{"files_below_target":860,"files_for_half_gap":22,"files_to_reach_target":57,"target_score":8.0,"weighted_gap_points":324845,"weighted_gross_gap_points":925602},"high_leverage_files":[{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":69.6,"maintainability_score":1.3,"max_ccn":249,"max_nesting":5,"module":"packages/cli","nloc":1810,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"run_update nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":1.4,"total_deduction":9.213,"weighted_deficit":12670},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/incremental.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.35,"maintainability_score":2.0,"max_ccn":54,"max_nesting":5,"module":"packages/core","nloc":1727,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_incremental_index nests 5 levels deep","score":1.41,"share_of_repo_gap_pct":1.2,"total_deduction":8.569,"weighted_deficit":11381},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":75.35,"maintainability_score":2.8,"max_ccn":162,"max_nesting":4,"module":"packages/cli","nloc":1535,"performance_score":10.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: init_command is 739 lines, CCN 162, in a file imported by 7 others","score":1.01,"share_of_repo_gap_pct":1.2,"total_deduction":8.985,"weighted_deficit":10730},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/workspace_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":72.45,"maintainability_score":1.3,"max_ccn":29,"max_nesting":4,"module":"packages/cli","nloc":1341,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"workspace_scan nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":1.0,"total_deduction":9.1,"weighted_deficit":9387},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_test_file":true,"is_test":false,"line_coverage_pct":92.35,"maintainability_score":3.1,"max_ccn":25,"max_nesting":6,"module":"packages/core","nloc":1460,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_find_parent nests 6 levels deep","score":1.74,"share_of_repo_gap_pct":1.0,"total_deduction":8.258,"weighted_deficit":9140},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":1.3,"max_ccn":74,"max_nesting":5,"module":"packages/cli","nloc":1279,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_persist_full_update_async nests 5 levels deep","score":1.11,"share_of_repo_gap_pct":1.0,"total_deduction":8.538,"weighted_deficit":8812},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/dead_code/analyzer.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.47,"maintainability_score":4.2,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":1352,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_get_unsatisfied_prop_guard nests 5 levels deep","score":1.71,"share_of_repo_gap_pct":0.9,"total_deduction":8.291,"weighted_deficit":8504},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/helpers.py","has_test_file":true,"is_test":false,"line_coverage_pct":78.67,"maintainability_score":2.0,"max_ccn":24,"max_nesting":4,"module":"packages/cli","nloc":1121,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"validate_provider_config nests 4 levels deep","score":1.15,"share_of_repo_gap_pct":0.8,"total_deduction":8.85,"weighted_deficit":7679},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_change_risk.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":2.8,"max_ccn":46,"max_nesting":4,"module":"packages/server","nloc":1173,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_cross_repo_block nests 4 levels deep","score":2.01,"share_of_repo_gap_pct":0.8,"total_deduction":7.99,"weighted_deficit":7026},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/engine.py","has_test_file":true,"is_test":false,"line_coverage_pct":81.77,"maintainability_score":1.7,"max_ccn":30,"max_nesting":4,"module":"packages/core","nloc":1013,"performance_score":9.58,"primary_biomarker":"god_class","primary_reason":"HealthAnalyzer is a god class: 669 lines across 19 methods, including a brain method (analyze_async, CCN 30)","score":1.12,"share_of_repo_gap_pct":0.8,"total_deduction":8.73,"weighted_deficit":6969},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/git_indexer/indexer.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.98,"maintainability_score":2.0,"max_ccn":42,"max_nesting":4,"module":"packages/core","nloc":1047,"performance_score":10.0,"primary_biomarker":"god_class","primary_reason":"GitIndexer is a god class: 760 lines across 24 methods, including a brain method (index_changed_files, CCN 42)","score":1.44,"share_of_repo_gap_pct":0.7,"total_deduction":8.555,"weighted_deficit":6868},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/graph-flow.tsx","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":260,"max_nesting":7,"module":"packages/ui","nloc":1235,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"GraphFlow nests 7 levels deep","score":2.5,"share_of_repo_gap_pct":0.7,"total_deduction":7.5,"weighted_deficit":6792},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/resolvers/ts_workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.68,"maintainability_score":2.5,"max_ccn":43,"max_nesting":7,"module":"packages/core","nloc":1001,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"find_npm_script_entry_targets nests 7 levels deep","score":1.43,"share_of_repo_gap_pct":0.7,"total_deduction":8.571,"weighted_deficit":6577},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/workspace/update.py","has_test_file":true,"is_test":false,"line_coverage_pct":87.58,"maintainability_score":2.0,"max_ccn":31,"max_nesting":6,"module":"packages/core","nloc":968,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_merged_repo_excludes nests 6 levels deep","score":1.5,"share_of_repo_gap_pct":0.7,"total_deduction":8.499,"weighted_deficit":6292},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/persist.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.47,"maintainability_score":1.3,"max_ccn":35,"max_nesting":5,"module":"packages/core","nloc":1819,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_analysis nests 5 levels deep","score":4.57,"share_of_repo_gap_pct":0.7,"total_deduction":5.089,"weighted_deficit":6239},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/decision_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":16.05,"maintainability_score":7.7,"max_ccn":8,"max_nesting":3,"module":"packages/cli","nloc":877,"performance_score":10.0,"primary_biomarker":"coverage_gap","primary_reason":"204/243 lines uncovered (16% line coverage)","score":1.0,"share_of_repo_gap_pct":0.7,"total_deduction":9.151,"weighted_deficit":6139},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/ui/provider_selection.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.2,"maintainability_score":3.1,"max_ccn":22,"max_nesting":4,"module":"packages/cli","nloc":851,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_interactive_openai_compatible_select nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.919,"weighted_deficit":5957},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/security_scan.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.82,"maintainability_score":3.1,"max_ccn":52,"max_nesting":5,"module":"packages/core","nloc":828,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"scan_source nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.597,"weighted_deficit":5796},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/context/assembler.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.71,"maintainability_score":2.8,"max_ccn":32,"max_nesting":5,"module":"packages/core","nloc":898,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"assemble_repo_overview nests 5 levels deep","score":1.59,"share_of_repo_gap_pct":0.6,"total_deduction":8.414,"weighted_deficit":5756},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/perf/dialects/python.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":3.3,"max_ccn":28,"max_nesting":4,"module":"packages/core","nloc":892,"performance_score":10.0,"primary_biomarker":"complex_conditional","primary_reason":"if condition combines 5 boolean operators","score":1.61,"share_of_repo_gap_pct":0.6,"total_deduction":8.045,"weighted_deficit":5700},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/doctor_cmd/repo_checks.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":1.3,"max_ccn":69,"max_nesting":4,"module":"packages/cli","nloc":884,"performance_score":9.3,"primary_biomarker":"brain_method","primary_reason":"Brain Method: _run_repo_checks is 468 lines, CCN 69, in a file imported by 15 others","score":1.65,"share_of_repo_gap_pct":0.6,"total_deduction":8.002,"weighted_deficit":5613},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.32,"maintainability_score":2.5,"max_ccn":18,"max_nesting":5,"module":"packages/cli","nloc":850,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"claude_code_leftover_reason nests 5 levels deep","score":1.42,"share_of_repo_gap_pct":0.6,"total_deduction":8.422,"weighted_deficit":5593},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_context/targets.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.59,"maintainability_score":4.0,"max_ccn":176,"max_nesting":5,"module":"packages/server","nloc":942,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_resolve_one_target nests 5 levels deep","score":2.16,"share_of_repo_gap_pct":0.6,"total_deduction":7.838,"weighted_deficit":5501},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/sigma/use-sigma.ts","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":131,"max_nesting":4,"module":"packages/ui","nloc":981,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"makeDrawNodeHover nests 4 levels deep","score":2.5,"share_of_repo_gap_pct":0.6,"total_deduction":7.499,"weighted_deficit":5396},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/_answer_pipeline.py","has_test_file":true,"is_test":false,"line_coverage_pct":68.99,"maintainability_score":3.0,"max_ccn":32,"max_nesting":4,"module":"packages/server","nloc":765,"performance_score":9.79,"primary_biomarker":"nested_complexity","primary_reason":"expand_via_parent_page nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.24,"weighted_deficit":5355},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_symbol.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.01,"maintainability_score":4.0,"max_ccn":41,"max_nesting":4,"module":"packages/server","nloc":911,"performance_score":8.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: get_symbol is 208 lines, CCN 41, in a file imported by 7 others","score":2.14,"share_of_repo_gap_pct":0.6,"total_deduction":7.86,"weighted_deficit":5338},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_context/enrichment.py","has_test_file":true,"is_test":false,"line_coverage_pct":59.91,"maintainability_score":3.7,"max_ccn":53,"max_nesting":4,"module":"packages/server","nloc":757,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"attach_doc_references nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.552,"weighted_deficit":5299},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/hook_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":74.29,"maintainability_score":4.3,"max_ccn":26,"max_nesting":4,"module":"packages/cli","nloc":890,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"hook_stats nests 4 levels deep","score":2.13,"share_of_repo_gap_pct":0.6,"total_deduction":7.714,"weighted_deficit":5224},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":65.84,"maintainability_score":2.8,"max_ccn":44,"max_nesting":4,"module":"packages/cli","nloc":768,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_workspace_init nests 4 levels deep","score":1.25,"share_of_repo_gap_pct":0.6,"total_deduction":8.753,"weighted_deficit":5184},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/concept_tree/vocabulary.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":3.7,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":910,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_harvest nests 5 levels deep","score":2.35,"share_of_repo_gap_pct":0.6,"total_deduction":7.651,"weighted_deficit":5142},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/_server.py","has_test_file":true,"is_test":false,"line_coverage_pct":60.59,"maintainability_score":2.0,"max_ccn":18,"max_nesting":4,"module":"packages/server","nloc":718,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"_detect_workspace nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.5,"total_deduction":9.57,"weighted_deficit":5026}],"high_leverage_files_emitted":31,"high_leverage_files_omitted":747,"high_leverage_files_reduced_reason":"limit_and_response_budget","high_leverage_files_total":778,"high_leverage_files_truncated":true,"kpis":{"average_health":7.57,"average_health_unweighted":8.79,"average_health_weighting":"nloc","band":"good","file_count":4461,"history_average":1.0,"hotspot_health":5.84,"maintainability_average":8.08,"performance_analyzed_files":4459,"performance_average":9.74,"performance_coverage_pct":100.0,"performance_covered_files":4452,"performance_findings":1061,"performance_findings_density_per_10k_loc":13.93,"performance_skipped_files":7,"performance_unsupported_languages":[["shell",7]],"performance_unsupported_languages_emitted":1,"performance_unsupported_languages_total":1,"structure_average":1.43,"worst_performer_path":"packages/cli/src/repowise/cli/commands/serve_cmd.py","worst_performer_score":1.0,"worst_test_path":"packages/core/src/repowise/core/analysis/test_impact.py","worst_test_score":2.0},"mode":"dashboard","omission_marker":"[repowise#b2756974b788: 25 lines omitted (~175 tokens); restore: repowise expand b2756974b788]","recovery":{"high_leverage_files":{"call":"get_health(targets=[], include=[], repo=None, limit=50, only=['high_leverage_files'], refactoring_view='diversified', cursor=100)","remaining":678}},"scope":"all","secondary_rankings":{"modules":{"call":"get_health(repo=None, only=['modules'], limit=50)","total":13},"test_findings":{"call":"get_health(repo=None, only=['test_findings'], limit=50)","total":1072},"test_worst_files":{"call":"get_health(repo=None, only=['test_worst_files'], limit=50)","total":1736},"top_findings":{"call":"get_health(repo=None, only=['top_findings'], limit=50)","total":9408},"worst_files":{"call":"get_health(repo=None, only=['worst_files'], limit=50)","total":2725}},"truncated":true,"unscored_files":0},"get_overview:all-includes":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#4e8f0bb0e304"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":1376},"response_budget":{"limit_chars":32000,"serialized_chars":7934,"tier":"expanded"},"state":{"truncated":true}},"architecture":{"layer_order":["UI","CLI","Application","API","Config","Utility","Data","Types","Service","Docs & Tooling","Test"],"layers":[{"file_count":641,"name":"Contributor 2"},{"file_count":261,"name":"Contributor 6"},{"file_count":191,"name":"Contributor 15"},{"file_count":92,"name":"Contributor 12"},{"file_count":28,"name":"Contributor 10"},{"file_count":52,"name":"Contributor 17"},{"file_count":60,"name":"Contributor 13"},{"file_count":81,"name":"Contributor 18"},{"file_count":981,"name":"Contributor 4"},{"file_count":220,"name":"Contributor 8"},{"file_count":1478,"name":"Contributor 11"}],"tour_available":true,"tour_step_count":12},"code_health":{"average_health":6.94,"band":"warning","distribution":{"bands":{"alert":{"files":212,"nloc":110556,"pct":17.5},"healthy":{"files":2678,"nloc":299568,"pct":47.5},"warning":{"files":903,"nloc":220758,"pct":35.0}},"total_files":3793,"total_nloc":630882},"file_count":3793,"hotspot_health":4.35,"open_findings":14239,"worst_performer_path":"packages/server/src/repowise/server/routers/repos.py","worst_performer_score":1.0},"content_hint":"Overview essay trimmed to its summary section. Call get_overview(include=[\"content\"]) for the full walkthrough.","content_md":"## Project Summary\n\nRepowise consumes source repositories and configuration files, walks and parses them through language-specific ingestion, persists and analyzes the resulting code graph, and generates documentation, health insights, and interactive views exposed through CLI, MCP/server APIs, web apps, and VS Code.\n\nIt is a Python/TypeScript monorepo organized around a shared analysis engine and several presentation surfaces. The repository contains 3,659 files and approximately 740k lines of code; dependency analysis reports 18 circular dependencies. Recent hotspots include dead-code analysis, MCP answer generation, and the web sidebar.","entry_points":["packages/server/src/repowise/server/app.py","packages/cli/src/repowise/cli/main.py","packages/vscode/webview/src/views/risk/App.tsx","packages/vscode/webview/src/views/decisions/App.tsx","packages/vscode/webview/src/views/settings/App.tsx","packages/vscode/webview/src/views/architecture/App.tsx","packages/vscode/webview/src/views/home/App.tsx","packages/vscode/webview/src/views/refactoring/App.tsx"],"git_health":{"avg_bus_factor":1.2,"churn_trend":"increasing","files_git_attributed":4136,"files_with_bus_factor_1":3339,"hotspot_count":419,"top_churn_modules":["packages/core","tests/unit","packages/ui","packages/server","packages/web"]},"key_modules":[{"name":"Contributor 3","path":"packages/api-client","section":"6"},{"name":"Contributor 14","path":"packages/api-client/src","section":"7"},{"name":"Contributor 5","path":"packages/vscode/src/features","section":"8"},{"name":"Contributor 9","path":"packages/vscode/webview/src/runtime","section":"9"},{"name":"Contributor 7","path":"packages/web","section":"10"},{"name":"Contributor 21","path":"packages/web/src/app/repos/[id]","section":"11"},{"name":"Contributor 1","path":"packages/web/src/app/repos/[id]/docs","section":"11.1"},{"name":"Contributor 16","path":"packages/web/src/app/repos/[id]/settings","section":"11.2"}],"more":"get_overview(include=[...]) also serves: \"outline\" (the wiki page tree), \"tour\" (guided_tour + reading_order), \"decisions\", \"graph\" (code communities), \"ownership\" (top owners, silos), \"content\" (the full essay).","omission_marker":"[repowise#4e8f0bb0e304: 90 lines omitted (~1376 tokens); restore: repowise expand 4e8f0bb0e304]","title":"Repository Overview: repowise","tool_surface":{"counts":{"default":10,"eligible":13,"enabled":10,"opt_in_available":3,"tiers":{"canonical":10}},"enabled":["get_answer","get_context","get_symbol","search_codebase","get_risk","get_change_risk","get_why","get_overview","get_health","get_dead_code"],"mode":"single_repo","opt_in":[{"description":"Find how two files/modules are connected in the dependency graph.","enabled":false,"name":"get_dependency_path"},{"description":"Show how the codebase executes: top entry points and their call traces.","enabled":false,"name":"get_execution_flows"},{"description":"Generate refactored code + a unified diff for one refactoring plan.","enabled":false,"name":"generate_refactoring_code"}],"recipes":[{"call":"get_answer(question=\"how does X work?\")","name":"answer_question"},{"call":"get_context(targets=[\"path\"], include=[\"skeleton\"])","name":"read_file_shape"},{"call":"search_codebase(query=\"identifier or path\", mode=\"auto\")","name":"find_raw_hits"},{"call":"get_risk(targets=[\"path\"])","name":"assess_hotspot"},{"call":"get_risk(targets=[\"path\"], changed_files=[\"path\"])","name":"review_change"},{"call":"get_why(targets=[\"path\"])","name":"read_rationale"},{"call":"get_health(only=[\"directive\"])","name":"health_directive"},{"call":"get_health(targets=[\"path\"], include=[\"refactoring\"])","name":"health_file_self_check"},{"call":"get_health(targets=[\"module:path\"], only=[\"modules\",\"metrics\"])","name":"health_module_triage"},{"call":"get_health(include=[\"trend\"], only=[\"trend\"])","name":"health_trend"},{"call":"get_health(include=[\"accuracy\"], only=[\"accuracy\"])","name":"health_accuracy"},{"call":"get_health(include=[\"coverage\"], only=[\"coverage\"])","name":"health_coverage"},{"call":"get_health(include=[\"performance\",\"refactoring\"], only=[\"performance_opportunities\",\"refactoring_plans\"])","name":"health_performance_refactoring"},{"call":"get_health(include=[\"performance\"], only=[\"performance_summary\"])","name":"health_performance_summary"},{"call":"get_health(opportunity_id=\"perf...\")","name":"health_performance_opportunity"},{"call":"get_health(opportunity_id=\"perf...\", only=[\"performance_evidence\"], cursor=0)","name":"health_performance_evidence"}],"tools":[{"default":true,"description":"Answer a how, where, or why question in one evidence-grounded call.","name":"get_answer","tier":"canonical"},{"default":true,"description":"Triage card for files / modules / symbols \u2014 relationships, not source bytes.","name":"get_context","tier":"canonical"},{"default":true,"description":"Follow-up read of one symbol whose id another response already gave you.","name":"get_symbol","tier":"canonical"},{"default":true,"description":"Find code by concept, symbol, or path \u2014 hybrid codebase search.","name":"search_codebase","tier":"canonical"},{"default":true,"description":"What history says about touching these files \u2014 bug fixes, churn, owners.","name":"get_risk","tier":"canonical"},{"default":true,"description":"Review a commit, ``base..head`` range, or uncommitted work.","name":"get_change_risk","tier":"canonical"},{"default":true,"description":"Why this code is shaped this way \u2014 decision records + evidence commits.","name":"get_why","tier":"canonical"},{"default":true,"description":"Architecture map for an unfamiliar repo \u2014 first call when you don't know your way around.","name":"get_overview","tier":"canonical"},{"default":true,"description":"Code-health scores and findings from stored analysis.","name":"get_health","tier":"canonical"},{"default":true,"description":"Unused exports, unreachable files, zombie packages \u2014 tiered by confidence.","name":"get_dead_code","tier":"canonical"}]}},"get_overview:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#4e8f0bb0e304"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":1376},"response_budget":{"limit_chars":24000,"serialized_chars":7933,"tier":"default"},"state":{"truncated":true}},"architecture":{"layer_order":["UI","CLI","Application","API","Config","Utility","Data","Types","Service","Docs & Tooling","Test"],"layers":[{"file_count":641,"name":"Contributor 2"},{"file_count":261,"name":"Contributor 6"},{"file_count":191,"name":"Contributor 15"},{"file_count":92,"name":"Contributor 12"},{"file_count":28,"name":"Contributor 10"},{"file_count":52,"name":"Contributor 17"},{"file_count":60,"name":"Contributor 13"},{"file_count":81,"name":"Contributor 18"},{"file_count":981,"name":"Contributor 4"},{"file_count":220,"name":"Contributor 8"},{"file_count":1478,"name":"Contributor 11"}],"tour_available":true,"tour_step_count":12},"code_health":{"average_health":6.94,"band":"warning","distribution":{"bands":{"alert":{"files":212,"nloc":110556,"pct":17.5},"healthy":{"files":2678,"nloc":299568,"pct":47.5},"warning":{"files":903,"nloc":220758,"pct":35.0}},"total_files":3793,"total_nloc":630882},"file_count":3793,"hotspot_health":4.35,"open_findings":14239,"worst_performer_path":"packages/server/src/repowise/server/routers/repos.py","worst_performer_score":1.0},"content_hint":"Overview essay trimmed to its summary section. Call get_overview(include=[\"content\"]) for the full walkthrough.","content_md":"## Project Summary\n\nRepowise consumes source repositories and configuration files, walks and parses them through language-specific ingestion, persists and analyzes the resulting code graph, and generates documentation, health insights, and interactive views exposed through CLI, MCP/server APIs, web apps, and VS Code.\n\nIt is a Python/TypeScript monorepo organized around a shared analysis engine and several presentation surfaces. The repository contains 3,659 files and approximately 740k lines of code; dependency analysis reports 18 circular dependencies. Recent hotspots include dead-code analysis, MCP answer generation, and the web sidebar.","entry_points":["packages/server/src/repowise/server/app.py","packages/cli/src/repowise/cli/main.py","packages/vscode/webview/src/views/risk/App.tsx","packages/vscode/webview/src/views/decisions/App.tsx","packages/vscode/webview/src/views/settings/App.tsx","packages/vscode/webview/src/views/architecture/App.tsx","packages/vscode/webview/src/views/home/App.tsx","packages/vscode/webview/src/views/refactoring/App.tsx"],"git_health":{"avg_bus_factor":1.2,"churn_trend":"increasing","files_git_attributed":4136,"files_with_bus_factor_1":3339,"hotspot_count":419,"top_churn_modules":["packages/core","tests/unit","packages/ui","packages/server","packages/web"]},"key_modules":[{"name":"Contributor 3","path":"packages/api-client","section":"6"},{"name":"Contributor 14","path":"packages/api-client/src","section":"7"},{"name":"Contributor 5","path":"packages/vscode/src/features","section":"8"},{"name":"Contributor 9","path":"packages/vscode/webview/src/runtime","section":"9"},{"name":"Contributor 7","path":"packages/web","section":"10"},{"name":"Contributor 21","path":"packages/web/src/app/repos/[id]","section":"11"},{"name":"Contributor 1","path":"packages/web/src/app/repos/[id]/docs","section":"11.1"},{"name":"Contributor 16","path":"packages/web/src/app/repos/[id]/settings","section":"11.2"}],"more":"get_overview(include=[...]) also serves: \"outline\" (the wiki page tree), \"tour\" (guided_tour + reading_order), \"decisions\", \"graph\" (code communities), \"ownership\" (top owners, silos), \"content\" (the full essay).","omission_marker":"[repowise#4e8f0bb0e304: 90 lines omitted (~1376 tokens); restore: repowise expand 4e8f0bb0e304]","title":"Repository Overview: repowise","tool_surface":{"counts":{"default":10,"eligible":13,"enabled":10,"opt_in_available":3,"tiers":{"canonical":10}},"enabled":["get_answer","get_context","get_symbol","search_codebase","get_risk","get_change_risk","get_why","get_overview","get_health","get_dead_code"],"mode":"single_repo","opt_in":[{"description":"Find how two files/modules are connected in the dependency graph.","enabled":false,"name":"get_dependency_path"},{"description":"Show how the codebase executes: top entry points and their call traces.","enabled":false,"name":"get_execution_flows"},{"description":"Generate refactored code + a unified diff for one refactoring plan.","enabled":false,"name":"generate_refactoring_code"}],"recipes":[{"call":"get_answer(question=\"how does X work?\")","name":"answer_question"},{"call":"get_context(targets=[\"path\"], include=[\"skeleton\"])","name":"read_file_shape"},{"call":"search_codebase(query=\"identifier or path\", mode=\"auto\")","name":"find_raw_hits"},{"call":"get_risk(targets=[\"path\"])","name":"assess_hotspot"},{"call":"get_risk(targets=[\"path\"], changed_files=[\"path\"])","name":"review_change"},{"call":"get_why(targets=[\"path\"])","name":"read_rationale"},{"call":"get_health(only=[\"directive\"])","name":"health_directive"},{"call":"get_health(targets=[\"path\"], include=[\"refactoring\"])","name":"health_file_self_check"},{"call":"get_health(targets=[\"module:path\"], only=[\"modules\",\"metrics\"])","name":"health_module_triage"},{"call":"get_health(include=[\"trend\"], only=[\"trend\"])","name":"health_trend"},{"call":"get_health(include=[\"accuracy\"], only=[\"accuracy\"])","name":"health_accuracy"},{"call":"get_health(include=[\"coverage\"], only=[\"coverage\"])","name":"health_coverage"},{"call":"get_health(include=[\"performance\",\"refactoring\"], only=[\"performance_opportunities\",\"refactoring_plans\"])","name":"health_performance_refactoring"},{"call":"get_health(include=[\"performance\"], only=[\"performance_summary\"])","name":"health_performance_summary"},{"call":"get_health(opportunity_id=\"perf...\")","name":"health_performance_opportunity"},{"call":"get_health(opportunity_id=\"perf...\", only=[\"performance_evidence\"], cursor=0)","name":"health_performance_evidence"}],"tools":[{"default":true,"description":"Answer a how, where, or why question in one evidence-grounded call.","name":"get_answer","tier":"canonical"},{"default":true,"description":"Triage card for files / modules / symbols \u2014 relationships, not source bytes.","name":"get_context","tier":"canonical"},{"default":true,"description":"Follow-up read of one symbol whose id another response already gave you.","name":"get_symbol","tier":"canonical"},{"default":true,"description":"Find code by concept, symbol, or path \u2014 hybrid codebase search.","name":"search_codebase","tier":"canonical"},{"default":true,"description":"What history says about touching these files \u2014 bug fixes, churn, owners.","name":"get_risk","tier":"canonical"},{"default":true,"description":"Review a commit, ``base..head`` range, or uncommitted work.","name":"get_change_risk","tier":"canonical"},{"default":true,"description":"Why this code is shaped this way \u2014 decision records + evidence commits.","name":"get_why","tier":"canonical"},{"default":true,"description":"Architecture map for an unfamiliar repo \u2014 first call when you don't know your way around.","name":"get_overview","tier":"canonical"},{"default":true,"description":"Code-health scores and findings from stored analysis.","name":"get_health","tier":"canonical"},{"default":true,"description":"Unused exports, unreachable files, zombie packages \u2014 tiered by confidence.","name":"get_dead_code","tier":"canonical"}]}},"get_risk:one-target":{"_meta":{"completeness":{"capped":true,"reason":"construction_cap","shown":5,"total":25},"contract_version":1,"embedder_degraded":false,"floor":["co_change_partners_total","dependents_count"],"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#160ca2a7eeeb"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":1810},"response_budget":{"limit_chars":24000,"serialized_chars":3742,"tier":"default"},"state":{"truncated":true}},"omission_marker":"[repowise#160ca2a7eeeb: 258 lines omitted (~1810 tokens); restore: repowise expand 160ca2a7eeeb]","targets":{"packages/core/src/repowise/core/ingestion/call_resolver.py":{"bus_factor":1,"co_change_partners":[{"direction":"undirected","evidence_kind":"historical","file_path":"tests/unit/ingestion/test_call_resolver_strategies.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-08-23","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":6,"weight":2.906},{"direction":"undirected","evidence_kind":"historical","file_path":"packages/core/src/repowise/core/ingestion/languages/receiver_types.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-08-25","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":9,"weight":2.799},{"direction":"undirected","evidence_kind":"historical","file_path":"packages/core/src/repowise/core/ingestion/models.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-08-30","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":20,"weight":2.578},{"direction":"undirected","evidence_kind":"historical","file_path":"tests/unit/ingestion/test_receiver_types.py","has_import_link":false,"has_structural_link":false,"last_co_change":"2026-08-25","provenance":"git_history","relationship_type":"co_change","support":7,"weight":2.315},{"direction":"undirected","evidence_kind":"historical","file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_import_link":false,"has_structural_link":false,"last_co_change":"2026-09-04","provenance":"git_history","relationship_type":"co_change","support":17,"weight":1.567}],"co_change_partners_emitted":5,"co_change_partners_omitted":20,"co_change_partners_reduced_reason":"construction_cap","co_change_partners_total":25,"co_change_partners_truncated":true,"commit_count_capped":false,"contributor_count":3,"coverage_pct":91.47,"defect_profile":{"bug_magnet":true,"fix_count":22,"last_fix_days_ago":10,"top_symbols":{"__init__":5,"_link_declarations":4,"_published":3},"window":"6 months"},"dependents_count":11,"episodes":21,"health_score":1.81,"hotspot_score":0.9995,"is_hotspot":true,"owner_pct":0.9412,"primary_owner":"Contributor 19","recent_owner":"Contributor 19","recent_owner_pct":0.9412,"risk_summary":"packages/core/src/repowise/core/ingestion/call_resolver.py \u2014 22 bug fixes in 6mo, last 10d ago (bug magnet), hotspot score 100% (increasing), 11 direct dependents, bug-prone, feature-active, 25 co-change partners, owned 94% by Contributor 19, bus factor risk (sole maintainer: Contributor 19)","security_signals":[],"target":"packages/core/src/repowise/core/ingestion/call_resolver.py","test_gap":false,"top_biomarkers":[{"biomarker_type":"change_entropy","function_name":null,"impact":1.18,"severity":"critical"},{"biomarker_type":"co_change_scatter","function_name":null,"impact":0.85,"severity":"high"},{"biomarker_type":"prior_defect","function_name":null,"impact":0.78,"severity":"critical"}],"trend":"increasing"}}},"get_symbol:largest-depth-3":{"_meta":{"completeness":{"capped":true},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#63171fe88e36","repowise#bb943f58f05d"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":8087},"replaced_tokens":25149,"response_budget":{"limit_chars":24000,"serialized_chars":22623,"tier":"default"},"state":{"truncated":true},"timing_ms":6.7,"tokens_saved":19480},"continuation":"packages/core/src/repowise/core/ingestion/call_resolver.py:797-2117","continuation_reference":{"id":"packages/core/src/repowise/core/ingestion/call_resolver.py:797-2117","kind":"file_range","path":"packages/core/src/repowise/core/ingestion/call_resolver.py","range":[797,2117],"repository":"default","source_kind":"source","verification_basis":"live"},"end_line":796,"file":"packages/core/src/repowise/core/ingestion/call_resolver.py","kind":"class","name":"CallResolver","omission_marker":"[repowise#bb943f58f05d: 11 lines omitted (~136 tokens); restore: repowise expand bb943f58f05d]","qualified_name":"packages.core.src.repowise.core.ingestion.call_resolver.CallResolver","signature":"class CallResolver","source":" 197\t _JVM_STRATEGIES,\n 198\t free=(\"_resolve_java_same_package_unique\",),\n 199\t member_fallback=_TYPED_RECEIVER,\n 200\t ),\n 201\t \"kotlin\": replace(_JVM_STRATEGIES, member_fallback=_TYPED_RECEIVER),\n 202\t \"csharp\": _LanguageCallStrategies(member_fallback=_TYPED_RECEIVER),\n 203\t \"python\": _LanguageCallStrategies(member_fallback=_TYPED_RECEIVER),\n 204\t # Swift registers the fallback and nothing else: it has no package\n 205\t # tier of its own, so a typed receiver is looked for in the caller's\n 206\t # file, in what the file imports, and then in the global pair index.\n 207\t \"swift\": _LanguageCallStrategies(member_fallback=_TYPED_RECEIVER),\n 208\t \"cpp\": _CPP_STRATEGIES,\n 209\t \"c\": _CPP_STRATEGIES,\n 210\t}\n 211\t\n 212\t_SOURCE_CACHE_FILES = 4\n 213\t_BODY_TYPE_CACHE_ENTRIES = 2048\n 214\t\n 215\t# Phase admission is intentionally explicit. P16 lands the behavior-preserving\n 216\t# substrate with no language enabled; later phases add only measured lanes.\n 217\tPRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES: frozenset[str] = frozenset({\"cpp\"})\n 218\t\n 219\t\n 220\t@dataclass(frozen=True, slots=True)\n 221\tclass ResolvedCall:\n 222\t \"\"\"A call resolved to concrete symbol IDs with a confidence score.\"\"\"\n 223\t\n 224\t caller_id: str # symbol node ID of the calling function/method\n 225\t callee_id: str # symbol node ID of the called function/method\n 226\t confidence: float # 0.0\u20131.0\n 227\t line: int # call site line number (for diagnostics)\n 228\t origin: ResolutionOrigin # which strategy below produced it\n 229\t edge_type: CallSiteEdgeType = \"calls\" # carried through from the CallSite\n 230\t supplied_props: frozenset[str] | None = None # prop names supplied in JSX element (None if unknown/spread)\n 231\t\n 232\t\n 233\tdef _same_translation_unit(decl_file: str, def_file: str) -> bool:\n 234\t \"\"\"Are these two paths the same C++ translation unit?\n 235\t\n 236\t Compared on the base name, because a public header rarely sits beside its\n 237\t implementation (``include/pkg/thing.h`` against ``src/thing.cc``). The\n 238\t include relation would be the better test, but a C++ include binds to the\n 239\t path as written and usually is not a file key.\n 240\t \"\"\"\n 241\t return (\n 242\t decl_file == def_file\n 243\t or PurePosixPath(decl_file).stem == PurePosixPath(def_file).stem\n 244\t )\n 245\t\n 246\t\n 247\tclass CallResolver:\n 248\t \"\"\"Resolve raw CallSites to symbol-level edges.\n 249\t\n 250\t Constructed once per ``GraphBuilder.build()`` call with the full set of\n 251\t parsed files and import edges, then driven one file at a time.\n 252\t\n 253\t ``resolve_file()`` is **not** safe to call concurrently. Several lazy\n 254\t caches are filled during resolution, and the capped ones evict wholesale.\n 255\t Every cached value is a pure function of state fixed at construction, so a\n 256\t race would cost recomputation rather than a wrong answer, but the eviction\n 257\t makes concurrent use pointless as well as unsupported.\n 258\t \"\"\"\n 259\t\n 260\t def __init__(\n 261\t self,\n 262\t parsed_files: dict[str, ParsedFile],\n 263\t import_targets: dict[str, set[str]],\n 264\t *,\n 265\t repo_path: str | None = None,\n 266\t import_maps: Any | None = None,\n 267\t heritage_parents: dict[str, set[str]] | None = None,\n 268\t return_type_chain_languages: frozenset[str] | None = None,\n 269\t ) -> None:\n 270\t # {type symbol id: parent type symbol ids}, from the caller's already\n 271\t # resolved heritage. Absent when the resolver is built standalone, in\n 272\t # which case the inherited tier simply never fires.\n 273\t self._heritage_parents: dict[str, set[str]] = heritage_parents or {}\n 274\t self._return_type_chain_languages = (\n 275\t PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES\n 276\t if return_type_chain_languages is None\n 277\t else return_type_chain_languages\n 278\t )\n 279\t self._ancestors: dict[str, tuple[str, ...]] = {}\n 280\t # Per-file symbol index: {file_path: {symbol_name: symbol_id}}\n 281\t self._file_symbols: dict[str, dict[str, str]] = {}\n 282\t\n 283\t # Per-file method index: {file_path: {(class_name, method_name): symbol_id}}\n 284\t self._file_methods: dict[str, dict[tuple[str, str], str]] = {}\n 285\t\n 286\t # Global method index: {(class_name, method_name): [(file_path, symbol_id)]}\n 287\t # in file-insertion order \u2014 replaces the trait-dispatch scan over\n 288\t # every file's method dict with one short-list lookup.\n 289\t self._global_methods: dict[tuple[str, str], list[tuple[str, str]]] = defaultdict(list)\n 290\t\n 291\t # Global symbol index: {name: [symbol_ids]} \u2014 for Tier 3\n 292\t self._global_symbols: dict[str, list[str]] = defaultdict(list)\n 293\t self._symbols_by_id = {\n 294\t symbol.id: symbol for parsed in parsed_files.values() for symbol in parsed.symbols\n 295\t }\n 296\t self._symbol_paths_by_id = {\n 297\t symbol.id: path\n 298\t for path, parsed in parsed_files.items()\n 299\t for symbol in parsed.symbols\n 300\t }\n 301\t self._overload_return_types: dict[tuple[str, str | None, str, int | None], set[str]] = (\n 302\t defaultdict(set)\n 303\t )\n 304\t for path, parsed in parsed_files.items():\n 305\t for symbol in parsed.symbols:\n 306\t raw_return = declared_return_type(symbol.signature or \"\")\n 307\t normalized = (\n 308\t normalize_return_type(raw_return, symbol.language) if raw_return else None\n 309\t )\n 310\t if normalized is not None:\n 311\t key = (\n 312\t path,\n 313\t symbol.parent_name,\n 314\t symbol.name,\n 315\t signature_parameter_count(symbol.signature or \"\"),\n 316\t )\n 317\t self._overload_return_types[key].add(normalized)\n 318\t self._known_type_names = frozenset(\n 319\t symbol.name for symbol in self._symbols_by_id.values() if symbol.kind in _TYPE_KINDS\n 320\t )\n 321\t\n 322\t # Symbols in the index above that are data members, not callables\n 323\t # Held as an id set rather than a full id->kind map: it is the only\n 324\t # kind question asked of it and the set is small.\n 325\t self._non_callable_ids: set[str] = set()\n 326\t self._property_accessor_ids: set[str] = set()\n 327\t\n 328\t # C/C++ forward declaration \u2192 the definition it declares. Populated by\n 329\t # ``_build_indices``; applied to every resolved call so the edge lands\n 330\t # on the body rather than the header line that announced it.\n 331\t self._decl_to_def: dict[str, str] = {}\n 332\t\n 333\t # Import graph: {file_path: set of imported file paths}\n 334\t self._import_targets = import_targets\n 335\t\n 336\t # Shared import-name maps (built once per GraphBuilder.build() and\n 337\t # injected; standalone construction builds them locally).\n 338\t if import_maps is None:\n 339\t from .import_index import build_import_name_maps\n 340\t\n 341\t import_maps = build_import_name_maps(parsed_files)\n 342\t # Import name mapping: {file_path: {local_name: source_file}}\n 343\t self._import_names: dict[str, dict[str, str]] = import_maps.import_names\n 344\t # Full binding data: {file_path: {local_name: NamedBinding}}\n 345\t self._import_bindings: dict[str, dict[str, NamedBinding]] = import_maps.import_bindings\n 346\t # Module alias mapping: {file_path: {alias: source_file}}\n 347\t self._module_aliases: dict[str, dict[str, str]] = import_maps.module_aliases\n 348\t\n 349\t # Lazy per-file merged views of every imported file's symbol /\n 350\t # method tables \u2014 turns the Tier-2b \"scan each imported file\"\n 351\t # loops into single dict lookups. Built on first miss per file;\n 352\t # merge order is sorted(import paths) with first-wins so shadowed\n 353\t # names resolve deterministically (the old set-iteration order was\n 354\t # hash-randomized per process).\n 355\t self._merged_import_symbols: dict[str, dict[str, str]] = {}\n 356\t self._merged_import_methods: dict[str, dict[tuple[str, str], str]] = {}\n 357\t\n 358\t # Lazy per-file set of (line, target) that also carry a receiver.\n 359\t self._member_shaped: dict[str, set[tuple[int, str]]] = {}\n 360\t\n 361\t # Receiver typing reads source text, so both caches are capped rather\n 362\t # than per-repo: files resolve one at a time, so a few slots always\n 363\t # hit, and the cap is what keeps a whole repo's source out of memory.\n 364\t # Scanning is memoised per *function*, not per reference \u2014 one scan\n 365\t # answers every unresolved receiver in a body.\n 366\t self._source_text: dict[str, str] = {}\n 367\t self._declarations: dict[str, tuple[Declaration, ...]] = {}\n 368\t self._symbol_spans: dict[str, dict[str, tuple[int, int]]] = {}\n 369\t self._body_types: dict[tuple[str, str], dict[str, str | None]] = {}\n 370\t self._field_types: dict[str, dict[str, dict[str, str | None]]] = {}\n 371\t self._bindings: dict[str, tuple[tuple[int, str], ...]] = {}\n 372\t self._bound_names: dict[tuple[str, str], frozenset[str]] = {}\n 373\t # {file: {name: type}} \u2014 module-level defs a framework decorator retyped.\n 374\t self._framework_types: dict[str, dict[str, str]] = {}\n 375\t self._external_names: dict[str, frozenset[str]] = {}\n 376\t self._repo_rebound_names: dict[str, frozenset[str]] = {}\n 377\t self._method_name_set: frozenset[str] | None = None\n 378\t self._framework_name_set: frozenset[str] | None = None\n 379\t\n 380\t # Barrel re-export origins: {barrel_file: {name: origin_file}}\n 381\t self._barrel_origins: dict[str, dict[str, str]] = defaultdict(dict)\n 382\t\n 383\t # Keep reference for cross-language checks in Tier 3\n 384\t self._parsed_files = parsed_files\n 385\t\n 386\t # Rust cross-crate resolution\n 387\t self._repo_path = repo_path\n 388\t self._rust_crate_src: dict[str, str] | None = None # lazy\n 389\t\n 390\t # Go package-scoped resolution (lazy GoPackageIndex). ``_go_index``\n 391\t # holds the built index; ``_go_index_built`` distinguishes \"not yet\n 392\t # built\" from \"built but unavailable\" (no repo_path / no go files).\n 393\t self._go_index: Any = None\n 394\t self._go_index_built = False\n 395\t\n 396\t # JVM same-package resolution (lazy JvmWorkspaceIndex)\n 397\t self._jvm_index: Any = None\n 398\t self._jvm_index_built = False\n 399\t\n 400\t # C/C++ same-target resolution (lazy CppWorkspaceIndex)\n 401\t self._cpp_index: Any = None\n 402\t self._cpp_index_built = False\n 403\t\n 404\t self._strategies_by_file: dict[str, _LanguageCallStrategies] = {}\n 405\t\n 406\t self._build_indices(parsed_files)\n 407\t self._follow_barrel_exports()\n 408\t\n 409\t def _follow_barrel_exports(self) -> None:\n 410\t \"\"\"Detect barrel/re-export files and record origin mappings.\n 411\t\n 412\t A barrel file imports a name and re-exports it without defining it\n 413\t locally (e.g., ``__init__.py`` with ``from .calculator import Calculator``).\n 414\t When downstream code imports from the barrel, we follow chains to\n 415\t find the actual defining file.\n 416\t \"\"\"\n 417\t # First pass: identify direct barrel origins\n 418\t for path, name_to_file in self._import_names.items():\n 419\t file_syms = self._file_symbols.get(path, {})\n 420\t for name, source_file in name_to_file.items():\n 421\t # An origin outside the repo names no file any reader of this\n 422\t # map can look up, and the wildcard pass below already refuses\n 423\t # one. Holding the invariant in one pass and not its twin is\n 424\t # what makes a later reader look safe when it is not.\n 425\t if name not in file_syms and not source_file.startswith(\"external:\"):\n 426\t self._barrel_origins[path][name] = source_file\n 427\t\n 428\t # Track wildcard re-exports, which forward every symbol of the imported\n 429\t # module under this file's namespace. Two shapes qualify: Rust\n 430\t # `pub use foo::*` (is_reexport) and Python/JS `from foo import *` (a\n 431\t # \"*\" imported name). The latter is how package ``__init__.py`` barrels\n 432\t # commonly re-export a subpackage \u2014 ``build_import_name_maps`` skips the\n 433\t # \"*\" name (it is not a binding), so without this pass the barrel chain\n 434\t # dead-ends one hop short of the real definition and a call through the\n 435\t # barrel resolves to nothing.\n 436\t wildcard_sources: dict[str, list[str]] = defaultdict(list)\n 437\t for path, parsed in self._parsed_files.items():\n 438\t file_syms = self._file_symbols.get(path, {})\n 439\t for imp in parsed.imports:\n 440\t is_wildcard = imp.is_reexport or \"*\" in imp.imported_names\n 441\t if not is_wildcard or not imp.resolved_file:\n 442\t continue\n 443\t if imp.resolved_file.startswith(\"external:\"):\n 444\t continue\n 445\t # ``export * as ns from \"x\"`` forwards the module under ``ns``,\n 446\t # so x's names are reachable as ``ns.name`` and are NOT this\n 447\t # file's own exports. Flattening them makes a bare ``name``\n 448\t # resolve into a nested namespace it was never in.\n 449\t if any(b.local_name == \"*\" and b.exported_name for b in imp.bindings):\n 450\t continue\n 451\t resolved = imp.resolved_file\n 452\t if resolved != path:\n 453\t wildcard_sources[path].append(resolved)\n 454\t source_syms = self._file_symbols.get(resolved, {})\n 455\t source_parsed = self._parsed_files.get(resolved)\n 456\t published = (\n 457\t (*source_syms, *source_parsed.export_aliases)\n 458\t if source_parsed\n 459\t else tuple(source_syms)\n 460\t )\n 461\t for sym_name in published:\n 462\t if sym_name not in file_syms:\n 463\t self._barrel_origins[path][sym_name] = resolved\n 464\t\n 465\t # The pass above forwards only what the source file DECLARES, so a\n 466\t # barrel over a barrel forwards nothing and the chain breaks at its\n 467\t # first link rather than its last. Forward what the source file\n 468\t # re-exports too, to a fixpoint. The multi-hop pass below cannot do\n 469\t # this job \u2014 it deepens entries that exist, and here none do.\n 470\t #\n 471\t # Sorted so that a name two of this file's barrels both forward lands on\n 472\t # the same origin whatever order the repository was walked in.\n 473\t for _ in range(4):\n 474\t changed = False\n 475\t for path, sources in sorted(wildcard_sources.items()):\n 476\t file_syms = self._file_symbols.get(path, {})\n 477\t origins = self._barrel_origins[path]\n 478\t for source in sorted(sources):\n 479\t source_bindings = self._import_bindings.get(source, {})\n 480\t for name, declaring in sorted(self._barrel_origins.get(source, {}).items()):\n 481\t if name in file_syms or name in origins or declaring == path:\n 482\t continue\n 483\t # The map keys a name as the source file spells it and\n 484\t # records only the declaring file, never the name the\n 485\t # symbol has there. A hop that renames therefore hands\n 486\t # on a key the declaring file may coincidentally\n 487\t # declare as something unrelated, and the receiving\n 488\t # file carries no binding to undo it with. Refuse those\n 489\t # rather than forward a name that means something else\n 490\t # at the far end; it costs reach, never correctness.\n 491\t binding = source_bindings.get(name)\n 492\t if binding is not None and (binding.exported_name or name) != name:\n 493\t continue\n 494\t origins[name] = declaring\n 495\t changed = True\n 496\t if not changed:\n 497\t break\n 498\t\n 499\t # Multi-hop: follow chains up to 5 hops\n 500\t for _ in range(4):\n 501\t changed = False\n 502\t for _path, origins in list(self._barrel_origins.items()):\n 503\t for name, source in list(origins.items()):\n 504\t deeper = self._barrel_origins.get(source, {}).get(name)\n 505\t if deeper and deeper != source:\n 506\t origins[name] = deeper\n 507\t changed = True\n 508\t if not changed:\n 509\t break\n 510\t\n 511\t def _get_rust_crate_src(self) -> dict[str, str]:\n 512\t \"\"\"Lazily build a mapping from normalised crate name to src/ dir.\"\"\"\n 513\t if self._rust_crate_src is not None:\n 514\t return self._rust_crate_src\n 515\t self._rust_crate_src = {}\n 516\t if not self._repo_path:\n 517\t return self._rust_crate_src\n 518\t from .resolvers.rust_workspace import get_or_build_cargo_workspace_index\n 519\t\n 520\t class _Ctx:\n 521\t def __init__(self, rp, pf):\n 522\t self.repo_path = rp\n 523\t self.parsed_files = pf\n 524\t\n 525\t ctx = _Ctx(self._repo_path, self._parsed_files)\n 526\t ws = get_or_build_cargo_workspace_index(ctx)\n 527\t if ws:\n 528\t for crate in ws.crates:\n 529\t normalized = crate.name.replace(\"-\", \"_\")\n 530\t self._rust_crate_src[normalized] = crate.src_dir\n 531\t return self._rust_crate_src\n 532\t\n 533\t def _get_go_index(self) -> Any:\n 534\t \"\"\"Lazily build the GoPackageIndex (or None if unavailable).\n 535\t\n 536\t Mirrors ``_get_rust_crate_src``: the resolver runs without a\n 537\t ``ResolverContext``, so it constructs a minimal stand-in and rebuilds\n 538\t the package index. The build is one walk over the ``.go`` files; the\n 539\t result is cached for the lifetime of the resolver.\n 540\t \"\"\"\n 541\t if self._go_index_built:\n 542\t return self._go_index\n 543\t self._go_index_built = True\n 544\t if not self._repo_path:\n 545\t return None\n 546\t from pathlib import Path\n 547\t\n 548\t from .resolvers.go_workspace import build_go_package_index\n 549\t\n 550\t class _Ctx:\n 551\t def __init__(self, rp: str, pf: dict[str, ParsedFile]) -> None:\n 552\t self.repo_path = Path(rp)\n 553\t self.path_set = set(pf.keys())\n 554\t self.sorted_paths = tuple(sorted(self.path_set))\n 555\t self.parsed_files = pf\n 556\t self.go_modules: tuple[\n[repowise#63171fe88e36: 600 lines omitted (~7951 tokens); restore: repowise expand 63171fe88e36]","start_line":197,"symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver","truncated":true,"verified":true},"get_symbol:largest-symbol":{"_meta":{"completeness":{"capped":true},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#c07e342c9b4c","repowise#6abe1e1bba89"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":8114},"replaced_tokens":25149,"response_budget":{"limit_chars":24000,"serialized_chars":22619,"tier":"default"},"state":{"truncated":true},"timing_ms":7.41,"tokens_saved":19481},"continuation":"packages/core/src/repowise/core/ingestion/call_resolver.py:847-2117","continuation_reference":{"id":"packages/core/src/repowise/core/ingestion/call_resolver.py:847-2117","kind":"file_range","path":"packages/core/src/repowise/core/ingestion/call_resolver.py","range":[847,2117],"repository":"default","source_kind":"source","verification_basis":"live"},"end_line":846,"file":"packages/core/src/repowise/core/ingestion/call_resolver.py","kind":"class","name":"CallResolver","omission_marker":"[repowise#6abe1e1bba89: 11 lines omitted (~136 tokens); restore: repowise expand 6abe1e1bba89]","qualified_name":"packages.core.src.repowise.core.ingestion.call_resolver.CallResolver","signature":"class CallResolver","source":" 247\tclass CallResolver:\n 248\t \"\"\"Resolve raw CallSites to symbol-level edges.\n 249\t\n 250\t Constructed once per ``GraphBuilder.build()`` call with the full set of\n 251\t parsed files and import edges, then driven one file at a time.\n 252\t\n 253\t ``resolve_file()`` is **not** safe to call concurrently. Several lazy\n 254\t caches are filled during resolution, and the capped ones evict wholesale.\n 255\t Every cached value is a pure function of state fixed at construction, so a\n 256\t race would cost recomputation rather than a wrong answer, but the eviction\n 257\t makes concurrent use pointless as well as unsupported.\n 258\t \"\"\"\n 259\t\n 260\t def __init__(\n 261\t self,\n 262\t parsed_files: dict[str, ParsedFile],\n 263\t import_targets: dict[str, set[str]],\n 264\t *,\n 265\t repo_path: str | None = None,\n 266\t import_maps: Any | None = None,\n 267\t heritage_parents: dict[str, set[str]] | None = None,\n 268\t return_type_chain_languages: frozenset[str] | None = None,\n 269\t ) -> None:\n 270\t # {type symbol id: parent type symbol ids}, from the caller's already\n 271\t # resolved heritage. Absent when the resolver is built standalone, in\n 272\t # which case the inherited tier simply never fires.\n 273\t self._heritage_parents: dict[str, set[str]] = heritage_parents or {}\n 274\t self._return_type_chain_languages = (\n 275\t PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES\n 276\t if return_type_chain_languages is None\n 277\t else return_type_chain_languages\n 278\t )\n 279\t self._ancestors: dict[str, tuple[str, ...]] = {}\n 280\t # Per-file symbol index: {file_path: {symbol_name: symbol_id}}\n 281\t self._file_symbols: dict[str, dict[str, str]] = {}\n 282\t\n 283\t # Per-file method index: {file_path: {(class_name, method_name): symbol_id}}\n 284\t self._file_methods: dict[str, dict[tuple[str, str], str]] = {}\n 285\t\n 286\t # Global method index: {(class_name, method_name): [(file_path, symbol_id)]}\n 287\t # in file-insertion order \u2014 replaces the trait-dispatch scan over\n 288\t # every file's method dict with one short-list lookup.\n 289\t self._global_methods: dict[tuple[str, str], list[tuple[str, str]]] = defaultdict(list)\n 290\t\n 291\t # Global symbol index: {name: [symbol_ids]} \u2014 for Tier 3\n 292\t self._global_symbols: dict[str, list[str]] = defaultdict(list)\n 293\t self._symbols_by_id = {\n 294\t symbol.id: symbol for parsed in parsed_files.values() for symbol in parsed.symbols\n 295\t }\n 296\t self._symbol_paths_by_id = {\n 297\t symbol.id: path\n 298\t for path, parsed in parsed_files.items()\n 299\t for symbol in parsed.symbols\n 300\t }\n 301\t self._overload_return_types: dict[tuple[str, str | None, str, int | None], set[str]] = (\n 302\t defaultdict(set)\n 303\t )\n 304\t for path, parsed in parsed_files.items():\n 305\t for symbol in parsed.symbols:\n 306\t raw_return = declared_return_type(symbol.signature or \"\")\n 307\t normalized = (\n 308\t normalize_return_type(raw_return, symbol.language) if raw_return else None\n 309\t )\n 310\t if normalized is not None:\n 311\t key = (\n 312\t path,\n 313\t symbol.parent_name,\n 314\t symbol.name,\n 315\t signature_parameter_count(symbol.signature or \"\"),\n 316\t )\n 317\t self._overload_return_types[key].add(normalized)\n 318\t self._known_type_names = frozenset(\n 319\t symbol.name for symbol in self._symbols_by_id.values() if symbol.kind in _TYPE_KINDS\n 320\t )\n 321\t\n 322\t # Symbols in the index above that are data members, not callables\n 323\t # Held as an id set rather than a full id->kind map: it is the only\n 324\t # kind question asked of it and the set is small.\n 325\t self._non_callable_ids: set[str] = set()\n 326\t self._property_accessor_ids: set[str] = set()\n 327\t\n 328\t # C/C++ forward declaration \u2192 the definition it declares. Populated by\n 329\t # ``_build_indices``; applied to every resolved call so the edge lands\n 330\t # on the body rather than the header line that announced it.\n 331\t self._decl_to_def: dict[str, str] = {}\n 332\t\n 333\t # Import graph: {file_path: set of imported file paths}\n 334\t self._import_targets = import_targets\n 335\t\n 336\t # Shared import-name maps (built once per GraphBuilder.build() and\n 337\t # injected; standalone construction builds them locally).\n 338\t if import_maps is None:\n 339\t from .import_index import build_import_name_maps\n 340\t\n 341\t import_maps = build_import_name_maps(parsed_files)\n 342\t # Import name mapping: {file_path: {local_name: source_file}}\n 343\t self._import_names: dict[str, dict[str, str]] = import_maps.import_names\n 344\t # Full binding data: {file_path: {local_name: NamedBinding}}\n 345\t self._import_bindings: dict[str, dict[str, NamedBinding]] = import_maps.import_bindings\n 346\t # Module alias mapping: {file_path: {alias: source_file}}\n 347\t self._module_aliases: dict[str, dict[str, str]] = import_maps.module_aliases\n 348\t\n 349\t # Lazy per-file merged views of every imported file's symbol /\n 350\t # method tables \u2014 turns the Tier-2b \"scan each imported file\"\n 351\t # loops into single dict lookups. Built on first miss per file;\n 352\t # merge order is sorted(import paths) with first-wins so shadowed\n 353\t # names resolve deterministically (the old set-iteration order was\n 354\t # hash-randomized per process).\n 355\t self._merged_import_symbols: dict[str, dict[str, str]] = {}\n 356\t self._merged_import_methods: dict[str, dict[tuple[str, str], str]] = {}\n 357\t\n 358\t # Lazy per-file set of (line, target) that also carry a receiver.\n 359\t self._member_shaped: dict[str, set[tuple[int, str]]] = {}\n 360\t\n 361\t # Receiver typing reads source text, so both caches are capped rather\n 362\t # than per-repo: files resolve one at a time, so a few slots always\n 363\t # hit, and the cap is what keeps a whole repo's source out of memory.\n 364\t # Scanning is memoised per *function*, not per reference \u2014 one scan\n 365\t # answers every unresolved receiver in a body.\n 366\t self._source_text: dict[str, str] = {}\n 367\t self._declarations: dict[str, tuple[Declaration, ...]] = {}\n 368\t self._symbol_spans: dict[str, dict[str, tuple[int, int]]] = {}\n 369\t self._body_types: dict[tuple[str, str], dict[str, str | None]] = {}\n 370\t self._field_types: dict[str, dict[str, dict[str, str | None]]] = {}\n 371\t self._bindings: dict[str, tuple[tuple[int, str], ...]] = {}\n 372\t self._bound_names: dict[tuple[str, str], frozenset[str]] = {}\n 373\t # {file: {name: type}} \u2014 module-level defs a framework decorator retyped.\n 374\t self._framework_types: dict[str, dict[str, str]] = {}\n 375\t self._external_names: dict[str, frozenset[str]] = {}\n 376\t self._repo_rebound_names: dict[str, frozenset[str]] = {}\n 377\t self._method_name_set: frozenset[str] | None = None\n 378\t self._framework_name_set: frozenset[str] | None = None\n 379\t\n 380\t # Barrel re-export origins: {barrel_file: {name: origin_file}}\n 381\t self._barrel_origins: dict[str, dict[str, str]] = defaultdict(dict)\n 382\t\n 383\t # Keep reference for cross-language checks in Tier 3\n 384\t self._parsed_files = parsed_files\n 385\t\n 386\t # Rust cross-crate resolution\n 387\t self._repo_path = repo_path\n 388\t self._rust_crate_src: dict[str, str] | None = None # lazy\n 389\t\n 390\t # Go package-scoped resolution (lazy GoPackageIndex). ``_go_index``\n 391\t # holds the built index; ``_go_index_built`` distinguishes \"not yet\n 392\t # built\" from \"built but unavailable\" (no repo_path / no go files).\n 393\t self._go_index: Any = None\n 394\t self._go_index_built = False\n 395\t\n 396\t # JVM same-package resolution (lazy JvmWorkspaceIndex)\n 397\t self._jvm_index: Any = None\n 398\t self._jvm_index_built = False\n 399\t\n 400\t # C/C++ same-target resolution (lazy CppWorkspaceIndex)\n 401\t self._cpp_index: Any = None\n 402\t self._cpp_index_built = False\n 403\t\n 404\t self._strategies_by_file: dict[str, _LanguageCallStrategies] = {}\n 405\t\n 406\t self._build_indices(parsed_files)\n 407\t self._follow_barrel_exports()\n 408\t\n 409\t def _follow_barrel_exports(self) -> None:\n 410\t \"\"\"Detect barrel/re-export files and record origin mappings.\n 411\t\n 412\t A barrel file imports a name and re-exports it without defining it\n 413\t locally (e.g., ``__init__.py`` with ``from .calculator import Calculator``).\n 414\t When downstream code imports from the barrel, we follow chains to\n 415\t find the actual defining file.\n 416\t \"\"\"\n 417\t # First pass: identify direct barrel origins\n 418\t for path, name_to_file in self._import_names.items():\n 419\t file_syms = self._file_symbols.get(path, {})\n 420\t for name, source_file in name_to_file.items():\n 421\t # An origin outside the repo names no file any reader of this\n 422\t # map can look up, and the wildcard pass below already refuses\n 423\t # one. Holding the invariant in one pass and not its twin is\n 424\t # what makes a later reader look safe when it is not.\n 425\t if name not in file_syms and not source_file.startswith(\"external:\"):\n 426\t self._barrel_origins[path][name] = source_file\n 427\t\n 428\t # Track wildcard re-exports, which forward every symbol of the imported\n 429\t # module under this file's namespace. Two shapes qualify: Rust\n 430\t # `pub use foo::*` (is_reexport) and Python/JS `from foo import *` (a\n 431\t # \"*\" imported name). The latter is how package ``__init__.py`` barrels\n 432\t # commonly re-export a subpackage \u2014 ``build_import_name_maps`` skips the\n 433\t # \"*\" name (it is not a binding), so without this pass the barrel chain\n 434\t # dead-ends one hop short of the real definition and a call through the\n 435\t # barrel resolves to nothing.\n 436\t wildcard_sources: dict[str, list[str]] = defaultdict(list)\n 437\t for path, parsed in self._parsed_files.items():\n 438\t file_syms = self._file_symbols.get(path, {})\n 439\t for imp in parsed.imports:\n 440\t is_wildcard = imp.is_reexport or \"*\" in imp.imported_names\n 441\t if not is_wildcard or not imp.resolved_file:\n 442\t continue\n 443\t if imp.resolved_file.startswith(\"external:\"):\n 444\t continue\n 445\t # ``export * as ns from \"x\"`` forwards the module under ``ns``,\n 446\t # so x's names are reachable as ``ns.name`` and are NOT this\n 447\t # file's own exports. Flattening them makes a bare ``name``\n 448\t # resolve into a nested namespace it was never in.\n 449\t if any(b.local_name == \"*\" and b.exported_name for b in imp.bindings):\n 450\t continue\n 451\t resolved = imp.resolved_file\n 452\t if resolved != path:\n 453\t wildcard_sources[path].append(resolved)\n 454\t source_syms = self._file_symbols.get(resolved, {})\n 455\t source_parsed = self._parsed_files.get(resolved)\n 456\t published = (\n 457\t (*source_syms, *source_parsed.export_aliases)\n 458\t if source_parsed\n 459\t else tuple(source_syms)\n 460\t )\n 461\t for sym_name in published:\n 462\t if sym_name not in file_syms:\n 463\t self._barrel_origins[path][sym_name] = resolved\n 464\t\n 465\t # The pass above forwards only what the source file DECLARES, so a\n 466\t # barrel over a barrel forwards nothing and the chain breaks at its\n 467\t # first link rather than its last. Forward what the source file\n 468\t # re-exports too, to a fixpoint. The multi-hop pass below cannot do\n 469\t # this job \u2014 it deepens entries that exist, and here none do.\n 470\t #\n 471\t # Sorted so that a name two of this file's barrels both forward lands on\n 472\t # the same origin whatever order the repository was walked in.\n 473\t for _ in range(4):\n 474\t changed = False\n 475\t for path, sources in sorted(wildcard_sources.items()):\n 476\t file_syms = self._file_symbols.get(path, {})\n 477\t origins = self._barrel_origins[path]\n 478\t for source in sorted(sources):\n 479\t source_bindings = self._import_bindings.get(source, {})\n 480\t for name, declaring in sorted(self._barrel_origins.get(source, {}).items()):\n 481\t if name in file_syms or name in origins or declaring == path:\n 482\t continue\n 483\t # The map keys a name as the source file spells it and\n 484\t # records only the declaring file, never the name the\n 485\t # symbol has there. A hop that renames therefore hands\n 486\t # on a key the declaring file may coincidentally\n 487\t # declare as something unrelated, and the receiving\n 488\t # file carries no binding to undo it with. Refuse those\n 489\t # rather than forward a name that means something else\n 490\t # at the far end; it costs reach, never correctness.\n 491\t binding = source_bindings.get(name)\n 492\t if binding is not None and (binding.exported_name or name) != name:\n 493\t continue\n 494\t origins[name] = declaring\n 495\t changed = True\n 496\t if not changed:\n 497\t break\n 498\t\n 499\t # Multi-hop: follow chains up to 5 hops\n 500\t for _ in range(4):\n 501\t changed = False\n 502\t for _path, origins in list(self._barrel_origins.items()):\n 503\t for name, source in list(origins.items()):\n 504\t deeper = self._barrel_origins.get(source, {}).get(name)\n 505\t if deeper and deeper != source:\n 506\t origins[name] = deeper\n 507\t changed = True\n 508\t if not changed:\n 509\t break\n 510\t\n 511\t def _get_rust_crate_src(self) -> dict[str, str]:\n 512\t \"\"\"Lazily build a mapping from normalised crate name to src/ dir.\"\"\"\n 513\t if self._rust_crate_src is not None:\n 514\t return self._rust_crate_src\n 515\t self._rust_crate_src = {}\n 516\t if not self._repo_path:\n 517\t return self._rust_crate_src\n 518\t from .resolvers.rust_workspace import get_or_build_cargo_workspace_index\n 519\t\n 520\t class _Ctx:\n 521\t def __init__(self, rp, pf):\n 522\t self.repo_path = rp\n 523\t self.parsed_files = pf\n 524\t\n 525\t ctx = _Ctx(self._repo_path, self._parsed_files)\n 526\t ws = get_or_build_cargo_workspace_index(ctx)\n 527\t if ws:\n 528\t for crate in ws.crates:\n 529\t normalized = crate.name.replace(\"-\", \"_\")\n 530\t self._rust_crate_src[normalized] = crate.src_dir\n 531\t return self._rust_crate_src\n 532\t\n 533\t def _get_go_index(self) -> Any:\n 534\t \"\"\"Lazily build the GoPackageIndex (or None if unavailable).\n 535\t\n 536\t Mirrors ``_get_rust_crate_src``: the resolver runs without a\n 537\t ``ResolverContext``, so it constructs a minimal stand-in and rebuilds\n 538\t the package index. The build is one walk over the ``.go`` files; the\n 539\t result is cached for the lifetime of the resolver.\n 540\t \"\"\"\n 541\t if self._go_index_built:\n 542\t return self._go_index\n 543\t self._go_index_built = True\n 544\t if not self._repo_path:\n 545\t return None\n 546\t from pathlib import Path\n 547\t\n 548\t from .resolvers.go_workspace import build_go_package_index\n 549\t\n 550\t class _Ctx:\n 551\t def __init__(self, rp: str, pf: dict[str, ParsedFile]) -> None:\n 552\t self.repo_path = Path(rp)\n 553\t self.path_set = set(pf.keys())\n 554\t self.sorted_paths = tuple(sorted(self.path_set))\n 555\t self.parsed_files = pf\n 556\t self.go_modules: tuple[tuple[str, str], ...] = ()\n 557\t self.go_module_path: str | None = None\n 558\t\n 559\t self._go_index = build_go_package_index(_Ctx(self._repo_path, self._parsed_files))\n 560\t return self._go_index\n 561\t\n 562\t def _strategies_for(self, file_path: str) -> _LanguageCallStrategies:\n 563\t \"\"\"The extra strategies this file's language gets.\"\"\"\n 564\t parsed = self._parsed_files.get(file_path)\n 565\t language = parsed.file_info.language if parsed else \"\"\n 566\t return _LANGUAGE_CALL_STRATEGIES.get(language, _NO_LANGUAGE_STRATEGIES)\n 567\t\n 568\t def _get_cpp_index(self) -> Any:\n 569\t \"\"\"Lazily build a CppWorkspaceIndex via a minimal stand-in context.\"\"\"\n 570\t if self._cpp_index_built:\n 571\t return self._cpp_index\n 572\t self._cpp_index_built = True\n 573\t if not self._repo_path:\n 574\t return None\n 575\t from pathlib import Path\n 576\t\n 577\t from .resolvers.cpp_workspace import build_cpp_workspace_index\n 578\t\n 579\t class _Ctx:\n 580\t def __init__(self, rp: str, pf: dict[str, ParsedFile]) -> None:\n 581\t self.repo_path = Path(rp)\n 582\t self.path_set = set(pf.keys())\n 583\t self.sorted_paths = tuple(sorted(self.path_set))\n 584\t self.parsed_files = pf\n 585\t self.stem_map: dict[str, list[str]] = {}\n 586\t\n 587\t self._cpp_index = build_cpp_workspace_index(_Ctx(self._repo_path, self._parsed_files))\n 588\t return self._cpp_index\n 589\t\n 590\t def _collapse_declarations(self, sym_ids: list[str]) -> set[str]:\n 591\t \"\"\"Fold each declaration onto the definition it was paired with.\n 592\t\n 593\t Two ids naming one symbol must not read as an ambiguity.\n 594\t \"\"\"\n 595\t return {self._decl_to_def.get(sym_id, sym_id) for sym_id in sym_ids}\n 596\t\n 597\t def _resolve_cpp_scoped_call(\n 598\t self,\n 599\t file_path: str,\n 600\t call: CallSite,\n 601\t caller_id: str,\n 602\t ) -> ResolvedCall | None:\n 603\t \"\"\"Resolve ``Qualifier::name()`` against the class the qualifier names.\n 604\t\n 605\t The qualifier is written at the call site, so this infers nothing: the\n 606\t repository either declares ``Qualifier::name`` or it does not. Before\n 607\t it existed only the leaf name survived ex\n[repowise#c07e342c9b4c: 600 lines omitted (~7978 tokens); restore: repowise expand c07e342c9b4c]","start_line":247,"symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver","truncated":true,"verified":true},"get_why:targets":{"_meta":{"completeness":{"capped":true,"reason":"construction_cap","shown":23,"total":173},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#c3d5b15fafd9","repowise#9f8533616584","repowise#5e41015972a5","repowise#9fcc901ca410"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":39053},"response_budget":{"limit_chars":24000,"serialized_chars":22762,"tier":"default"},"state":{"truncated":true}},"alignment":{"active_count":0,"candidate_count":0,"deprecated_count":0,"explanation":"No architectural decisions govern packages/core/src/repowise/core/ingestion/call_resolver.py. This file is ungoverned \u2014 it may be an outlier or simply undocumented.","governing_count":0,"score":"none","sibling_coverage":null,"stale_count":0},"answer_basis":"episode","code_rationale":[{"comment":"Three-tier call resolution engine for the symbol-level dependency graph. Resolves CallSite objects (extracted from AST) to concrete symbol node IDs in the graph, producing CALLS edges with confidence scores. Resolution tiers (checked in order, first match wins): Tier 1 \u2014 Same-file exact match (confidence 0.95) The call target matches a symbol defined in the same file. Tier 2 \u2014 Import-scoped match (confidence 0.90) The call target matches a symbol in a file that the caller imports, optionally scoped by the specific imported names. Tier 3 \u2014 Global unique match (confidence 0.50) The call target matches exactly one symbol across the entire codebase. Only fires when the match is unambiguous to avoid false edges. Each resolved call produces a (source_id, target_id, confidence, origin) tuple that the GraphBuilder converts into a CALLS edge. The tiers above are the headline three; ``ResolutionOrigin`` in ``models`` is the full set, one name per strategy, and it is what the edge carries.","evidence_refs":[{"content_id":"e7b6b95c70b3f8749c12","id":"ev_30e9f5f0c3b34b452e8c","kind":"file_content","line":1,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[1,12],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[1,12],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"Languages where a call the caller's own class cannot answer is looked for on its ancestors. Both shapes \u2014 an explicit ``self``/``this`` receiver and an implicit one \u2014 end in the same walk. C++ is absent because its heritage binds a qualified external parent to a same-named local type, which puts unrelated siblings in one hierarchy before this walk even runs. Java is absent because `java.scm`'s bare-call pattern also matches `this.field.m()`, which no receiver-carrying pattern claims, so such a call arrives here indistinguishable from a real implicit receiver \u2014 and its measured population on two Java repos was zero, so the tier could only cost. C# is present, and was once wrongly removed: a name's overloads all share one symbol id, so a declaration line read back out of the graph names an arbitrary overload. That reads as a wrong target and is not one \u2014 the id these calls resolve to is the id C# binds.","evidence_refs":[{"content_id":"e4551f6a4120417a9ac1","id":"ev_4c7480bb5b6fcc223188","kind":"file_content","line":71,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[71,82],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[71,82],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"Languages where a bare name is scoped lexically: it can only mean the caller's own module, an explicit ``import``, or the prelude. Elixir's ``alias`` / ``require`` / ``use`` bind a module name, never a function name, so repo-wide uniqueness is no evidence and only wildcard imports may merge names. F# is the same rule with different spelling: a bare name means the enclosing scope, a module the file has ``open``ed, or FSharp.Core, and nothing else -- a name unique across the repo is not thereby in scope.","evidence_refs":[{"content_id":"279bc93ec731b668214a","id":"ev_925a17bc0fec5d8f2f7e","kind":"file_content","line":89,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[89,95],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[89,95],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"What a language resolves that the language-neutral tiers cannot. ``free`` runs after the same-file tier and before the import tiers; ``member`` runs before every receiver strategy; ``member_fallback`` runs after all of them, so a strategy there only ever sees a call nothing else claimed and can only add an edge. All three stop at the first hit. Strategies are named rather than bound so a probe can substitute one.","evidence_refs":[{"content_id":"fa671bfea3e99da6733e","id":"ev_edb4dc3ce42f43aa3355","kind":"file_content","line":108,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[108,115],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[108,115],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"Kinds that can never be the callee of a call, used to keep the bare-name Tier 3 index from offering a data member as a function. This is deliberately NOT the complement of ``_FUNCTION_KINDS``. Measured over the corpus, plenty of non-function kinds are legitimately called: ``class`` is a constructor in python/java/c#/typescript; ``variable`` is both a rust tuple ``enum_variant`` (309 grounded call edges on goose) and a typescript const whose initialiser is not syntactically a function, such as a factory result or a ``.bind()`` handle (2,173 on zod); ``type_alias`` is a Go conversion. Denying by function-ness would delete thousands of real edges. ``property`` is the one kind in the whole of ``language_configs.py`` that means \"data member\" and nothing else: it is emitted by exactly one mapping, rust's ``field_declaration``. Every other language spells its fields ``variable``, which is why this fix cannot be extended to them \u2014 there a field is indistinguishable from a callable value by kind alone.","evidence_refs":[{"content_id":"8ac00a8632e2a7726d77","id":"ev_603ed9ddc8822602b80c","kind":"file_content","line":132,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[132,143],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[132,143],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"}],"code_rationale_emitted":5,"code_rationale_omitted":49,"code_rationale_reduced_reason":"construction_cap","code_rationale_total":54,"code_rationale_truncated":true,"decisions":[],"episodes":[{"evidence":"commit 0cbe36f70f0d, 2026-08-30, changed 10 files together","evidence_refs":[{"commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","id":"ev_0c1fdfbf06526d42573a","kind":"commit","provenance":"historical","repository":"default","source":"episode","source_kind":"episode","verification_basis":"historical"}],"kind":"code_fix","provenance":"historical","recorded":"fix(dead-code): detect JSX prop-guard dead code (#1554) (#1570)","scope":["packages/core/src/repowise/core/analysis/dead_code/analyzer.py","packages/core/src/repowise/core/analysis/dead_code/jsx_prop_guards.py","packages/core/src/repowise/core/ingestion/call_resolver.py","packages/core/src/repowise/core/ingestion/graph/_rehydrate.py","packages/core/src/repowise/core/ingestion/graph/_resolvers.py","packages/core/src/repowise/core/ingestion/models.py","packages/core/src/repowise/core/ingestion/parser.py","tests/unit/dead_code/_helpers.py","tests/unit/dead_code/test_jsx_prop_guard_dead_code.py","tests/unit/ingestion/test_graph_rehydrate.py"],"still_true":"recorded 2026-08-30 at 0cbe36f70f0d; 10 commits have touched its scope since","subject":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","tier":"git"}],"episodes_emitted":1,"episodes_omitted":20,"episodes_reduced_reason":"construction_cap_and_response_budget","episodes_total":21,"episodes_truncated":true,"git_archaeology":{"cross_references":[],"file_commits":[{"author":"Contributor 19","date":"2026-09-04T18:15:43+00:00","evidence_refs":[{"commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","id":"ev_a42e829967a6e860c041","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:file_commits","source_kind":"archaeology:file_commits","verification_basis":"historical"}],"message":"feat(languages): parse F# to a full AST and move it to Good (#2133)","provenance":"historical","sha":"9af0b5f9"}],"file_commits_emitted":1,"file_commits_omitted":33,"file_commits_reduced_reason":"construction_cap_and_response_budget","file_commits_total":34,"file_commits_truncated":true,"git_log":[{"author":"Contributor 19","commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","date":"2026-09-04","evidence_refs":[{"commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","id":"ev_a42e829967a6e860c041","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(languages): parse F# to a full AST and move it to Good (#2133)","provenance":"historical","sha":"9af0b5f9ca65","source":"git_log_follow"},{"author":"Contributor 19","commit":"01e50e2f8475888541745fcbb0d40dd016f77476","date":"2026-09-04","evidence_refs":[{"commit":"01e50e2f8475888541745fcbb0d40dd016f77476","id":"ev_39e60b3a5fcdf4065a36","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(languages): parse Elixir to a full AST and move it to Good (#2127)","provenance":"historical","sha":"01e50e2f8475","source":"git_log_follow"},{"author":"Contributor 20","commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","date":"2026-08-30","evidence_refs":[{"commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","id":"ev_0c1fdfbf06526d42573a","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(dead-code): detect JSX prop-guard dead code (#1554) (#1570)","provenance":"historical","sha":"0cbe36f70f0d","source":"git_log_follow"},{"author":"Contributor 19","commit":"58403ddb69490d0d605ad93b3d6a94d61aadbb51","date":"2026-08-26","evidence_refs":[{"commit":"58403ddb69490d0d605ad93b3d6a94d61aadbb51","id":"ev_a162f4fe7b64b188a5a7","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(ingestion): refuse a data member on the import-merged tier (#1925)","provenance":"historical","sha":"58403ddb6949","source":"git_log_follow"},{"author":"Contributor 19","commit":"f97ced7a4c7badf3879921b8d42c900753695ce6","date":"2026-08-25","evidence_refs":[{"commit":"f97ced7a4c7badf3879921b8d42c900753695ce6","id":"ev_4b18c964f408fa622c84","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(ingestion): resolve a call to an overload set instead of refusing it (#1923)","provenance":"historical","sha":"f97ced7a4c7b","source":"git_log_follow"},{"author":"Contributor 19","commit":"127e0f1ec4aab7033c5ef1139a0762b1d50a15ac","date":"2026-08-25","evidence_refs":[{"commit":"127e0f1ec4aab7033c5ef1139a0762b1d50a15ac","id":"ev_90dca2153133ec4557c0","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(ingestion): extract C++ in-class method declarations (#1921)","provenance":"historical","sha":"127e0f1ec4aa","source":"git_log_follow"},{"author":"Contributor 19","commit":"0c9faff85da640782783e1f9a1371f1c257ce5aa","date":"2026-08-25","evidence_refs":[{"commit":"0c9faff85da640782783e1f9a1371f1c257ce5aa","id":"ev_c5df10bf3bef8ae640b5","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(ingestion): type C++ receivers from their declarations (#1919)","provenance":"historical","sha":"0c9faff85da6","source":"git_log_follow"},{"author":"Contributor 19","commit":"354269f101dd81be3a681e1e122c17d4b8c81bbc","date":"2026-08-25","evidence_refs":[{"commit":"354269f101dd81be3a681e1e122c17d4b8c81bbc","id":"ev_df55cb0a222f001ebcd4","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(ingestion): resolve C++ scoped calls against their qualifier (#1915)","provenance":"historical","sha":"354269f101dd","source":"git_log_follow"},{"author":"Contributor 19","commit":"08e493b8f932296fc572def1873a6431b3023404","date":"2026-08-23","evidence_refs":[{"commit":"08e493b8f932296fc572def1873a6431b3023404","id":"ev_d3d093332515aa05cb6e","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(graph): a java chain rooted at an external type is not a bare-name call (#1897)","provenance":"historical","sha":"08e493b8f932","source":"git_log_follow"},{"author":"Contributor 19","commit":"330ad6fa13caa842d816b836349bcbe6403e5c79","date":"2026-08-23","evidence_refs":[{"commit":"330ad6fa13caa842d816b836349bcbe6403e5c79","id":"ev_1acf1dcd8778ada4188b","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(graph): stop the repo-wide receiver tier answering for foreign types (#1893)","provenance":"historical","sha":"330ad6fa13ca","source":"git_log_follow"},{"author":"Contributor 19","commit":"d7bd394ca894e0cd68ed2fd429a8c3fa9ff34c5a","date":"2026-08-23","evidence_refs":[{"commit":"d7bd394ca894e0cd68ed2fd429a8c3fa9ff34c5a","id":"ev_a47485b7ddc68ba5486d","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(graph): a rust macro invocation is not a function call (#1885)","provenance":"historical","sha":"d7bd394ca894","source":"git_log_follow"}],"git_log_emitted":11,"git_log_omitted":19,"git_log_reduced_reason":"construction_cap_and_response_budget","git_log_total":30,"git_log_truncated":true,"provenance":"historical","summary":"No architectural decisions found for packages/core/src/repowise/core/ingestion/call_resolver.py, but git archaeology recovered 34 direct commit(s), 0 cross-reference(s), and 30 git log result(s). Review these to understand the intent behind this code.","triggered":true},"mode":"path","omission_marker":"[repowise#9fcc901ca410: 369 lines omitted (~2722 tokens); restore: repowise expand 9fcc901ca410]","origin_story":{"age_days":20,"author_commit_pct":0.9412,"available":true,"contributors":[{"commit_count":32,"email":"[email protected]","first_commit_ts":1786882824,"last_commit_ts":1788545743,"name":"Contributor 19"},{"commit_count":1,"email":"[email protected]","first_commit_ts":1788086763,"last_commit_ts":1788086763,"name":"Contributor 20"},{"commit_count":1,"email":"[email protected]","first_commit_ts":1787414540,"last_commit_ts":1787414540,"name":"Contributor 23"}],"first_commit":"2026-08-16","key_commits":[{"author":"Contributor 19","body":"tree-sitter-fsharp 0.3.11 replaces the regex tier for .fs and .fsx.\nModules, namespaces, let bindings including each `and` continuation,\nrecords, unions, classes, interfaces, members and exceptions become\nsymbols; `///` comments become docstrings; `inherit` and\n`interface ... with` become heritage edges. Signature files stay on the\nimport-only path: one grammar per language cannot select the signature\ngrammar, and the implementation grammar mis-parses them.\n\nImports keep the existing resolver and its .fsproj compile-order leg;\n`open` now carries the wildcard sentinel, which is what it means. A bare\nname in F# is lexically scoped, so the resolver refuses the global-unique\ntier for it and merges names only through `open`; an uppercase unqualified\ncallee is a union case or constructor, not a call site.\n\nA registry-parity test pins that every non-passthrough language has a\ngrammar, a query file and a config, and a pipeline-worker test drives the\nreal parse entry point over a .fs file.\n\nNo health markers yet. Docs","date":"2026-09-04T18:15:43+00:00","evidence_refs":[{"commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","id":"ev_a42e829967a6e860c041","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"feat(languages): parse F# to a full AST and move it to Good (#2133)","pr_number":2133,"provenance":"historical","sha":"9af0b5f9"},{"author":"Contributor 19","body":"tree-sitter-elixir 0.3.5 replaces the regex tier for .ex and .exs.\ndefmodule, def, defp, defmacro, defguard, defdelegate and defprotocol\nbecome symbols, defimpl becomes an impl symbol named for the module the\ncompiler generates, and @doc / @moduledoc become docstrings. Every one\nof those is a call node in this grammar, so the kind, the parent module\nand the definition-head filter are read from the call's target keyword\nin four small language-gated blocks beside the Pascal and Dart ones.\n\nImports keep the existing resolver: alias, import, require and use yield\none import per named module, including each member of alias Foo.{Bar,\nBaz}, and the resolver's reach is unchanged. Call edges resolve within a\nmodule and through receivers. A bare name in Elixir is lexically scoped,\nso the resolver refuses the global-unique tier for it and merges names\nonly from wildcard imports; alias, require and use bind a module name,\nnever a function name.\n\nNo heritage edges (use and @behaviour are not inheritance) and no health\nmar","date":"2026-09-04T15:42:58+00:00","evidence_refs":[{"commit":"01e50e2f8475888541745fcbb0d40dd016f77476","id":"ev_39e60b3a5fcdf4065a36","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"feat(languages): parse Elixir to a full AST and move it to Good (#2127)","pr_number":2127,"provenance":"historical","sha":"01e50e2f"},{"author":"Contributor 20","date":"2026-08-30T10:46:03+00:00","evidence_refs":[{"commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","id":"ev_0c1fdfbf06526d42573a","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"fix(dead-code): detect JSX prop-guard dead code (#1554) (#1570)","pr_number":1554,"provenance":"historical","sha":"0cbe36f7"},{"author":"Contributor 19","date":"2026-08-25T18:42:09+00:00","evidence_refs":[{"commit":"58403ddb69490d0d605ad93b3d6a94d61aadbb51","id":"ev_a162f4fe7b64b188a5a7","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"fix(ingestion): refuse a data member on the import-merged tier (#1925)","pr_number":1925,"provenance":"historical","sha":"58403ddb"},{"author":"Contributor 19","body":"`_global_symbols` holds one entry per declaration, so a method written as\nan overload set is several rows under one symbol id. Tier 3's\nglobal-unique rung gated on `len(candidates) == 1` and read that as an\nambiguity that does not exist: C#'s `AddRetry` is two rows and one\nsymbol, and the call reached nothing.\n\nCollapsing by symbol id is not the candidate filtering this rung already\nrefuses on purpose. A name that a field and a method both declare still\nhas two distinct ids and stays refused.\n\nThe collapsed answer is tried after the implicit-receiver tier rather\nthan in place of the row count. Ahead of it, it answered sites the\ncaller's own class hierarchy already answered, moving 1,027 edges in one\nrepository off `enclosing_inherited` at 0.90 confidence onto this rung at\n0.50 for the same target. Behind it, it can only add an edge.\n\nA getter and its setter are also two declarations under one id, which\nmade an attribute look like a unique callable and bound a local\n`router(...)` parameter invocation to it. Re","date":"2026-08-25T16:53:58+00:00","evidence_refs":[{"commit":"f97ced7a4c7badf3879921b8d42c900753695ce6","id":"ev_4b18c964f408fa622c84","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"fix(ingestion): resolve a call to an overload set instead of refusing it (#1923)","pr_number":1923,"provenance":"historical","sha":"f97ced7a"}],"key_commits_emitted":5,"key_commits_omitted":29,"key_commits_reduced_reason":"construction_cap","key_commits_total":34,"key_commits_truncated":true,"last_commit":"2026-09-04","linked_decisions":[],"primary_author":"Contributor 19","provenance":"historical","summary":"Created ~2026-08-16, last modified 2026-09-04 (20 days old). Primary author: Contributor 19 (34 total commits). Earliest key commit: \"fix(cpp): attach a call edge to the definition, not the header declaration (#1626)\" by Contributor 19 on 2026-08-16T12:20:24+00:00. Contributors: Contributor 19, Contributor 20, Contributor 23.","total_commits":34},"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","truncated":true},"list_repos:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"response_budget":{"limit_chars":24000,"serialized_chars":462,"tier":"default"}},"default_repo":"default","hint":"This MCP server is serving a single repo; omit repo unless a tool asks for it.","repos":[{"absolute_path":"/repo","alias":"default","is_default":true,"path":"/repo"}],"workspace":false,"workspace_root":null},"search_codebase:limit-5":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","replaced_tokens":2000,"response_budget":{"limit_chars":24000,"serialized_chars":3288,"tier":"default"},"tokens_saved":1162},"candidates":[{"path":"packages/server/src/repowise/server/schemas/repository.py"},{"path":"packages/api-client/src/types/repository.ts"},{"path":"packages/core/src/repowise/core/persistence/crud/repository.py"},{"path":"packages/core/src/repowise/core/persistence/_interfaces/_meta.py"},{"path":"packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py"}],"results":[{"confidence_score":1.0,"page_type":"file_page","relevance_score":3.958,"snippet":"# packages/server/src/repowise/server/schemas/repository.py\n\n## Overview\n\nRepository request/response models.\n\nIt exposes 9 public symbols and depends on 2 other files.\n\n## Public API\n\n| Symbol | Kind","sources":["fts","vector"],"target_path":"packages/server/src/repowise/server/schemas/repository.py","title":"File: packages/server/src/repowise/server/schemas/repository.py"},{"confidence_score":1.0,"page_type":"file_page","relevance_score":3.951,"snippet":"# packages/api-client/src/types/repository.ts\n\n## Overview\n\nTypes module repository defining RepoCreate, RepoUpdate, RepoResponse. `packages/api-client/src/types/repository.ts` is a typescript source","sources":["fts","vector"],"target_path":"packages/api-client/src/types/repository.ts","title":"File: packages/api-client/src/types/repository.ts"},{"confidence_score":0.94,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","page_type":"symbol_spotlight","relevance_score":3.727,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.upsert_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estim","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.upsert_repository"},{"confidence_score":0.67,"page_type":"file_page","relevance_score":2.647,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_meta.py\n\n## Overview\n\nIndexStore mixin: repository, generation jobs, pages, chat, webhooks.\n\nThis mixin covers the \"meta\" surface \u2014 the top-l","sources":["fts"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_meta.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_meta.py"},{"confidence_score":0.66,"page_type":"file_page","relevance_score":2.601,"snippet":"# packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py\n\n## Overview\n\nIndex `wiki_symbols` on `(repository_id, file_path)`.\n\nEvery file-scoped symbol lookup joins on this pair, but the o","sources":["fts"],"target_path":"packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py","title":"File: packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py"}]},"search_codebase:limit-50":{"_meta":{"completeness":{"capped":true,"reason":"response_budget","shown":19,"total":100},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#1cb22af443b7","repowise#5fe350551fca"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":6176},"replaced_tokens":5600,"response_budget":{"limit_chars":24000,"serialized_chars":12869,"tier":"default"},"state":{"truncated":true},"targets":["packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py","packages/core/src/repowise/core/persistence/_interfaces/_meta.py","packages/server/src/repowise/server/schemas/repository.py","packages/api-client/src/types/repository.ts","packages/core/src/repowise/core/workspace/repo_index.py","packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/workspace/repo_index.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py","packages/core/src/repowise/core/pipeline/full_index.py","packages/core/src/repowise/core/persistence/_interfaces/_analysis.py","packages/core/src/repowise/core/persistence/models.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/stores/_sql_meta.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/crud/git.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/_interfaces/index_store.py"],"tokens_saved":2296},"candidates_emitted":0,"candidates_reduced_reason":"response_budget","candidates_total":50,"omission_marker":"[repowise#5fe350551fca: 273 lines omitted (~3223 tokens); restore: repowise expand 5fe350551fca]","results":[{"confidence_score":1.0,"page_type":"file_page","relevance_score":4.345,"snippet":"# packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py\n\n## Overview\n\nIndex `graph_nodes` on `(repository_id, node_type)`.\n\n`node_type == \"file\"` is the most-issued predicate on this tabl","sources":["fts","vector"],"target_path":"packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py","title":"File: packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py"},{"confidence_score":0.99,"page_type":"file_page","relevance_score":4.298,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_meta.py\n\n## Overview\n\nIndexStore mixin: repository, generation jobs, pages, chat, webhooks.\n\nThis mixin covers the \"meta\" surface \u2014 the top-l","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_meta.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_meta.py"},{"confidence_score":0.92,"page_type":"file_page","relevance_score":3.983,"snippet":"# packages/server/src/repowise/server/schemas/repository.py\n\n## Overview\n\nRepository request/response models.\n\nIt exposes 9 public symbols and depends on 2 other files.\n\n## Public API\n\n| Symbol | Kind","sources":["fts","vector"],"target_path":"packages/server/src/repowise/server/schemas/repository.py","title":"File: packages/server/src/repowise/server/schemas/repository.py"},{"confidence_score":0.92,"page_type":"file_page","relevance_score":3.977,"snippet":"# packages/api-client/src/types/repository.ts\n\n## Overview\n\nTypes module repository defining RepoCreate, RepoUpdate, RepoResponse. `packages/api-client/src/types/repository.ts` is a typescript source","sources":["fts","vector"],"target_path":"packages/api-client/src/types/repository.ts","title":"File: packages/api-client/src/types/repository.ts"},{"confidence_score":0.91,"file":"packages/core/src/repowise/core/workspace/repo_index.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/workspace/repo_index.py::open_repo_index","page_type":"symbol_spotlight","relevance_score":3.951,"snippet":"# packages.core.src.repowise.core.workspace.repo_index.open_repo_index\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/workspace/repo_index.py` | **Estimated complexity:","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/workspace/repo_index.py::open_repo_index","target_path":"packages/core/src/repowise/core/workspace/repo_index.py","title":"Symbol: packages.core.src.repowise.core.workspace.repo_index.open_repo_index"},{"confidence_score":0.87,"page_type":"file_page","relevance_score":3.801,"snippet":"# packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py\n\n## Overview\n\nIndex `wiki_symbols` on `(repository_id, file_path)`.\n\nEvery file-scoped symbol lookup joins on this pair, but the o","sources":["fts","vector"],"target_path":"packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py","title":"File: packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py"},{"confidence_score":0.86,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","page_type":"symbol_spotlight","relevance_score":3.75,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.upsert_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estim","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.upsert_repository"},{"confidence_score":0.75,"page_type":"file_page","relevance_score":3.246,"snippet":"# packages/core/src/repowise/core/workspace/repo_index.py\n\n## Overview\n\nRead-only index access for the cross-repo hooks.\n\nThe hooks run immediately after ingestion writes each repo's\n`.repowise/wiki.d","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/workspace/repo_index.py","title":"File: packages/core/src/repowise/core/workspace/repo_index.py"},{"confidence_score":0.74,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::get_repository","page_type":"symbol_spotlight","relevance_score":3.225,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.get_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estimate","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::get_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.get_repository"},{"confidence_score":0.73,"page_type":"file_page","relevance_score":3.183,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py\n\n## Overview\n\nIndexStore mixin: relational graph rows, external systems, symbols.\n\nThe \"graph records\" surface of `IndexStor","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py"},{"confidence_score":0.71,"page_type":"file_page","relevance_score":3.082,"snippet":"# packages/core/src/repowise/core/pipeline/full_index.py\n\n## Overview\n\nFull index-only pipeline run + persistence for a single repo.\n\nThe \"index this repo from scratch\" step shared by `repowise worksp","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/pipeline/full_index.py","title":"File: packages/core/src/repowise/core/pipeline/full_index.py"},{"confidence_score":0.71,"page_type":"file_page","relevance_score":3.069,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_analysis.py\n\n## Overview\n\nIndexStore mixin: git metadata, dead code, decisions, health, coverage.\n\nThe \"analysis\" surface of IndexStore \u2014 any","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_analysis.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_analysis.py"},{"confidence_score":0.66,"file":"packages/core/src/repowise/core/persistence/models.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/models.py::Repository","page_type":"symbol_spotlight","relevance_score":2.875,"snippet":"# Repository\n\n**Kind:** class | **Defined in:** `packages/core/src/repowise/core/persistence/models.py` | **Estimated complexity:** 1\n\n```\nclass Repository\n```\n\n## Overview\n\n`Repository` is a class de","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/models.py::Repository","target_path":"packages/core/src/repowise/core/persistence/models.py","title":"Symbol: packages/core/src/repowise/core/persistence/models.py::Repository"},{"confidence_score":0.65,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::delete_repository","page_type":"symbol_spotlight","relevance_score":2.831,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.delete_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estim","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::delete_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.delete_repository"},{"confidence_score":0.65,"page_type":"file_page","relevance_score":2.827,"snippet":"ore/src/repowise/core/persistence/stores/_sql_meta.py\n\n## Overview\n\nMeta-domain delegations for `SqlIndexStore`.\n\nEach method here is a one-to-one delegation to `crud`. Split out from\n`sql_index_store","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/stores/_sql_meta.py","title":"File: packages/core/src/repowise/core/persistence/stores/_sql_meta.py"},{"confidence_score":0.65,"page_type":"file_page","relevance_score":2.817,"snippet":"# packages/core/src/repowise/core/persistence/crud/repository.py\n\n## Overview\n\nCRUD operations for the repository domain (repowise persistence layer).\n\nSplit out of the former monolithic `crud.py`; `c","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"File: packages/core/src/repowise/core/persistence/crud/repository.py"},{"confidence_score":0.64,"page_type":"file_page","relevance_score":2.76,"snippet":"| --- | --- | --- |\n| `upsert_git_metadata` | function | async def upsert_git_metadata(session, *, repository_id, file_path, **kwargs) -> GitMetadata |\n| `get_git_metadata` | function | async def get","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/crud/git.py","title":"File: packages/core/src/repowise/core/persistence/crud/git.py"},{"confidence_score":0.63,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::list_page_ids","page_type":"symbol_spotlight","relevance_score":2.735,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.list_page_ids\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estimated","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::list_page_ids","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.list_page_ids"},{"confidence_score":0.62,"page_type":"file_page","relevance_score":2.673,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/index_store.py\n\n## Overview\n\nIndexStore \u2014 aggregate pluggable CRUD facade.\n\n`IndexStore` combines three domain mixins:\n\n- `MetaIndexStore` (re","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/index_store.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/index_store.py"}],"results_emitted":19,"results_reduced_reason":"response_budget","results_total":50,"truncated":true}}\ No newline at end of file+{"get_answer:how-question":{"_meta":{"cached":true,"completeness":{"capped":true,"reason":"confidence_projection_and_deduplication","shown":1,"total":15},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","projection":{"recovery":{"arguments":{"include":["evidence"],"question":"How does index the repository work?"},"tool":"get_answer"}},"response_budget":{"limit_chars":24000,"serialized_chars":4391,"tier":"default"},"scope_hint":"Unrelated to what was served: Contributor 11 (1,478 files), Contributor 2 (641), Contributor 6 (261).","timing_ms":11.19},"answer":"## What \u201cindexing\u201d means here\n\nThe retrieved code describes the **read side of an already-created repository index**, rather than the process that parses a repository from scratch. Ingestion writes each repository\u2019s `.repowise/wiki.db`; `RepoIndex` opens that database and exposes convenient lookup APIs over its contents (`packages/core/src/repowise/core/workspace/repo_index.py`).\n\n## Opening an index\n\nFor one repository, callers use:\n\n```python\nawait open_repo_index(alias, repo_path) -> RepoIndex | None\n```\n\n`open_repo_index` opens the repository\u2019s `wiki.db` read side and returns `None` when the repository has not been indexed (`packages/core/src/repowise/core/workspace/repo_index.py`).\n\nFor a workspace, `open_workspace_index(...)` opens the indexed repositories and returns a `WorkspaceIndex`. The workspace object maps repository aliases to `RepoIndex` instances; callers retrieve one with `get(alias)`. Repositories that fail to open are skipped, and an optional alias filter can restrict which repositories are opened.\n\nEach `RepoIndex` owns one database session/connection. The implementation stores:\n\n- the repository alias, path, and `repo_id`;\n- an in-memory index by file (`_by_file`);\n- an in-memory index by symbol name (`_by_name`);\n- external-import records (`_externals`).\n\nIts `_load` method queries `WikiSymbol` rows and graph-edge data from the database. After loading, accessors are pure in-memory reads, so worker-thread dialects can call them without issuing additional database queries. The `repo_id` is required so repository-scoped queries cannot accidentally return unrelated rows.\n\n## Lookup capabilities\n\nThe exposed API supports:\n\n- `symbols_for_file(rel_path)` \u2014 symbols declared in a POSIX, repo-relative file, outermost first;\n- `symbol_at(rel_path, line)` \u2014 symbol covering a line;\n- `declared_symbol_at(...)` \u2014 declaration-specific lookup;\n- `symbol_named(expression)` \u2014 resolve qualified or unqualified symbol expressions;\n- access to external imports and the underlying session.\n\nThe index stores source locations from ingestion. Those spans can become stale if files change afterward, so callers extracting source must bound or validate spans against the current content; `extractors.from_index` provides the related safety behavior. The connection is closed explicitly through `RepoIndex.close()` or `WorkspaceIndex.close()`.","candidates_emitted":0,"candidates_reduced_reason":"confidence_projection_and_deduplication","candidates_total":5,"citations":["packages/core/src/repowise/core/workspace/repo_index.py"],"confidence":"high","fallback_targets_emitted":0,"fallback_targets_reduced_reason":"confidence_projection_and_deduplication","fallback_targets_total":5,"flow_path":["packages/core/src/repowise/core/persistence/crud/repository.py -> packages/core/src/repowise/core/workspace/repo_index.py","packages/server/src/repowise/server/schemas/repository.py -> packages/core/src/repowise/core/ingestion/languages/specs/json.py -> packages/core/src/repowise/core/persistence/crud/repository.py"],"next_action_hint":"Use the answer and citations directly.","note":"High confidence: the top retrieval result clearly dominates, by 0.83 points over the runner-up (top score 5.27). Both scores are strong, so the gap is the measure here and not the ratio. Cite this answer; do not re-read the source unless a specific detail is missing.","quotes":[{"lines":[79,81],"path":"packages/core/src/repowise/core/workspace/repo_index.py","quote":"class RepoIndex:\n \"\"\"Read-only accessor over one repo's ``wiki.db``.\n"}],"quotes_emitted":1,"quotes_reduced_reason":"confidence_projection_and_deduplication","quotes_total":5,"retrieval_quality":"high"},"get_architecture:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":295,"tier":"default"},"runtime_breakage_proven":false},"error":"get_architecture is only available in workspace mode."},"get_blast_radius:one-target":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":295,"tier":"default"},"runtime_breakage_proven":false},"error":"get_blast_radius is only available in workspace mode."},"get_change_risk:head":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#fede8a95b801"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":275},"response_budget":{"limit_chars":24000,"serialized_chars":6116,"tier":"default"},"source":"live_git","state":{"truncated":true},"timing_ms":1412.0},"branch_overlap":{"base":"origin/main","branches":[{"ahead":2,"behind":2,"branch":"perf/mcp-startup-floor","files":[{"basis":"same file","file":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py"},{"basis":"same file","file":"packages/core/src/repowise/core/workspace/__init__.py"},{"basis":"same file","file":"packages/cli/src/repowise/cli/commands/mcp_cmd.py"},{"basis":"same file","file":"tests/unit/workspace/test_lazy_workspace_exports.py"}],"last_commit":"2026-09-09"},{"ahead":12,"behind":2,"branch":"origin/feat/index-freshness-hook","files":[{"basis":"same file","file":"packages/cli/src/repowise/cli/commands/mcp_cmd.py"},{"basis":"co-change pair, 3 of 6 commits","file":"packages/server/src/repowise/server/mcp_server/_meta.py","partner":"packages/core/src/repowise/core/workspace/__init__.py"}],"last_commit":"2026-09-09"}],"current":"fix/mcp-budget-accounting","scanned":50,"summary":"2 of 50 open branches (1068 exist) edit files this change also edits.","total":1068,"truncated":true},"change_shape":{"classification":"Typical","diagnostics_via":"get_change_risk(include=['diagnostics'])","fallback_band":null,"independent_changes":{"basis":"no import, call, type reference or co-change pair in the index links one group to another","count":3,"groups":[{"bridging_files":[],"files":["packages/cli/src/repowise/cli/commands/mcp_cmd.py"]},{"bridging_files":[],"files":["packages/cli/src/repowise/cli/editor_integrations/claude_config.py"]},{"bridging_files":[],"files":["packages/core/src/repowise/core/workspace/__init__.py"]}],"summary":"This diff is 3 independent changes: 1 file, 1 file and 1 file. 1 changed file is left out of the grouping: docs, config, tests, files not in the index, or files it has never linked.","ungrouped_files":["tests/unit/workspace/test_lazy_workspace_exports.py"]},"is_fix":false,"measures":"diff size and spread, not danger","review_priority":"moderate","risk_percentile":40.9,"score":8.2},"classification":"Typical","directive":{"headline":"No supported new findings surfaced in the analyzed scope.","next_actions":["Run: tests/unit/workspace/test_lazy_workspace_exports.py tests/unit/cli/test_agent_target_baseline.py tests/unit/cli/test_agent_targets.py"],"reasons":[],"status":"clear_in_analyzed_scope"},"exclude_patterns":[],"fallback_band":null,"fix_history":{"available":true,"density":0.768,"files":[{"churn":9,"fix_pressure":4.35,"path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py"},{"churn":5,"fix_pressure":1.94,"path":"packages/cli/src/repowise/cli/commands/mcp_cmd.py"},{"churn":226,"fix_pressure":0.88,"path":"packages/core/src/repowise/core/workspace/__init__.py"}],"percentile":21.2},"health_delta":{"analyzer":{"analyzer_version":10,"performance_model_version":2,"rules_fingerprint":"3e9c9fe763b725f9bb1d493656de4afd4ee75e189f42c98e96b0e4233630fe47"},"base":{"kind":"commit","ref":"HEAD^","sha":"7791e6401fa9da72b285bd224a6cf3257121e3da"},"basis":"both_sides_analyzed","by_dimension":{},"by_severity":{},"explanation":"No supported new findings surfaced in the analyzed scope.","findings_emitted":0,"findings_total":0,"head":{"kind":"commit","ref":"HEAD","sha":"920d1c973d647a5df41165225dae38b514b03ae1"},"introduced":0,"limits":["Both sides are analysed over the changed files only, so cross-file detectors (duplication, cross-function performance) see no wider context."],"resolved":1,"scope":{"analyzed":4,"changed":4,"eligible":4,"failed":0,"skipped":0},"status":"available","top_findings":[],"worsened":0},"impacted_tests":{"basis":"inferred","line_coverage":{"covered":[],"no_coverage_data":[],"stale_test_candidates":[],"untested_changes":[]},"map_present":false,"status":"inferred","summary":"29 test file(s) reach the changed files in the graph; showing first 10. Inferred from the dependency graph, not measured. For the line-precise answer build the map with `coverage run --contexts=test` then `repowise coverage add`.","tests_to_run":["tests/unit/workspace/test_lazy_workspace_exports.py","tests/unit/cli/test_agent_target_baseline.py","tests/unit/cli/test_agent_targets.py","tests/unit/cli/test_commands.py","tests/unit/cli/test_doctor_embed_recipe.py","tests/unit/cli/test_doctor_fts_drift.py","tests/unit/cli/test_doctor_honours_exclusions.py","tests/unit/cli/test_doctor_information_floor.py","tests/unit/cli/test_doctor_mcp_smoke.py","tests/unit/cli/test_doctor_page_cap.py"],"total":29,"truncated":true},"is_fix":false,"omission_marker":"[repowise#fede8a95b801: 25 lines omitted (~275 tokens); restore: repowise expand fede8a95b801]","prior_fixes":{"changed_lines_in_fixed_files":98,"concentration":"packages/core/src/repowise/core/workspace/__init__.py carries 50% of the changed lines and 1 past bug fix(es).","files":[{"changed_lines":4,"file_path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py","fix_count":5,"last_fix_days_ago":32,"overlapping_lines":0,"share_of_change":0.022},{"changed_lines":4,"file_path":"packages/cli/src/repowise/cli/commands/mcp_cmd.py","fix_count":2,"last_fix_days_ago":3,"overlapping_lines":0,"share_of_change":0.022},{"changed_lines":90,"file_path":"packages/core/src/repowise/core/workspace/__init__.py","fix_count":1,"last_fix_days_ago":68,"overlapping_lines":0,"share_of_change":0.5}],"files_with_fixes":3,"line_overlap":"approximate","summary":"8 past bug-fix commit(s) touched 3 of the changed file(s). Line overlap is approximate (past ranges are numbered on their own parent commit); the per-file counts are not.","total_fixes":8,"truncated":false},"ref":"HEAD","review_priority":"moderate","risk_percentile":40.9,"score":8.2,"working_tree":false},"get_conformance:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":294,"tier":"default"},"runtime_breakage_proven":false},"error":"get_conformance is only available in workspace mode."},"get_context:many-targets":{"_meta":{"completeness":{"capped":true},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#6c9c3e123777"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":4507},"replaced_tokens":48638,"response_budget":{"limit_chars":32000,"serialized_chars":14278,"tier":"expanded"},"scope_hint":"Unrelated to what was served: Contributor 11 (1,478 files), Contributor 2 (641), Contributor 6 (261).","state":{"truncated":true},"timing_ms":62.24,"tokens_saved":45004},"dropped_symbols":{},"dropped_targets":[],"targets":{"packages/cli/src/repowise/cli/commands/update_cmd/command.py":{"_call_graph_note":"File-level rollup: importing files plus inbound cross-file call counts. For symbol-precise callers pass 'file.py::Symbol'.","architectural_layer":{"description":"Contains the command-line application runtime, command definitions, platform clients, agent targets, helpers, and telemetry handling.","name":"Contributor 15","role":"edge_connector"},"callers":[{"file":"tests/integration/test_cli.py","imports":true,"inbound_calls":2},{"file":"tests/unit/cli/test_update_reindex_notice.py","imports":true,"inbound_calls":2},{"file":"tests/unit/cli/test_update_renderer_gate.py","imports":true,"inbound_calls":2},{"file":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/update_cmd/workspace.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/watch_cmd.py","imports":true,"inbound_calls":1},{"file":"tests/unit/cli/test_update_full_dry_run.py","imports":true,"inbound_calls":1},{"file":"packages/cli/src/repowise/cli/commands/update_cmd/__init__.py","imports":true},{"file":"tests/unit/cli/test_docs_pointer.py","imports":true},{"file":"tests/unit/cli/test_editor_setup.py","imports":true},{"file":"tests/unit/cli/test_update_up_to_date_lock.py","imports":true},{"file":"tests/unit/cli/test_workspace_docs_pointer.py","imports":true}],"docs":{"summary":"`repowise update` \u2014 incremental wiki regeneration for changed files.","title":"File: packages/cli/src/repowise/cli/commands/update_cmd/command.py"},"episodes":26,"fix_history":{"bug_magnet":true,"fix_count":27,"last_fix_days_ago":1},"freshness":{"confidence_score":1.0,"freshness_status":"stale","is_stale":true},"hotspot":true,"parent_page":{"section":"14.2.2","target_path":"packages/cli/src/repowise/cli/commands/health_cmd","title":"Code Health Commands"},"path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","skeleton":{"bodies_kept":["run_update","_current_renderer_fingerprint","_renderer_inputs","_surface_reindex_recommendation","_docs_provider_prompt_allowed"],"full_tokens":23489,"mode":"smart","pct_of_full":8.9,"text":"\"\"\"``repowise update`` \u2014 incremental wiki regeneration for changed files.\n\nThis module holds the Click command + single-repo orchestration. The standalone\nhelpers it relies on live in sibling modules: mode resolution (:mod:`.mode`),\ncore delegators (:mod:`.incremental`), persistence + re-score\n(:mod:`.persistence`), the workspace flow (:mod:`.workspace`), and report\nrendering (:mod:`.reporting`).\n\"\"\"\nfrom __future__ import annotations\nimport sys\nimport time\nfrom enum import StrEnum\nfrom pathlib import Path\nfrom typing import Any\nimport click\nimport structlog\nfrom repowise.cli._setup import configure_cli_logging\nfrom repowise.cli.helpers import (\n ... 19 lines (23-41)\nfrom repowise.core.docs_mode import docs_mode_state_fields, resolve_docs_mode\nfrom repowise.core.pipeline import PhaseTimings, timed\nfrom repowise.core.reasoning import REASONING_MODES\nfrom .incremental import (\n ... 8 lines (47-54)\nfrom .mode import _resolve_index_only_mode\nfrom .persistence import (\n ... 6 lines (57-62)\nfrom .reporting import (\n ... 7 lines (64-70)\nfrom .workspace import _workspace_update\nlog = structlog.get_logger(__name__)\n... 6 lines (74-79)\n_EFFICACY_LOOKBACK_SECONDS = 7 * 86400.0\n\n\ndef _docs_provider_prompt_allowed(emitter: Any) -> bool:\n \"\"\"Whether a docs run may block on an interactive provider prompt.\n\n Requires a real terminal on *both* ends: a terminal stdout (so the table\n renders) and a tty stdin (so the answer can actually be read). The stdin\n check is what keeps a background post-commit hook or CI run from hanging\n even when it inherits a ``FORCE_COLOR`` that makes ``console.is_terminal``\n report True. ``--progress json`` (emitter set) is always non-interactive.\n \"\"\"\n return console.is_terminal and sys.stdin.isatty() and emitter is None\n\n\ndef _record_update_outcome(\n *,\n index_only: bool,\n changed_count: int,\n provider: Any = None,\n generated_pages: list | None = None,\n docs_mode: str | None = None,\n) -> None:\n \"\"\"Attach an anonymous update-shape outcome to the ``command_run`` event.\n... 30 lines (104-133)\n\n\ndef _refresh_editor_stamp(\n repo_path: Any, agents_md: bool | None, degraded: list[str] | None = None\n) -> None:\n \"\"\"Re-stamp managed editor files (CLAUDE.md / AGENTS.md), best-effort.\n... 21 lines (140-160)\n\n\ndef _surface_release_news(*, written_by: str | None) -> None:\n \"\"\"Show a post-upgrade \"what's new\" panel and a cached PyPI advisory.\n... 23 lines (165-187)\n\n\ndef _surface_reindex_recommendation(repo_path, verdict, *, emitter: Any, dry_run: bool) -> None:\n \"\"\"Show the once-per-store reindex recommendation for *verdict*, if any.\n\n Read-only except for the shown-notice ledger, so it is safe to call on the\n no-op (\"already up to date\") path as well as the main assessment path. It\n never runs the verdict's auto actions \u2014 those stay behind the single-flight\n lock in the main path. Interactive-terminal only, so a background post-commit\n update never burns the one-shot into a log the user never reads; `doctor`\n reports the recommendation on demand regardless.\n \"\"\"\n from repowise.cli.upgrade import (\n record_reindex_notice_shown,\n reindex_notice_already_shown,\n )\n\n if not (verdict.reindex_recommended and verdict.reindex_command):\n return\n ... 139 lines (207-345)\ndef update_command(\n ... 49 lines (347-395)\n\n\nclass UpdateOutcome(StrEnum):\n \"\"\"What a single-repo :func:`run_update` actually did.\n... 11 lines (400-410)\n\n\ndef _render_full_upgrade_dry_run(\n repo_path: Path,\n *,\n provider_name: str | None,\n model: str | None,\n) -> None:\n \"\"\"Describe a full upgrade without resolving providers or touching the store.\"\"\"\n ... 20 lines (420-439)\n\n\ndef _renderer_inputs(repo_path):\n \"\"\"The (language, style fingerprint, style template dir) a file page uses.\n\n Read from the persisted config so the fingerprint computed at the \"up to\n date\" gate matches the one the pages actually store. A wrong triple here\n would make every page look stale on every run (or none ever), so all three\n come from the same place generation reads them. The template dir is a\n custom style's own ``templates/`` (``None`` for a built-in style), tried\n ahead of the shipped template exactly as the generator's Jinja loader does.\n \"\"\"\n from repowise.cli.helpers import load_config\n from repowise.core.generation.styles import resolve_style\n\n cfg = load_config(repo_path)\n style = resolve_style(cfg.get(\"wiki_style\", \"comprehensive\"), repo_path=repo_path)\n return cfg.get(\"language\", \"en\"), style.fingerprint, style.template_dir\n\n\ndef _head_commit_ts(repo_path) -> float | None:\n \"\"\"Committer timestamp of the repo's HEAD, or None when git is unavailable.\n... 9 lines (462-470)\n\n\ndef _current_renderer_fingerprint(repo_path) -> str:\n \"\"\"This release's fingerprint for the structural renderers, or '' on failure.\n\n Covers every template with no model path behind it, because this value is\n what decides whether a repository with no new commits is \"already up to\n date\". Fingerprinting only the file page meant a release that improved the\n spotlight template alone returned before doing anything, and the change\n never reached an existing wiki.\n\n Cheap: reads the templates and a few constants, no parse. An empty result\n disables the renderer-staleness gate for this run rather than risking a\n spurious full re-render, which is the safe direction.\n \"\"\"\n try:\n from repowise.core.generation.page_generator.structural import (\n FILE_PAGE_TEMPLATE,\n SYMBOL_SPOTLIGHT_TEMPLATE,\n structural_fingerprint,\n )\n\n language, style_fp, template_dir = _renderer_inputs(repo_path)\n return \":\".join(\n structural_fingerprint(\n template,\n language=language,\n style_fingerprint=style_fp,\n template_dir=template_dir,\n ... 6 lines (500-505)\n\n\ndef _stale_renderer_paths(repo_path, parsed_files) -> list[str]:\n \"\"\"File paths whose stored pages predate the current structural renderers.\n... 37 lines (510-546)\n\n\ndef run_update(\n path: str | None,\n provider_name: str | None,\n model: str | None,\n since: str | None,\n reasoning: str | None,\n cascade_budget: int | None,\n dry_run: bool,\n workspace: bool,\n no_workspace: bool,\n repo_alias: str | None,\n index_only: bool = False,\n docs_flag: bool | None = None,\n full: bool = False,\n yes: bool = False,\n agents_md: bool | None = None,\n concurrency: int = 10,\n no_cost_tracking: bool = False,\n verbose: bool = False,\n progress: str = \"rich\",\n skip_cross_repo_hooks: bool = False,\n include_working_tree: bool = False,\n) -> UpdateOutcome:\n \"\"\"Incrementally update wiki pages for files changed since last sync.\n\n If `since` is None, the base commit is read from state.json's last_sync_commit.\n\n ``skip_cross_repo_hooks`` is set only by the workspace docs flow, which\n calls this per repo and then runs the cross-repo hooks once over every\n updated repo instead of once per repo.\n\n ``include_working_tree`` folds uncommitted work (staged, unstaged and\n untracked) into the change set on top of the commit range. Off by default,\n because every other caller is anchored to a commit \u2014 the post-commit hook,\n a webhook, a manual sync \u2014 and indexing a half-finished edit under those is\n not what the user asked for. ``repowise watch`` sets it: watching for file\n saves and then only ever diffing commit-to-commit is what made the watcher\n a no-op until you committed.\n \"\"\"\n start = time.monotonic()\n # Per-stage wall clock for this run, written to ``state.json`` as\n # ``phase_timings`` by the paths that rebuild the index. ``run`` is the\n # denominator; stages nest and overlap, so compare each against it and\n # never against their sum. The fast paths (already up to date, no changed\n # files, config-only re-score) do not record: they do no stage work and\n # would overwrite the last real run's numbers with nothing.\n timings = PhaseTimings()\n timings.start(\"run\")\n\n # --- Machine-readable progress (--progress json) --------------------\n # Silence structlog/stdlib logging and redirect the shared Rich console\n ... 1530 lines (600-2129)\n","tokens":2095,"verified":true},"target":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","type":"file"},"packages/core/src/repowise/core/ingestion/call_resolver.py":{"_call_graph_note":"File-level rollup: importing files plus inbound cross-file call counts. For symbol-precise callers pass 'file.py::Symbol'.","architectural_layer":{"description":"Implements repository ingestion, language parsing, code analysis, health evaluation, domain modeling, and supporting application utilities across the codebase.","name":"Contributor 4","role":"edge_connector"},"callers":[{"file":"tests/unit/ingestion/test_return_type_chain_resolution.py","imports":true,"inbound_calls":20},{"file":"tests/unit/ingestion/test_bare_name_index_kinds.py","imports":true,"inbound_calls":4},{"file":"tests/unit/ingestion/test_call_resolver_strategies.py","imports":true,"inbound_calls":3},{"file":"packages/core/src/repowise/core/ingestion/graph/_resolvers.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_elixir_bare_name_scope.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_enclosing_class_calls.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_jvm_calls.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_overload_set_uniqueness.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_php_luau_receivers.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_resolver_merged_index.py","imports":true,"inbound_calls":2},{"file":"tests/unit/ingestion/test_self_call_resolution.py","imports":true,"inbound_calls":2}],"docs":{"summary":"Three-tier call resolution engine for the symbol-level dependency graph.","title":"File: packages/core/src/repowise/core/ingestion/call_resolver.py"},"episodes":21,"fix_history":{"bug_magnet":true,"fix_count":22,"last_fix_days_ago":10},"freshness":{"confidence_score":1.0,"freshness_status":"stale","is_stale":true},"hotspot":true,"parent_page":{"section":"17.4","target_path":"packages/core/src/repowise/core/ingestion","title":"Ingestion Overview"},"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","skeleton":{"bodies_kept":[],"full_tokens":25149,"mode":"smart","omitted":true,"pct_of_full":17.9,"text":"[repowise#6c9c3e123777: 508 lines omitted (~4507 tokens); restore: repowise expand 6c9c3e123777]","tokens":4507,"verified":true},"target":"packages/core/src/repowise/core/ingestion/call_resolver.py","type":"file"}},"truncated":true},"get_context:one-file":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","response_budget":{"limit_chars":24000,"serialized_chars":11328,"tier":"default"},"scope_hint":"Unrelated to what was served: Contributor 11 (1,478 files), Contributor 2 (641), Contributor 6 (261).","timing_ms":22.87},"targets":{"packages/core/src/repowise/core/ingestion/call_resolver.py":{"architectural_layer":{"description":"Implements repository ingestion, language parsing, code analysis, health evaluation, domain modeling, and supporting application utilities across the codebase.","name":"Contributor 4","role":"edge_connector"},"docs":{"summary":"Three-tier call resolution engine for the symbol-level dependency graph.","symbols":[{"kind":"variable","line":64,"name":"log","signature":"log = structlog.get_logger(__name__)","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::log"},{"kind":"constant","line":69,"name":"_IMPLICIT_RECEIVER_LANGUAGES","signature":"_IMPLICIT_RECEIVER_LANGUAGES = frozenset({\"java\", \"csharp\", \"cpp\", \"kotlin\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_IMPLICIT_RECEIVER_LANGUAGES"},{"kind":"constant","line":87,"name":"_INHERITED_LANGUAGES","signature":"_INHERITED_LANGUAGES = frozenset({\"kotlin\", \"python\", \"typescript\", \"swift\", \"csharp\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_INHERITED_LANGUAGES"},{"kind":"constant","line":103,"name":"_MAX_ANCESTOR_EXPAND_DEPTH","signature":"_MAX_ANCESTOR_EXPAND_DEPTH = 3","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_MAX_ANCESTOR_EXPAND_DEPTH"},{"kind":"class","line":107,"name":"_LanguageCallStrategies","signature":"class _LanguageCallStrategies","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_LanguageCallStrategies"},{"kind":"constant","line":122,"name":"_NO_LANGUAGE_STRATEGIES","signature":"_NO_LANGUAGE_STRATEGIES = _LanguageCallStrategies()","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_NO_LANGUAGE_STRATEGIES"},{"kind":"constant","line":124,"name":"_TYPED_RECEIVER","signature":"_TYPED_RECEIVER = (\"_resolve_typed_receiver\",)","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_TYPED_RECEIVER"},{"kind":"constant","line":129,"name":"_TYPE_KINDS","signature":"_TYPE_KINDS = frozenset({\"class\", \"struct\", \"interface\", \"enum\", \"trait\", \"impl\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_TYPE_KINDS"},{"kind":"constant","line":130,"name":"_FUNCTION_KINDS","signature":"_FUNCTION_KINDS = frozenset({\"function\", \"method\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_FUNCTION_KINDS"},{"kind":"constant","line":148,"name":"_NON_CALLABLE_KINDS","signature":"_NON_CALLABLE_KINDS = frozenset({\"property\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_NON_CALLABLE_KINDS"},{"kind":"constant","line":163,"name":"_JVM_STRATEGIES","signature":"_JVM_STRATEGIES = _LanguageCallStrategies(","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_JVM_STRATEGIES"},{"kind":"constant","line":173,"name":"_CPP_STRATEGIES","signature":"_CPP_STRATEGIES = _LanguageCallStrategies(","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_CPP_STRATEGIES"},{"kind":"constant","line":180,"name":"_LANGUAGE_CALL_STRATEGIES","signature":"_LANGUAGE_CALL_STRATEGIES: dict[str, _LanguageCallStrategies] = {","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_LANGUAGE_CALL_STRATEGIES"},{"kind":"constant","line":212,"name":"_SOURCE_CACHE_FILES","signature":"_SOURCE_CACHE_FILES = 4","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_SOURCE_CACHE_FILES"},{"kind":"constant","line":213,"name":"_BODY_TYPE_CACHE_ENTRIES","signature":"_BODY_TYPE_CACHE_ENTRIES = 2048","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::_BODY_TYPE_CACHE_ENTRIES"},{"kind":"constant","line":217,"name":"PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES","signature":"PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES: frozenset[str] = frozenset({\"cpp\"})","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES"},{"kind":"class","line":221,"name":"ResolvedCall","signature":"class ResolvedCall","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::ResolvedCall"},{"kind":"class","line":247,"name":"CallResolver","signature":"class CallResolver","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver"},{"kind":"method","line":260,"name":"__init__","signature":"def __init__( self, parsed_files: dict[str, ParsedFile], import_targets: dict[str, set[str]], *, repo_path: str | None = None, import_maps: Any | None = None, heritage_parents: dict[str, set[str]] | None = None, return_type_chain_languages: frozenset[str] | None = None, ) -> None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::__init__"},{"kind":"method","line":409,"name":"_follow_barrel_exports","signature":"def _follow_barrel_exports(self) -> None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_follow_barrel_exports"},{"kind":"method","line":511,"name":"_get_rust_crate_src","signature":"def _get_rust_crate_src(self) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_rust_crate_src"},{"kind":"method","line":533,"name":"_get_go_index","signature":"def _get_go_index(self) -> Any","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_go_index"},{"kind":"method","line":562,"name":"_strategies_for","signature":"def _strategies_for(self, file_path: str) -> _LanguageCallStrategies","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_strategies_for"},{"kind":"method","line":568,"name":"_get_cpp_index","signature":"def _get_cpp_index(self) -> Any","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_cpp_index"},{"kind":"method","line":640,"name":"_resolve_cpp_same_target","signature":"def _resolve_cpp_same_target( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_cpp_same_target"},{"kind":"method","line":663,"name":"_get_jvm_index","signature":"def _get_jvm_index(self) -> Any","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_get_jvm_index"},{"kind":"method","line":684,"name":"_resolve_jvm_same_package","signature":"def _resolve_jvm_same_package( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_jvm_same_package"},{"kind":"method","line":744,"name":"_resolve_jvm_receiver_same_package","signature":"def _resolve_jvm_receiver_same_package( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_jvm_receiver_same_package"},{"kind":"method","line":767,"name":"_resolve_go_package_call","signature":"def _resolve_go_package_call( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_go_package_call"},{"kind":"method","line":796,"name":"_resolve_go_same_package","signature":"def _resolve_go_same_package( self, file_path: str, call: CallSite, caller_id: str, ) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_go_same_package"},{"kind":"method","line":824,"name":"_build_indices","signature":"def _build_indices(self, parsed_files: dict[str, ParsedFile]) -> None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_build_indices"},{"kind":"method","line":879,"name":"_link_declarations","signature":"def _link_declarations( self, declarations: list[tuple[str, str, tuple[str | None, str]]], definitions: dict[tuple[str | None, str], list[tuple[str, str]]], ) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_link_declarations"},{"kind":"method","line":930,"name":"declaration_definitions","signature":"def declaration_definitions(self) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::declaration_definitions"},{"kind":"method","line":939,"name":"_redirect_to_definition","signature":"def _redirect_to_definition(self, resolved: ResolvedCall) -> ResolvedCall","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_redirect_to_definition"},{"kind":"method","line":961,"name":"_published","signature":"def _published(self, file_path: str, name: str) -> str | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_published"},{"kind":"method","line":978,"name":"_merged_symbols_for","signature":"def _merged_symbols_for(self, file_path: str) -> dict[str, str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_merged_symbols_for"},{"kind":"method","line":1017,"name":"_merged_methods_for","signature":"def _merged_methods_for(self, file_path: str) -> dict[tuple[str, str], str]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_merged_methods_for"},{"kind":"method","line":1030,"name":"resolve_file","signature":"def resolve_file(self, file_path: str, calls: list[CallSite]) -> list[ResolvedCall]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::resolve_file"},{"kind":"method","line":1052,"name":"_resolve_one","signature":"def _resolve_one(self, file_path: str, call: CallSite) -> ResolvedCall | None","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_one"},{"kind":"method","line":1083,"name":"_resolve_return_typed_chain","signature":"def _resolve_return_typed_chain( self, file_path: str, call: CallSite, caller_id: str, language: str, ) -> tuple[bool, ResolvedCall | None]","symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver::_resolve_return_typed_chain"}],"symbols_truncated":{"hint":"Call with compact=False or include=['full_doc'] for the full list.","shown":40,"total":89},"title":"File: packages/core/src/repowise/core/ingestion/call_resolver.py"},"episodes":21,"fix_history":{"bug_magnet":true,"fix_count":22,"last_fix_days_ago":10},"freshness":{"confidence_score":1.0,"freshness_status":"stale","is_stale":true},"hotspot":true,"parent_page":{"section":"17.4","target_path":"packages/core/src/repowise/core/ingestion","title":"Ingestion Overview"},"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","target":"packages/core/src/repowise/core/ingestion/call_resolver.py","type":"file"}}},"get_dead_code:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#b20f4f25756c"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":4031},"response_budget":{"limit_chars":24000,"serialized_chars":13223,"tier":"default"},"state":{"truncated":true}},"impact":{"recommendation":"Start with the 'high' tier \u2014 these have no references in the graph and are the strongest cleanup candidates. Confirm each (runtime-loaded config/bootstrap/database files are flagged but never auto-marked safe), then review 'medium' tier with your team.","safe_lines_reclaimable":0,"total_lines_reclaimable":2013},"omission_marker":"[repowise#b20f4f25756c: 35 lines omitted (~4031 tokens); restore: repowise expand b20f4f25756c]","summary":{"by_kind":{"unreachable_file":25,"unused_export":27,"unused_internal":508},"call_resolution_basis":[{"guessed_share":0.0,"language":"javascript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":2,"unresolved_call_sites":null},{"guessed_share":0.03,"language":"python","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":49295,"unresolved_call_sites":null},{"guessed_share":0.04,"language":"typescript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":5364,"unresolved_call_sites":null}],"deletable_lines":0,"filtered_findings":52,"safe_to_delete_count":1,"scope":"total_findings, by_kind, deletable_lines and safe_to_delete_count cover every open finding; filtered_findings and tiers cover what the filters kept (min_confidence defaults to 0.4)","total_findings":560},"tiers":{"high":{"count":1,"description":"High confidence (>=0.8): No references found in the codebase. Strong cleanup candidates \u2014 review (especially runtime-loaded files) before deleting.","findings":[{"age_days":100,"commit_count_90d":0,"confidence":0.8,"end_line":null,"file_path":"packages/core/src/repowise/core/analysis/decision_gate.py","id":"finding_a6c9a04ac7c39bae9231","kind":"unreachable_file","last_commit_at":"2026-05-27T10:27:47","last_meaningful_change":"2026-05-27T10:27:47+00:00","lines":0,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":true,"start_line":null,"symbol_kind":null,"symbol_name":null}],"lines":0,"safe_count":1,"truncated":false},"low":{"count":51,"description":"Low confidence (<0.5): Potentially used via dynamic imports or reflection. Investigate first.","findings":[{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_readme_hero.py","id":"finding_0f040cd55166f823bccf","kind":"unreachable_file","last_commit_at":"2026-08-12T15:52:24","last_meaningful_change":"2026-08-12T15:52:24+00:00","lines":350,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_plugin_content.py","id":"finding_29369eff6365a1b0293f","kind":"unreachable_file","last_commit_at":"2026-08-12T14:19:38","last_meaningful_change":"2026-08-12T14:19:38+00:00","lines":190,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":5,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_agent_matrix.py","id":"finding_4e063ba4bc6f9980ff00","kind":"unreachable_file","last_commit_at":"2026-08-24T11:59:28","last_meaningful_change":"2026-08-24T11:59:28+00:00","lines":180,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":18,"commit_count_90d":4,"confidence":0.4,"end_line":352,"file_path":"packages/server/src/repowise/server/mcp_server/_graph_utils.py","id":"finding_7866e0a83040cdca646e","kind":"unused_export","last_commit_at":"2026-09-04T06:25:06","last_meaningful_change":"2026-09-04T06:25:06+00:00","lines":138,"primary_owner":"Contributor 19","reason":"Public symbol 'build_visual_context' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":214,"symbol_kind":"function","symbol_name":"build_visual_context"},{"age_days":4,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/generate_http_types.py","id":"finding_c1cedf34ddebe7d261cb","kind":"unreachable_file","last_commit_at":"2026-08-31T03:51:20","last_meaningful_change":"2026-08-31T03:51:20+00:00","lines":130,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":87,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/ui/scripts/contrast-check.py","id":"finding_1b9b8063b93def0ff331","kind":"unreachable_file","last_commit_at":"2026-06-08T15:01:45","last_meaningful_change":"2026-06-08T15:01:45+00:00","lines":120,"primary_owner":"Contributor 22","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":21,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/uninstall_cmd.py","id":"finding_4d056697ef3263430455","kind":"unreachable_file","last_commit_at":"2026-08-13T06:48:25","last_meaningful_change":"2026-08-13T06:48:25+00:00","lines":100,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":13,"commit_count_90d":4,"confidence":0.4,"end_line":117,"file_path":"packages/server/src/repowise/server/mcp_server/tool_refactoring.py","id":"finding_4368b4710bdc7ab05fcc","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":86,"primary_owner":"Contributor 19","reason":"Public symbol 'generate_refactoring_code' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":31,"symbol_kind":"function","symbol_name":"generate_refactoring_code"},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_3393e63b818004f15f8d","kind":"unreachable_file","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":3,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/measure_mcp_response_sizes.py","id":"finding_16a533bd7dba51d593b6","kind":"unreachable_file","last_commit_at":"2026-08-31T09:13:01","last_meaningful_change":"2026-08-31T09:13:01+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":10,"commit_count_90d":2,"confidence":0.4,"end_line":100,"file_path":"packages/server/src/repowise/server/mcp_server/tool_architecture.py","id":"finding_63e9ee35b2c0edb37176","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":68,"primary_owner":"Contributor 19","reason":"Public symbol 'get_architecture' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":32,"symbol_kind":"function","symbol_name":"get_architecture"},{"age_days":73,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/telemetry_cmd.py","id":"finding_f6e27d31e8b93df85fd9","kind":"unreachable_file","last_commit_at":"2026-06-22T11:35:27","last_meaningful_change":"2026-06-22T11:35:27+00:00","lines":50,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":24,"commit_count_90d":2,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/ui/result_panels.py","id":"finding_2f1914812c29533dd062","kind":"unreachable_file","last_commit_at":"2026-08-14T17:16:16","last_meaningful_change":"2026-08-14T17:16:16+00:00","lines":50,"primary_owner":"Contributor 22","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":63,"commit_count_90d":5,"confidence":0.4,"end_line":null,"file_path":"packages/vscode/src/extension.ts","id":"finding_e900c8cb8978cb1bd8ee","kind":"unreachable_file","last_commit_at":"2026-07-04T17:35:07","last_meaningful_change":"2026-07-04T17:35:07+00:00","lines":40,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":102,"commit_count_90d":0,"confidence":0.4,"end_line":null,"file_path":"scripts/benchmark_upgrade.py","id":"finding_2a035f9742fa48fd2731","kind":"unreachable_file","last_commit_at":"2026-05-24T06:00:26","last_meaningful_change":"2026-05-24T06:00:26+00:00","lines":40,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":10,"commit_count_90d":3,"confidence":0.4,"end_line":103,"file_path":"packages/server/src/repowise/server/mcp_server/tool_repos.py","id":"finding_9849407bdffedca12fbb","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":35,"primary_owner":"joptimus","reason":"Public symbol 'list_repos' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":68,"symbol_kind":"function","symbol_name":"list_repos"},{"age_days":10,"commit_count_90d":3,"confidence":0.4,"end_line":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_repos.py","id":"finding_237d674ac8ed2dae134d","kind":"unreachable_file","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":30,"primary_owner":"joptimus","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":57,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_fda1711f7fc7dbcba35e","kind":"unused_export","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":22,"primary_owner":"Contributor 19","reason":"Public symbol 'useC4DocsPathSet' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":35,"symbol_kind":"function","symbol_name":"useC4DocsPathSet"},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":87,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_f0e29b2242ddf3a75783","kind":"unused_export","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":22,"primary_owner":"Contributor 19","reason":"Public symbol 'useC4SelectionContext' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":65,"symbol_kind":"function","symbol_name":"useC4SelectionContext"},{"age_days":10,"commit_count_90d":2,"confidence":0.4,"end_line":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_architecture.py","id":"finding_de52d15beb2b3cbcbf97","kind":"unreachable_file","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":20,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null}],"lines":2013,"safe_count":0,"truncated":true},"medium":{"count":0,"description":"Medium confidence (0.5-0.8): Likely unused but may have indirect references. Review before deleting.","findings":[],"lines":0,"safe_count":0,"truncated":false}}},"get_dead_code:limit-200":{"_meta":{"completeness":{"capped":true,"reason":"response_budget","shown":36,"total":50},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#1ee5d92d3242","repowise#31ab8534db9e"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":69631},"reductions":[],"response_budget":{"limit_chars":24000,"serialized_chars":22533,"tier":"default"},"state":{"truncated":true}},"limit_note":"Requested limit=200 exceeded the MCP transport budget and was clamped to 25. Use tier/directory/owner filters or paginate to see more findings.","omission_marker":"[repowise#31ab8534db9e: 299 lines omitted (~2233 tokens); restore: repowise expand 31ab8534db9e]","summary":{"by_kind":{"unreachable_file":25,"unused_export":27,"unused_internal":508},"call_resolution_basis":[{"guessed_share":0.0,"language":"javascript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":2,"unresolved_call_sites":null},{"guessed_share":0.03,"language":"python","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":49295,"unresolved_call_sites":null},{"guessed_share":0.04,"language":"typescript","note":"Call sites the resolver could not bind are not counted, so an empty list means no resolved edge reaches this symbol, not proof that nothing calls it.","resolved_call_edges":5364,"unresolved_call_sites":null}],"deletable_lines":0,"filtered_findings":560,"filters":{"excluded_kinds":[],"min_confidence":0.0},"safe_to_delete_count":1,"scope":"total_findings, by_kind, deletable_lines and safe_to_delete_count cover every open finding; filtered_findings and tiers cover what the filters kept (min_confidence defaults to 0.4)","total_findings":560},"tiers":{"high":{"count":1,"description":"High confidence (>=0.8): No references found in the codebase. Strong cleanup candidates \u2014 review (especially runtime-loaded files) before deleting.","findings":[{"age_days":100,"commit_count_90d":0,"confidence":0.8,"end_line":null,"file_path":"packages/core/src/repowise/core/analysis/decision_gate.py","id":"finding_a6c9a04ac7c39bae9231","kind":"unreachable_file","last_commit_at":"2026-05-27T10:27:47","last_meaningful_change":"2026-05-27T10:27:47+00:00","lines":0,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":true,"start_line":null,"symbol_kind":null,"symbol_name":null}],"lines":0,"safe_count":1,"truncated":false},"low":{"count":51,"description":"Low confidence (<0.5): Potentially used via dynamic imports or reflection. Investigate first.","findings":[{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_readme_hero.py","id":"finding_0f040cd55166f823bccf","kind":"unreachable_file","last_commit_at":"2026-08-12T15:52:24","last_meaningful_change":"2026-08-12T15:52:24+00:00","lines":350,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_plugin_content.py","id":"finding_29369eff6365a1b0293f","kind":"unreachable_file","last_commit_at":"2026-08-12T14:19:38","last_meaningful_change":"2026-08-12T14:19:38+00:00","lines":190,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":22,"commit_count_90d":5,"confidence":0.4,"end_line":null,"file_path":"scripts/gen_agent_matrix.py","id":"finding_4e063ba4bc6f9980ff00","kind":"unreachable_file","last_commit_at":"2026-08-24T11:59:28","last_meaningful_change":"2026-08-24T11:59:28+00:00","lines":180,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":18,"commit_count_90d":4,"confidence":0.4,"end_line":352,"file_path":"packages/server/src/repowise/server/mcp_server/_graph_utils.py","id":"finding_7866e0a83040cdca646e","kind":"unused_export","last_commit_at":"2026-09-04T06:25:06","last_meaningful_change":"2026-09-04T06:25:06+00:00","lines":138,"primary_owner":"Contributor 19","reason":"Public symbol 'build_visual_context' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":214,"symbol_kind":"function","symbol_name":"build_visual_context"},{"age_days":4,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/generate_http_types.py","id":"finding_c1cedf34ddebe7d261cb","kind":"unreachable_file","last_commit_at":"2026-08-31T03:51:20","last_meaningful_change":"2026-08-31T03:51:20+00:00","lines":130,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":87,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/ui/scripts/contrast-check.py","id":"finding_1b9b8063b93def0ff331","kind":"unreachable_file","last_commit_at":"2026-06-08T15:01:45","last_meaningful_change":"2026-06-08T15:01:45+00:00","lines":120,"primary_owner":"Contributor 22","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":21,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/uninstall_cmd.py","id":"finding_4d056697ef3263430455","kind":"unreachable_file","last_commit_at":"2026-08-13T06:48:25","last_meaningful_change":"2026-08-13T06:48:25+00:00","lines":100,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":13,"commit_count_90d":4,"confidence":0.4,"end_line":117,"file_path":"packages/server/src/repowise/server/mcp_server/tool_refactoring.py","id":"finding_4368b4710bdc7ab05fcc","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":86,"primary_owner":"Contributor 19","reason":"Public symbol 'generate_refactoring_code' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":31,"symbol_kind":"function","symbol_name":"generate_refactoring_code"},{"age_days":109,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/web/src/lib/hooks/use-c4-context.ts","id":"finding_3393e63b818004f15f8d","kind":"unreachable_file","last_commit_at":"2026-07-27T11:24:34","last_meaningful_change":"2026-07-27T11:24:34+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":3,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"scripts/measure_mcp_response_sizes.py","id":"finding_16a533bd7dba51d593b6","kind":"unreachable_file","last_commit_at":"2026-08-31T09:13:01","last_meaningful_change":"2026-08-31T09:13:01+00:00","lines":70,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":["script"],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null},{"age_days":10,"commit_count_90d":2,"confidence":0.4,"end_line":100,"file_path":"packages/server/src/repowise/server/mcp_server/tool_architecture.py","id":"finding_63e9ee35b2c0edb37176","kind":"unused_export","last_commit_at":"2026-08-28T17:33:56","last_meaningful_change":"2026-08-28T17:33:56+00:00","lines":68,"primary_owner":"Contributor 19","reason":"Public symbol 'get_architecture' has no importers","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":32,"symbol_kind":"function","symbol_name":"get_architecture"},{"age_days":73,"commit_count_90d":1,"confidence":0.4,"end_line":null,"file_path":"packages/cli/src/repowise/cli/commands/telemetry_cmd.py","id":"finding_f6e27d31e8b93df85fd9","kind":"unreachable_file","last_commit_at":"2026-06-22T11:35:27","last_meaningful_change":"2026-06-22T11:35:27+00:00","lines":50,"primary_owner":"Contributor 19","reason":"File has no importers (in_degree=0)","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":null,"symbol_kind":null,"symbol_name":null}],"findings_emitted":12,"findings_omitted":13,"findings_reduced_reason":"response_budget","findings_total":25,"findings_truncated":true,"lines":2013,"safe_count":0,"truncated":true},"medium":{"count":508,"description":"Medium confidence (0.5-0.8): Likely unused but may have indirect references. Review before deleting.","findings":[{"age_days":19,"commit_count_90d":1,"confidence":0.65,"end_line":224,"file_path":"packages/vscode/webview/src/views/settings/App.tsx","id":"finding_b075fd8305a7974411b7","kind":"unused_internal","last_commit_at":"2026-08-15T04:52:49","last_meaningful_change":"2026-08-15T04:52:49+00:00","lines":175,"primary_owner":"Contributor 19","reason":"Private symbol 'GROUPS' is not used anywhere","repository":"default","risk_factors":["config"],"safe_to_delete":false,"start_line":49,"symbol_kind":"constant","symbol_name":"GROUPS"},{"age_days":21,"commit_count_90d":4,"confidence":0.65,"end_line":638,"file_path":"packages/core/src/repowise/core/generation/onboarding/subkinds/key_concepts.py","id":"finding_be86c5b82740d8059283","kind":"unused_internal","last_commit_at":"2026-08-17T08:07:51","last_meaningful_change":"2026-08-17T08:07:51+00:00","lines":159,"primary_owner":"Contributor 19","reason":"Private symbol '_build' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":479,"symbol_kind":"function","symbol_name":"_build"},{"age_days":101,"commit_count_90d":2,"confidence":0.65,"end_line":173,"file_path":"packages/ui/src/c4/nodes/LayerClusterNode.tsx","id":"finding_c6ddde3060cf14ca3310","kind":"unused_internal","last_commit_at":"2026-06-23T10:24:32","last_meaningful_change":"2026-06-23T10:24:32+00:00","lines":147,"primary_owner":"Contributor 22","reason":"Private symbol 'LayerClusterNodeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":26,"symbol_kind":"function","symbol_name":"LayerClusterNodeImpl"},{"age_days":22,"commit_count_90d":3,"confidence":0.65,"end_line":589,"file_path":"packages/core/src/repowise/core/ingestion/sfc_source.py","id":"finding_27b06007ec3b456791b8","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":144,"primary_owner":"Contributor 19","reason":"Private symbol '_razor_byte_scan' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":445,"symbol_kind":"function","symbol_name":"_razor_byte_scan"},{"age_days":101,"commit_count_90d":1,"confidence":0.65,"end_line":148,"file_path":"packages/ui/src/c4/nodes/ArchFileNode.tsx","id":"finding_7897e8b0e5b192dc04f3","kind":"unused_internal","last_commit_at":"2026-06-06T13:25:45","last_meaningful_change":"2026-06-06T13:25:45+00:00","lines":125,"primary_owner":"Contributor 22","reason":"Private symbol 'ArchFileNodeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":23,"symbol_kind":"function","symbol_name":"ArchFileNodeImpl"},{"age_days":22,"commit_count_90d":3,"confidence":0.65,"end_line":484,"file_path":"packages/core/src/repowise/core/persistence/database.py","id":"finding_f8da2bf875ed65e153ee","kind":"unused_internal","last_commit_at":"2026-09-05T13:30:40","last_meaningful_change":"2026-09-05T13:30:40+00:00","lines":118,"primary_owner":"Contributor 19","reason":"Private symbol '_reconcile_schema' is not used anywhere","repository":"default","risk_factors":["database"],"safe_to_delete":false,"start_line":366,"symbol_kind":"function","symbol_name":"_reconcile_schema"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":508,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_97db30e3d8a29e1f728f","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":96,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_c_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":412,"symbol_kind":"function","symbol_name":"_resolve_c_type_refs"},{"age_days":101,"commit_count_90d":2,"confidence":0.65,"end_line":115,"file_path":"packages/ui/src/c4/nodes/ArchContainerNode.tsx","id":"finding_4cf23634a04a6a87e7f8","kind":"unused_internal","last_commit_at":"2026-06-23T10:24:32","last_meaningful_change":"2026-06-23T10:24:32+00:00","lines":95,"primary_owner":"Contributor 22","reason":"Private symbol 'ArchContainerNodeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":20,"symbol_kind":"function","symbol_name":"ArchContainerNodeImpl"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":638,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_3494eba7bab882eb59ec","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":91,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_ts_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":547,"symbol_kind":"function","symbol_name":"_resolve_ts_type_refs"},{"age_days":19,"commit_count_90d":1,"confidence":0.65,"end_line":151,"file_path":"packages/core/src/repowise/core/generation/onboarding/subkinds/active_landscape.py","id":"finding_de7b2aff5fc207d79981","kind":"unused_internal","last_commit_at":"2026-08-15T09:40:34","last_meaningful_change":"2026-08-15T09:40:34+00:00","lines":87,"primary_owner":"Contributor 19","reason":"Private symbol '_build' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":64,"symbol_kind":"function","symbol_name":"_build"},{"age_days":101,"commit_count_90d":1,"confidence":0.65,"end_line":142,"file_path":"packages/ui/src/graph-primitives/edge-renderer.tsx","id":"finding_eade40e87507df4bdae7","kind":"unused_internal","last_commit_at":"2026-06-06T13:25:45","last_meaningful_change":"2026-06-06T13:25:45+00:00","lines":87,"primary_owner":"Contributor 22","reason":"Private symbol 'ArchEdgeRendererImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":55,"symbol_kind":"function","symbol_name":"ArchEdgeRendererImpl"},{"age_days":22,"commit_count_90d":11,"confidence":0.65,"end_line":1208,"file_path":"packages/core/src/repowise/core/ingestion/parser_helpers.py","id":"finding_798475db14d41278d3f8","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":86,"primary_owner":"Contributor 19","reason":"Private symbol '_ts_head_type_identifier' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":1122,"symbol_kind":"function","symbol_name":"_ts_head_type_identifier"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":366,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_0320a6bd2eeb4c7b9686","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":83,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_go_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":283,"symbol_kind":"function","symbol_name":"_resolve_go_type_refs"},{"age_days":76,"commit_count_90d":1,"confidence":0.65,"end_line":94,"file_path":"packages/ui/src/workspace/system-map/system-map-edge.tsx","id":"finding_cde5d1605847ffe10cd1","kind":"unused_internal","last_commit_at":"2026-06-19T07:53:16","last_meaningful_change":"2026-06-19T07:53:16+00:00","lines":74,"primary_owner":"Contributor 19","reason":"Private symbol 'SystemMapEdgeInner' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":20,"symbol_kind":"function","symbol_name":"SystemMapEdgeInner"},{"age_days":161,"commit_count_90d":1,"confidence":0.65,"end_line":213,"file_path":"packages/core/src/repowise/core/ingestion/special_handlers.py","id":"finding_a72b31224fbeb674507a","kind":"unused_internal","last_commit_at":"2026-07-04T11:15:25","last_meaningful_change":"2026-07-04T11:15:25+00:00","lines":72,"primary_owner":"Contributor 19","reason":"Private symbol '_parse_dockerfile' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":141,"symbol_kind":"function","symbol_name":"_parse_dockerfile"},{"age_days":109,"commit_count_90d":2,"confidence":0.65,"end_line":90,"file_path":"packages/ui/src/c4/edges/RelationEdge.tsx","id":"finding_d11a1aeaa4becb88db2c","kind":"unused_internal","last_commit_at":"2026-06-23T10:24:32","last_meaningful_change":"2026-06-23T10:24:32+00:00","lines":72,"primary_owner":"Contributor 19","reason":"Private symbol 'RelationEdgeImpl' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":18,"symbol_kind":"function","symbol_name":"RelationEdgeImpl"},{"age_days":9,"commit_count_90d":4,"confidence":0.65,"end_line":831,"file_path":"packages/server/src/repowise/server/job_executor.py","id":"finding_ea3a8bb0f7e7024be0d4","kind":"unused_internal","last_commit_at":"2026-09-07T11:41:26","last_meaningful_change":"2026-09-07T11:41:26+00:00","lines":71,"primary_owner":"Contributor 19","reason":"Private symbol '_persist_initial_index_state' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":760,"symbol_kind":"function","symbol_name":"_persist_initial_index_state"},{"age_days":161,"commit_count_90d":1,"confidence":0.65,"end_line":125,"file_path":"packages/core/src/repowise/core/ingestion/special_handlers.py","id":"finding_4c6222d665b3595e0493","kind":"unused_internal","last_commit_at":"2026-07-04T11:15:25","last_meaningful_change":"2026-07-04T11:15:25+00:00","lines":70,"primary_owner":"Contributor 19","reason":"Private symbol '_parse_openapi' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":55,"symbol_kind":"function","symbol_name":"_parse_openapi"},{"age_days":18,"commit_count_90d":4,"confidence":0.65,"end_line":741,"file_path":"packages/core/src/repowise/core/ingestion/type_ref_resolution.py","id":"finding_60313f5eee105a75790e","kind":"unused_internal","last_commit_at":"2026-08-22T16:05:26","last_meaningful_change":"2026-08-22T16:05:26+00:00","lines":68,"primary_owner":"Contributor 19","reason":"Private symbol '_resolve_jvm_type_refs' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":673,"symbol_kind":"function","symbol_name":"_resolve_jvm_type_refs"},{"age_days":20,"commit_count_90d":3,"confidence":0.65,"end_line":112,"file_path":"packages/core/src/repowise/core/ingestion/graph_warmups.py","id":"finding_56627b474c7331f636f9","kind":"unused_internal","last_commit_at":"2026-09-04T13:27:00","last_meaningful_change":"2026-09-04T13:27:00+00:00","lines":62,"primary_owner":"Contributor 19","reason":"Private symbol '_warmup_jvm' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":50,"symbol_kind":"function","symbol_name":"_warmup_jvm"},{"age_days":22,"commit_count_90d":11,"confidence":0.65,"end_line":1060,"file_path":"packages/core/src/repowise/core/ingestion/parser_helpers.py","id":"finding_f2ff92755f90a64d9b11","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":62,"primary_owner":"Contributor 19","reason":"Private symbol '_go_head_type_identifier' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":998,"symbol_kind":"function","symbol_name":"_go_head_type_identifier"},{"age_days":22,"commit_count_90d":11,"confidence":0.65,"end_line":1276,"file_path":"packages/core/src/repowise/core/ingestion/parser_helpers.py","id":"finding_391c43bb421d142b8094","kind":"unused_internal","last_commit_at":"2026-09-04T18:23:23","last_meaningful_change":"2026-09-04T18:23:23+00:00","lines":61,"primary_owner":"Contributor 19","reason":"Private symbol '_java_head_type_identifier' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":1215,"symbol_kind":"function","symbol_name":"_java_head_type_identifier"},{"age_days":161,"commit_count_90d":1,"confidence":0.65,"end_line":285,"file_path":"packages/core/src/repowise/core/ingestion/special_handlers.py","id":"finding_f3d3afff206d3be963cf","kind":"unused_internal","last_commit_at":"2026-07-04T11:15:25","last_meaningful_change":"2026-07-04T11:15:25+00:00","lines":59,"primary_owner":"Contributor 19","reason":"Private symbol '_parse_makefile' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":226,"symbol_kind":"function","symbol_name":"_parse_makefile"},{"age_days":20,"commit_count_90d":3,"confidence":0.65,"end_line":173,"file_path":"packages/core/src/repowise/core/ingestion/graph_warmups.py","id":"finding_d645a649dd73cd608107","kind":"unused_internal","last_commit_at":"2026-09-04T13:27:00","last_meaningful_change":"2026-09-04T13:27:00+00:00","lines":58,"primary_owner":"Contributor 19","reason":"Private symbol '_warmup_cpp' is not used anywhere","repository":"default","risk_factors":[],"safe_to_delete":false,"start_line":115,"symbol_kind":"function","symbol_name":"_warmup_cpp"}],"findings_emitted":24,"findings_omitted":1,"findings_reduced_reason":"response_budget","findings_total":25,"findings_truncated":true,"lines":5444,"safe_count":0,"truncated":true}},"truncated":true},"get_dependency_path:two-files":{"_meta":{"completeness":{"capped":false},"contract_version":1,"evidence_kind":"structural","response_budget":{"limit_chars":24000,"serialized_chars":2005,"tier":"default"},"runtime_breakage_proven":false},"distance":-1,"explanation":"No direct dependency path found","path":[],"visual_context":{"bridge_suggestions":[{"node":"external:typing","pagerank":0.02358},{"node":"external:dataclasses","pagerank":0.02038},{"node":"tests/conftest.py","pagerank":0.02011},{"node":"external:pathlib","pagerank":0.01869},{"node":"external:collections.abc","pagerank":0.01618}],"community":{"same_community":false,"source_community":3,"target_community":2},"disconnected":false,"nearest_common_ancestors":[{"distance_from_source":1,"distance_from_target":1,"node":"external:typing"},{"distance_from_source":1,"distance_from_target":1,"node":"external:structlog"},{"distance_from_source":1,"distance_from_target":1,"node":"external:pathlib"},{"distance_from_source":2,"distance_from_target":1,"node":"packages/core/src/repowise/core/docs_mode.py"},{"distance_from_source":2,"distance_from_target":1,"node":"packages/cli/src/repowise/cli/commands/upgrade_flow.py"}],"reverse_path":{"distance":5,"exists":true,"note":"A path exists in the reverse direction (packages/cli/src/repowise/cli/commands/update_cmd/command.py -> packages/core/src/repowise/core/ingestion/call_resolver.py). The dependency flows the other way.","path":["packages/cli/src/repowise/cli/commands/update_cmd/command.py","packages/core/src/repowise/core/ingestion/__init__.py","packages/core/src/repowise/core/ingestion/graph/__init__.py","packages/core/src/repowise/core/ingestion/graph/builder.py","packages/core/src/repowise/core/ingestion/graph/_resolvers.py","packages/core/src/repowise/core/ingestion/call_resolver.py"]},"shared_neighbors":["external:pathlib","external:structlog","external:typing"],"suggestion":"No direct path, but both nodes connect through 'external:typing'. This shared dependency may be the architectural bridge point."}},"get_execution_flows:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","hint":"Use get_context(include=['callers','callees']) on any trace node for detail.","index_age_days":0,"indexed_commit":"920d1c973d64","replaced_tokens":2160,"response_budget":{"limit_chars":24000,"serialized_chars":4969,"tier":"default"},"runtime_breakage_proven":false,"timing_ms":1155.0,"tokens_saved":870},"flows":[{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/vscode/webview/src/views/graph/App.tsx::App","entry_point_name":"App","entry_point_score":0.95,"termination":"no_callees","trace":["packages/vscode/webview/src/views/graph/App.tsx::App","packages/vscode/webview/src/views/graph/App.tsx::CommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::GraphCommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::FactGrid","packages/ui/src/graph/graph-community-panel.tsx::FactValue"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","entry_point_name":"execute","entry_point_score":0.928,"termination":"no_callees","trace":["packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::_announce_total","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_announce_paid"],"trace_via":["self_scope","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/git.py::get_risk_range","entry_point_name":"get_risk_range","entry_point_score":0.843,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/git.py::get_risk_range","packages/server/src/repowise/server/routers/git.py::_revision_exists"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","entry_point_name":"HealthOverviewCard","entry_point_score":0.838,"termination":"no_callees","trace":["packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","packages/ui/src/dashboard/health-overview-card.tsx::AccuracyStrip"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/costs.py::get_distill_savings","entry_point_name":"get_distill_savings","entry_point_score":0.831,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/costs.py::get_distill_savings","packages/server/src/repowise/server/routers/costs.py::_parse_since"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/git/ownership-table.tsx::OwnershipTable","entry_point_name":"OwnershipTable","entry_point_score":0.83,"termination":"no_callees","trace":["packages/ui/src/git/ownership-table.tsx::OwnershipTable","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","entry_point_name":"DecisionsTimeline","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","packages/ui/src/lib/format.ts::formatRelativeTime","packages/ui/src/lib/format.ts::parseDate"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","entry_point_name":"HotspotsMini","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","packages/ui/src/dashboard/hotspots-mini.tsx::getChurnColor"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","entry_point_name":"ModuleMinimap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","entry_point_name":"OwnershipTreemap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]}],"total_entry_points":10},"get_execution_flows:top-100-depth-20":{"_meta":{"completeness":{"capped":true,"reason":"response_budget","shown":45,"total":50},"contract_version":1,"embedder_degraded":false,"evidence_kind":"structural","hint":"Use get_context(include=['callers','callees']) on any trace node for detail.","index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#54b10477a47c","repowise#94e97218a71a"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":761},"replaced_tokens":6000,"response_budget":{"limit_chars":24000,"serialized_chars":22639,"tier":"default"},"runtime_breakage_proven":false,"state":{"truncated":true},"timing_ms":1286.0,"tokens_saved":102},"flows":[{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/vscode/webview/src/views/graph/App.tsx::App","entry_point_name":"App","entry_point_score":0.95,"termination":"no_callees","trace":["packages/vscode/webview/src/views/graph/App.tsx::App","packages/vscode/webview/src/views/graph/App.tsx::CommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::GraphCommunityPanel","packages/ui/src/graph/graph-community-panel.tsx::FactGrid","packages/ui/src/graph/graph-community-panel.tsx::FactValue"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","entry_point_name":"execute","entry_point_score":0.928,"termination":"no_callees","trace":["packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::execute","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_GenerationRun::_announce_total","packages/core/src/repowise/core/generation/page_generator/orchestrate.py::_announce_paid"],"trace_via":["self_scope","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/git.py::get_risk_range","entry_point_name":"get_risk_range","entry_point_score":0.843,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/git.py::get_risk_range","packages/server/src/repowise/server/routers/git.py::_revision_exists"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","entry_point_name":"HealthOverviewCard","entry_point_score":0.838,"termination":"no_callees","trace":["packages/ui/src/dashboard/health-overview-card.tsx::HealthOverviewCard","packages/ui/src/dashboard/health-overview-card.tsx::AccuracyStrip"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/costs.py::get_distill_savings","entry_point_name":"get_distill_savings","entry_point_score":0.831,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/costs.py::get_distill_savings","packages/server/src/repowise/server/routers/costs.py::_parse_since"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/git/ownership-table.tsx::OwnershipTable","entry_point_name":"OwnershipTable","entry_point_score":0.83,"termination":"no_callees","trace":["packages/ui/src/git/ownership-table.tsx::OwnershipTable","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","entry_point_name":"DecisionsTimeline","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/decisions-timeline.tsx::DecisionsTimeline","packages/ui/src/lib/format.ts::formatRelativeTime","packages/ui/src/lib/format.ts::parseDate"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","entry_point_name":"HotspotsMini","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/hotspots-mini.tsx::HotspotsMini","packages/ui/src/dashboard/hotspots-mini.tsx::getChurnColor"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","entry_point_name":"ModuleMinimap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/module-minimap.tsx::ModuleMinimap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","entry_point_name":"OwnershipTreemap","entry_point_score":0.826,"termination":"no_callees","trace":["packages/ui/src/dashboard/ownership-treemap.tsx::OwnershipTreemap","packages/ui/src/ui/card.tsx::Card","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/graph/community.py::get_community_detail","entry_point_name":"get_community_detail","entry_point_score":0.825,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/graph/community.py::get_community_detail","packages/server/src/repowise/server/mcp_server/_graph_utils.py::community_cohesion","packages/server/src/repowise/server/mcp_server/_graph_utils.py::parse_community_meta"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/health/kpi-cards.tsx::HealthKpiCards","entry_point_name":"HealthKpiCards","entry_point_score":0.821,"termination":"no_callees","trace":["packages/ui/src/health/kpi-cards.tsx::HealthKpiCards","packages/ui/src/health/kpi-cards.tsx::InlineStat","packages/ui/src/health/sparkline.tsx::Sparkline"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":0,"entry_point":"packages/ui/src/health/ai-prompt-builder.ts::buildGalaxyMapAiPrompt","entry_point_name":"buildGalaxyMapAiPrompt","entry_point_score":0.821,"termination":"no_callees","trace":["packages/ui/src/health/ai-prompt-builder.ts::buildGalaxyMapAiPrompt"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/modules.py::get_module_health","entry_point_name":"get_module_health","entry_point_score":0.821,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/modules.py::get_module_health","packages/server/src/repowise/server/routers/modules.py::_decision_refs","packages/server/src/repowise/server/schemas/ownership.py::GoverningDecisionRef"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_plan_page","entry_point_name":"get_refactoring_plan_page","entry_point_score":0.821,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_plan_page","packages/server/src/repowise/server/routers/refactoring.py::RefactoringPlanPageResponse"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_mermaid","entry_point_name":"get_c4_mermaid","entry_point_score":0.816,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_mermaid","packages/server/src/repowise/server/services/c4_builder/mermaid.py::to_mermaid_l1","packages/server/src/repowise/server/services/c4_builder/mermaid.py::_emit_externals","packages/server/src/repowise/server/services/c4_builder/mermaid.py::_external_line","packages/server/src/repowise/server/services/c4_builder/mermaid.py::_ext_kind"],"trace_via":["import_scoped","same_file","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/workspace.py::get_workspace_graph","entry_point_name":"get_workspace_graph","entry_point_score":0.816,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/workspace.py::get_workspace_graph","packages/server/src/repowise/server/routers/workspace.py::_query_repo_stats","packages/core/src/repowise/core/docs_mode.py::resolve_docs_mode"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/dashboard/commits-mini.tsx::CommitsMini","entry_point_name":"CommitsMini","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/dashboard/commits-mini.tsx::CommitsMini","packages/ui/src/lib/format.ts::formatRelativeTime","packages/ui/src/lib/format.ts::parseDate"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/module-overview-grid.tsx::ModuleOverviewGrid","entry_point_name":"ModuleOverviewGrid","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/dashboard/module-overview-grid.tsx::ModuleOverviewGrid","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/dashboard/savings-mini.tsx::SavingsMini","entry_point_name":"SavingsMini","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/dashboard/savings-mini.tsx::SavingsMini","packages/ui/src/lib/format.ts::formatCost"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/git/contributors-strip.tsx::ContributorsStrip","entry_point_name":"ContributorsStrip","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/git/contributors-strip.tsx::ContributorsStrip","packages/ui/src/git/contributors-strip.tsx::firstName"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/ui/src/graph/graph-context-drawer.tsx::GraphContextDrawer","entry_point_name":"GraphContextDrawer","entry_point_score":0.815,"termination":"no_callees","trace":["packages/ui/src/graph/graph-context-drawer.tsx::GraphContextDrawer","packages/ui/src/graph/node-badges.tsx::NodeBadges","packages/ui/src/lib/cn.ts::cn"],"trace_via":["import_scoped","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_l1","entry_point_name":"get_c4_l1","entry_point_score":0.81,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_l1","packages/server/src/repowise/server/routers/c4.py::_person","packages/server/src/repowise/server/schemas/c4.py::C4PersonResponse"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_l3","entry_point_name":"get_c4_l3","entry_point_score":0.81,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_l3","packages/server/src/repowise/server/routers/c4.py::_component","packages/server/src/repowise/server/schemas/c4.py::C4ComponentResponse"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/decisions.py::get_decision_graph","entry_point_name":"get_decision_graph","entry_point_score":0.81,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/decisions.py::get_decision_graph","packages/server/src/repowise/server/schemas/decisions.py::DecisionCodeEdge"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/cli/src/repowise/cli/commands/init_cmd/command.py::init_command","entry_point_name":"init_command","entry_point_score":0.809,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/init_cmd/command.py::init_command","packages/cli/src/repowise/cli/commands/init_cmd/command.py::_print_structural_plan","packages/cli/src/repowise/cli/commands/init_cmd/generation.py::page_type_label"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/ui/src/graph/centrality-leaderboard.tsx::CentralityLeaderboard","entry_point_name":"CentralityLeaderboard","entry_point_score":0.807,"termination":"no_callees","trace":["packages/ui/src/graph/centrality-leaderboard.tsx::CentralityLeaderboard","packages/ui/src/graph/centrality-leaderboard.tsx::score"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/cli/src/repowise/cli/commands/health_cmd/command.py::health_command","entry_point_name":"health_command","entry_point_score":0.805,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/health_cmd/command.py::health_command","packages/cli/src/repowise/cli/_setup.py::configure_cli_logging"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/vscode/webview/src/views/decisions/App.tsx::App","entry_point_name":"App","entry_point_score":0.805,"termination":"confidence_filtered","termination_detail":{"global_unique":1},"trace":["packages/vscode/webview/src/views/decisions/App.tsx::App","packages/vscode/webview/src/views/decisions/App.tsx::DecisionsSkeleton"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/web/src/app/repos/[id]/overview/page.tsx::OverviewPage","entry_point_name":"OverviewPage","entry_point_score":0.804,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/overview/page.tsx::OverviewPage","packages/web/src/app/repos/[id]/overview/page.tsx::safeFetch"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/web/src/app/repos/[id]/costs/page.tsx::CostsPage","entry_point_name":"CostsPage","entry_point_score":0.803,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/costs/page.tsx::CostsPage","packages/api-client/src/costs.ts::getCostSummary","packages/api-client/src/client.ts::apiGet","packages/api-client/src/client.ts::buildHeaders","packages/api-client/src/client.ts::resolveToken"],"trace_via":["import_scoped","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/vscode/src/extension.ts::activate","entry_point_name":"activate","entry_point_score":0.802,"termination":"confidence_filtered","termination_detail":{"global_unique":1},"trace":["packages/vscode/src/extension.ts::activate","packages/vscode/src/extension.ts::checkSetup"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/c4.py::get_c4_l2","entry_point_name":"get_c4_l2","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/c4.py::get_c4_l2","packages/server/src/repowise/server/routers/c4.py::_container","packages/server/src/repowise/server/schemas/c4.py::C4ContainerResponse"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/knowledge_map.py::get_knowledge_map","entry_point_name":"get_knowledge_map","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/knowledge_map.py::get_knowledge_map","packages/server/src/repowise/server/schemas/ownership.py::KnowledgeMapOwner"],"trace_via":["import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_targets","entry_point_name":"get_refactoring_targets","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/refactoring.py::get_refactoring_targets","packages/server/src/repowise/server/routers/refactoring.py::RefactoringSummary"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/server/src/repowise/server/routers/repos.py::create_repo","entry_point_name":"create_repo","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/repos.py::create_repo","packages/server/src/repowise/server/routers/repos.py::_enqueue_index_job","packages/server/src/repowise/server/routers/repos.py::_launch_job_task","packages/server/src/repowise/server/routers/repos.py::_resolve_repo_session_factory","packages/server/src/repowise/server/deps.py::resolve_session_factory"],"trace_via":["same_file","same_file","same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/workspace.py::get_workspace","entry_point_name":"get_workspace","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/workspace.py::get_workspace","packages/server/src/repowise/server/routers/workspace.py::_query_repo_stats","packages/core/src/repowise/core/docs_mode.py::resolve_docs_mode"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":3,"entry_point":"packages/server/src/repowise/server/routers/graph/intelligence.py::get_execution_flows","entry_point_name":"get_execution_flows","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/graph/intelligence.py::get_execution_flows","packages/server/src/repowise/server/mcp_server/_graph_utils.py::bfs_trace","packages/server/src/repowise/server/mcp_server/_graph_utils.py::_node_id_is_excluded","packages/core/src/repowise/core/analysis/execution_graph.py::is_excluded_execution_path"],"trace_via":["import_scoped","same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/server/src/repowise/server/routers/workspace.py::get_contract_detail","entry_point_name":"get_contract_detail","entry_point_score":0.802,"termination":"no_callees","trace":["packages/server/src/repowise/server/routers/workspace.py::get_contract_detail","packages/server/src/repowise/server/routers/workspace.py::_contract_entry","packages/server/src/repowise/server/schemas/workspace.py::WorkspaceContractEntry"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/cli/src/repowise/cli/commands/saved_cmd.py::saved_command","entry_point_name":"saved_command","entry_point_score":0.799,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/saved_cmd.py::saved_command","packages/cli/src/repowise/cli/commands/saved_cmd.py::_estimate_usd","packages/core/src/repowise/core/generation/cost_tracker.py::get_model_pricing","packages/core/src/repowise/core/generation/cost_tracker.py::_get_pricing","packages/core/src/repowise/core/generation/cost_tracker.py::_family_pricing"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/web/src/app/repos/[id]/code-health/page.tsx::CodeHealthPage","entry_point_name":"CodeHealthPage","entry_point_score":0.799,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/code-health/page.tsx::CodeHealthPage","packages/web/src/app/repos/[id]/code-health/page.tsx::ViewSelect","packages/ui/src/ui/select.tsx::Select"],"trace_via":["same_file","import_scoped"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/cli/src/repowise/cli/commands/dead_code_cmd.py::dead_code_command","entry_point_name":"dead_code_command","entry_point_score":0.798,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/dead_code_cmd.py::dead_code_command","packages/cli/src/repowise/cli/helpers.py::load_state","packages/cli/src/repowise/cli/helpers.py::get_repowise_dir"],"trace_via":["import_scoped","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":4,"entry_point":"packages/cli/src/repowise/cli/commands/restyle_cmd.py::restyle_command","entry_point_name":"restyle_command","entry_point_score":0.798,"termination":"no_callees","trace":["packages/cli/src/repowise/cli/commands/restyle_cmd.py::restyle_command","packages/cli/src/repowise/cli/commands/restyle_cmd.py::_print_styles","packages/core/src/repowise/core/generation/styles/registry.py::list_styles","packages/core/src/repowise/core/generation/styles/registry.py::_load_custom_style","packages/core/src/repowise/core/generation/styles/registry.py::_clip"],"trace_via":["same_file","import_scoped","same_file","same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":1,"entry_point":"packages/web/src/app/repos/[id]/refactoring/page.tsx::RefactoringPage","entry_point_name":"RefactoringPage","entry_point_score":0.797,"termination":"no_callees","trace":["packages/web/src/app/repos/[id]/refactoring/page.tsx::RefactoringPage","packages/web/src/app/repos/[id]/refactoring/page.tsx::leadTypeFor"],"trace_via":["same_file"]},{"communities_visited":[0],"crosses_community":false,"depth":2,"entry_point":"packages/vscode/webview/src/views/risk/App.tsx::App","entry_point_name":"App","entry_point_score":0.797,"termination":"no_callees","trace":["packages/vscode/webview/src/views/risk/App.tsx::App","packages/vscode/webview/src/views/risk/App.tsx::ChangeImpact","packages/vscode/webview/src/views/risk/App.tsx::DirectRiskRow"],"trace_via":["same_file","same_file"]}],"flows_emitted":45,"flows_omitted":5,"flows_reduced_reason":"response_budget","flows_total":50,"flows_truncated":true,"omission_marker":"[repowise#94e97218a71a: 26 lines omitted (~201 tokens); restore: repowise expand 94e97218a71a]","total_entry_points":50,"truncated":true},"get_health:all-includes":{"_meta":{"completeness":{"capped":true,"reason":"collection_cap_and_response_budget","shown":80,"total":1855},"contract_version":2,"embedder":"mock","embedder_degraded":false,"health_analysis":{"analyzed_at":"2026-09-30T14:04:24.529401","analyzed_commit":"547df91a7e7b","analyzed_commits_distinct":2,"live_verification":{"basis":"index_commit_and_live_git_head","source_bytes_verified":false},"recomputed_this_call":false,"refresh":{"command":"repowise update","precondition":"commit health-relevant working-tree changes first","required_before_comparison":true},"source":"stored_health_analysis","status":"available"},"health_analyzed_at":"2026-09-30T14:04:24.529401","health_analyzed_commit":"547df91a7e7b","health_analyzed_commits_distinct":2,"index_age_days":0,"index_behind":true,"index_scope":{"content_provenance":"model","fingerprint":"4a1aa5b83bd6","full":"get_overview()","git_tier":"full","projection":"compact","run_mode":"standard","status":"partial","version":1},"indexed_commit":"eaf9fb2638af","live_head":"303f55f1785c","omitted":{"refs":["repowise#7c7d4b4978b4","repowise#b0df000b1f03"],"restore":"`repowise expand <ref>`, or get_symbol(\"repowise#<ref>\", query=...)","tokens":22235},"reductions":[{"emitted":0,"field":"performance_summary.facets.context","reason":"response_budget","total":3},{"emitted":0,"field":"performance_summary.facets.boundary","reason":"response_budget","total":5},{"emitted":0,"field":"performance_summary.facets.confidence","reason":"response_budget","total":1},{"emitted":0,"field":"performance_summary.facets.actionability","reason":"response_budget","total":3},{"emitted":0,"field":"performance_summary.facets.plan_state","reason":"response_budget","total":2}],"response_budget":{"limit_chars":32000,"serialized_chars":30504,"tier":"expanded"},"semantic_search":false,"stale_warning":"Index is behind live HEAD \u2014 run `repowise update`.","state":{"truncated":true},"timing_ms":1515.0},"counts":"everything","distribution":{"bands":{"at_risk":{"files":180,"nloc":103273,"pct":13.6},"excellent":{"files":3312,"nloc":388454,"pct":51.0},"fair":{"files":261,"nloc":78236,"pct":10.3},"good":{"files":570,"nloc":140575,"pct":18.4},"needs_work":{"files":138,"nloc":51446,"pct":6.8}},"total_files":4461,"total_nloc":761984},"fix_first":{"basis":{"analyzed_commit":"547df91a7e7ba6e01f7457ac2172e09a36ad47a6","health_analyzed_at":"2026-09-30T14:04:24.529401"},"by_improves":{"defect":768,"maintainability":157,"performance":122},"detail_call":"get_health(fix_id='fix1_97d425a56a911cf78db4')","items":[{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ff13ab231f7b30bbdffb\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_d21fb1bde221e8df007e","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ae647f629da0ef35d96e"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ae647f629da0ef35d96e\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","line_end":208,"line_start":152,"symbol":"walk_file"},"tier":"now","title":"Extract a helper from walk_file","why":"walk_file has more branches than its tests can easily cover; 8 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_fba1d37b9cbd137f45e7","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_f679a97d234a223b34f5"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_f679a97d234a223b34f5\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/web/src/components/code-health/triage-tab.tsx","line_end":121,"line_start":71,"symbol":"TriageTab"},"tier":"now","title":"Extract a helper from TriageTab","why":"TriageTab has more branches than its tests can easily cover; it changed 6 times in 90 days, so the cost recurs."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_26c2da3b4c98f8fdef56","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_5ca551b7b7c3293951d0"},"cli":null,"mcp":"get_health(opportunity_id=\"perf2_5ca551b7b7c3293951d0\")","purpose":"The full opportunity: ordered steps, validation and other causes here","tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/repo_db.py","line_end":null,"line_start":null,"symbol":"ensure_repo_registration"},"tier":"next","title":"Batch the database calls loops make through ensure_repo_registration","why":"ensure_repo_registration makes a database call once per loop iteration; 2 call sites reach it, an entry point reaches it, the loop grows with the data."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_f17556ad6537b1c26c98","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_29080eb5a091e8eeb79d"},"cli":null,"mcp":"get_health(opportunity_id=\"perf2_29080eb5a091e8eeb79d\")","purpose":"The full opportunity: ordered steps, validation and other causes here","tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/job_executor.py","line_end":null,"line_start":null,"symbol":"_start_job"},"tier":"next","title":"Move the database call in _start_job out of its loop","why":"_start_job makes a database call once per loop iteration; an entry point reaches it, the loop grows with the data."}],"items_emitted":5,"items_total":5,"lead":{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ff13ab231f7b30bbdffb\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},"model_version":1,"totals":{"candidates":2834,"eligible":1047,"excluded":{"below_min_worth":428,"expected":148,"generated":4,"history_only":137,"no_plan":12,"test":804,"tooling":254},"shown":5}},"gap_analysis":{"files_below_target":860,"files_for_half_gap":22,"files_to_reach_target":57,"target_score":8.0,"weighted_gap_points":324845,"weighted_gross_gap_points":925602},"high_leverage_files":[{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":69.6,"maintainability_score":1.3,"max_ccn":249,"max_nesting":5,"module":"packages/cli","nloc":1810,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"run_update nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":1.4,"total_deduction":9.213,"weighted_deficit":12670},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/incremental.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.35,"maintainability_score":2.0,"max_ccn":54,"max_nesting":5,"module":"packages/core","nloc":1727,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_incremental_index nests 5 levels deep","score":1.41,"share_of_repo_gap_pct":1.2,"total_deduction":8.569,"weighted_deficit":11381},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":75.35,"maintainability_score":2.8,"max_ccn":162,"max_nesting":4,"module":"packages/cli","nloc":1535,"performance_score":10.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: init_command is 739 lines, CCN 162, in a file imported by 7 others","score":1.01,"share_of_repo_gap_pct":1.2,"total_deduction":8.985,"weighted_deficit":10730},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/workspace_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":72.45,"maintainability_score":1.3,"max_ccn":29,"max_nesting":4,"module":"packages/cli","nloc":1341,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"workspace_scan nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":1.0,"total_deduction":9.1,"weighted_deficit":9387},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_test_file":true,"is_test":false,"line_coverage_pct":92.35,"maintainability_score":3.1,"max_ccn":25,"max_nesting":6,"module":"packages/core","nloc":1460,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_find_parent nests 6 levels deep","score":1.74,"share_of_repo_gap_pct":1.0,"total_deduction":8.258,"weighted_deficit":9140},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":1.3,"max_ccn":74,"max_nesting":5,"module":"packages/cli","nloc":1279,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_persist_full_update_async nests 5 levels deep","score":1.11,"share_of_repo_gap_pct":1.0,"total_deduction":8.538,"weighted_deficit":8812},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/dead_code/analyzer.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.47,"maintainability_score":4.2,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":1352,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_get_unsatisfied_prop_guard nests 5 levels deep","score":1.71,"share_of_repo_gap_pct":0.9,"total_deduction":8.291,"weighted_deficit":8504},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/helpers.py","has_test_file":true,"is_test":false,"line_coverage_pct":78.67,"maintainability_score":2.0,"max_ccn":24,"max_nesting":4,"module":"packages/cli","nloc":1121,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"validate_provider_config nests 4 levels deep","score":1.15,"share_of_repo_gap_pct":0.8,"total_deduction":8.85,"weighted_deficit":7679},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_change_risk.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":2.8,"max_ccn":46,"max_nesting":4,"module":"packages/server","nloc":1173,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_cross_repo_block nests 4 levels deep","score":2.01,"share_of_repo_gap_pct":0.8,"total_deduction":7.99,"weighted_deficit":7026},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/engine.py","has_test_file":true,"is_test":false,"line_coverage_pct":81.77,"maintainability_score":1.7,"max_ccn":30,"max_nesting":4,"module":"packages/core","nloc":1013,"performance_score":9.58,"primary_biomarker":"god_class","primary_reason":"HealthAnalyzer is a god class: 669 lines across 19 methods, including a brain method (analyze_async, CCN 30)","score":1.12,"share_of_repo_gap_pct":0.8,"total_deduction":8.73,"weighted_deficit":6969},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/git_indexer/indexer.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.98,"maintainability_score":2.0,"max_ccn":42,"max_nesting":4,"module":"packages/core","nloc":1047,"performance_score":10.0,"primary_biomarker":"god_class","primary_reason":"GitIndexer is a god class: 760 lines across 24 methods, including a brain method (index_changed_files, CCN 42)","score":1.44,"share_of_repo_gap_pct":0.7,"total_deduction":8.555,"weighted_deficit":6868},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/graph-flow.tsx","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":260,"max_nesting":7,"module":"packages/ui","nloc":1235,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"GraphFlow nests 7 levels deep","score":2.5,"share_of_repo_gap_pct":0.7,"total_deduction":7.5,"weighted_deficit":6792},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/resolvers/ts_workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.68,"maintainability_score":2.5,"max_ccn":43,"max_nesting":7,"module":"packages/core","nloc":1001,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"find_npm_script_entry_targets nests 7 levels deep","score":1.43,"share_of_repo_gap_pct":0.7,"total_deduction":8.571,"weighted_deficit":6577},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/workspace/update.py","has_test_file":true,"is_test":false,"line_coverage_pct":87.58,"maintainability_score":2.0,"max_ccn":31,"max_nesting":6,"module":"packages/core","nloc":968,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_merged_repo_excludes nests 6 levels deep","score":1.5,"share_of_repo_gap_pct":0.7,"total_deduction":8.499,"weighted_deficit":6292},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/persist.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.47,"maintainability_score":1.3,"max_ccn":35,"max_nesting":5,"module":"packages/core","nloc":1819,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_analysis nests 5 levels deep","score":4.57,"share_of_repo_gap_pct":0.7,"total_deduction":5.089,"weighted_deficit":6239},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/decision_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":16.05,"maintainability_score":7.7,"max_ccn":8,"max_nesting":3,"module":"packages/cli","nloc":877,"performance_score":10.0,"primary_biomarker":"coverage_gap","primary_reason":"204/243 lines uncovered (16% line coverage)","score":1.0,"share_of_repo_gap_pct":0.7,"total_deduction":9.151,"weighted_deficit":6139},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/ui/provider_selection.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.2,"maintainability_score":3.1,"max_ccn":22,"max_nesting":4,"module":"packages/cli","nloc":851,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_interactive_openai_compatible_select nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.919,"weighted_deficit":5957},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/security_scan.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.82,"maintainability_score":3.1,"max_ccn":52,"max_nesting":5,"module":"packages/core","nloc":828,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"scan_source nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.597,"weighted_deficit":5796},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/context/assembler.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.71,"maintainability_score":2.8,"max_ccn":32,"max_nesting":5,"module":"packages/core","nloc":898,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"assemble_repo_overview nests 5 levels deep","score":1.59,"share_of_repo_gap_pct":0.6,"total_deduction":8.414,"weighted_deficit":5756},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/perf/dialects/python.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":3.3,"max_ccn":28,"max_nesting":4,"module":"packages/core","nloc":892,"performance_score":10.0,"primary_biomarker":"complex_conditional","primary_reason":"if condition combines 5 boolean operators","score":1.61,"share_of_repo_gap_pct":0.6,"total_deduction":8.045,"weighted_deficit":5700},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/doctor_cmd/repo_checks.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":1.3,"max_ccn":69,"max_nesting":4,"module":"packages/cli","nloc":884,"performance_score":9.3,"primary_biomarker":"brain_method","primary_reason":"Brain Method: _run_repo_checks is 468 lines, CCN 69, in a file imported by 15 others","score":1.65,"share_of_repo_gap_pct":0.6,"total_deduction":8.002,"weighted_deficit":5613},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.32,"maintainability_score":2.5,"max_ccn":18,"max_nesting":5,"module":"packages/cli","nloc":850,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"claude_code_leftover_reason nests 5 levels deep","score":1.42,"share_of_repo_gap_pct":0.6,"total_deduction":8.422,"weighted_deficit":5593},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_context/targets.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.59,"maintainability_score":4.0,"max_ccn":176,"max_nesting":5,"module":"packages/server","nloc":942,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_resolve_one_target nests 5 levels deep","score":2.16,"share_of_repo_gap_pct":0.6,"total_deduction":7.838,"weighted_deficit":5501}],"high_leverage_files_emitted":23,"high_leverage_files_omitted":755,"high_leverage_files_reduced_reason":"limit_and_response_budget","high_leverage_files_total":778,"high_leverage_files_truncated":true,"kpis":{"average_health":7.57,"average_health_unweighted":8.79,"average_health_weighting":"nloc","band":"good","file_count":4461,"history_average":1.0,"hotspot_health":5.84,"maintainability_average":8.08,"performance_analyzed_files":4459,"performance_average":9.74,"performance_coverage_pct":100.0,"performance_covered_files":4452,"performance_findings":1061,"performance_findings_density_per_10k_loc":13.93,"performance_skipped_files":7,"performance_unsupported_languages":[["shell",7]],"performance_unsupported_languages_emitted":1,"performance_unsupported_languages_total":1,"structure_average":1.43,"worst_performer_path":"packages/cli/src/repowise/cli/commands/serve_cmd.py","worst_performer_score":1.0,"worst_test_path":"packages/core/src/repowise/core/analysis/test_impact.py","worst_test_score":2.0},"mode":"dashboard","omission_marker":"[repowise#b0df000b1f03: 25 lines omitted (~172 tokens); restore: repowise expand b0df000b1f03]","performance_opportunities":[{"actionability_reason":"strategy_requires_validation","actionability_state":"advisory","affected_call_sites_total":8,"affected_files_total":5,"biomarker_type":"io_in_loop","biomarker_types":["io_in_loop"],"biomarker_types_emitted":1,"biomarker_types_total":1,"boundary_kind":"db","confidence":"high","evidence":[{"biomarker_type":"io_in_loop","file_path":"packages/core/src/repowise/core/persistence/crud/decision_ingest.py","finding_id":"finding_a28156f45bdc525925d3","function_name":"bulk_upsert_decisions","line_end":208,"line_start":208,"path":["packages/core/src/repowise/core/persistence/crud/decision_ingest.py::bulk_upsert_decisions","packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"path_emitted":3,"path_total":3,"provenance":"call-site","reason":"a database call is reached once per loop iteration through bulk_upsert_decisions -> sync_links_from_record -> sync_decision_node_links (cross-function N+1 query)"},{"biomarker_type":"io_in_loop","file_path":"packages/core/src/repowise/core/persistence/crud/decision_staleness.py","finding_id":"finding_87e3241ec84d98ad4eb2","function_name":"recompute_decision_staleness","line_end":93,"line_start":93,"path":["packages/core/src/repowise/core/persistence/crud/decision_staleness.py::recompute_decision_staleness","packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"path_emitted":3,"path_total":3,"provenance":"call-site","reason":"a database call is reached once per loop iteration through recompute_decision_staleness -> sync_links_from_record -> sync_decision_node_links (cross-function N+1 query)"},{"biomarker_type":"io_in_loop","file_path":"packages/core/src/repowise/core/persistence/decision_dedupe.py","finding_id":"finding_f403adb11591ee210497","function_name":"apply_dedupe","line_end":393,"line_start":393,"path":["packages/core/src/repowise/core/persistence/decision_dedupe.py::apply_dedupe","packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"path_emitted":3,"path_total":3,"provenance":"call-site","reason":"a database call is reached once per loop iteration through apply_dedupe -> sync_links_from_record -> sync_decision_node_links (cross-function N+1 query)"}],"evidence_emitted":3,"evidence_next_cursor":3,"evidence_reduced_reason":"evidence_page","evidence_total":8,"evidence_truncated":true,"execution_context":"production","facets":{"actionability_confidence":"medium","amplification":"per_iteration","change_risk":"wide","exposure":"entry_reachable","leverage":"shared","loop_magnitude":"grows_with_data"},"file_path":"packages/core/src/repowise/core/persistence/decision_graph.py","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_symbol":"packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","observations_total":8,"opportunity_id":"perf2_e4f7e2faf8f17903562d","performance_model_version":2,"plan_economics":{"benefit":2.996,"cost":5.0,"effort_bucket":"XL","risk":3.889},"plan_id":"f4b65c2839824c29801d866006483a8f","plan_reason":"A stored performance plan addresses this exact opportunity.","plan_reference":"refac2_8cdc4ea10cf6c05d400d","plan_status":"available","plan_steps":[{"action":"Add a form of sync_links_from_record that takes every key at once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_graph.py","line":null,"order":1,"symbol":"packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/crud/decision_ingest.py","line":208,"order":2,"symbol":"bulk_upsert_decisions"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/crud/decision_staleness.py","line":93,"order":3,"symbol":"recompute_decision_staleness"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_dedupe.py","line":393,"order":4,"symbol":"apply_dedupe"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_manifest.py","line":322,"order":5,"symbol":"import_manifest"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_manifest.py","line":330,"order":6,"symbol":"import_manifest"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_migration.py","line":382,"order":7,"symbol":"apply_migration"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_migration.py","line":587,"order":8,"symbol":"backfill_decision_node_links"},{"action":"Collect the keys before the loop and call the batched form once","applicability":"judgment","file_path":"packages/core/src/repowise/core/persistence/decision_migration.py","line":653,"order":9,"symbol":"prune_unindexed_scope_files"}],"plan_steps_emitted":9,"plan_steps_total":9,"prerequisites":["batch_api_contract","result_equivalence"],"prerequisites_emitted":2,"prerequisites_total":2,"provenance":"call-site","rank_factors":{"affected_call_sites":6,"boundary_kind":4,"entry_reachability":3,"execution_context":3,"loop_magnitude":2,"multiplier_shape":4,"provenance":3},"rank_position":0,"rank_score":25,"reliable_entry_reachability":true,"resource_fingerprints":[],"resource_fingerprints_emitted":0,"resource_fingerprints_total":0,"shared_path_suffix":["packages/core/src/repowise/core/persistence/decision_graph.py::sync_links_from_record","packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links"],"shared_path_suffix_emitted":2,"shared_path_suffix_total":2,"siblings":[],"siblings_emitted":0,"siblings_total":0,"terminal_sink":"packages/core/src/repowise/core/persistence/decision_graph.py::sync_decision_node_links","validation":{"basis":"inferred","commands":["pytest tests/unit/persistence/test_decision_acceptance_provenance.py tests/unit/persistence/test_decision_authority.py tests/unit/persistence/test_decision_candidate_meta_capture.py tests/unit/persistence/test_decision_conventions_persist.py tests/unit/persistence/test_decision_evidence.py tests/unit/persistence/test_decision_evolution_update.py tests/unit/persistence/test_decision_graph.py tests/unit/persistence/test_decision_kinds.py tests/unit/persistence/test_decision_manifest.py tests/unit/persistence/test_decision_migration.py tests/unit/persistence/test_decision_scope_basis.py tests/unit/persistence/test_decision_semantic_dedup.py"],"commands_emitted":1,"commands_total":1,"tests":["tests/unit/persistence/test_decision_acceptance_provenance.py","tests/unit/persistence/test_decision_authority.py","tests/unit/persistence/test_decision_candidate_meta_capture.py","tests/unit/persistence/test_decision_conventions_persist.py","tests/unit/persistence/test_decision_evidence.py","tests/unit/persistence/test_decision_evolution_update.py","tests/unit/persistence/test_decision_graph.py","tests/unit/persistence/test_decision_kinds.py","tests/unit/persistence/test_decision_manifest.py","tests/unit/persistence/test_decision_migration.py","tests/unit/persistence/test_decision_scope_basis.py","tests/unit/persistence/test_decision_semantic_dedup.py"],"tests_emitted":12,"tests_total":12,"total":69,"via":"call-graph"},"why_ranked":[{"factor":"affected_call_sites","points":6,"value":8},{"factor":"boundary_kind","points":4,"value":"db"},{"factor":"multiplier_shape","points":4,"value":"io_in_loop"}],"why_ranked_emitted":3,"why_ranked_total":3}],"performance_opportunities_emitted":1,"performance_opportunities_omitted":202,"performance_opportunities_reduced_reason":"collection_cap_and_response_budget","performance_opportunities_total":203,"performance_opportunities_truncated":true,"recovery":{"high_leverage_files":{"call":"get_health(targets=[], include=['files', 'refactoring', 'performance'], repo=None, limit=50, only=['high_leverage_files'], refactoring_view='diversified', cursor=100)","remaining":678},"performance_opportunities":{"call":"get_health(targets=[], include=['files', 'refactoring', 'performance'], repo=None, limit=6, only=['performance_opportunities'], refactoring_view='diversified', cursor=6)","remaining":197},"refactoring_opportunities":{"call":"get_health(targets=[], include=['files', 'refactoring', 'performance'], repo=None, limit=6, only=['refactoring_opportunities'], refactoring_view='diversified', cursor=6)","remaining":794}},"refactoring_opportunities":[{"addresses_primary_problem":true,"affected_files_total":1,"confidence":"high","dependents":8,"effort_bucket":"S","evidence_total":0,"file_nloc":218,"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","judgment_steps":0,"lead_biomarker":"complex_method","lead_refactoring_type":"extract_method","mechanical_steps":1,"opportunity_id":"refop2_ae647f629da0ef35d96e","queue_position":0,"rank_factors":{"benefit":1.694,"cost":1.0,"mechanical_share":0.5,"primary_problem":0.5,"risk":0.0},"rank_position":0,"rank_score":1.694,"recoverable_health":1.694,"refactoring_model_version":2,"status":"open","step_count":1,"steps":[{"applicability":{"classification":"mechanical","facts":{"affected_file_count":1,"blast_size":0,"confidence":"high","cross_file":false,"local_scope":true},"reasons":["dataflow_proved_local_extraction"],"reasons_emitted":1,"reasons_total":1,"unknowns":[],"unknowns_emitted":0,"unknowns_total":0},"confidence":"high","effort_bucket":"S","file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","finding_ids":["finding_2b453a22e0c1b5255f17"],"finding_ids_emitted":1,"finding_ids_total":1,"impact_delta":1.694,"line_end":208,"line_start":94,"plan_id":"refac2_9346327bc364ff91125c","refactoring_type":"extract_method","relocated_by":null,"source_biomarker":"complex_method","target_symbol":"walk_file","validation_profile_id":"validation_987b19c9e18ff1bb"}],"steps_emitted":1,"steps_total":1,"why_ranked":[{"factor":"benefit","value":1.694},{"factor":"cost","value":1.0},{"factor":"mechanical_share","value":0.5}],"why_ranked_emitted":3,"why_ranked_total":3}],"refactoring_opportunities_emitted":1,"refactoring_opportunities_omitted":799,"refactoring_opportunities_reduced_reason":"collection_cap_and_response_budget","refactoring_opportunities_total":800,"refactoring_opportunities_truncated":true,"scope":"all","secondary_rankings":{"modules":{"call":"get_health(repo=None, only=['modules'], limit=50)","total":13},"test_findings":{"call":"get_health(repo=None, only=['test_findings'], limit=50)","total":464},"test_worst_files":{"call":"get_health(repo=None, only=['test_worst_files'], limit=50)","total":1736},"top_findings":{"call":"get_health(repo=None, only=['top_findings'], limit=50)","total":597},"worst_files":{"call":"get_health(repo=None, only=['worst_files'], limit=50)","total":2725}},"truncated":true,"unknown_include_keys":["files"],"unknown_include_keys_emitted":1,"unknown_include_keys_total":1,"unscored_files":0},"get_health:default":{"_meta":{"completeness":{"capped":true,"reason":"limit","shown":26,"total":784},"contract_version":2,"embedder":"mock","embedder_degraded":false,"health_analysis":{"analyzed_at":"2026-09-30T14:04:24.529401","analyzed_commit":"547df91a7e7b","analyzed_commits_distinct":2,"live_verification":{"basis":"index_commit_and_live_git_head","source_bytes_verified":false},"recomputed_this_call":false,"refresh":{"command":"repowise update","precondition":"commit health-relevant working-tree changes first","required_before_comparison":true},"source":"stored_health_analysis","status":"available"},"health_analyzed_at":"2026-09-30T14:04:24.529401","health_analyzed_commit":"547df91a7e7b","health_analyzed_commits_distinct":2,"index_age_days":0,"index_behind":true,"index_scope":{"content_provenance":"model","fingerprint":"4a1aa5b83bd6","full":"get_overview()","git_tier":"full","projection":"compact","run_mode":"standard","status":"partial","version":1},"indexed_commit":"eaf9fb2638af","live_head":"303f55f1785c","response_budget":{"limit_chars":24000,"serialized_chars":16878,"tier":"default"},"semantic_search":false,"stale_warning":"Index is behind live HEAD \u2014 run `repowise update`.","timing_ms":1036.0},"counts":"everything","distribution":{"bands":{"at_risk":{"files":180,"nloc":103273,"pct":13.6},"excellent":{"files":3312,"nloc":388454,"pct":51.0},"fair":{"files":261,"nloc":78236,"pct":10.3},"good":{"files":570,"nloc":140575,"pct":18.4},"needs_work":{"files":138,"nloc":51446,"pct":6.8}},"total_files":4461,"total_nloc":761984},"fix_first":{"basis":{"analyzed_commit":"547df91a7e7ba6e01f7457ac2172e09a36ad47a6","health_analyzed_at":"2026-09-30T14:04:24.529401"},"by_improves":{"defect":768,"maintainability":157,"performance":122},"detail_call":"get_health(fix_id='fix1_97d425a56a911cf78db4')","items":[{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ff13ab231f7b30bbdffb\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_d21fb1bde221e8df007e","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ae647f629da0ef35d96e"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ae647f629da0ef35d96e\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","line_end":208,"line_start":152,"symbol":"walk_file"},"tier":"now","title":"Extract a helper from walk_file","why":"walk_file has more branches than its tests can easily cover; 8 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_fba1d37b9cbd137f45e7","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_f679a97d234a223b34f5"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_f679a97d234a223b34f5\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/web/src/components/code-health/triage-tab.tsx","line_end":121,"line_start":71,"symbol":"TriageTab"},"tier":"now","title":"Extract a helper from TriageTab","why":"TriageTab has more branches than its tests can easily cover; it changed 6 times in 90 days, so the cost recurs."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_26c2da3b4c98f8fdef56","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_5ca551b7b7c3293951d0"},"cli":null,"mcp":"get_health(opportunity_id=\"perf2_5ca551b7b7c3293951d0\")","purpose":"The full opportunity: ordered steps, validation and other causes here","tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/repo_db.py","line_end":null,"line_start":null,"symbol":"ensure_repo_registration"},"tier":"next","title":"Batch the database calls loops make through ensure_repo_registration","why":"ensure_repo_registration makes a database call once per loop iteration; 2 call sites reach it, an entry point reaches it, the loop grows with the data."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_f17556ad6537b1c26c98","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_29080eb5a091e8eeb79d"},"cli":null,"mcp":"get_health(opportunity_id=\"perf2_29080eb5a091e8eeb79d\")","purpose":"The full opportunity: ordered steps, validation and other causes here","tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/job_executor.py","line_end":null,"line_start":null,"symbol":"_start_job"},"tier":"next","title":"Move the database call in _start_job out of its loop","why":"_start_job makes a database call once per loop iteration; an entry point reaches it, the loop grows with the data."}],"items_emitted":5,"items_total":5,"lead":{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ff13ab231f7b30bbdffb\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},"model_version":1,"totals":{"candidates":2834,"eligible":1047,"excluded":{"below_min_worth":428,"expected":148,"generated":4,"history_only":137,"no_plan":12,"test":804,"tooling":254},"shown":5}},"gap_analysis":{"files_below_target":860,"files_for_half_gap":22,"files_to_reach_target":57,"target_score":8.0,"weighted_gap_points":324845,"weighted_gross_gap_points":925602},"high_leverage_files":[{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":69.6,"maintainability_score":1.3,"max_ccn":249,"max_nesting":5,"module":"packages/cli","nloc":1810,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"run_update nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":1.4,"total_deduction":9.213,"weighted_deficit":12670},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/incremental.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.35,"maintainability_score":2.0,"max_ccn":54,"max_nesting":5,"module":"packages/core","nloc":1727,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_incremental_index nests 5 levels deep","score":1.41,"share_of_repo_gap_pct":1.2,"total_deduction":8.569,"weighted_deficit":11381},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":75.35,"maintainability_score":2.8,"max_ccn":162,"max_nesting":4,"module":"packages/cli","nloc":1535,"performance_score":10.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: init_command is 739 lines, CCN 162, in a file imported by 7 others","score":1.01,"share_of_repo_gap_pct":1.2,"total_deduction":8.985,"weighted_deficit":10730},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/workspace_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":72.45,"maintainability_score":1.3,"max_ccn":29,"max_nesting":4,"module":"packages/cli","nloc":1341,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"workspace_scan nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":1.0,"total_deduction":9.1,"weighted_deficit":9387},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_test_file":true,"is_test":false,"line_coverage_pct":92.35,"maintainability_score":3.1,"max_ccn":25,"max_nesting":6,"module":"packages/core","nloc":1460,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_find_parent nests 6 levels deep","score":1.74,"share_of_repo_gap_pct":1.0,"total_deduction":8.258,"weighted_deficit":9140},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":1.3,"max_ccn":74,"max_nesting":5,"module":"packages/cli","nloc":1279,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_persist_full_update_async nests 5 levels deep","score":1.11,"share_of_repo_gap_pct":1.0,"total_deduction":8.538,"weighted_deficit":8812},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/dead_code/analyzer.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.47,"maintainability_score":4.2,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":1352,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_get_unsatisfied_prop_guard nests 5 levels deep","score":1.71,"share_of_repo_gap_pct":0.9,"total_deduction":8.291,"weighted_deficit":8504},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/helpers.py","has_test_file":true,"is_test":false,"line_coverage_pct":78.67,"maintainability_score":2.0,"max_ccn":24,"max_nesting":4,"module":"packages/cli","nloc":1121,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"validate_provider_config nests 4 levels deep","score":1.15,"share_of_repo_gap_pct":0.8,"total_deduction":8.85,"weighted_deficit":7679},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_change_risk.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":2.8,"max_ccn":46,"max_nesting":4,"module":"packages/server","nloc":1173,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_cross_repo_block nests 4 levels deep","score":2.01,"share_of_repo_gap_pct":0.8,"total_deduction":7.99,"weighted_deficit":7026},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/engine.py","has_test_file":true,"is_test":false,"line_coverage_pct":81.77,"maintainability_score":1.7,"max_ccn":30,"max_nesting":4,"module":"packages/core","nloc":1013,"performance_score":9.58,"primary_biomarker":"god_class","primary_reason":"HealthAnalyzer is a god class: 669 lines across 19 methods, including a brain method (analyze_async, CCN 30)","score":1.12,"share_of_repo_gap_pct":0.8,"total_deduction":8.73,"weighted_deficit":6969},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/git_indexer/indexer.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.98,"maintainability_score":2.0,"max_ccn":42,"max_nesting":4,"module":"packages/core","nloc":1047,"performance_score":10.0,"primary_biomarker":"god_class","primary_reason":"GitIndexer is a god class: 760 lines across 24 methods, including a brain method (index_changed_files, CCN 42)","score":1.44,"share_of_repo_gap_pct":0.7,"total_deduction":8.555,"weighted_deficit":6868},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/graph-flow.tsx","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":260,"max_nesting":7,"module":"packages/ui","nloc":1235,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"GraphFlow nests 7 levels deep","score":2.5,"share_of_repo_gap_pct":0.7,"total_deduction":7.5,"weighted_deficit":6792},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/resolvers/ts_workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.68,"maintainability_score":2.5,"max_ccn":43,"max_nesting":7,"module":"packages/core","nloc":1001,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"find_npm_script_entry_targets nests 7 levels deep","score":1.43,"share_of_repo_gap_pct":0.7,"total_deduction":8.571,"weighted_deficit":6577},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/workspace/update.py","has_test_file":true,"is_test":false,"line_coverage_pct":87.58,"maintainability_score":2.0,"max_ccn":31,"max_nesting":6,"module":"packages/core","nloc":968,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_merged_repo_excludes nests 6 levels deep","score":1.5,"share_of_repo_gap_pct":0.7,"total_deduction":8.499,"weighted_deficit":6292},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/persist.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.47,"maintainability_score":1.3,"max_ccn":35,"max_nesting":5,"module":"packages/core","nloc":1819,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_analysis nests 5 levels deep","score":4.57,"share_of_repo_gap_pct":0.7,"total_deduction":5.089,"weighted_deficit":6239},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/decision_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":16.05,"maintainability_score":7.7,"max_ccn":8,"max_nesting":3,"module":"packages/cli","nloc":877,"performance_score":10.0,"primary_biomarker":"coverage_gap","primary_reason":"204/243 lines uncovered (16% line coverage)","score":1.0,"share_of_repo_gap_pct":0.7,"total_deduction":9.151,"weighted_deficit":6139},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/ui/provider_selection.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.2,"maintainability_score":3.1,"max_ccn":22,"max_nesting":4,"module":"packages/cli","nloc":851,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_interactive_openai_compatible_select nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.919,"weighted_deficit":5957},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/security_scan.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.82,"maintainability_score":3.1,"max_ccn":52,"max_nesting":5,"module":"packages/core","nloc":828,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"scan_source nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.597,"weighted_deficit":5796},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/context/assembler.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.71,"maintainability_score":2.8,"max_ccn":32,"max_nesting":5,"module":"packages/core","nloc":898,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"assemble_repo_overview nests 5 levels deep","score":1.59,"share_of_repo_gap_pct":0.6,"total_deduction":8.414,"weighted_deficit":5756},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/perf/dialects/python.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":3.3,"max_ccn":28,"max_nesting":4,"module":"packages/core","nloc":892,"performance_score":10.0,"primary_biomarker":"complex_conditional","primary_reason":"if condition combines 5 boolean operators","score":1.61,"share_of_repo_gap_pct":0.6,"total_deduction":8.045,"weighted_deficit":5700}],"high_leverage_files_emitted":20,"high_leverage_files_reduced_reason":"limit","high_leverage_files_total":778,"kpis":{"average_health":7.57,"average_health_unweighted":8.79,"average_health_weighting":"nloc","band":"good","file_count":4461,"history_average":1.0,"hotspot_health":5.84,"maintainability_average":8.08,"performance_analyzed_files":4459,"performance_average":9.74,"performance_coverage_pct":100.0,"performance_covered_files":4452,"performance_findings":1061,"performance_findings_density_per_10k_loc":13.93,"performance_skipped_files":7,"performance_unsupported_languages":[["shell",7]],"performance_unsupported_languages_emitted":1,"performance_unsupported_languages_total":1,"structure_average":1.43,"worst_performer_path":"packages/cli/src/repowise/cli/commands/serve_cmd.py","worst_performer_score":1.0,"worst_test_path":"packages/core/src/repowise/core/analysis/test_impact.py","worst_test_score":2.0},"mode":"dashboard","recovery":{"high_leverage_files":{"call":"get_health(targets=[], include=[], repo=None, limit=50, only=['high_leverage_files'], refactoring_view='diversified', cursor=20)","remaining":758}},"scope":"all","secondary_rankings":{"modules":{"call":"get_health(repo=None, only=['modules'], limit=50)","total":13},"test_findings":{"call":"get_health(repo=None, only=['test_findings'], limit=50)","total":1072},"test_worst_files":{"call":"get_health(repo=None, only=['test_worst_files'], limit=50)","total":1736},"top_findings":{"call":"get_health(repo=None, only=['top_findings'], limit=50)","total":9408},"worst_files":{"call":"get_health(repo=None, only=['worst_files'], limit=50)","total":2725}},"unscored_files":0},"get_health:limit-100":{"_meta":{"completeness":{"capped":true,"reason":"limit_and_response_budget","shown":37,"total":784},"contract_version":2,"embedder":"mock","embedder_degraded":false,"health_analysis":{"analyzed_at":"2026-09-30T14:04:24.529401","analyzed_commit":"547df91a7e7b","analyzed_commits_distinct":2,"live_verification":{"basis":"index_commit_and_live_git_head","source_bytes_verified":false},"recomputed_this_call":false,"refresh":{"command":"repowise update","precondition":"commit health-relevant working-tree changes first","required_before_comparison":true},"source":"stored_health_analysis","status":"available"},"health_analyzed_at":"2026-09-30T14:04:24.529401","health_analyzed_commit":"547df91a7e7b","health_analyzed_commits_distinct":2,"index_age_days":0,"index_behind":true,"index_scope":{"content_provenance":"model","fingerprint":"4a1aa5b83bd6","full":"get_overview()","git_tier":"full","projection":"compact","run_mode":"standard","status":"partial","version":1},"indexed_commit":"eaf9fb2638af","live_head":"303f55f1785c","omitted":{"refs":["repowise#c3e68e923dea","repowise#b2756974b788"],"restore":"`repowise expand <ref>`, or get_symbol(\"repowise#<ref>\", query=...)","tokens":9566},"response_budget":{"limit_chars":24000,"serialized_chars":22580,"tier":"default"},"semantic_search":false,"stale_warning":"Index is behind live HEAD \u2014 run `repowise update`.","state":{"truncated":true},"timing_ms":2005.0},"counts":"everything","distribution":{"bands":{"at_risk":{"files":180,"nloc":103273,"pct":13.6},"excellent":{"files":3312,"nloc":388454,"pct":51.0},"fair":{"files":261,"nloc":78236,"pct":10.3},"good":{"files":570,"nloc":140575,"pct":18.4},"needs_work":{"files":138,"nloc":51446,"pct":6.8}},"total_files":4461,"total_nloc":761984},"fix_first":{"basis":{"analyzed_commit":"547df91a7e7ba6e01f7457ac2172e09a36ad47a6","health_analyzed_at":"2026-09-30T14:04:24.529401"},"by_improves":{"defect":768,"maintainability":157,"performance":122},"detail_call":"get_health(fix_id='fix1_97d425a56a911cf78db4')","items":[{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ff13ab231f7b30bbdffb\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_d21fb1bde221e8df007e","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ae647f629da0ef35d96e"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ae647f629da0ef35d96e\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/analysis/health/complexity/walker.py","line_end":208,"line_start":152,"symbol":"walk_file"},"tier":"now","title":"Extract a helper from walk_file","why":"walk_file has more branches than its tests can easily cover; 8 files import it, so every caller inherits the risk."},{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_fba1d37b9cbd137f45e7","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_f679a97d234a223b34f5"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_f679a97d234a223b34f5\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/web/src/components/code-health/triage-tab.tsx","line_end":121,"line_start":71,"symbol":"TriageTab"},"tier":"now","title":"Extract a helper from TriageTab","why":"TriageTab has more branches than its tests can easily cover; it changed 6 times in 90 days, so the cost recurs."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_26c2da3b4c98f8fdef56","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_5ca551b7b7c3293951d0"},"cli":null,"mcp":"get_health(opportunity_id=\"perf2_5ca551b7b7c3293951d0\")","purpose":"The full opportunity: ordered steps, validation and other causes here","tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/repo_db.py","line_end":null,"line_start":null,"symbol":"ensure_repo_registration"},"tier":"next","title":"Batch the database calls loops make through ensure_repo_registration","why":"ensure_repo_registration makes a database call once per loop iteration; 2 call sites reach it, an entry point reaches it, the loop grows with the data."},{"confidence":"medium","effort":"M","gain":"one database call per loop iteration, grows with the data","id":"fix1_f17556ad6537b1c26c98","kind":"perf_fix","next_call":{"arguments":{"opportunity_id":"perf2_29080eb5a091e8eeb79d"},"cli":null,"mcp":"get_health(opportunity_id=\"perf2_29080eb5a091e8eeb79d\")","purpose":"The full opportunity: ordered steps, validation and other causes here","tool":"get_health"},"target":{"file_path":"packages/server/src/repowise/server/job_executor.py","line_end":null,"line_start":null,"symbol":"_start_job"},"tier":"next","title":"Move the database call in _start_job out of its loop","why":"_start_job makes a database call once per loop iteration; an entry point reaches it, the loop grows with the data."}],"items_emitted":5,"items_total":5,"lead":{"confidence":"high","effort":"S","gain":"about +1.7 health on this file","id":"fix1_97d425a56a911cf78db4","kind":"refactor","next_call":{"arguments":{"opportunity_id":"refop2_ff13ab231f7b30bbdffb"},"cli":null,"mcp":"get_health(opportunity_id=\"refop2_ff13ab231f7b30bbdffb\")","purpose":"The full plan: ordered steps, validation and evidence","tool":"get_health"},"target":{"file_path":"packages/core/src/repowise/core/workspace/repo_index.py","line_end":254,"line_start":243,"symbol":"declared_symbol_at"},"tier":"now","title":"Extract a helper from declared_symbol_at","why":"declared_symbol_at has more branches than its tests can easily cover; 19 files import it, so every caller inherits the risk."},"model_version":1,"totals":{"candidates":2834,"eligible":1047,"excluded":{"below_min_worth":428,"expected":148,"generated":4,"history_only":137,"no_plan":12,"test":804,"tooling":254},"shown":5}},"gap_analysis":{"files_below_target":860,"files_for_half_gap":22,"files_to_reach_target":57,"target_score":8.0,"weighted_gap_points":324845,"weighted_gross_gap_points":925602},"high_leverage_files":[{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":69.6,"maintainability_score":1.3,"max_ccn":249,"max_nesting":5,"module":"packages/cli","nloc":1810,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"run_update nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":1.4,"total_deduction":9.213,"weighted_deficit":12670},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/incremental.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.35,"maintainability_score":2.0,"max_ccn":54,"max_nesting":5,"module":"packages/core","nloc":1727,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_incremental_index nests 5 levels deep","score":1.41,"share_of_repo_gap_pct":1.2,"total_deduction":8.569,"weighted_deficit":11381},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","has_test_file":true,"is_test":false,"line_coverage_pct":75.35,"maintainability_score":2.8,"max_ccn":162,"max_nesting":4,"module":"packages/cli","nloc":1535,"performance_score":10.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: init_command is 739 lines, CCN 162, in a file imported by 7 others","score":1.01,"share_of_repo_gap_pct":1.2,"total_deduction":8.985,"weighted_deficit":10730},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/workspace_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":72.45,"maintainability_score":1.3,"max_ccn":29,"max_nesting":4,"module":"packages/cli","nloc":1341,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"workspace_scan nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":1.0,"total_deduction":9.1,"weighted_deficit":9387},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_test_file":true,"is_test":false,"line_coverage_pct":92.35,"maintainability_score":3.1,"max_ccn":25,"max_nesting":6,"module":"packages/core","nloc":1460,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_find_parent nests 6 levels deep","score":1.74,"share_of_repo_gap_pct":1.0,"total_deduction":8.258,"weighted_deficit":9140},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":1.3,"max_ccn":74,"max_nesting":5,"module":"packages/cli","nloc":1279,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_persist_full_update_async nests 5 levels deep","score":1.11,"share_of_repo_gap_pct":1.0,"total_deduction":8.538,"weighted_deficit":8812},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/dead_code/analyzer.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.47,"maintainability_score":4.2,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":1352,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_get_unsatisfied_prop_guard nests 5 levels deep","score":1.71,"share_of_repo_gap_pct":0.9,"total_deduction":8.291,"weighted_deficit":8504},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/helpers.py","has_test_file":true,"is_test":false,"line_coverage_pct":78.67,"maintainability_score":2.0,"max_ccn":24,"max_nesting":4,"module":"packages/cli","nloc":1121,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"validate_provider_config nests 4 levels deep","score":1.15,"share_of_repo_gap_pct":0.8,"total_deduction":8.85,"weighted_deficit":7679},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_change_risk.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":2.8,"max_ccn":46,"max_nesting":4,"module":"packages/server","nloc":1173,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_cross_repo_block nests 4 levels deep","score":2.01,"share_of_repo_gap_pct":0.8,"total_deduction":7.99,"weighted_deficit":7026},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/engine.py","has_test_file":true,"is_test":false,"line_coverage_pct":81.77,"maintainability_score":1.7,"max_ccn":30,"max_nesting":4,"module":"packages/core","nloc":1013,"performance_score":9.58,"primary_biomarker":"god_class","primary_reason":"HealthAnalyzer is a god class: 669 lines across 19 methods, including a brain method (analyze_async, CCN 30)","score":1.12,"share_of_repo_gap_pct":0.8,"total_deduction":8.73,"weighted_deficit":6969},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/git_indexer/indexer.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.98,"maintainability_score":2.0,"max_ccn":42,"max_nesting":4,"module":"packages/core","nloc":1047,"performance_score":10.0,"primary_biomarker":"god_class","primary_reason":"GitIndexer is a god class: 760 lines across 24 methods, including a brain method (index_changed_files, CCN 42)","score":1.44,"share_of_repo_gap_pct":0.7,"total_deduction":8.555,"weighted_deficit":6868},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/graph-flow.tsx","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":260,"max_nesting":7,"module":"packages/ui","nloc":1235,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"GraphFlow nests 7 levels deep","score":2.5,"share_of_repo_gap_pct":0.7,"total_deduction":7.5,"weighted_deficit":6792},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/ingestion/resolvers/ts_workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.68,"maintainability_score":2.5,"max_ccn":43,"max_nesting":7,"module":"packages/core","nloc":1001,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"find_npm_script_entry_targets nests 7 levels deep","score":1.43,"share_of_repo_gap_pct":0.7,"total_deduction":8.571,"weighted_deficit":6577},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/workspace/update.py","has_test_file":true,"is_test":false,"line_coverage_pct":87.58,"maintainability_score":2.0,"max_ccn":31,"max_nesting":6,"module":"packages/core","nloc":968,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_merged_repo_excludes nests 6 levels deep","score":1.5,"share_of_repo_gap_pct":0.7,"total_deduction":8.499,"weighted_deficit":6292},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/pipeline/persist.py","has_test_file":true,"is_test":false,"line_coverage_pct":85.47,"maintainability_score":1.3,"max_ccn":35,"max_nesting":5,"module":"packages/core","nloc":1819,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"persist_analysis nests 5 levels deep","score":4.57,"share_of_repo_gap_pct":0.7,"total_deduction":5.089,"weighted_deficit":6239},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/decision_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":16.05,"maintainability_score":7.7,"max_ccn":8,"max_nesting":3,"module":"packages/cli","nloc":877,"performance_score":10.0,"primary_biomarker":"coverage_gap","primary_reason":"204/243 lines uncovered (16% line coverage)","score":1.0,"share_of_repo_gap_pct":0.7,"total_deduction":9.151,"weighted_deficit":6139},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/ui/provider_selection.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.2,"maintainability_score":3.1,"max_ccn":22,"max_nesting":4,"module":"packages/cli","nloc":851,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_interactive_openai_compatible_select nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.919,"weighted_deficit":5957},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/security_scan.py","has_test_file":true,"is_test":false,"line_coverage_pct":58.82,"maintainability_score":3.1,"max_ccn":52,"max_nesting":5,"module":"packages/core","nloc":828,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"scan_source nests 5 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.597,"weighted_deficit":5796},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/context/assembler.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.71,"maintainability_score":2.8,"max_ccn":32,"max_nesting":5,"module":"packages/core","nloc":898,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"assemble_repo_overview nests 5 levels deep","score":1.59,"share_of_repo_gap_pct":0.6,"total_deduction":8.414,"weighted_deficit":5756},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/analysis/health/perf/dialects/python.py","has_test_file":true,"is_test":false,"line_coverage_pct":86.49,"maintainability_score":3.3,"max_ccn":28,"max_nesting":4,"module":"packages/core","nloc":892,"performance_score":10.0,"primary_biomarker":"complex_conditional","primary_reason":"if condition combines 5 boolean operators","score":1.61,"share_of_repo_gap_pct":0.6,"total_deduction":8.045,"weighted_deficit":5700},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/doctor_cmd/repo_checks.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":1.3,"max_ccn":69,"max_nesting":4,"module":"packages/cli","nloc":884,"performance_score":9.3,"primary_biomarker":"brain_method","primary_reason":"Brain Method: _run_repo_checks is 468 lines, CCN 69, in a file imported by 15 others","score":1.65,"share_of_repo_gap_pct":0.6,"total_deduction":8.002,"weighted_deficit":5613},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/editor_integrations/claude_config.py","has_test_file":true,"is_test":false,"line_coverage_pct":89.32,"maintainability_score":2.5,"max_ccn":18,"max_nesting":5,"module":"packages/cli","nloc":850,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"claude_code_leftover_reason nests 5 levels deep","score":1.42,"share_of_repo_gap_pct":0.6,"total_deduction":8.422,"weighted_deficit":5593},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_context/targets.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.59,"maintainability_score":4.0,"max_ccn":176,"max_nesting":5,"module":"packages/server","nloc":942,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_resolve_one_target nests 5 levels deep","score":2.16,"share_of_repo_gap_pct":0.6,"total_deduction":7.838,"weighted_deficit":5501},{"branch_coverage_pct":null,"file_path":"packages/ui/src/graph/sigma/use-sigma.ts","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":4.0,"max_ccn":131,"max_nesting":4,"module":"packages/ui","nloc":981,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"makeDrawNodeHover nests 4 levels deep","score":2.5,"share_of_repo_gap_pct":0.6,"total_deduction":7.499,"weighted_deficit":5396},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/_answer_pipeline.py","has_test_file":true,"is_test":false,"line_coverage_pct":68.99,"maintainability_score":3.0,"max_ccn":32,"max_nesting":4,"module":"packages/server","nloc":765,"performance_score":9.79,"primary_biomarker":"nested_complexity","primary_reason":"expand_via_parent_page nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.24,"weighted_deficit":5355},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_symbol.py","has_test_file":true,"is_test":false,"line_coverage_pct":91.01,"maintainability_score":4.0,"max_ccn":41,"max_nesting":4,"module":"packages/server","nloc":911,"performance_score":8.0,"primary_biomarker":"brain_method","primary_reason":"Brain Method: get_symbol is 208 lines, CCN 41, in a file imported by 7 others","score":2.14,"share_of_repo_gap_pct":0.6,"total_deduction":7.86,"weighted_deficit":5338},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/tool_context/enrichment.py","has_test_file":true,"is_test":false,"line_coverage_pct":59.91,"maintainability_score":3.7,"max_ccn":53,"max_nesting":4,"module":"packages/server","nloc":757,"performance_score":8.6,"primary_biomarker":"nested_complexity","primary_reason":"attach_doc_references nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.6,"total_deduction":9.552,"weighted_deficit":5299},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/hook_cmd.py","has_test_file":true,"is_test":false,"line_coverage_pct":74.29,"maintainability_score":4.3,"max_ccn":26,"max_nesting":4,"module":"packages/cli","nloc":890,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"hook_stats nests 4 levels deep","score":2.13,"share_of_repo_gap_pct":0.6,"total_deduction":7.714,"weighted_deficit":5224},{"branch_coverage_pct":null,"file_path":"packages/cli/src/repowise/cli/commands/init_cmd/workspace.py","has_test_file":true,"is_test":false,"line_coverage_pct":65.84,"maintainability_score":2.8,"max_ccn":44,"max_nesting":4,"module":"packages/cli","nloc":768,"performance_score":9.3,"primary_biomarker":"nested_complexity","primary_reason":"_workspace_init nests 4 levels deep","score":1.25,"share_of_repo_gap_pct":0.6,"total_deduction":8.753,"weighted_deficit":5184},{"branch_coverage_pct":null,"file_path":"packages/core/src/repowise/core/generation/concept_tree/vocabulary.py","has_test_file":true,"is_test":false,"line_coverage_pct":null,"maintainability_score":3.7,"max_ccn":27,"max_nesting":5,"module":"packages/core","nloc":910,"performance_score":8.0,"primary_biomarker":"nested_complexity","primary_reason":"_harvest nests 5 levels deep","score":2.35,"share_of_repo_gap_pct":0.6,"total_deduction":7.651,"weighted_deficit":5142},{"branch_coverage_pct":null,"file_path":"packages/server/src/repowise/server/mcp_server/_server.py","has_test_file":true,"is_test":false,"line_coverage_pct":60.59,"maintainability_score":2.0,"max_ccn":18,"max_nesting":4,"module":"packages/server","nloc":718,"performance_score":10.0,"primary_biomarker":"nested_complexity","primary_reason":"_detect_workspace nests 4 levels deep","score":1.0,"share_of_repo_gap_pct":0.5,"total_deduction":9.57,"weighted_deficit":5026}],"high_leverage_files_emitted":31,"high_leverage_files_omitted":747,"high_leverage_files_reduced_reason":"limit_and_response_budget","high_leverage_files_total":778,"high_leverage_files_truncated":true,"kpis":{"average_health":7.57,"average_health_unweighted":8.79,"average_health_weighting":"nloc","band":"good","file_count":4461,"history_average":1.0,"hotspot_health":5.84,"maintainability_average":8.08,"performance_analyzed_files":4459,"performance_average":9.74,"performance_coverage_pct":100.0,"performance_covered_files":4452,"performance_findings":1061,"performance_findings_density_per_10k_loc":13.93,"performance_skipped_files":7,"performance_unsupported_languages":[["shell",7]],"performance_unsupported_languages_emitted":1,"performance_unsupported_languages_total":1,"structure_average":1.43,"worst_performer_path":"packages/cli/src/repowise/cli/commands/serve_cmd.py","worst_performer_score":1.0,"worst_test_path":"packages/core/src/repowise/core/analysis/test_impact.py","worst_test_score":2.0},"mode":"dashboard","omission_marker":"[repowise#b2756974b788: 25 lines omitted (~175 tokens); restore: repowise expand b2756974b788]","recovery":{"high_leverage_files":{"call":"get_health(targets=[], include=[], repo=None, limit=50, only=['high_leverage_files'], refactoring_view='diversified', cursor=100)","remaining":678}},"scope":"all","secondary_rankings":{"modules":{"call":"get_health(repo=None, only=['modules'], limit=50)","total":13},"test_findings":{"call":"get_health(repo=None, only=['test_findings'], limit=50)","total":1072},"test_worst_files":{"call":"get_health(repo=None, only=['test_worst_files'], limit=50)","total":1736},"top_findings":{"call":"get_health(repo=None, only=['top_findings'], limit=50)","total":9408},"worst_files":{"call":"get_health(repo=None, only=['worst_files'], limit=50)","total":2725}},"truncated":true,"unscored_files":0},"get_overview:all-includes":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#4e8f0bb0e304"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":1376},"response_budget":{"limit_chars":32000,"serialized_chars":7934,"tier":"expanded"},"state":{"truncated":true}},"architecture":{"layer_order":["UI","CLI","Application","API","Config","Utility","Data","Types","Service","Docs & Tooling","Test"],"layers":[{"file_count":641,"name":"Contributor 2"},{"file_count":261,"name":"Contributor 6"},{"file_count":191,"name":"Contributor 15"},{"file_count":92,"name":"Contributor 12"},{"file_count":28,"name":"Contributor 10"},{"file_count":52,"name":"Contributor 17"},{"file_count":60,"name":"Contributor 13"},{"file_count":81,"name":"Contributor 18"},{"file_count":981,"name":"Contributor 4"},{"file_count":220,"name":"Contributor 8"},{"file_count":1478,"name":"Contributor 11"}],"tour_available":true,"tour_step_count":12},"code_health":{"average_health":6.94,"band":"warning","distribution":{"bands":{"alert":{"files":212,"nloc":110556,"pct":17.5},"healthy":{"files":2678,"nloc":299568,"pct":47.5},"warning":{"files":903,"nloc":220758,"pct":35.0}},"total_files":3793,"total_nloc":630882},"file_count":3793,"hotspot_health":4.35,"open_findings":14239,"worst_performer_path":"packages/server/src/repowise/server/routers/repos.py","worst_performer_score":1.0},"content_hint":"Overview essay trimmed to its summary section. Call get_overview(include=[\"content\"]) for the full walkthrough.","content_md":"## Project Summary\n\nRepowise consumes source repositories and configuration files, walks and parses them through language-specific ingestion, persists and analyzes the resulting code graph, and generates documentation, health insights, and interactive views exposed through CLI, MCP/server APIs, web apps, and VS Code.\n\nIt is a Python/TypeScript monorepo organized around a shared analysis engine and several presentation surfaces. The repository contains 3,659 files and approximately 740k lines of code; dependency analysis reports 18 circular dependencies. Recent hotspots include dead-code analysis, MCP answer generation, and the web sidebar.","entry_points":["packages/server/src/repowise/server/app.py","packages/cli/src/repowise/cli/main.py","packages/vscode/webview/src/views/risk/App.tsx","packages/vscode/webview/src/views/decisions/App.tsx","packages/vscode/webview/src/views/settings/App.tsx","packages/vscode/webview/src/views/architecture/App.tsx","packages/vscode/webview/src/views/home/App.tsx","packages/vscode/webview/src/views/refactoring/App.tsx"],"git_health":{"avg_bus_factor":1.2,"churn_trend":"increasing","files_git_attributed":4136,"files_with_bus_factor_1":3339,"hotspot_count":419,"top_churn_modules":["packages/core","tests/unit","packages/ui","packages/server","packages/web"]},"key_modules":[{"name":"Contributor 3","path":"packages/api-client","section":"6"},{"name":"Contributor 14","path":"packages/api-client/src","section":"7"},{"name":"Contributor 5","path":"packages/vscode/src/features","section":"8"},{"name":"Contributor 9","path":"packages/vscode/webview/src/runtime","section":"9"},{"name":"Contributor 7","path":"packages/web","section":"10"},{"name":"Contributor 21","path":"packages/web/src/app/repos/[id]","section":"11"},{"name":"Contributor 1","path":"packages/web/src/app/repos/[id]/docs","section":"11.1"},{"name":"Contributor 16","path":"packages/web/src/app/repos/[id]/settings","section":"11.2"}],"more":"get_overview(include=[...]) also serves: \"outline\" (the wiki page tree), \"tour\" (guided_tour + reading_order), \"decisions\", \"graph\" (code communities), \"ownership\" (top owners, silos), \"content\" (the full essay).","omission_marker":"[repowise#4e8f0bb0e304: 90 lines omitted (~1376 tokens); restore: repowise expand 4e8f0bb0e304]","title":"Repository Overview: repowise","tool_surface":{"counts":{"default":10,"eligible":13,"enabled":10,"opt_in_available":3,"tiers":{"canonical":10}},"enabled":["get_answer","get_context","get_symbol","search_codebase","get_risk","get_change_risk","get_why","get_overview","get_health","get_dead_code"],"mode":"single_repo","opt_in":[{"description":"Find how two files/modules are connected in the dependency graph.","enabled":false,"name":"get_dependency_path"},{"description":"Show how the codebase executes: top entry points and their call traces.","enabled":false,"name":"get_execution_flows"},{"description":"Generate refactored code + a unified diff for one refactoring plan.","enabled":false,"name":"generate_refactoring_code"}],"recipes":[{"call":"get_answer(question=\"how does X work?\")","name":"answer_question"},{"call":"get_context(targets=[\"path\"], include=[\"skeleton\"])","name":"read_file_shape"},{"call":"search_codebase(query=\"identifier or path\", mode=\"auto\")","name":"find_raw_hits"},{"call":"get_risk(targets=[\"path\"])","name":"assess_hotspot"},{"call":"get_risk(targets=[\"path\"], changed_files=[\"path\"])","name":"review_change"},{"call":"get_why(targets=[\"path\"])","name":"read_rationale"},{"call":"get_health(only=[\"directive\"])","name":"health_directive"},{"call":"get_health(targets=[\"path\"], include=[\"refactoring\"])","name":"health_file_self_check"},{"call":"get_health(targets=[\"module:path\"], only=[\"modules\",\"metrics\"])","name":"health_module_triage"},{"call":"get_health(include=[\"trend\"], only=[\"trend\"])","name":"health_trend"},{"call":"get_health(include=[\"accuracy\"], only=[\"accuracy\"])","name":"health_accuracy"},{"call":"get_health(include=[\"coverage\"], only=[\"coverage\"])","name":"health_coverage"},{"call":"get_health(include=[\"performance\",\"refactoring\"], only=[\"performance_opportunities\",\"refactoring_plans\"])","name":"health_performance_refactoring"},{"call":"get_health(include=[\"performance\"], only=[\"performance_summary\"])","name":"health_performance_summary"},{"call":"get_health(opportunity_id=\"perf...\")","name":"health_performance_opportunity"},{"call":"get_health(opportunity_id=\"perf...\", only=[\"performance_evidence\"], cursor=0)","name":"health_performance_evidence"}],"tools":[{"default":true,"description":"Answer a how, where, or why question in one evidence-grounded call.","name":"get_answer","tier":"canonical"},{"default":true,"description":"Triage card for files / modules / symbols \u2014 relationships, not source bytes.","name":"get_context","tier":"canonical"},{"default":true,"description":"Follow-up read of one symbol whose id another response already gave you.","name":"get_symbol","tier":"canonical"},{"default":true,"description":"Find code by concept, symbol, or path \u2014 hybrid codebase search.","name":"search_codebase","tier":"canonical"},{"default":true,"description":"What history says about touching these files \u2014 bug fixes, churn, owners.","name":"get_risk","tier":"canonical"},{"default":true,"description":"Review a commit, ``base..head`` range, or uncommitted work.","name":"get_change_risk","tier":"canonical"},{"default":true,"description":"Why this code is shaped this way \u2014 decision records + evidence commits.","name":"get_why","tier":"canonical"},{"default":true,"description":"Architecture map for an unfamiliar repo \u2014 first call when you don't know your way around.","name":"get_overview","tier":"canonical"},{"default":true,"description":"Code-health scores and findings from stored analysis.","name":"get_health","tier":"canonical"},{"default":true,"description":"Unused exports, unreachable files, zombie packages \u2014 tiered by confidence.","name":"get_dead_code","tier":"canonical"}]}},"get_overview:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#4e8f0bb0e304"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":1376},"response_budget":{"limit_chars":24000,"serialized_chars":7933,"tier":"default"},"state":{"truncated":true}},"architecture":{"layer_order":["UI","CLI","Application","API","Config","Utility","Data","Types","Service","Docs & Tooling","Test"],"layers":[{"file_count":641,"name":"Contributor 2"},{"file_count":261,"name":"Contributor 6"},{"file_count":191,"name":"Contributor 15"},{"file_count":92,"name":"Contributor 12"},{"file_count":28,"name":"Contributor 10"},{"file_count":52,"name":"Contributor 17"},{"file_count":60,"name":"Contributor 13"},{"file_count":81,"name":"Contributor 18"},{"file_count":981,"name":"Contributor 4"},{"file_count":220,"name":"Contributor 8"},{"file_count":1478,"name":"Contributor 11"}],"tour_available":true,"tour_step_count":12},"code_health":{"average_health":6.94,"band":"warning","distribution":{"bands":{"alert":{"files":212,"nloc":110556,"pct":17.5},"healthy":{"files":2678,"nloc":299568,"pct":47.5},"warning":{"files":903,"nloc":220758,"pct":35.0}},"total_files":3793,"total_nloc":630882},"file_count":3793,"hotspot_health":4.35,"open_findings":14239,"worst_performer_path":"packages/server/src/repowise/server/routers/repos.py","worst_performer_score":1.0},"content_hint":"Overview essay trimmed to its summary section. Call get_overview(include=[\"content\"]) for the full walkthrough.","content_md":"## Project Summary\n\nRepowise consumes source repositories and configuration files, walks and parses them through language-specific ingestion, persists and analyzes the resulting code graph, and generates documentation, health insights, and interactive views exposed through CLI, MCP/server APIs, web apps, and VS Code.\n\nIt is a Python/TypeScript monorepo organized around a shared analysis engine and several presentation surfaces. The repository contains 3,659 files and approximately 740k lines of code; dependency analysis reports 18 circular dependencies. Recent hotspots include dead-code analysis, MCP answer generation, and the web sidebar.","entry_points":["packages/server/src/repowise/server/app.py","packages/cli/src/repowise/cli/main.py","packages/vscode/webview/src/views/risk/App.tsx","packages/vscode/webview/src/views/decisions/App.tsx","packages/vscode/webview/src/views/settings/App.tsx","packages/vscode/webview/src/views/architecture/App.tsx","packages/vscode/webview/src/views/home/App.tsx","packages/vscode/webview/src/views/refactoring/App.tsx"],"git_health":{"avg_bus_factor":1.2,"churn_trend":"increasing","files_git_attributed":4136,"files_with_bus_factor_1":3339,"hotspot_count":419,"top_churn_modules":["packages/core","tests/unit","packages/ui","packages/server","packages/web"]},"key_modules":[{"name":"Contributor 3","path":"packages/api-client","section":"6"},{"name":"Contributor 14","path":"packages/api-client/src","section":"7"},{"name":"Contributor 5","path":"packages/vscode/src/features","section":"8"},{"name":"Contributor 9","path":"packages/vscode/webview/src/runtime","section":"9"},{"name":"Contributor 7","path":"packages/web","section":"10"},{"name":"Contributor 21","path":"packages/web/src/app/repos/[id]","section":"11"},{"name":"Contributor 1","path":"packages/web/src/app/repos/[id]/docs","section":"11.1"},{"name":"Contributor 16","path":"packages/web/src/app/repos/[id]/settings","section":"11.2"}],"more":"get_overview(include=[...]) also serves: \"outline\" (the wiki page tree), \"tour\" (guided_tour + reading_order), \"decisions\", \"graph\" (code communities), \"ownership\" (top owners, silos), \"content\" (the full essay).","omission_marker":"[repowise#4e8f0bb0e304: 90 lines omitted (~1376 tokens); restore: repowise expand 4e8f0bb0e304]","title":"Repository Overview: repowise","tool_surface":{"counts":{"default":10,"eligible":13,"enabled":10,"opt_in_available":3,"tiers":{"canonical":10}},"enabled":["get_answer","get_context","get_symbol","search_codebase","get_risk","get_change_risk","get_why","get_overview","get_health","get_dead_code"],"mode":"single_repo","opt_in":[{"description":"Find how two files/modules are connected in the dependency graph.","enabled":false,"name":"get_dependency_path"},{"description":"Show how the codebase executes: top entry points and their call traces.","enabled":false,"name":"get_execution_flows"},{"description":"Generate refactored code + a unified diff for one refactoring plan.","enabled":false,"name":"generate_refactoring_code"}],"recipes":[{"call":"get_answer(question=\"how does X work?\")","name":"answer_question"},{"call":"get_context(targets=[\"path\"], include=[\"skeleton\"])","name":"read_file_shape"},{"call":"search_codebase(query=\"identifier or path\", mode=\"auto\")","name":"find_raw_hits"},{"call":"get_risk(targets=[\"path\"])","name":"assess_hotspot"},{"call":"get_risk(targets=[\"path\"], changed_files=[\"path\"])","name":"review_change"},{"call":"get_why(targets=[\"path\"])","name":"read_rationale"},{"call":"get_health(only=[\"directive\"])","name":"health_directive"},{"call":"get_health(targets=[\"path\"], include=[\"refactoring\"])","name":"health_file_self_check"},{"call":"get_health(targets=[\"module:path\"], only=[\"modules\",\"metrics\"])","name":"health_module_triage"},{"call":"get_health(include=[\"trend\"], only=[\"trend\"])","name":"health_trend"},{"call":"get_health(include=[\"accuracy\"], only=[\"accuracy\"])","name":"health_accuracy"},{"call":"get_health(include=[\"coverage\"], only=[\"coverage\"])","name":"health_coverage"},{"call":"get_health(include=[\"performance\",\"refactoring\"], only=[\"performance_opportunities\",\"refactoring_plans\"])","name":"health_performance_refactoring"},{"call":"get_health(include=[\"performance\"], only=[\"performance_summary\"])","name":"health_performance_summary"},{"call":"get_health(opportunity_id=\"perf...\")","name":"health_performance_opportunity"},{"call":"get_health(opportunity_id=\"perf...\", only=[\"performance_evidence\"], cursor=0)","name":"health_performance_evidence"}],"tools":[{"default":true,"description":"Answer a how, where, or why question in one evidence-grounded call.","name":"get_answer","tier":"canonical"},{"default":true,"description":"Triage card for files / modules / symbols \u2014 relationships, not source bytes.","name":"get_context","tier":"canonical"},{"default":true,"description":"Follow-up read of one symbol whose id another response already gave you.","name":"get_symbol","tier":"canonical"},{"default":true,"description":"Find code by concept, symbol, or path \u2014 hybrid codebase search.","name":"search_codebase","tier":"canonical"},{"default":true,"description":"What history says about touching these files \u2014 bug fixes, churn, owners.","name":"get_risk","tier":"canonical"},{"default":true,"description":"Review a commit, ``base..head`` range, or uncommitted work.","name":"get_change_risk","tier":"canonical"},{"default":true,"description":"Why this code is shaped this way \u2014 decision records + evidence commits.","name":"get_why","tier":"canonical"},{"default":true,"description":"Architecture map for an unfamiliar repo \u2014 first call when you don't know your way around.","name":"get_overview","tier":"canonical"},{"default":true,"description":"Code-health scores and findings from stored analysis.","name":"get_health","tier":"canonical"},{"default":true,"description":"Unused exports, unreachable files, zombie packages \u2014 tiered by confidence.","name":"get_dead_code","tier":"canonical"}]}},"get_risk:one-target":{"_meta":{"completeness":{"capped":true,"reason":"construction_cap","shown":5,"total":25},"contract_version":1,"embedder_degraded":false,"floor":["co_change_partners_total","dependents_count"],"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#160ca2a7eeeb"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":1810},"response_budget":{"limit_chars":24000,"serialized_chars":3742,"tier":"default"},"state":{"truncated":true}},"omission_marker":"[repowise#160ca2a7eeeb: 258 lines omitted (~1810 tokens); restore: repowise expand 160ca2a7eeeb]","targets":{"packages/core/src/repowise/core/ingestion/call_resolver.py":{"bus_factor":1,"co_change_partners":[{"direction":"undirected","evidence_kind":"historical","file_path":"tests/unit/ingestion/test_call_resolver_strategies.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-08-23","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":6,"weight":2.906},{"direction":"undirected","evidence_kind":"historical","file_path":"packages/core/src/repowise/core/ingestion/languages/receiver_types.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-08-25","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":9,"weight":2.799},{"direction":"undirected","evidence_kind":"historical","file_path":"packages/core/src/repowise/core/ingestion/models.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-08-30","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":20,"weight":2.578},{"direction":"undirected","evidence_kind":"historical","file_path":"tests/unit/ingestion/test_receiver_types.py","has_import_link":false,"has_structural_link":false,"last_co_change":"2026-08-25","provenance":"git_history","relationship_type":"co_change","support":7,"weight":2.315},{"direction":"undirected","evidence_kind":"historical","file_path":"packages/core/src/repowise/core/ingestion/parser.py","has_import_link":false,"has_structural_link":false,"last_co_change":"2026-09-04","provenance":"git_history","relationship_type":"co_change","support":17,"weight":1.567}],"co_change_partners_emitted":5,"co_change_partners_omitted":20,"co_change_partners_reduced_reason":"construction_cap","co_change_partners_total":25,"co_change_partners_truncated":true,"commit_count_capped":false,"contributor_count":3,"coverage_pct":91.47,"defect_profile":{"bug_magnet":true,"fix_count":22,"last_fix_days_ago":10,"top_symbols":{"__init__":5,"_link_declarations":4,"_published":3},"window":"6 months"},"dependents_count":11,"episodes":21,"health_score":1.81,"hotspot_score":0.9995,"is_hotspot":true,"owner_pct":0.9412,"primary_owner":"Contributor 19","recent_owner":"Contributor 19","recent_owner_pct":0.9412,"risk_summary":"packages/core/src/repowise/core/ingestion/call_resolver.py \u2014 22 bug fixes in 6mo, last 10d ago (bug magnet), hotspot score 100% (increasing), 11 direct dependents, bug-prone, feature-active, 25 co-change partners, owned 94% by Contributor 19, bus factor risk (sole maintainer: Contributor 19)","security_signals":[],"target":"packages/core/src/repowise/core/ingestion/call_resolver.py","test_gap":false,"top_biomarkers":[{"biomarker_type":"change_entropy","function_name":null,"impact":1.18,"severity":"critical"},{"biomarker_type":"co_change_scatter","function_name":null,"impact":0.85,"severity":"high"},{"biomarker_type":"prior_defect","function_name":null,"impact":0.78,"severity":"critical"}],"trend":"increasing"}}},"get_risk:pr-mode":{"_meta":{"completeness":{"capped":true,"reason":"construction_cap","shown":59,"total":3021},"contract_version":2,"embedder":"mock","embedder_degraded":false,"floor":["co_change_partners_total","dependents_count"],"index_age_days":2,"index_scope":{"content_provenance":"template","degraded_analyses":["Graph build can take several minutes on a first run. Safe to Ctrl-C \u2014 re-run 'repowise init --resume' to continue where it stopped."],"fingerprint":"0e8450c5d2de","full":"get_overview()","git_tier":"full","projection":"compact","run_mode":"standard","status":"degraded","version":1},"indexed_commit":"6552eae9b32c","omitted":{"refs":["repowise#2801adcfc5da","repowise#3193a92098fa"],"restore":"`repowise expand <ref>`, or get_symbol(\"repowise#<ref>\", query=...)","tokens":115239},"reductions":[{"emitted":0,"field":"pr_blast_radius.guarding_tests.tests_to_run","reason":"response_budget","total":7},{"emitted":0,"field":"pr_blast_radius.guarding_tests.tests_to_run_with_basis","reason":"response_budget","total":7},{"emitted":0,"field":"pr_blast_radius.guarding_tests.by_file.packages/cli/src/repowise/cli/commands/update_cmd/command.py","reason":"response_budget","total":6},{"emitted":0,"field":"pr_blast_radius.guarding_tests.by_file.packages/ui/src/graph/graph-flow.tsx","reason":"response_budget","total":1},{"emitted":0,"field":"pr_blast_radius.guarding_tests.analysis.basis_categories","reason":"response_budget","total":1}],"response_budget":{"limit_chars":24000,"serialized_chars":21274,"tier":"default"},"semantic_search":false,"state":{"truncated":true},"timing_ms":2338.83},"directive":{"breaking_changes":[],"breaking_changes_truncated":0,"conformance_violations":[],"coverage_analysis":{"changed_files_total":2,"changed_files_with_measured_tests":0,"changed_files_without_measured_tests":2,"freshness":{"indexed_commit":null,"ingested_commit":null,"reason":"coverage_or_index_commit_unavailable","status":"unknown"},"ingested_at":null,"map_present":false,"pair_count":0,"reason":"no_per_test_coverage_map","source_file_count":0,"source_format":null,"status":"unavailable","test_count":0},"cross_repo_relationship_analysis":{"reason":"system_graph_unavailable","status":"unavailable"},"dependency_cycles":[],"files_without_measured_tests":["packages/cli/src/repowise/cli/commands/update_cmd/command.py","packages/ui/src/graph/graph-flow.tsx"],"governance_risk":[],"may_break":["packages/cli/src/repowise/cli/commands/init_cmd/command.py","packages/cli/src/repowise/cli/commands/update_cmd/__init__.py","packages/cli/src/repowise/cli/commands/update_cmd/persistence.py"],"may_break_emitted":3,"may_break_omitted":10,"may_break_reduced_reason":"construction_cap_and_response_budget","may_break_tests":["packages/ui/__tests__/graph/graph-flow.test.tsx","tests/integration/test_cli.py","tests/unit/cli/test_commands.py"],"may_break_tests_emitted":3,"may_break_tests_omitted":1406,"may_break_tests_reduced_reason":"construction_cap","may_break_tests_total":1409,"may_break_tests_truncated":true,"may_break_total":13,"may_break_truncated":true,"missing_cochanges":["packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","packages/core/src/repowise/core/workspace/update.py","packages/cli/src/repowise/cli/commands/update_cmd/deterministic.py"],"missing_cochanges_emitted":3,"missing_cochanges_omitted":47,"missing_cochanges_reduced_reason":"construction_cap","missing_cochanges_total":50,"missing_cochanges_truncated":true,"missing_cross_repo_cochanges":[],"missing_cross_repo_cochanges_emitted":0,"missing_cross_repo_cochanges_total":0,"missing_cross_repo_cochanges_truncated":false,"missing_tests":[],"missing_tests_emitted":0,"missing_tests_omitted":0,"missing_tests_semantics":"changed_file_test_gap_compatibility_projection","missing_tests_total":0,"missing_tests_truncated":false,"next_calls":[{"arguments":{},"cli":"repowise risk","mcp":"get_change_risk()","purpose":"The diff itself: review priority, health delta and impacted tests","tool":"get_change_risk"},{"arguments":{"include":["callers"],"targets":["packages/cli/src/repowise/cli/commands/init_cmd/command.py","packages/cli/src/repowise/cli/commands/update_cmd/__init__.py","packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","packages/cli/src/repowise/cli/commands/update_cmd/workspace.py","packages/cli/src/repowise/cli/commands/watch_cmd.py"]},"cli":"repowise context packages/cli/src/repowise/cli/commands/init_cmd/command.py packages/cli/src/repowise/cli/commands/update_cmd/__init__.py packages/cli/src/repowise/cli/commands/update_cmd/persistence.py packages/cli/src/repowise/cli/commands/update_cmd/workspace.py packages/cli/src/repowise/cli/commands/watch_cmd.py --include callers","mcp":"get_context(targets=[\"packages/cli/src/repowise/cli/commands/init_cmd/command.py\", \"packages/cli/src/repowise/cli/commands/update_cmd/__init__.py\", \"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py\", \"packages/cli/src/repowise/cli/commands/update_cmd/workspace.py\", \"packages/cli/src/repowise/cli/commands/watch_cmd.py\"], include=[\"callers\"])","purpose":"How the files that may break use the changed code","tool":"get_context"}],"summary":"PR touches 2 file(s). ~5 downstream file(s) may be affected, 3 test(s) may break, 3 historical co-changer(s) missing, Coverage analysis is unavailable; missing_tests is withheld rather than treated as empty evidence. 7 test recommendation(s): 0 measured and 7 inferred, not coverage-proven candidate(s); each row carries its basis.","test_analysis":{"basis_categories":["inferred"],"degraded":false,"partial":true,"stale":false,"status":"partial"},"test_inference_analysis":{"candidates_before_dedup":7,"changed_files_total":2,"changed_files_with_candidates":2,"reason":null,"status":"available"},"test_recommendations":[{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/ui/src/graph/graph-flow.tsx","via":"call-graph"}],"test_id":"packages/ui/__tests__/graph/graph-flow.test.tsx"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/integration/test_cli.py"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/unit/cli/test_commands.py"}],"test_recommendations_emitted":3,"test_recommendations_omitted":4,"test_recommendations_reduced_reason":"response_budget","test_recommendations_repository":"default","test_recommendations_repository_id":"5dc45e3f30d54edcb17bd4b3785be90d","test_recommendations_total":7,"test_recommendations_truncated":true,"test_unknown_files":[],"tests_to_run":["packages/ui/__tests__/graph/graph-flow.test.tsx","tests/integration/test_cli.py","tests/unit/cli/test_commands.py"],"tests_to_run_basis":"inferred","tests_to_run_emitted":3,"tests_to_run_kind":"test_file","tests_to_run_omitted":4,"tests_to_run_reduced_reason":"response_budget","tests_to_run_total":7,"tests_to_run_truncated":true,"will_break_consumers":[],"will_break_consumers_deprecated":true,"will_break_consumers_emitted":0,"will_break_consumers_semantics":"structural_reach_only","will_break_consumers_total":0,"will_break_consumers_truncated":false},"omission_marker":"[repowise#3193a92098fa: 276 lines omitted (~1814 tokens); restore: repowise expand 3193a92098fa]","pr_blast_radius":{"cochange_warnings":[{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","provenance":"git_history","relationship_type":"co_change","score":0.8764,"support":26},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/core/src/repowise/core/workspace/update.py","provenance":"git_history","relationship_type":"co_change","score":0.6616,"support":25},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/cli/src/repowise/cli/commands/update_cmd/deterministic.py","provenance":"git_history","relationship_type":"co_change","score":0.6167,"support":13},{"changed":"packages/ui/src/graph/graph-flow.tsx","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/ui/__tests__/graph/graph-flow.test.tsx","provenance":"git_history","relationship_type":"co_change","score":0.576,"support":10},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/cli/src/repowise/cli/commands/update_cmd/reporting.py","provenance":"git_history","relationship_type":"co_change","score":0.405,"support":9},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/cli/src/repowise/cli/commands/update_cmd/incremental.py","provenance":"git_history","relationship_type":"co_change","score":0.4023,"support":12},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/core/src/repowise/core/ingestion/change_detector.py","provenance":"git_history","relationship_type":"co_change","score":0.3452,"support":8},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/core/src/repowise/core/pipeline/incremental.py","provenance":"git_history","relationship_type":"co_change","score":0.3443,"support":18},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"tests/unit/ingestion/test_change_detector.py","provenance":"git_history","relationship_type":"co_change","score":0.3184,"support":6},{"changed":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","direction":"undirected","evidence_kind":"historical","missing_partner":"packages/core/src/repowise/core/pipeline/phases/analysis.py","provenance":"git_history","relationship_type":"co_change","score":0.278,"support":12}],"cochange_warnings_emitted":10,"cochange_warnings_total":50,"cochange_warnings_truncated":true,"cochange_warnings_truncated_total":50,"overall_risk_score":2.7,"overall_risk_score_compatibility":{"deprecated":true,"equivalent_value":true,"historical_meaning":"uncalibrated 0-10 structural blast-radius heuristic","replacement":"structural_impact_score"},"recommended_reviewers":[{"email":"[email protected]","files":1173,"ownership_pct":0.924},{"email":"[email protected]","files":121,"ownership_pct":0.716},{"email":"[email protected]","files":19,"ownership_pct":1.0},{"email":"[email protected]","files":15,"ownership_pct":0.725},{"email":"[email protected]","files":11,"ownership_pct":0.561}],"recommended_reviewers_emitted":5,"recommended_reviewers_total":5,"recommended_reviewers_truncated":false,"structural_impact_band":"localized","structural_impact_scale":{"authoritative_for_change_review":false,"band_thresholds":{"broad":7.0,"moderate":4.0},"calibration":{"status":"uncalibrated"},"field":"structural_impact_score","kind":"heuristic_structural_score","measures":"indexed structural exposure: centrality of the changed files plus bounded direct and transitive dependent breadth","range":{"maximum":10.0,"minimum":0.0},"runtime_breakage_probability":false,"unit":"normalized_points"},"structural_impact_score":2.7,"test_gaps":["packages/vscode/webview/src/views/graph/App.tsx","packages/vscode/webview/src/views/graph/main.tsx","packages/web/src/components/architecture/graph-view.tsx","packages/web/src/components/graph/graph-flow.tsx"],"test_gaps_emitted":4,"test_gaps_total":4,"test_gaps_truncated":false,"test_impact":{"analysis":{"basis_categories":["inferred"],"degraded":false,"partial":true,"stale":false,"status":"partial"},"coverage":{"changed_files_total":2,"changed_files_with_measured_tests":0,"changed_files_without_measured_tests":2,"freshness":{"indexed_commit":null,"ingested_commit":null,"reason":"coverage_or_index_commit_unavailable","status":"unknown"},"ingested_at":null,"map_present":false,"pair_count":0,"reason":"no_per_test_coverage_map","source_file_count":0,"source_format":null,"status":"unavailable","test_count":0},"deleted_files":[],"files":[{"change_status":null,"head_present":true,"inferred_tests":["tests/integration/test_cli.py","tests/unit/cli/test_commands.py","tests/unit/cli/test_update_full_dry_run.py","tests/unit/cli/test_update_phase_timings.py","tests/unit/cli/test_update_reindex_notice.py","tests/unit/cli/test_update_renderer_gate.py"],"inferred_tests_total":6,"measured_tests":[],"measured_tests_total":0,"source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","status":"inferred"},{"change_status":null,"head_present":true,"inferred_tests":["packages/ui/__tests__/graph/graph-flow.test.tsx"],"inferred_tests_total":1,"measured_tests":[],"measured_tests_total":0,"source_file":"packages/ui/src/graph/graph-flow.tsx","status":"inferred"}],"files_total":2,"files_without_measured_tests":["packages/cli/src/repowise/cli/commands/update_cmd/command.py","packages/ui/src/graph/graph-flow.tsx"],"inference":{"candidates_before_dedup":7,"changed_files_total":2,"changed_files_with_candidates":2,"reason":null,"status":"available"},"recommendations":[{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/ui/src/graph/graph-flow.tsx","via":"call-graph"}],"test_id":"packages/ui/__tests__/graph/graph-flow.test.tsx"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/integration/test_cli.py"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/unit/cli/test_commands.py"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/unit/cli/test_update_full_dry_run.py"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/unit/cli/test_update_phase_timings.py"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/unit/cli/test_update_reindex_notice.py"},{"basis":"inferred","evidence":[{"basis":"inferred","source_file":"packages/cli/src/repowise/cli/commands/update_cmd/command.py","via":"call-graph"}],"test_id":"tests/unit/cli/test_update_renderer_gate.py"}],"recommendations_by_primary_basis":{"inferred":7,"measured":0},"recommendations_emitted":7,"recommendations_omitted":0,"recommendations_repository":"default","recommendations_repository_id":"5dc45e3f30d54edcb17bd4b3785be90d","recommendations_total":7,"recommendations_truncated":false,"unknown_files":[]},"transitive_affected":[{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/cli/src/repowise/cli/commands/init_cmd/command.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/cli/src/repowise/cli/commands/update_cmd/__init__.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/cli/src/repowise/cli/commands/update_cmd/workspace.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/cli/src/repowise/cli/commands/watch_cmd.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/ui/__tests__/graph/graph-flow.test.tsx","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/ui/src/graph/index.ts","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/vscode/webview/src/views/graph/App.tsx","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"packages/web/src/components/graph/graph-flow.tsx","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"tests/integration/test_cli.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"tests/unit/cli/test_commands.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"tests/unit/cli/test_docs_pointer.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"tests/unit/cli/test_editor_setup.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"tests/unit/cli/test_update_full_dry_run.py","runtime_breakage_claim":false},{"claim":"structural_reach","depth":1,"direct":true,"direction":"dependent_to_dependency","distance":1,"evidence_kind":"structural","path":"tests/unit/cli/test_update_reindex_notice.py","runtime_breakage_claim":false}],"transitive_affected_emitted":15,"transitive_affected_total":1422,"transitive_affected_truncated":true,"transitive_affected_truncated_total":1422},"targets":{"packages/cli/src/repowise/cli/commands/update_cmd/command.py":{"bus_factor":2,"co_change_partners":[{"conf_ab":0.217,"conf_ba":0.433,"direction":"b_to_a","evidence_kind":"historical","file_path":"packages/cli/src/repowise/cli/commands/update_cmd/persistence.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-09-19","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":26,"weight":0.8764},{"conf_ab":0.208,"conf_ba":0.694,"direction":"b_to_a","evidence_kind":"historical","file_path":"packages/core/src/repowise/core/workspace/update.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-09-28","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":25,"weight":0.6616},{"conf_ab":0.108,"conf_ba":0.812,"direction":"b_to_a","evidence_kind":"historical","file_path":"packages/cli/src/repowise/cli/commands/update_cmd/deterministic.py","has_import_link":true,"has_structural_link":true,"last_co_change":"2026-09-27","provenance":"git_history","relationship_type":"co_change","structural_relationship_types":["imports"],"support":13,"weight":0.6167}],"co_change_partners_emitted":3,"co_change_partners_omitted":20,"co_change_partners_reduced_reason":"construction_cap","co_change_partners_total":25,"co_change_partners_truncated":true,"commit_count_capped":false,"contributor_count":13,"defect_profile":{"bug_magnet":true,"fix_count":49,"last_fix_days_ago":4,"top_symbols":{"_render_full_upgrade_dry_run":4,"_renderer_inputs":2,"run_update":23},"window":"6 months"},"dependents_count":15,"episodes":32,"health_score":1.65,"hotspot_score":1.0,"is_hotspot":true,"owner_line_pct":null,"owner_pct":0.775,"primary_owner":"Contributor 1","recent_owner":"Contributor 1","recent_owner_pct":0.7857,"risk_summary":"packages/cli/src/repowise/cli/commands/update_cmd/command.py \u2014 49 bug fixes in 6mo, last 4d ago (bug magnet), hotspot score 100% (stable), 15 direct dependents, bug-prone, fix-heavy, 25 co-change partners, primary owner Contributor 1 (78% of commits)","security_signals":[],"test_gap":false,"top_biomarkers":[{"biomarker_type":"change_entropy","impact":0.98,"severity":"critical"},{"biomarker_type":"ownership_risk","impact":0.9,"severity":"critical"},{"biomarker_type":"nested_complexity","function_name":"run_update","impact":0.89,"severity":"high"}],"trend":"stable"}},"truncated":true},"get_symbol:largest-depth-3":{"_meta":{"completeness":{"capped":true},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#63171fe88e36","repowise#bb943f58f05d"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":8087},"replaced_tokens":25149,"response_budget":{"limit_chars":24000,"serialized_chars":22623,"tier":"default"},"state":{"truncated":true},"timing_ms":6.7,"tokens_saved":19480},"continuation":"packages/core/src/repowise/core/ingestion/call_resolver.py:797-2117","continuation_reference":{"id":"packages/core/src/repowise/core/ingestion/call_resolver.py:797-2117","kind":"file_range","path":"packages/core/src/repowise/core/ingestion/call_resolver.py","range":[797,2117],"repository":"default","source_kind":"source","verification_basis":"live"},"end_line":796,"file":"packages/core/src/repowise/core/ingestion/call_resolver.py","kind":"class","name":"CallResolver","omission_marker":"[repowise#bb943f58f05d: 11 lines omitted (~136 tokens); restore: repowise expand bb943f58f05d]","qualified_name":"packages.core.src.repowise.core.ingestion.call_resolver.CallResolver","signature":"class CallResolver","source":" 197\t _JVM_STRATEGIES,\n 198\t free=(\"_resolve_java_same_package_unique\",),\n 199\t member_fallback=_TYPED_RECEIVER,\n 200\t ),\n 201\t \"kotlin\": replace(_JVM_STRATEGIES, member_fallback=_TYPED_RECEIVER),\n 202\t \"csharp\": _LanguageCallStrategies(member_fallback=_TYPED_RECEIVER),\n 203\t \"python\": _LanguageCallStrategies(member_fallback=_TYPED_RECEIVER),\n 204\t # Swift registers the fallback and nothing else: it has no package\n 205\t # tier of its own, so a typed receiver is looked for in the caller's\n 206\t # file, in what the file imports, and then in the global pair index.\n 207\t \"swift\": _LanguageCallStrategies(member_fallback=_TYPED_RECEIVER),\n 208\t \"cpp\": _CPP_STRATEGIES,\n 209\t \"c\": _CPP_STRATEGIES,\n 210\t}\n 211\t\n 212\t_SOURCE_CACHE_FILES = 4\n 213\t_BODY_TYPE_CACHE_ENTRIES = 2048\n 214\t\n 215\t# Phase admission is intentionally explicit. P16 lands the behavior-preserving\n 216\t# substrate with no language enabled; later phases add only measured lanes.\n 217\tPRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES: frozenset[str] = frozenset({\"cpp\"})\n 218\t\n 219\t\n 220\t@dataclass(frozen=True, slots=True)\n 221\tclass ResolvedCall:\n 222\t \"\"\"A call resolved to concrete symbol IDs with a confidence score.\"\"\"\n 223\t\n 224\t caller_id: str # symbol node ID of the calling function/method\n 225\t callee_id: str # symbol node ID of the called function/method\n 226\t confidence: float # 0.0\u20131.0\n 227\t line: int # call site line number (for diagnostics)\n 228\t origin: ResolutionOrigin # which strategy below produced it\n 229\t edge_type: CallSiteEdgeType = \"calls\" # carried through from the CallSite\n 230\t supplied_props: frozenset[str] | None = None # prop names supplied in JSX element (None if unknown/spread)\n 231\t\n 232\t\n 233\tdef _same_translation_unit(decl_file: str, def_file: str) -> bool:\n 234\t \"\"\"Are these two paths the same C++ translation unit?\n 235\t\n 236\t Compared on the base name, because a public header rarely sits beside its\n 237\t implementation (``include/pkg/thing.h`` against ``src/thing.cc``). The\n 238\t include relation would be the better test, but a C++ include binds to the\n 239\t path as written and usually is not a file key.\n 240\t \"\"\"\n 241\t return (\n 242\t decl_file == def_file\n 243\t or PurePosixPath(decl_file).stem == PurePosixPath(def_file).stem\n 244\t )\n 245\t\n 246\t\n 247\tclass CallResolver:\n 248\t \"\"\"Resolve raw CallSites to symbol-level edges.\n 249\t\n 250\t Constructed once per ``GraphBuilder.build()`` call with the full set of\n 251\t parsed files and import edges, then driven one file at a time.\n 252\t\n 253\t ``resolve_file()`` is **not** safe to call concurrently. Several lazy\n 254\t caches are filled during resolution, and the capped ones evict wholesale.\n 255\t Every cached value is a pure function of state fixed at construction, so a\n 256\t race would cost recomputation rather than a wrong answer, but the eviction\n 257\t makes concurrent use pointless as well as unsupported.\n 258\t \"\"\"\n 259\t\n 260\t def __init__(\n 261\t self,\n 262\t parsed_files: dict[str, ParsedFile],\n 263\t import_targets: dict[str, set[str]],\n 264\t *,\n 265\t repo_path: str | None = None,\n 266\t import_maps: Any | None = None,\n 267\t heritage_parents: dict[str, set[str]] | None = None,\n 268\t return_type_chain_languages: frozenset[str] | None = None,\n 269\t ) -> None:\n 270\t # {type symbol id: parent type symbol ids}, from the caller's already\n 271\t # resolved heritage. Absent when the resolver is built standalone, in\n 272\t # which case the inherited tier simply never fires.\n 273\t self._heritage_parents: dict[str, set[str]] = heritage_parents or {}\n 274\t self._return_type_chain_languages = (\n 275\t PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES\n 276\t if return_type_chain_languages is None\n 277\t else return_type_chain_languages\n 278\t )\n 279\t self._ancestors: dict[str, tuple[str, ...]] = {}\n 280\t # Per-file symbol index: {file_path: {symbol_name: symbol_id}}\n 281\t self._file_symbols: dict[str, dict[str, str]] = {}\n 282\t\n 283\t # Per-file method index: {file_path: {(class_name, method_name): symbol_id}}\n 284\t self._file_methods: dict[str, dict[tuple[str, str], str]] = {}\n 285\t\n 286\t # Global method index: {(class_name, method_name): [(file_path, symbol_id)]}\n 287\t # in file-insertion order \u2014 replaces the trait-dispatch scan over\n 288\t # every file's method dict with one short-list lookup.\n 289\t self._global_methods: dict[tuple[str, str], list[tuple[str, str]]] = defaultdict(list)\n 290\t\n 291\t # Global symbol index: {name: [symbol_ids]} \u2014 for Tier 3\n 292\t self._global_symbols: dict[str, list[str]] = defaultdict(list)\n 293\t self._symbols_by_id = {\n 294\t symbol.id: symbol for parsed in parsed_files.values() for symbol in parsed.symbols\n 295\t }\n 296\t self._symbol_paths_by_id = {\n 297\t symbol.id: path\n 298\t for path, parsed in parsed_files.items()\n 299\t for symbol in parsed.symbols\n 300\t }\n 301\t self._overload_return_types: dict[tuple[str, str | None, str, int | None], set[str]] = (\n 302\t defaultdict(set)\n 303\t )\n 304\t for path, parsed in parsed_files.items():\n 305\t for symbol in parsed.symbols:\n 306\t raw_return = declared_return_type(symbol.signature or \"\")\n 307\t normalized = (\n 308\t normalize_return_type(raw_return, symbol.language) if raw_return else None\n 309\t )\n 310\t if normalized is not None:\n 311\t key = (\n 312\t path,\n 313\t symbol.parent_name,\n 314\t symbol.name,\n 315\t signature_parameter_count(symbol.signature or \"\"),\n 316\t )\n 317\t self._overload_return_types[key].add(normalized)\n 318\t self._known_type_names = frozenset(\n 319\t symbol.name for symbol in self._symbols_by_id.values() if symbol.kind in _TYPE_KINDS\n 320\t )\n 321\t\n 322\t # Symbols in the index above that are data members, not callables\n 323\t # Held as an id set rather than a full id->kind map: it is the only\n 324\t # kind question asked of it and the set is small.\n 325\t self._non_callable_ids: set[str] = set()\n 326\t self._property_accessor_ids: set[str] = set()\n 327\t\n 328\t # C/C++ forward declaration \u2192 the definition it declares. Populated by\n 329\t # ``_build_indices``; applied to every resolved call so the edge lands\n 330\t # on the body rather than the header line that announced it.\n 331\t self._decl_to_def: dict[str, str] = {}\n 332\t\n 333\t # Import graph: {file_path: set of imported file paths}\n 334\t self._import_targets = import_targets\n 335\t\n 336\t # Shared import-name maps (built once per GraphBuilder.build() and\n 337\t # injected; standalone construction builds them locally).\n 338\t if import_maps is None:\n 339\t from .import_index import build_import_name_maps\n 340\t\n 341\t import_maps = build_import_name_maps(parsed_files)\n 342\t # Import name mapping: {file_path: {local_name: source_file}}\n 343\t self._import_names: dict[str, dict[str, str]] = import_maps.import_names\n 344\t # Full binding data: {file_path: {local_name: NamedBinding}}\n 345\t self._import_bindings: dict[str, dict[str, NamedBinding]] = import_maps.import_bindings\n 346\t # Module alias mapping: {file_path: {alias: source_file}}\n 347\t self._module_aliases: dict[str, dict[str, str]] = import_maps.module_aliases\n 348\t\n 349\t # Lazy per-file merged views of every imported file's symbol /\n 350\t # method tables \u2014 turns the Tier-2b \"scan each imported file\"\n 351\t # loops into single dict lookups. Built on first miss per file;\n 352\t # merge order is sorted(import paths) with first-wins so shadowed\n 353\t # names resolve deterministically (the old set-iteration order was\n 354\t # hash-randomized per process).\n 355\t self._merged_import_symbols: dict[str, dict[str, str]] = {}\n 356\t self._merged_import_methods: dict[str, dict[tuple[str, str], str]] = {}\n 357\t\n 358\t # Lazy per-file set of (line, target) that also carry a receiver.\n 359\t self._member_shaped: dict[str, set[tuple[int, str]]] = {}\n 360\t\n 361\t # Receiver typing reads source text, so both caches are capped rather\n 362\t # than per-repo: files resolve one at a time, so a few slots always\n 363\t # hit, and the cap is what keeps a whole repo's source out of memory.\n 364\t # Scanning is memoised per *function*, not per reference \u2014 one scan\n 365\t # answers every unresolved receiver in a body.\n 366\t self._source_text: dict[str, str] = {}\n 367\t self._declarations: dict[str, tuple[Declaration, ...]] = {}\n 368\t self._symbol_spans: dict[str, dict[str, tuple[int, int]]] = {}\n 369\t self._body_types: dict[tuple[str, str], dict[str, str | None]] = {}\n 370\t self._field_types: dict[str, dict[str, dict[str, str | None]]] = {}\n 371\t self._bindings: dict[str, tuple[tuple[int, str], ...]] = {}\n 372\t self._bound_names: dict[tuple[str, str], frozenset[str]] = {}\n 373\t # {file: {name: type}} \u2014 module-level defs a framework decorator retyped.\n 374\t self._framework_types: dict[str, dict[str, str]] = {}\n 375\t self._external_names: dict[str, frozenset[str]] = {}\n 376\t self._repo_rebound_names: dict[str, frozenset[str]] = {}\n 377\t self._method_name_set: frozenset[str] | None = None\n 378\t self._framework_name_set: frozenset[str] | None = None\n 379\t\n 380\t # Barrel re-export origins: {barrel_file: {name: origin_file}}\n 381\t self._barrel_origins: dict[str, dict[str, str]] = defaultdict(dict)\n 382\t\n 383\t # Keep reference for cross-language checks in Tier 3\n 384\t self._parsed_files = parsed_files\n 385\t\n 386\t # Rust cross-crate resolution\n 387\t self._repo_path = repo_path\n 388\t self._rust_crate_src: dict[str, str] | None = None # lazy\n 389\t\n 390\t # Go package-scoped resolution (lazy GoPackageIndex). ``_go_index``\n 391\t # holds the built index; ``_go_index_built`` distinguishes \"not yet\n 392\t # built\" from \"built but unavailable\" (no repo_path / no go files).\n 393\t self._go_index: Any = None\n 394\t self._go_index_built = False\n 395\t\n 396\t # JVM same-package resolution (lazy JvmWorkspaceIndex)\n 397\t self._jvm_index: Any = None\n 398\t self._jvm_index_built = False\n 399\t\n 400\t # C/C++ same-target resolution (lazy CppWorkspaceIndex)\n 401\t self._cpp_index: Any = None\n 402\t self._cpp_index_built = False\n 403\t\n 404\t self._strategies_by_file: dict[str, _LanguageCallStrategies] = {}\n 405\t\n 406\t self._build_indices(parsed_files)\n 407\t self._follow_barrel_exports()\n 408\t\n 409\t def _follow_barrel_exports(self) -> None:\n 410\t \"\"\"Detect barrel/re-export files and record origin mappings.\n 411\t\n 412\t A barrel file imports a name and re-exports it without defining it\n 413\t locally (e.g., ``__init__.py`` with ``from .calculator import Calculator``).\n 414\t When downstream code imports from the barrel, we follow chains to\n 415\t find the actual defining file.\n 416\t \"\"\"\n 417\t # First pass: identify direct barrel origins\n 418\t for path, name_to_file in self._import_names.items():\n 419\t file_syms = self._file_symbols.get(path, {})\n 420\t for name, source_file in name_to_file.items():\n 421\t # An origin outside the repo names no file any reader of this\n 422\t # map can look up, and the wildcard pass below already refuses\n 423\t # one. Holding the invariant in one pass and not its twin is\n 424\t # what makes a later reader look safe when it is not.\n 425\t if name not in file_syms and not source_file.startswith(\"external:\"):\n 426\t self._barrel_origins[path][name] = source_file\n 427\t\n 428\t # Track wildcard re-exports, which forward every symbol of the imported\n 429\t # module under this file's namespace. Two shapes qualify: Rust\n 430\t # `pub use foo::*` (is_reexport) and Python/JS `from foo import *` (a\n 431\t # \"*\" imported name). The latter is how package ``__init__.py`` barrels\n 432\t # commonly re-export a subpackage \u2014 ``build_import_name_maps`` skips the\n 433\t # \"*\" name (it is not a binding), so without this pass the barrel chain\n 434\t # dead-ends one hop short of the real definition and a call through the\n 435\t # barrel resolves to nothing.\n 436\t wildcard_sources: dict[str, list[str]] = defaultdict(list)\n 437\t for path, parsed in self._parsed_files.items():\n 438\t file_syms = self._file_symbols.get(path, {})\n 439\t for imp in parsed.imports:\n 440\t is_wildcard = imp.is_reexport or \"*\" in imp.imported_names\n 441\t if not is_wildcard or not imp.resolved_file:\n 442\t continue\n 443\t if imp.resolved_file.startswith(\"external:\"):\n 444\t continue\n 445\t # ``export * as ns from \"x\"`` forwards the module under ``ns``,\n 446\t # so x's names are reachable as ``ns.name`` and are NOT this\n 447\t # file's own exports. Flattening them makes a bare ``name``\n 448\t # resolve into a nested namespace it was never in.\n 449\t if any(b.local_name == \"*\" and b.exported_name for b in imp.bindings):\n 450\t continue\n 451\t resolved = imp.resolved_file\n 452\t if resolved != path:\n 453\t wildcard_sources[path].append(resolved)\n 454\t source_syms = self._file_symbols.get(resolved, {})\n 455\t source_parsed = self._parsed_files.get(resolved)\n 456\t published = (\n 457\t (*source_syms, *source_parsed.export_aliases)\n 458\t if source_parsed\n 459\t else tuple(source_syms)\n 460\t )\n 461\t for sym_name in published:\n 462\t if sym_name not in file_syms:\n 463\t self._barrel_origins[path][sym_name] = resolved\n 464\t\n 465\t # The pass above forwards only what the source file DECLARES, so a\n 466\t # barrel over a barrel forwards nothing and the chain breaks at its\n 467\t # first link rather than its last. Forward what the source file\n 468\t # re-exports too, to a fixpoint. The multi-hop pass below cannot do\n 469\t # this job \u2014 it deepens entries that exist, and here none do.\n 470\t #\n 471\t # Sorted so that a name two of this file's barrels both forward lands on\n 472\t # the same origin whatever order the repository was walked in.\n 473\t for _ in range(4):\n 474\t changed = False\n 475\t for path, sources in sorted(wildcard_sources.items()):\n 476\t file_syms = self._file_symbols.get(path, {})\n 477\t origins = self._barrel_origins[path]\n 478\t for source in sorted(sources):\n 479\t source_bindings = self._import_bindings.get(source, {})\n 480\t for name, declaring in sorted(self._barrel_origins.get(source, {}).items()):\n 481\t if name in file_syms or name in origins or declaring == path:\n 482\t continue\n 483\t # The map keys a name as the source file spells it and\n 484\t # records only the declaring file, never the name the\n 485\t # symbol has there. A hop that renames therefore hands\n 486\t # on a key the declaring file may coincidentally\n 487\t # declare as something unrelated, and the receiving\n 488\t # file carries no binding to undo it with. Refuse those\n 489\t # rather than forward a name that means something else\n 490\t # at the far end; it costs reach, never correctness.\n 491\t binding = source_bindings.get(name)\n 492\t if binding is not None and (binding.exported_name or name) != name:\n 493\t continue\n 494\t origins[name] = declaring\n 495\t changed = True\n 496\t if not changed:\n 497\t break\n 498\t\n 499\t # Multi-hop: follow chains up to 5 hops\n 500\t for _ in range(4):\n 501\t changed = False\n 502\t for _path, origins in list(self._barrel_origins.items()):\n 503\t for name, source in list(origins.items()):\n 504\t deeper = self._barrel_origins.get(source, {}).get(name)\n 505\t if deeper and deeper != source:\n 506\t origins[name] = deeper\n 507\t changed = True\n 508\t if not changed:\n 509\t break\n 510\t\n 511\t def _get_rust_crate_src(self) -> dict[str, str]:\n 512\t \"\"\"Lazily build a mapping from normalised crate name to src/ dir.\"\"\"\n 513\t if self._rust_crate_src is not None:\n 514\t return self._rust_crate_src\n 515\t self._rust_crate_src = {}\n 516\t if not self._repo_path:\n 517\t return self._rust_crate_src\n 518\t from .resolvers.rust_workspace import get_or_build_cargo_workspace_index\n 519\t\n 520\t class _Ctx:\n 521\t def __init__(self, rp, pf):\n 522\t self.repo_path = rp\n 523\t self.parsed_files = pf\n 524\t\n 525\t ctx = _Ctx(self._repo_path, self._parsed_files)\n 526\t ws = get_or_build_cargo_workspace_index(ctx)\n 527\t if ws:\n 528\t for crate in ws.crates:\n 529\t normalized = crate.name.replace(\"-\", \"_\")\n 530\t self._rust_crate_src[normalized] = crate.src_dir\n 531\t return self._rust_crate_src\n 532\t\n 533\t def _get_go_index(self) -> Any:\n 534\t \"\"\"Lazily build the GoPackageIndex (or None if unavailable).\n 535\t\n 536\t Mirrors ``_get_rust_crate_src``: the resolver runs without a\n 537\t ``ResolverContext``, so it constructs a minimal stand-in and rebuilds\n 538\t the package index. The build is one walk over the ``.go`` files; the\n 539\t result is cached for the lifetime of the resolver.\n 540\t \"\"\"\n 541\t if self._go_index_built:\n 542\t return self._go_index\n 543\t self._go_index_built = True\n 544\t if not self._repo_path:\n 545\t return None\n 546\t from pathlib import Path\n 547\t\n 548\t from .resolvers.go_workspace import build_go_package_index\n 549\t\n 550\t class _Ctx:\n 551\t def __init__(self, rp: str, pf: dict[str, ParsedFile]) -> None:\n 552\t self.repo_path = Path(rp)\n 553\t self.path_set = set(pf.keys())\n 554\t self.sorted_paths = tuple(sorted(self.path_set))\n 555\t self.parsed_files = pf\n 556\t self.go_modules: tuple[\n[repowise#63171fe88e36: 600 lines omitted (~7951 tokens); restore: repowise expand 63171fe88e36]","start_line":197,"symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver","truncated":true,"verified":true},"get_symbol:largest-symbol":{"_meta":{"completeness":{"capped":true},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#c07e342c9b4c","repowise#6abe1e1bba89"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":8114},"replaced_tokens":25149,"response_budget":{"limit_chars":24000,"serialized_chars":22619,"tier":"default"},"state":{"truncated":true},"timing_ms":7.41,"tokens_saved":19481},"continuation":"packages/core/src/repowise/core/ingestion/call_resolver.py:847-2117","continuation_reference":{"id":"packages/core/src/repowise/core/ingestion/call_resolver.py:847-2117","kind":"file_range","path":"packages/core/src/repowise/core/ingestion/call_resolver.py","range":[847,2117],"repository":"default","source_kind":"source","verification_basis":"live"},"end_line":846,"file":"packages/core/src/repowise/core/ingestion/call_resolver.py","kind":"class","name":"CallResolver","omission_marker":"[repowise#6abe1e1bba89: 11 lines omitted (~136 tokens); restore: repowise expand 6abe1e1bba89]","qualified_name":"packages.core.src.repowise.core.ingestion.call_resolver.CallResolver","signature":"class CallResolver","source":" 247\tclass CallResolver:\n 248\t \"\"\"Resolve raw CallSites to symbol-level edges.\n 249\t\n 250\t Constructed once per ``GraphBuilder.build()`` call with the full set of\n 251\t parsed files and import edges, then driven one file at a time.\n 252\t\n 253\t ``resolve_file()`` is **not** safe to call concurrently. Several lazy\n 254\t caches are filled during resolution, and the capped ones evict wholesale.\n 255\t Every cached value is a pure function of state fixed at construction, so a\n 256\t race would cost recomputation rather than a wrong answer, but the eviction\n 257\t makes concurrent use pointless as well as unsupported.\n 258\t \"\"\"\n 259\t\n 260\t def __init__(\n 261\t self,\n 262\t parsed_files: dict[str, ParsedFile],\n 263\t import_targets: dict[str, set[str]],\n 264\t *,\n 265\t repo_path: str | None = None,\n 266\t import_maps: Any | None = None,\n 267\t heritage_parents: dict[str, set[str]] | None = None,\n 268\t return_type_chain_languages: frozenset[str] | None = None,\n 269\t ) -> None:\n 270\t # {type symbol id: parent type symbol ids}, from the caller's already\n 271\t # resolved heritage. Absent when the resolver is built standalone, in\n 272\t # which case the inherited tier simply never fires.\n 273\t self._heritage_parents: dict[str, set[str]] = heritage_parents or {}\n 274\t self._return_type_chain_languages = (\n 275\t PRODUCTION_RETURN_TYPE_CHAIN_LANGUAGES\n 276\t if return_type_chain_languages is None\n 277\t else return_type_chain_languages\n 278\t )\n 279\t self._ancestors: dict[str, tuple[str, ...]] = {}\n 280\t # Per-file symbol index: {file_path: {symbol_name: symbol_id}}\n 281\t self._file_symbols: dict[str, dict[str, str]] = {}\n 282\t\n 283\t # Per-file method index: {file_path: {(class_name, method_name): symbol_id}}\n 284\t self._file_methods: dict[str, dict[tuple[str, str], str]] = {}\n 285\t\n 286\t # Global method index: {(class_name, method_name): [(file_path, symbol_id)]}\n 287\t # in file-insertion order \u2014 replaces the trait-dispatch scan over\n 288\t # every file's method dict with one short-list lookup.\n 289\t self._global_methods: dict[tuple[str, str], list[tuple[str, str]]] = defaultdict(list)\n 290\t\n 291\t # Global symbol index: {name: [symbol_ids]} \u2014 for Tier 3\n 292\t self._global_symbols: dict[str, list[str]] = defaultdict(list)\n 293\t self._symbols_by_id = {\n 294\t symbol.id: symbol for parsed in parsed_files.values() for symbol in parsed.symbols\n 295\t }\n 296\t self._symbol_paths_by_id = {\n 297\t symbol.id: path\n 298\t for path, parsed in parsed_files.items()\n 299\t for symbol in parsed.symbols\n 300\t }\n 301\t self._overload_return_types: dict[tuple[str, str | None, str, int | None], set[str]] = (\n 302\t defaultdict(set)\n 303\t )\n 304\t for path, parsed in parsed_files.items():\n 305\t for symbol in parsed.symbols:\n 306\t raw_return = declared_return_type(symbol.signature or \"\")\n 307\t normalized = (\n 308\t normalize_return_type(raw_return, symbol.language) if raw_return else None\n 309\t )\n 310\t if normalized is not None:\n 311\t key = (\n 312\t path,\n 313\t symbol.parent_name,\n 314\t symbol.name,\n 315\t signature_parameter_count(symbol.signature or \"\"),\n 316\t )\n 317\t self._overload_return_types[key].add(normalized)\n 318\t self._known_type_names = frozenset(\n 319\t symbol.name for symbol in self._symbols_by_id.values() if symbol.kind in _TYPE_KINDS\n 320\t )\n 321\t\n 322\t # Symbols in the index above that are data members, not callables\n 323\t # Held as an id set rather than a full id->kind map: it is the only\n 324\t # kind question asked of it and the set is small.\n 325\t self._non_callable_ids: set[str] = set()\n 326\t self._property_accessor_ids: set[str] = set()\n 327\t\n 328\t # C/C++ forward declaration \u2192 the definition it declares. Populated by\n 329\t # ``_build_indices``; applied to every resolved call so the edge lands\n 330\t # on the body rather than the header line that announced it.\n 331\t self._decl_to_def: dict[str, str] = {}\n 332\t\n 333\t # Import graph: {file_path: set of imported file paths}\n 334\t self._import_targets = import_targets\n 335\t\n 336\t # Shared import-name maps (built once per GraphBuilder.build() and\n 337\t # injected; standalone construction builds them locally).\n 338\t if import_maps is None:\n 339\t from .import_index import build_import_name_maps\n 340\t\n 341\t import_maps = build_import_name_maps(parsed_files)\n 342\t # Import name mapping: {file_path: {local_name: source_file}}\n 343\t self._import_names: dict[str, dict[str, str]] = import_maps.import_names\n 344\t # Full binding data: {file_path: {local_name: NamedBinding}}\n 345\t self._import_bindings: dict[str, dict[str, NamedBinding]] = import_maps.import_bindings\n 346\t # Module alias mapping: {file_path: {alias: source_file}}\n 347\t self._module_aliases: dict[str, dict[str, str]] = import_maps.module_aliases\n 348\t\n 349\t # Lazy per-file merged views of every imported file's symbol /\n 350\t # method tables \u2014 turns the Tier-2b \"scan each imported file\"\n 351\t # loops into single dict lookups. Built on first miss per file;\n 352\t # merge order is sorted(import paths) with first-wins so shadowed\n 353\t # names resolve deterministically (the old set-iteration order was\n 354\t # hash-randomized per process).\n 355\t self._merged_import_symbols: dict[str, dict[str, str]] = {}\n 356\t self._merged_import_methods: dict[str, dict[tuple[str, str], str]] = {}\n 357\t\n 358\t # Lazy per-file set of (line, target) that also carry a receiver.\n 359\t self._member_shaped: dict[str, set[tuple[int, str]]] = {}\n 360\t\n 361\t # Receiver typing reads source text, so both caches are capped rather\n 362\t # than per-repo: files resolve one at a time, so a few slots always\n 363\t # hit, and the cap is what keeps a whole repo's source out of memory.\n 364\t # Scanning is memoised per *function*, not per reference \u2014 one scan\n 365\t # answers every unresolved receiver in a body.\n 366\t self._source_text: dict[str, str] = {}\n 367\t self._declarations: dict[str, tuple[Declaration, ...]] = {}\n 368\t self._symbol_spans: dict[str, dict[str, tuple[int, int]]] = {}\n 369\t self._body_types: dict[tuple[str, str], dict[str, str | None]] = {}\n 370\t self._field_types: dict[str, dict[str, dict[str, str | None]]] = {}\n 371\t self._bindings: dict[str, tuple[tuple[int, str], ...]] = {}\n 372\t self._bound_names: dict[tuple[str, str], frozenset[str]] = {}\n 373\t # {file: {name: type}} \u2014 module-level defs a framework decorator retyped.\n 374\t self._framework_types: dict[str, dict[str, str]] = {}\n 375\t self._external_names: dict[str, frozenset[str]] = {}\n 376\t self._repo_rebound_names: dict[str, frozenset[str]] = {}\n 377\t self._method_name_set: frozenset[str] | None = None\n 378\t self._framework_name_set: frozenset[str] | None = None\n 379\t\n 380\t # Barrel re-export origins: {barrel_file: {name: origin_file}}\n 381\t self._barrel_origins: dict[str, dict[str, str]] = defaultdict(dict)\n 382\t\n 383\t # Keep reference for cross-language checks in Tier 3\n 384\t self._parsed_files = parsed_files\n 385\t\n 386\t # Rust cross-crate resolution\n 387\t self._repo_path = repo_path\n 388\t self._rust_crate_src: dict[str, str] | None = None # lazy\n 389\t\n 390\t # Go package-scoped resolution (lazy GoPackageIndex). ``_go_index``\n 391\t # holds the built index; ``_go_index_built`` distinguishes \"not yet\n 392\t # built\" from \"built but unavailable\" (no repo_path / no go files).\n 393\t self._go_index: Any = None\n 394\t self._go_index_built = False\n 395\t\n 396\t # JVM same-package resolution (lazy JvmWorkspaceIndex)\n 397\t self._jvm_index: Any = None\n 398\t self._jvm_index_built = False\n 399\t\n 400\t # C/C++ same-target resolution (lazy CppWorkspaceIndex)\n 401\t self._cpp_index: Any = None\n 402\t self._cpp_index_built = False\n 403\t\n 404\t self._strategies_by_file: dict[str, _LanguageCallStrategies] = {}\n 405\t\n 406\t self._build_indices(parsed_files)\n 407\t self._follow_barrel_exports()\n 408\t\n 409\t def _follow_barrel_exports(self) -> None:\n 410\t \"\"\"Detect barrel/re-export files and record origin mappings.\n 411\t\n 412\t A barrel file imports a name and re-exports it without defining it\n 413\t locally (e.g., ``__init__.py`` with ``from .calculator import Calculator``).\n 414\t When downstream code imports from the barrel, we follow chains to\n 415\t find the actual defining file.\n 416\t \"\"\"\n 417\t # First pass: identify direct barrel origins\n 418\t for path, name_to_file in self._import_names.items():\n 419\t file_syms = self._file_symbols.get(path, {})\n 420\t for name, source_file in name_to_file.items():\n 421\t # An origin outside the repo names no file any reader of this\n 422\t # map can look up, and the wildcard pass below already refuses\n 423\t # one. Holding the invariant in one pass and not its twin is\n 424\t # what makes a later reader look safe when it is not.\n 425\t if name not in file_syms and not source_file.startswith(\"external:\"):\n 426\t self._barrel_origins[path][name] = source_file\n 427\t\n 428\t # Track wildcard re-exports, which forward every symbol of the imported\n 429\t # module under this file's namespace. Two shapes qualify: Rust\n 430\t # `pub use foo::*` (is_reexport) and Python/JS `from foo import *` (a\n 431\t # \"*\" imported name). The latter is how package ``__init__.py`` barrels\n 432\t # commonly re-export a subpackage \u2014 ``build_import_name_maps`` skips the\n 433\t # \"*\" name (it is not a binding), so without this pass the barrel chain\n 434\t # dead-ends one hop short of the real definition and a call through the\n 435\t # barrel resolves to nothing.\n 436\t wildcard_sources: dict[str, list[str]] = defaultdict(list)\n 437\t for path, parsed in self._parsed_files.items():\n 438\t file_syms = self._file_symbols.get(path, {})\n 439\t for imp in parsed.imports:\n 440\t is_wildcard = imp.is_reexport or \"*\" in imp.imported_names\n 441\t if not is_wildcard or not imp.resolved_file:\n 442\t continue\n 443\t if imp.resolved_file.startswith(\"external:\"):\n 444\t continue\n 445\t # ``export * as ns from \"x\"`` forwards the module under ``ns``,\n 446\t # so x's names are reachable as ``ns.name`` and are NOT this\n 447\t # file's own exports. Flattening them makes a bare ``name``\n 448\t # resolve into a nested namespace it was never in.\n 449\t if any(b.local_name == \"*\" and b.exported_name for b in imp.bindings):\n 450\t continue\n 451\t resolved = imp.resolved_file\n 452\t if resolved != path:\n 453\t wildcard_sources[path].append(resolved)\n 454\t source_syms = self._file_symbols.get(resolved, {})\n 455\t source_parsed = self._parsed_files.get(resolved)\n 456\t published = (\n 457\t (*source_syms, *source_parsed.export_aliases)\n 458\t if source_parsed\n 459\t else tuple(source_syms)\n 460\t )\n 461\t for sym_name in published:\n 462\t if sym_name not in file_syms:\n 463\t self._barrel_origins[path][sym_name] = resolved\n 464\t\n 465\t # The pass above forwards only what the source file DECLARES, so a\n 466\t # barrel over a barrel forwards nothing and the chain breaks at its\n 467\t # first link rather than its last. Forward what the source file\n 468\t # re-exports too, to a fixpoint. The multi-hop pass below cannot do\n 469\t # this job \u2014 it deepens entries that exist, and here none do.\n 470\t #\n 471\t # Sorted so that a name two of this file's barrels both forward lands on\n 472\t # the same origin whatever order the repository was walked in.\n 473\t for _ in range(4):\n 474\t changed = False\n 475\t for path, sources in sorted(wildcard_sources.items()):\n 476\t file_syms = self._file_symbols.get(path, {})\n 477\t origins = self._barrel_origins[path]\n 478\t for source in sorted(sources):\n 479\t source_bindings = self._import_bindings.get(source, {})\n 480\t for name, declaring in sorted(self._barrel_origins.get(source, {}).items()):\n 481\t if name in file_syms or name in origins or declaring == path:\n 482\t continue\n 483\t # The map keys a name as the source file spells it and\n 484\t # records only the declaring file, never the name the\n 485\t # symbol has there. A hop that renames therefore hands\n 486\t # on a key the declaring file may coincidentally\n 487\t # declare as something unrelated, and the receiving\n 488\t # file carries no binding to undo it with. Refuse those\n 489\t # rather than forward a name that means something else\n 490\t # at the far end; it costs reach, never correctness.\n 491\t binding = source_bindings.get(name)\n 492\t if binding is not None and (binding.exported_name or name) != name:\n 493\t continue\n 494\t origins[name] = declaring\n 495\t changed = True\n 496\t if not changed:\n 497\t break\n 498\t\n 499\t # Multi-hop: follow chains up to 5 hops\n 500\t for _ in range(4):\n 501\t changed = False\n 502\t for _path, origins in list(self._barrel_origins.items()):\n 503\t for name, source in list(origins.items()):\n 504\t deeper = self._barrel_origins.get(source, {}).get(name)\n 505\t if deeper and deeper != source:\n 506\t origins[name] = deeper\n 507\t changed = True\n 508\t if not changed:\n 509\t break\n 510\t\n 511\t def _get_rust_crate_src(self) -> dict[str, str]:\n 512\t \"\"\"Lazily build a mapping from normalised crate name to src/ dir.\"\"\"\n 513\t if self._rust_crate_src is not None:\n 514\t return self._rust_crate_src\n 515\t self._rust_crate_src = {}\n 516\t if not self._repo_path:\n 517\t return self._rust_crate_src\n 518\t from .resolvers.rust_workspace import get_or_build_cargo_workspace_index\n 519\t\n 520\t class _Ctx:\n 521\t def __init__(self, rp, pf):\n 522\t self.repo_path = rp\n 523\t self.parsed_files = pf\n 524\t\n 525\t ctx = _Ctx(self._repo_path, self._parsed_files)\n 526\t ws = get_or_build_cargo_workspace_index(ctx)\n 527\t if ws:\n 528\t for crate in ws.crates:\n 529\t normalized = crate.name.replace(\"-\", \"_\")\n 530\t self._rust_crate_src[normalized] = crate.src_dir\n 531\t return self._rust_crate_src\n 532\t\n 533\t def _get_go_index(self) -> Any:\n 534\t \"\"\"Lazily build the GoPackageIndex (or None if unavailable).\n 535\t\n 536\t Mirrors ``_get_rust_crate_src``: the resolver runs without a\n 537\t ``ResolverContext``, so it constructs a minimal stand-in and rebuilds\n 538\t the package index. The build is one walk over the ``.go`` files; the\n 539\t result is cached for the lifetime of the resolver.\n 540\t \"\"\"\n 541\t if self._go_index_built:\n 542\t return self._go_index\n 543\t self._go_index_built = True\n 544\t if not self._repo_path:\n 545\t return None\n 546\t from pathlib import Path\n 547\t\n 548\t from .resolvers.go_workspace import build_go_package_index\n 549\t\n 550\t class _Ctx:\n 551\t def __init__(self, rp: str, pf: dict[str, ParsedFile]) -> None:\n 552\t self.repo_path = Path(rp)\n 553\t self.path_set = set(pf.keys())\n 554\t self.sorted_paths = tuple(sorted(self.path_set))\n 555\t self.parsed_files = pf\n 556\t self.go_modules: tuple[tuple[str, str], ...] = ()\n 557\t self.go_module_path: str | None = None\n 558\t\n 559\t self._go_index = build_go_package_index(_Ctx(self._repo_path, self._parsed_files))\n 560\t return self._go_index\n 561\t\n 562\t def _strategies_for(self, file_path: str) -> _LanguageCallStrategies:\n 563\t \"\"\"The extra strategies this file's language gets.\"\"\"\n 564\t parsed = self._parsed_files.get(file_path)\n 565\t language = parsed.file_info.language if parsed else \"\"\n 566\t return _LANGUAGE_CALL_STRATEGIES.get(language, _NO_LANGUAGE_STRATEGIES)\n 567\t\n 568\t def _get_cpp_index(self) -> Any:\n 569\t \"\"\"Lazily build a CppWorkspaceIndex via a minimal stand-in context.\"\"\"\n 570\t if self._cpp_index_built:\n 571\t return self._cpp_index\n 572\t self._cpp_index_built = True\n 573\t if not self._repo_path:\n 574\t return None\n 575\t from pathlib import Path\n 576\t\n 577\t from .resolvers.cpp_workspace import build_cpp_workspace_index\n 578\t\n 579\t class _Ctx:\n 580\t def __init__(self, rp: str, pf: dict[str, ParsedFile]) -> None:\n 581\t self.repo_path = Path(rp)\n 582\t self.path_set = set(pf.keys())\n 583\t self.sorted_paths = tuple(sorted(self.path_set))\n 584\t self.parsed_files = pf\n 585\t self.stem_map: dict[str, list[str]] = {}\n 586\t\n 587\t self._cpp_index = build_cpp_workspace_index(_Ctx(self._repo_path, self._parsed_files))\n 588\t return self._cpp_index\n 589\t\n 590\t def _collapse_declarations(self, sym_ids: list[str]) -> set[str]:\n 591\t \"\"\"Fold each declaration onto the definition it was paired with.\n 592\t\n 593\t Two ids naming one symbol must not read as an ambiguity.\n 594\t \"\"\"\n 595\t return {self._decl_to_def.get(sym_id, sym_id) for sym_id in sym_ids}\n 596\t\n 597\t def _resolve_cpp_scoped_call(\n 598\t self,\n 599\t file_path: str,\n 600\t call: CallSite,\n 601\t caller_id: str,\n 602\t ) -> ResolvedCall | None:\n 603\t \"\"\"Resolve ``Qualifier::name()`` against the class the qualifier names.\n 604\t\n 605\t The qualifier is written at the call site, so this infers nothing: the\n 606\t repository either declares ``Qualifier::name`` or it does not. Before\n 607\t it existed only the leaf name survived ex\n[repowise#c07e342c9b4c: 600 lines omitted (~7978 tokens); restore: repowise expand c07e342c9b4c]","start_line":247,"symbol_id":"packages/core/src/repowise/core/ingestion/call_resolver.py::CallResolver","truncated":true,"verified":true},"get_why:targets":{"_meta":{"completeness":{"capped":true,"reason":"construction_cap","shown":23,"total":173},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#c3d5b15fafd9","repowise#9f8533616584","repowise#5e41015972a5","repowise#9fcc901ca410"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":39053},"response_budget":{"limit_chars":24000,"serialized_chars":22762,"tier":"default"},"state":{"truncated":true}},"alignment":{"active_count":0,"candidate_count":0,"deprecated_count":0,"explanation":"No architectural decisions govern packages/core/src/repowise/core/ingestion/call_resolver.py. This file is ungoverned \u2014 it may be an outlier or simply undocumented.","governing_count":0,"score":"none","sibling_coverage":null,"stale_count":0},"answer_basis":"episode","code_rationale":[{"comment":"Three-tier call resolution engine for the symbol-level dependency graph. Resolves CallSite objects (extracted from AST) to concrete symbol node IDs in the graph, producing CALLS edges with confidence scores. Resolution tiers (checked in order, first match wins): Tier 1 \u2014 Same-file exact match (confidence 0.95) The call target matches a symbol defined in the same file. Tier 2 \u2014 Import-scoped match (confidence 0.90) The call target matches a symbol in a file that the caller imports, optionally scoped by the specific imported names. Tier 3 \u2014 Global unique match (confidence 0.50) The call target matches exactly one symbol across the entire codebase. Only fires when the match is unambiguous to avoid false edges. Each resolved call produces a (source_id, target_id, confidence, origin) tuple that the GraphBuilder converts into a CALLS edge. The tiers above are the headline three; ``ResolutionOrigin`` in ``models`` is the full set, one name per strategy, and it is what the edge carries.","evidence_refs":[{"content_id":"e7b6b95c70b3f8749c12","id":"ev_30e9f5f0c3b34b452e8c","kind":"file_content","line":1,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[1,12],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[1,12],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"Languages where a call the caller's own class cannot answer is looked for on its ancestors. Both shapes \u2014 an explicit ``self``/``this`` receiver and an implicit one \u2014 end in the same walk. C++ is absent because its heritage binds a qualified external parent to a same-named local type, which puts unrelated siblings in one hierarchy before this walk even runs. Java is absent because `java.scm`'s bare-call pattern also matches `this.field.m()`, which no receiver-carrying pattern claims, so such a call arrives here indistinguishable from a real implicit receiver \u2014 and its measured population on two Java repos was zero, so the tier could only cost. C# is present, and was once wrongly removed: a name's overloads all share one symbol id, so a declaration line read back out of the graph names an arbitrary overload. That reads as a wrong target and is not one \u2014 the id these calls resolve to is the id C# binds.","evidence_refs":[{"content_id":"e4551f6a4120417a9ac1","id":"ev_4c7480bb5b6fcc223188","kind":"file_content","line":71,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[71,82],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[71,82],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"Languages where a bare name is scoped lexically: it can only mean the caller's own module, an explicit ``import``, or the prelude. Elixir's ``alias`` / ``require`` / ``use`` bind a module name, never a function name, so repo-wide uniqueness is no evidence and only wildcard imports may merge names. F# is the same rule with different spelling: a bare name means the enclosing scope, a module the file has ``open``ed, or FSharp.Core, and nothing else -- a name unique across the repo is not thereby in scope.","evidence_refs":[{"content_id":"279bc93ec731b668214a","id":"ev_925a17bc0fec5d8f2f7e","kind":"file_content","line":89,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[89,95],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[89,95],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"What a language resolves that the language-neutral tiers cannot. ``free`` runs after the same-file tier and before the import tiers; ``member`` runs before every receiver strategy; ``member_fallback`` runs after all of them, so a strategy there only ever sees a call nothing else claimed and can only add an edge. All three stop at the first hit. Strategies are named rather than bound so a probe can substitute one.","evidence_refs":[{"content_id":"fa671bfea3e99da6733e","id":"ev_edb4dc3ce42f43aa3355","kind":"file_content","line":108,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[108,115],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[108,115],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"},{"comment":"Kinds that can never be the callee of a call, used to keep the bare-name Tier 3 index from offering a data member as a function. This is deliberately NOT the complement of ``_FUNCTION_KINDS``. Measured over the corpus, plenty of non-function kinds are legitimately called: ``class`` is a constructor in python/java/c#/typescript; ``variable`` is both a rust tuple ``enum_variant`` (309 grounded call edges on goose) and a typescript const whose initialiser is not syntactically a function, such as a factory result or a ``.bind()`` handle (2,173 on zod); ``type_alias`` is a Go conversion. Denying by function-ness would delete thousands of real edges. ``property`` is the one kind in the whole of ``language_configs.py`` that means \"data member\" and nothing else: it is emitted by exactly one mapping, rust's ``field_declaration``. Every other language spells its fields ``variable``, which is why this fix cannot be extended to them \u2014 there a field is indistinguishable from a callable value by kind alone.","evidence_refs":[{"content_id":"8ac00a8632e2a7726d77","id":"ev_603ed9ddc8822602b80c","kind":"file_content","line":132,"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale","range":[132,143],"repository":"default","source":"live_code_rationale","source_kind":"code_comment","verification":"exact","verification_basis":"live"}],"lines":[132,143],"matched_terms":[],"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","provenance":"extracted_rationale"}],"code_rationale_emitted":5,"code_rationale_omitted":49,"code_rationale_reduced_reason":"construction_cap","code_rationale_total":54,"code_rationale_truncated":true,"decisions":[],"episodes":[{"evidence":"commit 0cbe36f70f0d, 2026-08-30, changed 10 files together","evidence_refs":[{"commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","id":"ev_0c1fdfbf06526d42573a","kind":"commit","provenance":"historical","repository":"default","source":"episode","source_kind":"episode","verification_basis":"historical"}],"kind":"code_fix","provenance":"historical","recorded":"fix(dead-code): detect JSX prop-guard dead code (#1554) (#1570)","scope":["packages/core/src/repowise/core/analysis/dead_code/analyzer.py","packages/core/src/repowise/core/analysis/dead_code/jsx_prop_guards.py","packages/core/src/repowise/core/ingestion/call_resolver.py","packages/core/src/repowise/core/ingestion/graph/_rehydrate.py","packages/core/src/repowise/core/ingestion/graph/_resolvers.py","packages/core/src/repowise/core/ingestion/models.py","packages/core/src/repowise/core/ingestion/parser.py","tests/unit/dead_code/_helpers.py","tests/unit/dead_code/test_jsx_prop_guard_dead_code.py","tests/unit/ingestion/test_graph_rehydrate.py"],"still_true":"recorded 2026-08-30 at 0cbe36f70f0d; 10 commits have touched its scope since","subject":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","tier":"git"}],"episodes_emitted":1,"episodes_omitted":20,"episodes_reduced_reason":"construction_cap_and_response_budget","episodes_total":21,"episodes_truncated":true,"git_archaeology":{"cross_references":[],"file_commits":[{"author":"Contributor 19","date":"2026-09-04T18:15:43+00:00","evidence_refs":[{"commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","id":"ev_a42e829967a6e860c041","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:file_commits","source_kind":"archaeology:file_commits","verification_basis":"historical"}],"message":"feat(languages): parse F# to a full AST and move it to Good (#2133)","provenance":"historical","sha":"9af0b5f9"}],"file_commits_emitted":1,"file_commits_omitted":33,"file_commits_reduced_reason":"construction_cap_and_response_budget","file_commits_total":34,"file_commits_truncated":true,"git_log":[{"author":"Contributor 19","commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","date":"2026-09-04","evidence_refs":[{"commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","id":"ev_a42e829967a6e860c041","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(languages): parse F# to a full AST and move it to Good (#2133)","provenance":"historical","sha":"9af0b5f9ca65","source":"git_log_follow"},{"author":"Contributor 19","commit":"01e50e2f8475888541745fcbb0d40dd016f77476","date":"2026-09-04","evidence_refs":[{"commit":"01e50e2f8475888541745fcbb0d40dd016f77476","id":"ev_39e60b3a5fcdf4065a36","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(languages): parse Elixir to a full AST and move it to Good (#2127)","provenance":"historical","sha":"01e50e2f8475","source":"git_log_follow"},{"author":"Contributor 20","commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","date":"2026-08-30","evidence_refs":[{"commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","id":"ev_0c1fdfbf06526d42573a","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(dead-code): detect JSX prop-guard dead code (#1554) (#1570)","provenance":"historical","sha":"0cbe36f70f0d","source":"git_log_follow"},{"author":"Contributor 19","commit":"58403ddb69490d0d605ad93b3d6a94d61aadbb51","date":"2026-08-26","evidence_refs":[{"commit":"58403ddb69490d0d605ad93b3d6a94d61aadbb51","id":"ev_a162f4fe7b64b188a5a7","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(ingestion): refuse a data member on the import-merged tier (#1925)","provenance":"historical","sha":"58403ddb6949","source":"git_log_follow"},{"author":"Contributor 19","commit":"f97ced7a4c7badf3879921b8d42c900753695ce6","date":"2026-08-25","evidence_refs":[{"commit":"f97ced7a4c7badf3879921b8d42c900753695ce6","id":"ev_4b18c964f408fa622c84","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(ingestion): resolve a call to an overload set instead of refusing it (#1923)","provenance":"historical","sha":"f97ced7a4c7b","source":"git_log_follow"},{"author":"Contributor 19","commit":"127e0f1ec4aab7033c5ef1139a0762b1d50a15ac","date":"2026-08-25","evidence_refs":[{"commit":"127e0f1ec4aab7033c5ef1139a0762b1d50a15ac","id":"ev_90dca2153133ec4557c0","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(ingestion): extract C++ in-class method declarations (#1921)","provenance":"historical","sha":"127e0f1ec4aa","source":"git_log_follow"},{"author":"Contributor 19","commit":"0c9faff85da640782783e1f9a1371f1c257ce5aa","date":"2026-08-25","evidence_refs":[{"commit":"0c9faff85da640782783e1f9a1371f1c257ce5aa","id":"ev_c5df10bf3bef8ae640b5","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"feat(ingestion): type C++ receivers from their declarations (#1919)","provenance":"historical","sha":"0c9faff85da6","source":"git_log_follow"},{"author":"Contributor 19","commit":"354269f101dd81be3a681e1e122c17d4b8c81bbc","date":"2026-08-25","evidence_refs":[{"commit":"354269f101dd81be3a681e1e122c17d4b8c81bbc","id":"ev_df55cb0a222f001ebcd4","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(ingestion): resolve C++ scoped calls against their qualifier (#1915)","provenance":"historical","sha":"354269f101dd","source":"git_log_follow"},{"author":"Contributor 19","commit":"08e493b8f932296fc572def1873a6431b3023404","date":"2026-08-23","evidence_refs":[{"commit":"08e493b8f932296fc572def1873a6431b3023404","id":"ev_d3d093332515aa05cb6e","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(graph): a java chain rooted at an external type is not a bare-name call (#1897)","provenance":"historical","sha":"08e493b8f932","source":"git_log_follow"},{"author":"Contributor 19","commit":"330ad6fa13caa842d816b836349bcbe6403e5c79","date":"2026-08-23","evidence_refs":[{"commit":"330ad6fa13caa842d816b836349bcbe6403e5c79","id":"ev_1acf1dcd8778ada4188b","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(graph): stop the repo-wide receiver tier answering for foreign types (#1893)","provenance":"historical","sha":"330ad6fa13ca","source":"git_log_follow"},{"author":"Contributor 19","commit":"d7bd394ca894e0cd68ed2fd429a8c3fa9ff34c5a","date":"2026-08-23","evidence_refs":[{"commit":"d7bd394ca894e0cd68ed2fd429a8c3fa9ff34c5a","id":"ev_a47485b7ddc68ba5486d","kind":"commit","provenance":"historical","repository":"default","source":"archaeology:git_log","source_kind":"archaeology:git_log","verification_basis":"historical"}],"message":"fix(graph): a rust macro invocation is not a function call (#1885)","provenance":"historical","sha":"d7bd394ca894","source":"git_log_follow"}],"git_log_emitted":11,"git_log_omitted":19,"git_log_reduced_reason":"construction_cap_and_response_budget","git_log_total":30,"git_log_truncated":true,"provenance":"historical","summary":"No architectural decisions found for packages/core/src/repowise/core/ingestion/call_resolver.py, but git archaeology recovered 34 direct commit(s), 0 cross-reference(s), and 30 git log result(s). Review these to understand the intent behind this code.","triggered":true},"mode":"path","omission_marker":"[repowise#9fcc901ca410: 369 lines omitted (~2722 tokens); restore: repowise expand 9fcc901ca410]","origin_story":{"age_days":20,"author_commit_pct":0.9412,"available":true,"contributors":[{"commit_count":32,"email":"[email protected]","first_commit_ts":1786882824,"last_commit_ts":1788545743,"name":"Contributor 19"},{"commit_count":1,"email":"[email protected]","first_commit_ts":1788086763,"last_commit_ts":1788086763,"name":"Contributor 20"},{"commit_count":1,"email":"[email protected]","first_commit_ts":1787414540,"last_commit_ts":1787414540,"name":"Contributor 23"}],"first_commit":"2026-08-16","key_commits":[{"author":"Contributor 19","body":"tree-sitter-fsharp 0.3.11 replaces the regex tier for .fs and .fsx.\nModules, namespaces, let bindings including each `and` continuation,\nrecords, unions, classes, interfaces, members and exceptions become\nsymbols; `///` comments become docstrings; `inherit` and\n`interface ... with` become heritage edges. Signature files stay on the\nimport-only path: one grammar per language cannot select the signature\ngrammar, and the implementation grammar mis-parses them.\n\nImports keep the existing resolver and its .fsproj compile-order leg;\n`open` now carries the wildcard sentinel, which is what it means. A bare\nname in F# is lexically scoped, so the resolver refuses the global-unique\ntier for it and merges names only through `open`; an uppercase unqualified\ncallee is a union case or constructor, not a call site.\n\nA registry-parity test pins that every non-passthrough language has a\ngrammar, a query file and a config, and a pipeline-worker test drives the\nreal parse entry point over a .fs file.\n\nNo health markers yet. Docs","date":"2026-09-04T18:15:43+00:00","evidence_refs":[{"commit":"9af0b5f9ca6564bf23be01c50828ad49e25ef060","id":"ev_a42e829967a6e860c041","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"feat(languages): parse F# to a full AST and move it to Good (#2133)","pr_number":2133,"provenance":"historical","sha":"9af0b5f9"},{"author":"Contributor 19","body":"tree-sitter-elixir 0.3.5 replaces the regex tier for .ex and .exs.\ndefmodule, def, defp, defmacro, defguard, defdelegate and defprotocol\nbecome symbols, defimpl becomes an impl symbol named for the module the\ncompiler generates, and @doc / @moduledoc become docstrings. Every one\nof those is a call node in this grammar, so the kind, the parent module\nand the definition-head filter are read from the call's target keyword\nin four small language-gated blocks beside the Pascal and Dart ones.\n\nImports keep the existing resolver: alias, import, require and use yield\none import per named module, including each member of alias Foo.{Bar,\nBaz}, and the resolver's reach is unchanged. Call edges resolve within a\nmodule and through receivers. A bare name in Elixir is lexically scoped,\nso the resolver refuses the global-unique tier for it and merges names\nonly from wildcard imports; alias, require and use bind a module name,\nnever a function name.\n\nNo heritage edges (use and @behaviour are not inheritance) and no health\nmar","date":"2026-09-04T15:42:58+00:00","evidence_refs":[{"commit":"01e50e2f8475888541745fcbb0d40dd016f77476","id":"ev_39e60b3a5fcdf4065a36","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"feat(languages): parse Elixir to a full AST and move it to Good (#2127)","pr_number":2127,"provenance":"historical","sha":"01e50e2f"},{"author":"Contributor 20","date":"2026-08-30T10:46:03+00:00","evidence_refs":[{"commit":"0cbe36f70f0db2dfeddf23d56960506f8872deb6","id":"ev_0c1fdfbf06526d42573a","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"fix(dead-code): detect JSX prop-guard dead code (#1554) (#1570)","pr_number":1554,"provenance":"historical","sha":"0cbe36f7"},{"author":"Contributor 19","date":"2026-08-25T18:42:09+00:00","evidence_refs":[{"commit":"58403ddb69490d0d605ad93b3d6a94d61aadbb51","id":"ev_a162f4fe7b64b188a5a7","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"fix(ingestion): refuse a data member on the import-merged tier (#1925)","pr_number":1925,"provenance":"historical","sha":"58403ddb"},{"author":"Contributor 19","body":"`_global_symbols` holds one entry per declaration, so a method written as\nan overload set is several rows under one symbol id. Tier 3's\nglobal-unique rung gated on `len(candidates) == 1` and read that as an\nambiguity that does not exist: C#'s `AddRetry` is two rows and one\nsymbol, and the call reached nothing.\n\nCollapsing by symbol id is not the candidate filtering this rung already\nrefuses on purpose. A name that a field and a method both declare still\nhas two distinct ids and stays refused.\n\nThe collapsed answer is tried after the implicit-receiver tier rather\nthan in place of the row count. Ahead of it, it answered sites the\ncaller's own class hierarchy already answered, moving 1,027 edges in one\nrepository off `enclosing_inherited` at 0.90 confidence onto this rung at\n0.50 for the same target. Behind it, it can only add an edge.\n\nA getter and its setter are also two declarations under one id, which\nmade an attribute look like a unique callable and bound a local\n`router(...)` parameter invocation to it. Re","date":"2026-08-25T16:53:58+00:00","evidence_refs":[{"commit":"f97ced7a4c7badf3879921b8d42c900753695ce6","id":"ev_4b18c964f408fa622c84","kind":"commit","provenance":"historical","repository":"default","source":"origin","source_kind":"origin","verification_basis":"historical"}],"message":"fix(ingestion): resolve a call to an overload set instead of refusing it (#1923)","pr_number":1923,"provenance":"historical","sha":"f97ced7a"}],"key_commits_emitted":5,"key_commits_omitted":29,"key_commits_reduced_reason":"construction_cap","key_commits_total":34,"key_commits_truncated":true,"last_commit":"2026-09-04","linked_decisions":[],"primary_author":"Contributor 19","provenance":"historical","summary":"Created ~2026-08-16, last modified 2026-09-04 (20 days old). Primary author: Contributor 19 (34 total commits). Earliest key commit: \"fix(cpp): attach a call edge to the definition, not the header declaration (#1626)\" by Contributor 19 on 2026-08-16T12:20:24+00:00. Contributors: Contributor 19, Contributor 20, Contributor 23.","total_commits":34},"path":"packages/core/src/repowise/core/ingestion/call_resolver.py","truncated":true},"list_repos:default":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"response_budget":{"limit_chars":24000,"serialized_chars":462,"tier":"default"}},"default_repo":"default","hint":"This MCP server is serving a single repo; omit repo unless a tool asks for it.","repos":[{"absolute_path":"/repo","alias":"default","is_default":true,"path":"/repo"}],"workspace":false,"workspace_root":null},"search_codebase:limit-5":{"_meta":{"completeness":{"capped":false},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","replaced_tokens":2000,"response_budget":{"limit_chars":24000,"serialized_chars":3288,"tier":"default"},"tokens_saved":1162},"candidates":[{"path":"packages/server/src/repowise/server/schemas/repository.py"},{"path":"packages/api-client/src/types/repository.ts"},{"path":"packages/core/src/repowise/core/persistence/crud/repository.py"},{"path":"packages/core/src/repowise/core/persistence/_interfaces/_meta.py"},{"path":"packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py"}],"results":[{"confidence_score":1.0,"page_type":"file_page","relevance_score":3.958,"snippet":"# packages/server/src/repowise/server/schemas/repository.py\n\n## Overview\n\nRepository request/response models.\n\nIt exposes 9 public symbols and depends on 2 other files.\n\n## Public API\n\n| Symbol | Kind","sources":["fts","vector"],"target_path":"packages/server/src/repowise/server/schemas/repository.py","title":"File: packages/server/src/repowise/server/schemas/repository.py"},{"confidence_score":1.0,"page_type":"file_page","relevance_score":3.951,"snippet":"# packages/api-client/src/types/repository.ts\n\n## Overview\n\nTypes module repository defining RepoCreate, RepoUpdate, RepoResponse. `packages/api-client/src/types/repository.ts` is a typescript source","sources":["fts","vector"],"target_path":"packages/api-client/src/types/repository.ts","title":"File: packages/api-client/src/types/repository.ts"},{"confidence_score":0.94,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","page_type":"symbol_spotlight","relevance_score":3.727,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.upsert_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estim","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.upsert_repository"},{"confidence_score":0.67,"page_type":"file_page","relevance_score":2.647,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_meta.py\n\n## Overview\n\nIndexStore mixin: repository, generation jobs, pages, chat, webhooks.\n\nThis mixin covers the \"meta\" surface \u2014 the top-l","sources":["fts"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_meta.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_meta.py"},{"confidence_score":0.66,"page_type":"file_page","relevance_score":2.601,"snippet":"# packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py\n\n## Overview\n\nIndex `wiki_symbols` on `(repository_id, file_path)`.\n\nEvery file-scoped symbol lookup joins on this pair, but the o","sources":["fts"],"target_path":"packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py","title":"File: packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py"}]},"search_codebase:limit-50":{"_meta":{"completeness":{"capped":true,"reason":"response_budget","shown":19,"total":100},"contract_version":1,"embedder_degraded":false,"index_age_days":0,"indexed_commit":"920d1c973d64","omitted":{"refs":["repowise#1cb22af443b7","repowise#5fe350551fca"],"restore":"Run `repowise expand <ref>` from the repo, or call get_symbol(\"repowise#<ref>\", query=...) to retrieve the omitted content.","tokens":6176},"replaced_tokens":5600,"response_budget":{"limit_chars":24000,"serialized_chars":12869,"tier":"default"},"state":{"truncated":true},"targets":["packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py","packages/core/src/repowise/core/persistence/_interfaces/_meta.py","packages/server/src/repowise/server/schemas/repository.py","packages/api-client/src/types/repository.ts","packages/core/src/repowise/core/workspace/repo_index.py","packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/workspace/repo_index.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py","packages/core/src/repowise/core/pipeline/full_index.py","packages/core/src/repowise/core/persistence/_interfaces/_analysis.py","packages/core/src/repowise/core/persistence/models.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/stores/_sql_meta.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/crud/git.py","packages/core/src/repowise/core/persistence/crud/repository.py","packages/core/src/repowise/core/persistence/_interfaces/index_store.py"],"tokens_saved":2296},"candidates_emitted":0,"candidates_reduced_reason":"response_budget","candidates_total":50,"omission_marker":"[repowise#5fe350551fca: 273 lines omitted (~3223 tokens); restore: repowise expand 5fe350551fca]","results":[{"confidence_score":1.0,"page_type":"file_page","relevance_score":4.345,"snippet":"# packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py\n\n## Overview\n\nIndex `graph_nodes` on `(repository_id, node_type)`.\n\n`node_type == \"file\"` is the most-issued predicate on this tabl","sources":["fts","vector"],"target_path":"packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py","title":"File: packages/core/alembic/versions/0051_graph_nodes_repo_type_index.py"},{"confidence_score":0.99,"page_type":"file_page","relevance_score":4.298,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_meta.py\n\n## Overview\n\nIndexStore mixin: repository, generation jobs, pages, chat, webhooks.\n\nThis mixin covers the \"meta\" surface \u2014 the top-l","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_meta.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_meta.py"},{"confidence_score":0.92,"page_type":"file_page","relevance_score":3.983,"snippet":"# packages/server/src/repowise/server/schemas/repository.py\n\n## Overview\n\nRepository request/response models.\n\nIt exposes 9 public symbols and depends on 2 other files.\n\n## Public API\n\n| Symbol | Kind","sources":["fts","vector"],"target_path":"packages/server/src/repowise/server/schemas/repository.py","title":"File: packages/server/src/repowise/server/schemas/repository.py"},{"confidence_score":0.92,"page_type":"file_page","relevance_score":3.977,"snippet":"# packages/api-client/src/types/repository.ts\n\n## Overview\n\nTypes module repository defining RepoCreate, RepoUpdate, RepoResponse. `packages/api-client/src/types/repository.ts` is a typescript source","sources":["fts","vector"],"target_path":"packages/api-client/src/types/repository.ts","title":"File: packages/api-client/src/types/repository.ts"},{"confidence_score":0.91,"file":"packages/core/src/repowise/core/workspace/repo_index.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/workspace/repo_index.py::open_repo_index","page_type":"symbol_spotlight","relevance_score":3.951,"snippet":"# packages.core.src.repowise.core.workspace.repo_index.open_repo_index\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/workspace/repo_index.py` | **Estimated complexity:","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/workspace/repo_index.py::open_repo_index","target_path":"packages/core/src/repowise/core/workspace/repo_index.py","title":"Symbol: packages.core.src.repowise.core.workspace.repo_index.open_repo_index"},{"confidence_score":0.87,"page_type":"file_page","relevance_score":3.801,"snippet":"# packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py\n\n## Overview\n\nIndex `wiki_symbols` on `(repository_id, file_path)`.\n\nEvery file-scoped symbol lookup joins on this pair, but the o","sources":["fts","vector"],"target_path":"packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py","title":"File: packages/core/alembic/versions/0046_wiki_symbols_repo_path_index.py"},{"confidence_score":0.86,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","page_type":"symbol_spotlight","relevance_score":3.75,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.upsert_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estim","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::upsert_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.upsert_repository"},{"confidence_score":0.75,"page_type":"file_page","relevance_score":3.246,"snippet":"# packages/core/src/repowise/core/workspace/repo_index.py\n\n## Overview\n\nRead-only index access for the cross-repo hooks.\n\nThe hooks run immediately after ingestion writes each repo's\n`.repowise/wiki.d","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/workspace/repo_index.py","title":"File: packages/core/src/repowise/core/workspace/repo_index.py"},{"confidence_score":0.74,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::get_repository","page_type":"symbol_spotlight","relevance_score":3.225,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.get_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estimate","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::get_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.get_repository"},{"confidence_score":0.73,"page_type":"file_page","relevance_score":3.183,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py\n\n## Overview\n\nIndexStore mixin: relational graph rows, external systems, symbols.\n\nThe \"graph records\" surface of `IndexStor","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_graph_records.py"},{"confidence_score":0.71,"page_type":"file_page","relevance_score":3.082,"snippet":"# packages/core/src/repowise/core/pipeline/full_index.py\n\n## Overview\n\nFull index-only pipeline run + persistence for a single repo.\n\nThe \"index this repo from scratch\" step shared by `repowise worksp","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/pipeline/full_index.py","title":"File: packages/core/src/repowise/core/pipeline/full_index.py"},{"confidence_score":0.71,"page_type":"file_page","relevance_score":3.069,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/_analysis.py\n\n## Overview\n\nIndexStore mixin: git metadata, dead code, decisions, health, coverage.\n\nThe \"analysis\" surface of IndexStore \u2014 any","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/_analysis.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/_analysis.py"},{"confidence_score":0.66,"file":"packages/core/src/repowise/core/persistence/models.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/models.py::Repository","page_type":"symbol_spotlight","relevance_score":2.875,"snippet":"# Repository\n\n**Kind:** class | **Defined in:** `packages/core/src/repowise/core/persistence/models.py` | **Estimated complexity:** 1\n\n```\nclass Repository\n```\n\n## Overview\n\n`Repository` is a class de","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/models.py::Repository","target_path":"packages/core/src/repowise/core/persistence/models.py","title":"Symbol: packages/core/src/repowise/core/persistence/models.py::Repository"},{"confidence_score":0.65,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::delete_repository","page_type":"symbol_spotlight","relevance_score":2.831,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.delete_repository\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estim","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::delete_repository","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.delete_repository"},{"confidence_score":0.65,"page_type":"file_page","relevance_score":2.827,"snippet":"ore/src/repowise/core/persistence/stores/_sql_meta.py\n\n## Overview\n\nMeta-domain delegations for `SqlIndexStore`.\n\nEach method here is a one-to-one delegation to `crud`. Split out from\n`sql_index_store","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/stores/_sql_meta.py","title":"File: packages/core/src/repowise/core/persistence/stores/_sql_meta.py"},{"confidence_score":0.65,"page_type":"file_page","relevance_score":2.817,"snippet":"# packages/core/src/repowise/core/persistence/crud/repository.py\n\n## Overview\n\nCRUD operations for the repository domain (repowise persistence layer).\n\nSplit out of the former monolithic `crud.py`; `c","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"File: packages/core/src/repowise/core/persistence/crud/repository.py"},{"confidence_score":0.64,"page_type":"file_page","relevance_score":2.76,"snippet":"| --- | --- | --- |\n| `upsert_git_metadata` | function | async def upsert_git_metadata(session, *, repository_id, file_path, **kwargs) -> GitMetadata |\n| `get_git_metadata` | function | async def get","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/crud/git.py","title":"File: packages/core/src/repowise/core/persistence/crud/git.py"},{"confidence_score":0.63,"file":"packages/core/src/repowise/core/persistence/crud/repository.py","page_id":"symbol_spotlight:packages/core/src/repowise/core/persistence/crud/repository.py::list_page_ids","page_type":"symbol_spotlight","relevance_score":2.735,"snippet":"# packages.core.src.repowise.core.persistence.crud.repository.list_page_ids\n\n**Kind:** function (async) | **Defined in:** `packages/core/src/repowise/core/persistence/crud/repository.py` | **Estimated","sources":["fts","vector"],"symbol_id":"packages/core/src/repowise/core/persistence/crud/repository.py::list_page_ids","target_path":"packages/core/src/repowise/core/persistence/crud/repository.py","title":"Symbol: packages.core.src.repowise.core.persistence.crud.repository.list_page_ids"},{"confidence_score":0.62,"page_type":"file_page","relevance_score":2.673,"snippet":"# packages/core/src/repowise/core/persistence/_interfaces/index_store.py\n\n## Overview\n\nIndexStore \u2014 aggregate pluggable CRUD facade.\n\n`IndexStore` combines three domain mixins:\n\n- `MetaIndexStore` (re","sources":["fts","vector"],"target_path":"packages/core/src/repowise/core/persistence/_interfaces/index_store.py","title":"File: packages/core/src/repowise/core/persistence/_interfaces/index_store.py"}],"results_emitted":19,"results_reduced_reason":"response_budget","results_total":50,"truncated":true}}\ No newline at end of filediff --git a/tests/fixtures/mcp/tool_response_shapes.json b/tests/fixtures/mcp/tool_response_shapes.jsonindex 303b65115..2675de91d 100644--- a/tests/fixtures/mcp/tool_response_shapes.json+++ b/tests/fixtures/mcp/tool_response_shapes.json@@ -672,6 +672,9 @@"arguments": {"opportunity_id": null},+ "cli": null,+ "mcp": null,+ "purpose": null,"tool": null},"target": {@@ -697,6 +700,9 @@"arguments": {"opportunity_id": null},+ "cli": null,+ "mcp": null,+ "purpose": null,"tool": null},"target": {@@ -981,7 +987,21 @@"plan_state_total": null},"materialized_model_version": null,- "next_call": null,+ "next_call": {+ "arguments": {+ "include": [+ null+ ],+ "limit": null,+ "only": [+ null+ ]+ },+ "cli": null,+ "mcp": null,+ "purpose": null,+ "tool": null+ },"performance_model_version": null,"repository_total": null,"status": null,@@ -1150,7 +1170,21 @@"step_count": null},"mechanical_steps_total": null,- "next_call": null,+ "next_call": {+ "arguments": {+ "include": [+ null+ ],+ "limit": null,+ "only": [+ null+ ]+ },+ "cli": null,+ "mcp": null,+ "purpose": null,+ "tool": null+ },"opportunities_total": null,"refactoring_model_version": null,"status": null,@@ -1332,7 +1366,366 @@"tokens": null}},+ "directive": {+ "breaking_changes": [],+ "breaking_changes_truncated": null,+ "conformance_violations": [],+ "coverage_analysis": {+ "changed_files_total": null,+ "changed_files_with_measured_tests": null,+ "changed_files_without_measured_tests": null,+ "freshness": {+ "indexed_commit": null,+ "ingested_commit": null,+ "reason": null,+ "status": null+ },+ "ingested_at": null,+ "map_present": null,+ "pair_count": null,+ "reason": null,+ "source_file_count": null,+ "source_format": null,+ "status": null,+ "test_count": null+ },+ "cross_repo_relationship_analysis": {+ "reason": null,+ "status": null+ },+ "dependency_cycles": [],+ "files_without_measured_tests": [+ null+ ],+ "governance_risk": [],+ "may_break": [+ null+ ],+ "may_break_emitted": null,+ "may_break_omitted": null,+ "may_break_reduced_reason": null,+ "may_break_tests": [+ null+ ],+ "may_break_tests_emitted": null,+ "may_break_tests_omitted": null,+ "may_break_tests_reduced_reason": null,+ "may_break_tests_total": null,+ "may_break_tests_truncated": null,+ "may_break_total": null,+ "may_break_truncated": null,+ "missing_cochanges": [+ null+ ],+ "missing_cochanges_emitted": null,+ "missing_cochanges_omitted": null,+ "missing_cochanges_reduced_reason": null,+ "missing_cochanges_total": null,+ "missing_cochanges_truncated": null,+ "missing_cross_repo_cochanges": [],+ "missing_cross_repo_cochanges_emitted": null,+ "missing_cross_repo_cochanges_total": null,+ "missing_cross_repo_cochanges_truncated": null,+ "missing_tests": [],+ "missing_tests_emitted": null,+ "missing_tests_omitted": null,+ "missing_tests_semantics": null,+ "missing_tests_total": null,+ "missing_tests_truncated": null,+ "next_calls": [+ {+ "arguments": {},+ "cli": null,+ "mcp": null,+ "purpose": null,+ "tool": null+ }+ ],+ "summary": null,+ "test_analysis": {+ "basis_categories": [+ null+ ],+ "degraded": null,+ "partial": null,+ "stale": null,+ "status": null+ },+ "test_inference_analysis": {+ "candidates_before_dedup": null,+ "changed_files_total": null,+ "changed_files_with_candidates": null,+ "reason": null,+ "status": null+ },+ "test_recommendations": [+ {+ "basis": null,+ "evidence": [+ {+ "basis": null,+ "source_file": null,+ "via": null+ }+ ],+ "test_id": null+ }+ ],+ "test_recommendations_emitted": null,+ "test_recommendations_omitted": null,+ "test_recommendations_repository": null,+ "test_recommendations_repository_id": null,+ "test_recommendations_total": null,+ "test_recommendations_truncated": null,+ "test_unknown_files": [],+ "tests_to_run": [+ null+ ],+ "tests_to_run_basis": null,+ "tests_to_run_emitted": null,+ "tests_to_run_kind": null,+ "tests_to_run_omitted": null,+ "tests_to_run_total": null,+ "tests_to_run_truncated": null,+ "will_break_consumers": [],+ "will_break_consumers_deprecated": null,+ "will_break_consumers_emitted": null,+ "will_break_consumers_semantics": null,+ "will_break_consumers_total": null,+ "will_break_consumers_truncated": null+ },"omission_marker": null,+ "pr_blast_radius": {+ "cochange_warnings": [+ {+ "changed": null,+ "direction": null,+ "evidence_kind": null,+ "missing_partner": null,+ "provenance": null,+ "relationship_type": null,+ "score": null,+ "support": null+ }+ ],+ "cochange_warnings_emitted": null,+ "cochange_warnings_total": null,+ "cochange_warnings_truncated": null,+ "cochange_warnings_truncated_total": null,+ "guarding_tests": {+ "analysis": {+ "basis_categories": [+ null+ ],+ "degraded": null,+ "partial": null,+ "stale": null,+ "status": null+ },+ "basis": null,+ "by_file": {+ "<path>": [+ null+ ]+ },+ "coverage": {+ "changed_files_total": null,+ "changed_files_with_measured_tests": null,+ "changed_files_without_measured_tests": null,+ "freshness": {+ "indexed_commit": null,+ "ingested_commit": null,+ "reason": null,+ "status": null+ },+ "ingested_at": null,+ "map_present": null,+ "pair_count": null,+ "reason": null,+ "source_file_count": null,+ "source_format": null,+ "status": null,+ "test_count": null+ },+ "inference": {+ "candidates_before_dedup": null,+ "changed_files_total": null,+ "changed_files_with_candidates": null,+ "reason": null,+ "status": null+ },+ "map_present": null,+ "tests_to_run": [+ null+ ],+ "tests_to_run_emitted": null,+ "tests_to_run_total": null,+ "tests_to_run_truncated": null,+ "tests_to_run_with_basis": [+ {+ "bases": [+ null+ ],+ "basis": null,+ "evidence": [+ {+ "basis": null,+ "source_file": null,+ "source_format": null,+ "via": null+ }+ ],+ "repository": null,+ "repository_id": null,+ "source_files": [+ null+ ],+ "test_file": null,+ "test_id": null+ }+ ]+ },+ "overall_risk_score": null,+ "overall_risk_score_compatibility": {+ "deprecated": null,+ "equivalent_value": null,+ "historical_meaning": null,+ "replacement": null+ },+ "recommended_reviewers": [+ {+ "email": null,+ "files": null,+ "ownership_pct": null+ }+ ],+ "recommended_reviewers_emitted": null,+ "recommended_reviewers_total": null,+ "recommended_reviewers_truncated": null,+ "structural_impact_band": null,+ "structural_impact_scale": {+ "authoritative_for_change_review": null,+ "band_thresholds": {+ "broad": null,+ "moderate": null+ },+ "calibration": {+ "status": null+ },+ "field": null,+ "kind": null,+ "measures": null,+ "range": {+ "maximum": null,+ "minimum": null+ },+ "runtime_breakage_probability": null,+ "unit": null+ },+ "structural_impact_score": null,+ "test_gaps": [+ null+ ],+ "test_gaps_emitted": null,+ "test_gaps_total": null,+ "test_gaps_truncated": null,+ "test_impact": {+ "analysis": {+ "basis_categories": [+ null+ ],+ "degraded": null,+ "partial": null,+ "stale": null,+ "status": null+ },+ "coverage": {+ "changed_files_total": null,+ "changed_files_with_measured_tests": null,+ "changed_files_without_measured_tests": null,+ "freshness": {+ "indexed_commit": null,+ "ingested_commit": null,+ "reason": null,+ "status": null+ },+ "ingested_at": null,+ "map_present": null,+ "pair_count": null,+ "reason": null,+ "source_file_count": null,+ "source_format": null,+ "status": null,+ "test_count": null+ },+ "deleted_files": [],+ "files": [+ {+ "change_status": null,+ "head_present": null,+ "inferred_tests": [+ null+ ],+ "inferred_tests_total": null,+ "measured_tests": [],+ "measured_tests_total": null,+ "source_file": null,+ "status": null+ }+ ],+ "files_total": null,+ "files_without_measured_tests": [+ null+ ],+ "inference": {+ "candidates_before_dedup": null,+ "changed_files_total": null,+ "changed_files_with_candidates": null,+ "reason": null,+ "status": null+ },+ "recommendations": [+ {+ "basis": null,+ "evidence": [+ {+ "basis": null,+ "source_file": null,+ "via": null+ }+ ],+ "test_id": null+ }+ ],+ "recommendations_by_primary_basis": {+ "inferred": null,+ "measured": null+ },+ "recommendations_emitted": null,+ "recommendations_omitted": null,+ "recommendations_repository": null,+ "recommendations_repository_id": null,+ "recommendations_total": null,+ "recommendations_truncated": null,+ "unknown_files": []+ },+ "transitive_affected": [+ {+ "claim": null,+ "depth": null,+ "direct": null,+ "direction": null,+ "distance": null,+ "evidence_kind": null,+ "path": null,+ "runtime_breakage_claim": null+ }+ ],+ "transitive_affected_emitted": null,+ "transitive_affected_total": null,+ "transitive_affected_truncated": null,+ "transitive_affected_truncated_total": null+ },"targets": {"packages/core/src/repowise/core/ingestion/call_resolver.py": {"bus_factor": null,diff --git a/tests/unit/analysis/test_next_call.py b/tests/unit/analysis/test_next_call.pynew file mode 100644index 000000000..69bb2f7a1--- /dev/null+++ b/tests/unit/analysis/test_next_call.py@@ -0,0 +1,93 @@+"""``render_call`` reproduces, byte for byte, the call lines the action rules+used to write by hand, so moving them to ``tool`` + ``arguments`` changed no+``mcp`` string."""++from __future__ import annotations++import pytest++from repowise.core.analysis.next_call import ActionCommand, render_call++_PATHS = ["src/a.py", "src/b.py", "src/c.py"]+_SHA = "0123456789abcdef0123456789abcdef01234567"+++def _old_list(items: list[str]) -> str:+ return "[" + ", ".join(f'"{i}"' for i in items) + "]"+++# (tool, arguments, the f-string the rule used to build)+_SITES = [+ # code.py: fresh regressions+ (+ "get_health",+ {"targets": _PATHS[:10], "include": ["biomarkers"]},+ f'get_health(targets={_old_list(_PATHS[:10])}, include=["biomarkers"])',+ ),+ ("get_change_risk", {"revspec": _SHA}, f'get_change_risk(revspec="{_SHA}")'),+ (+ "get_context",+ {"targets": ["src/a.py"], "include": ["skeleton", "callers"]},+ 'get_context(targets=["src/a.py"], include=["skeleton", "callers"])',+ ),+ # code.py: fragile file+ ("get_risk", {"targets": ["src/a.py"]}, 'get_risk(targets=["src/a.py"])'),+ (+ "get_health",+ {"targets": ["src/a.py"], "include": ["biomarkers"]},+ 'get_health(targets=["src/a.py"], include=["biomarkers"])',+ ),+ # code.py: fix concentration+ ("get_risk", {"targets": _PATHS[:5]}, f"get_risk(targets={_old_list(_PATHS[:5])})"),+ ("get_why", {"targets": ["src/"]}, 'get_why(targets=["src/"])'),+ # code.py: fix first+ ("get_health", {"fix_id": "fix1_abc"}, 'get_health(fix_id="fix1_abc")'),+ # hygiene.py: live secret, broken doc refs, dead code, stale decision+ (+ "get_context",+ {"targets": ["src/a.py"], "include": ["callers"]},+ 'get_context(targets=["src/a.py"], include=["callers"])',+ ),+ (+ "get_context",+ {"targets": ["docs/x.md"], "include": ["doc_drift"]},+ 'get_context(targets=["docs/x.md"], include=["doc_drift"])',+ ),+ ("get_dead_code", {"safe_only": True}, "get_dead_code(safe_only=True)"),+ ("get_why", {"id": "dec_1"}, 'get_why(id="dec_1")'),+]++[email protected](("tool", "arguments", "expected"), _SITES)+def test_render_call_matches_the_hand_written_line(tool, arguments, expected) -> None:+ assert render_call(tool, arguments) == expected+ command = ActionCommand.call("p", tool, arguments)+ assert command.mcp == expected+ assert command.as_dict() == {+ "purpose": "p",+ "mcp": expected,+ "cli": None,+ "tool": tool,+ "arguments": arguments,+ }+++def test_render_call_literals() -> None:+ assert render_call("get_change_risk") == "get_change_risk()"+ assert (+ render_call("t", {"n": 6, "x": 1.5, "off": False, "none": None, "m": {"k": ["v"]}})+ == 't(n=6, x=1.5, off=False, none=None, m={"k": ["v"]})'+ )+ assert render_call("t", {"q": 'say "hi"'}) == 't(q="say \\"hi\\"")'+++def test_a_hand_written_command_keeps_its_old_wire_shape() -> None:+ assert ActionCommand("p", mcp="m").as_dict() == {"purpose": "p", "mcp": "m", "cli": None}+++def test_a_command_hashes_and_equal_commands_hash_equal() -> None:+ a = ActionCommand.call("p", "get_health", {"targets": ["a.py"], "include": ["biomarkers"]})+ b = ActionCommand.call("p", "get_health", {"targets": ["a.py"], "include": ["biomarkers"]})+ assert a == b+ assert hash(a) == hash(b)+ assert len({a, b, ActionCommand("p", mcp="m")}) == 2diff --git a/tests/unit/server/mcp/test_health.py b/tests/unit/server/mcp/test_health.pyindex ed1627a30..1bef8d380 100644--- a/tests/unit/server/mcp/test_health.py+++ b/tests/unit/server/mcp/test_health.py@@ -2356,6 +2356,10 @@ async def test_every_growing_collection_has_total_and_emitted_counts(if not isinstance(value, dict):returnfor key, child in value.items():+ if key == "arguments":+ # A next call's keyword arguments: a count there would be an argument.+ assert not any(k.endswith(("_total", "_emitted")) for k in child), child+ continueif isinstance(child, list):assert f"{key}_total" in value, keyassert f"{key}_emitted" in value, keydiff --git a/tests/unit/server/mcp/test_performance_levels.py b/tests/unit/server/mcp/test_performance_levels.pyindex 766d22983..b055abb68 100644--- a/tests/unit/server/mcp/test_performance_levels.py+++ b/tests/unit/server/mcp/test_performance_levels.py@@ -125,7 +125,8 @@ async def test_the_summary_rolls_up_and_names_the_next_call(setup_mcp, materialiassert summary["actionability"].get("plan_ready", 0) == 0assert summary["with_plan_total"] == 2assert summary["analyzed_commit"] == "c" * 40- assert "get_health" in summary["next_call"]+ assert summary["next_call"]["tool"] == "get_health"+ assert summary["next_call"]["arguments"]["only"] == ["performance_opportunities"]assert len(json.dumps(summary)) <= 3000diff --git a/tests/unit/server/mcp/test_risk.py b/tests/unit/server/mcp/test_risk.pyindex ec3e20e20..66e49efa8 100644--- a/tests/unit/server/mcp/test_risk.py+++ b/tests/unit/server/mcp/test_risk.py@@ -177,6 +177,22 @@ async def test_get_risk_pr_directive_splits_test_breakage(setup_mcp):assert set(RISK_RELATED_FILE_KEYS) <= set(directive)+async def test_get_risk_pr_directive_names_its_next_calls(setup_mcp):+ """The diff first, then the callers of what may break; tests_to_run gets no call."""+ from repowise.server.mcp_server import get_risk++ result = await get_risk(["src/auth/service.py"], changed_files=["src/auth/service.py"])+ directive = result["directive"]+ diff, callers = directive["next_calls"]++ assert diff["mcp"] == "get_change_risk()"+ assert diff["cli"] == "repowise risk"+ assert callers["tool"] == "get_context"+ assert callers["arguments"] == {"targets": directive["may_break"][:5], "include": ["callers"]}+ assert callers["mcp"].startswith('get_context(targets=["')++@pytest.mark.asyncioasync def test_get_risk_changed_files_alone_is_pr_mode(setup_mcp):"""The documented get_risk(changed_files=[...]) call assesses the changed set."""diff --git a/tests/unit/server/test_refactoring_opportunities.py b/tests/unit/server/test_refactoring_opportunities.pyindex 293bf01e0..c81038a90 100644--- a/tests/unit/server/test_refactoring_opportunities.py+++ b/tests/unit/server/test_refactoring_opportunities.py@@ -513,7 +513,8 @@ async def test_the_summary_rolls_up_by_type_effort_and_classification(client, apassert summary["mechanical_steps_total"] + summary["judgment_steps_total"] == 6assert summary["addresses_primary_problem"]["yes"] == 6assert "facets" in summary- assert "refactoring_opportunities" in summary["next_call"]+ assert summary["next_call"]["arguments"]["only"] == ["refactoring_opportunities"]+ assert "refactoring_opportunities" in summary["next_call"]["mcp"]@pytest.mark.asynciodiff --git a/tests/unit/server/test_wire_vocabulary_parity.py b/tests/unit/server/test_wire_vocabulary_parity.pyindex b4259ac16..a41f82dba 100644--- a/tests/unit/server/test_wire_vocabulary_parity.py+++ b/tests/unit/server/test_wire_vocabulary_parity.py@@ -126,3 +126,33 @@ def test_agent_prompt_flavors_match_python() -> None:match = re.search(rf"export type {alias} =(.*?);", text, re.DOTALL)assert match, f"{alias} is not declared in {module}"assert set(re.findall(r'"([a-z-]+)"', match.group(1))) == set(FLAVORS), alias++++def _interface_body(name: str, module: str) -> str:+ """The text between `export interface <name> {` and its closing brace."""+ text = (_TYPES_SRC / module).read_text(encoding="utf-8")+ match = re.search(rf"export interface {name} \{{\n(.*?)\n\}}", text, re.DOTALL)+ assert match, f"{name} is not declared in {module}"+ return match.group(1)+++def _interface_fields(name: str, module: str) -> set[str]:+ return set(re.findall(r"^ (\w+)\??:", _interface_body(name, module), re.MULTILINE))+++def test_next_call_shapes_match_python() -> None:+ """One "what to call next" shape: actions, Fix first, get_health pillars and+ the get_risk directive all carry it, so its fields are pinned on both ends."""+ from dataclasses import fields++ from repowise.core.analysis.actions.model import WhyFact+ from repowise.core.analysis.health.fix_first.model import FixItem+ from repowise.core.analysis.next_call import ActionCommand++ assert _interface_fields("ActionCommand", "actions.ts") == {f.name for f in fields(ActionCommand)}+ assert _interface_fields("ActionWhy", "actions.ts") == {f.name for f in fields(WhyFact)}+ assert {f.name: f.type for f in fields(FixItem)}["next_call"] == "ActionCommand"+ for name in ("FixItem", "FixItemCompact"):+ body = _interface_body(name, "fix-first.ts")+ assert re.search(r"^ next_call: ActionCommand;", body, re.MULTILINE), name