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(answer): cite the files the answer names and hold high when it leaves the top hit (#4202)
Raghav Chamadiya6caa9654fe22
diff --git a/packages/server/src/repowise/server/mcp_server/tool_answer/answer.py b/packages/server/src/repowise/server/mcp_server/tool_answer/answer.pyindex 23ac994e3..8f046032f 100644--- a/packages/server/src/repowise/server/mcp_server/tool_answer/answer.py+++ b/packages/server/src/repowise/server/mcp_server/tool_answer/answer.py@@ -133,6 +133,7 @@ from repowise.server.mcp_server.tool_answer.callers import (is_caller_question,is_impact_question,)+from repowise.server.mcp_server.tool_answer.citations import answer_filesfrom repowise.server.mcp_server.tool_answer.confidence import (_agreement_dominant,_grade_answer,@@ -587,13 +588,11 @@ async def _graded_payload() -> tuple[dict, str, list[str]]:"""Grade the synthesized answer and build its payload: ``(payload, confidence, citations)``."""hits = retrieved.hits- citations = [- h["target_path"] for h in hits if h.get("target_path") and h["target_path"] in answer_text- ]- if not citations:- # Top-2 retrieval paths, so the agent always has something to verify.- citations = fallback_targets[:2]- quotes = build_quotes(hits, answer_text)+ cited = answer_files(+ answer_text, hits, retrieved.resolved_pool, fallback_targets, _repo_root(ask.ctx)+ )+ citations = cited.citations+ quotes = [q for q in build_quotes(hits, answer_text) if q["path"] not in cited.ruled_out]# ``served_named_body``: the question-named symbol's live body is inlined and# carries what was asked, so the response is content-grounded even when# synthesis hedges.@@ -615,6 +614,7 @@ async def _graded_payload(served_named_body=served_named_body,dominance=dominance,uncovered=uncovered,+ lead_off_top=cited.drops_top_hit(hits, answer_text),)payload = await build_synthesized_payload(question=ask.question,diff --git a/packages/server/src/repowise/server/mcp_server/tool_answer/citations.py b/packages/server/src/repowise/server/mcp_server/tool_answer/citations.pynew file mode 100644index 000000000..7b99aa433--- /dev/null+++ b/packages/server/src/repowise/server/mcp_server/tool_answer/citations.py@@ -0,0 +1,114 @@+"""The files a synthesized answer rests on, read from the answer itself.++Synthesis also sees the structured prelude and caller graph, which name files+no hit carries, and an answer can dismiss a hit ("X does not compute it").+"""++from __future__ import annotations++import re+from dataclasses import dataclass+from pathlib import Path++_PATH_RE = re.compile(r"(?<![\w./-])((?:[\w.-]+/)*[\w.-]*\w\.[A-Za-z0-9]{1,6})(?![\w/])")++# A dismissal next to a path ("not in X", "X is not where ..."); a negated+# description ("X has no backoff") explains a cause and rules nothing out.+# Ceiling: "X does not handle it" still reads as a dismissal.+_NEG_BEFORE_RE = re.compile(+ r"(?:\bnot\s+(?:in|from|by|inside)|\brather\s+than|\binstead\s+of|\boutside(?:\s+of)?|"+ r"\bother\s+than)\s+(?:the\s+)?(?:file\s+)?[`'\"(]*$",+ re.IGNORECASE,+)+_NEG_AFTER_RE = re.compile(+ r"^[`'\")]*\s*(?:\([^)]{0,40}\)\s*)?(?:itself\s+|also\s+|only\s+)?"+ r"(?:does\s+not|doesn't|is\s+not|isn't|never)\s+(?:\w+\s+){0,3}?"+ r"(?:it|this|that|them|where|responsible|involved)\b",+ re.IGNORECASE,+)+++@dataclass(frozen=True)+class AnswerFiles:+ """``citations``: the files the answer rests on, in the order it names them.+ ``ruled_out``: files the answer says are not the answer. ``named``: whether+ the answer named any file, rather than the citations being the fallback."""++ citations: list[str]+ ruled_out: frozenset[str]+ named: bool++ def drops_top_hit(self, hits: list[dict], answer_text: str) -> str | None:+ """The file the answer names first when it rules out or never names the top hit.++ Dominance was measured on the top hit, so its grade does not vouch for+ an answer resting elsewhere. Any mention of its file name counts.+ """+ top = hits[0].get("target_path") if hits else None+ if not (self.named and top) or top in self.citations:+ return None+ if top not in self.ruled_out and re.search(+ rf"(?<![\w.-]){re.escape(top.rsplit('/', 1)[-1])}(?!\w)", answer_text+ ):+ return None+ return self.citations[0]+++def _is_ruled_out(text: str, start: int, end: int) -> bool:+ before = text[max(0, start - 40) : start]+ after = text[end : end + 60]+ return bool(_NEG_BEFORE_RE.search(before) or _NEG_AFTER_RE.search(after))+++def _resolve(named: str, hit_paths: list[str], known: list[str], repo_root: Path | None) -> str | None:+ """``named`` as an indexed path: exact, a unique suffix of one, or a live file.+ A bare file name resolves only to the one hit that carries it."""+ named = named.removeprefix("./")+ if ".." in named.split("/"):+ return None+ if "/" not in named:+ same = [p for p in hit_paths if p.rsplit("/", 1)[-1] == named]+ return same[0] if len(same) == 1 else None+ if named in known:+ return named+ suffixed = [k for k in known if k.endswith("/" + named)]+ if len(suffixed) == 1:+ return suffixed[0]+ if repo_root is not None:+ try:+ if (repo_root / named).is_file():+ return named+ except OSError:+ return None+ return None+++def answer_files(+ answer_text: str,+ hits: list[dict],+ pool: list[dict],+ fallback_targets: list[str],+ repo_root: Path | None,+) -> AnswerFiles:+ """The files ``answer_text`` names, minus the ones it rules out.++ A path resolves against the hits, the ranked pool, then the checkout, so an+ invented path is never cited. A file named positively anywhere stays cited.+ With nothing named, the top two fallback targets not ruled out are cited.+ """+ hit_paths = [h["target_path"] for h in hits if h.get("target_path")]+ known = list(dict.fromkeys(hit_paths + [h["target_path"] for h in pool if h.get("target_path")]))+ mentions = [+ (path, _is_ruled_out(answer_text, m.start(1), m.end(1)))+ for m in _PATH_RE.finditer(answer_text or "")+ if (path := _resolve(m.group(1), hit_paths, known, repo_root))+ ]+ named = [p for p, _ in mentions] + [+ h["target_path"] for h in hits if h.get("target_path") and h["target_path"] in answer_text+ ]+ ruled = {p for p, neg in mentions if neg} - {p for p, neg in mentions if not neg}+ citations = [p for p in dict.fromkeys(named) if p not in ruled]+ if citations:+ return AnswerFiles(citations, frozenset(ruled), named=True)+ fallback = [p for p in fallback_targets if p not in ruled][:2] or fallback_targets[:2]+ return AnswerFiles(fallback, frozenset(ruled), named=False)diff --git a/packages/server/src/repowise/server/mcp_server/tool_answer/confidence.py b/packages/server/src/repowise/server/mcp_server/tool_answer/confidence.pyindex dd42327a0..1ce5a64b2 100644--- a/packages/server/src/repowise/server/mcp_server/tool_answer/confidence.py+++ b/packages/server/src/repowise/server/mcp_server/tool_answer/confidence.py@@ -709,6 +709,8 @@ class _Grade(NamedTuple):withheld_implicated: list[str]lookup_body_truncated: boolnamed_body_cut: dict | None+ #: The file the answer leads with when it cites files but not the top hit.+ lead_off_top: str | None = None@dataclass@@ -734,6 +736,7 @@ class _GradeState:lookup_body_truncated: bool = Falsenamed_body_cut: dict | None = Nonegap: list[str] = field(default_factory=list)+ lead_off_top: str | None = Nonedef _earned_high(@@ -811,6 +814,15 @@ def _citation_gate(s: _GradeState) -> None:s.confidence = "medium"+def _named_file_gate(s: _GradeState) -> None:+ """The answer cites files but not the top hit dominance was measured on.+ Kept only when it demotes, so the note never blames it for another gate's grade."""+ if s.confidence != "high":+ s.lead_off_top = None+ elif s.lead_off_top:+ s.confidence = "medium"++def _claim_gate(s: _GradeState) -> None:"""A why/how answer naming a code-like mechanism term retrieval never showed.@@ -894,6 +906,7 @@ _GRADE_GATES = (_identifier_gate,_value_gate,_citation_gate,+ _named_file_gate,_claim_gate,_exclusivity_gate,_withheld_gate,@@ -914,6 +927,7 @@ def _grade_answer(served_named_body: bool,dominance: str | None,uncovered: list[str] | None = None,+ lead_off_top: str | None = None,) -> _Grade:"""Grade the synthesised answer through the gate cascade, in order.@@ -924,6 +938,7 @@ def _grade_answer(``dominance`` is :func:`dominance_reason`'s verdict, computed once by thecaller and used for the starting grade, the ceiling, and the note's reason.``uncovered`` is :func:`uncovered_terms`, when the caller already has it.+ ``lead_off_top`` is ``AnswerFiles.drops_top_hit``."""dominant = dominance is not Nonetop_score = _confidence_score(hits[0]) if hits else 0.0@@ -947,6 +962,7 @@ def _grade_answer(earn_high=earn_high,uncovered=uncovered,confidence=start,+ lead_off_top=lead_off_top,)for gate in _GRADE_GATES:gate(s)@@ -969,4 +985,5 @@ def _grade_answer(withheld_implicated=s.withheld_implicated,lookup_body_truncated=s.lookup_body_truncated,named_body_cut=s.named_body_cut,+ lead_off_top=s.lead_off_top,)diff --git a/packages/server/src/repowise/server/mcp_server/tool_answer/payload.py b/packages/server/src/repowise/server/mcp_server/tool_answer/payload.pyindex 94448b797..66d6820cf 100644--- a/packages/server/src/repowise/server/mcp_server/tool_answer/payload.py+++ b/packages/server/src/repowise/server/mcp_server/tool_answer/payload.py@@ -720,6 +720,12 @@ async def _graded_payload(payload["next_action_hint"] = (f"call get_symbol id='{cut['continuation']}' for the rest of {cut['name']}")+ elif grade.lead_off_top:+ payload["note"] = (+ f"The answer names {grade.lead_off_top} first and not the top retrieval hit "+ "the confidence was measured on. Held at medium; confirm against that file."+ )+ payload["next_action_hint"] = f"Read {grade.lead_off_top} to confirm the answer."elif grade.uncovered:payload["note"] = (f"Coverage gate: the top source does not mention {', '.join(grade.uncovered[:4])}, "diff --git a/tests/fixtures/mcp/grade_answer_cases.json b/tests/fixtures/mcp/grade_answer_cases.jsonindex ead41e2aa..0b9cf5cd1 100644--- a/tests/fixtures/mcp/grade_answer_cases.json+++ b/tests/fixtures/mcp/grade_answer_cases.json@@ -1,38 +1,38 @@[-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 2.5, "second_score": 1.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default timeout is 30 seconds (pkg/a.py:12).", "citations": ["pkg/c.py"], "dominance": "abs_gap", "hits": [{"score": 2.5, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "timeout = 30", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "Why is MAX_RETRIES 5?", "question_ids": ["MAX_RETRIES"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 0.2, "top_score": 0.2, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": null, "hits": [{"score": 0.2, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 30], "name": "parse_config", "truncated": false, "withheld_symbols": []}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}, "ratio": 1.25, "second_score": 1.0, "top_score": 1.25, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/d.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": 0.5, "score": 2.5, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 1.0, "top_score": 1.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default timeout is 30 seconds (pkg/a.py:12).", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": null, "hits": [{"_confidence_score_factor": -1, "score": 1.0, "snippet": "timeout = 30", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 151], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": Infinity, "second_score": 0.0, "top_score": 0.2, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"score": 0.2, "snippet": "", "target_path": "pkg/a.py"}], "question": "Where is the cache written?", "question_ids": [], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 129], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": ["cache"]}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 5.0, "second_score": 0.8, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": "ratio", "hits": [{"score": 4.0, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/b.py"}, {"_confidence_score_factor": 0.5, "score": 1.0, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}, {"score": 2.5, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/d.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "timeout = 30", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 21], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.25, "second_score": 1.6, "top_score": 2.0, "uncovered": ["cache"], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/a.py", "pkg/b.py"], "dominance": null, "hits": [{"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "timeout = 30", "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": 1.0, "score": 0.2, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": true, "symbol_bodies": [], "uncovered": ["cache"]}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.5625, "second_score": 1.6, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "FooBar uses retry_loop because HiddenThing_v2 requires it.", "citations": [], "dominance": "agreement", "hits": [{"score": 2.5, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": 0.5, "score": 1.0, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["RateLimiter"], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 2.5, "second_score": 1.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": null, "hits": [{"score": 2.5, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}], "question": "Why is MAX_RETRIES 5?", "question_ids": ["MAX_RETRIES"], "served_named_body": true, "symbol_bodies": [], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 1.6, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/b.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": -1, "score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": true, "symbol_bodies": [], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "high", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": "ratio", "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.6, "second_score": 2.5, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "Scheduler starts 4 workers via spawn_pool in pkg/a.py.", "citations": ["pkg/d.py", "pkg/a.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": 1.0, "score": 4.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 2.5, "snippet": "", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "", "target_path": "pkg/c.py"}], "question": "parse_config", "question_ids": [], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 151], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": ["4"], "withheld_implicated": []}, "kwargs": {"answer_text": "Scheduler starts 4 workers via spawn_pool in pkg/a.py.", "citations": ["pkg/a.py", "pkg/b.py"], "dominance": null, "hits": [], "question": "How many workers does Scheduler start?", "question_ids": [], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "Scheduler", "truncated": true, "withheld_symbols": []}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 4.0, "second_score": 1.0, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "retry_loop calls _validate( before writing; see pkg/a.py.", "citations": ["pkg/d.py"], "dominance": "ratio", "hits": [{"score": 4.0, "snippet": "Scheduler", "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"score": 1.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, {"continuation": null, "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 20.0, "second_score": 0.2, "top_score": 4.0, "uncovered": [], "ungrounded_values": ["7"], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/d.py"], "dominance": "agreement", "hits": [{"score": 4.0, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.6, "second_score": 1.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/b.py", "pkg/d.py"], "dominance": "ratio", "hits": [{"score": 1.6, "snippet": "timeout = 30", "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.25, "second_score": 1.6, "top_score": 2.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/b.py", "pkg/d.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 4.0, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}, {"score": 0.2, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/d.py"}, {"score": 1.6, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "parse_config", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/d.py"], "dominance": null, "hits": [], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 30], "name": "Scheduler", "truncated": false, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": "agreement", "hits": [], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.5625, "second_score": 1.6, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/c.py", "pkg/d.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": -1, "score": 2.5, "snippet": "", "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}, {"score": 1.6, "snippet": "Scheduler", "target_path": "pkg/d.py"}, {"score": 4.0, "snippet": "", "target_path": "pkg/a.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 21], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 2.5, "second_score": 1.6, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": -1, "score": 4.0, "snippet": "", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 30], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": true, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 1.6, "second_score": 1.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/b.py"], "dominance": null, "hits": [{"score": 1.6, "snippet": "timeout = 30", "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": Infinity, "second_score": 0.0, "top_score": 4.0, "uncovered": [], "ungrounded_values": ["30", "7"], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/b.py"], "dominance": "abs_gap", "hits": [{"score": 4.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 21], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 2.5, "second_score": 1.0, "top_score": 2.5, "uncovered": ["default", "retry", "loop"], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "retry_loop calls _validate( before writing; see pkg/a.py.", "citations": ["pkg/b.py", "pkg/d.py"], "dominance": "ratio", "hits": [{"score": 2.5, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": Infinity, "second_score": 0.0, "top_score": 2.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/c.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "workers = 4 spawn_pool", "target_path": "pkg/a.py"}], "question": "retry_loop _validate", "question_ids": [], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, {"continuation": null, "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "high", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": "agreement", "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.625, "second_score": 4.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/b.py", "pkg/a.py"], "dominance": "agreement", "hits": [{"score": 2.5, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 4.0, "snippet": "", "target_path": "pkg/b.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}, {"score": 1.0, "snippet": "workers = 4 spawn_pool", "target_path": "pkg/d.py"}, {"score": 4.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.05, "second_score": 4.0, "top_score": 0.2, "uncovered": [], "ungrounded_values": ["4"], "withheld_implicated": []}, "kwargs": {"answer_text": "Scheduler starts 4 workers via spawn_pool in pkg/a.py.", "citations": ["pkg/a.py", "pkg/d.py"], "dominance": null, "hits": [{"score": 0.2, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 4.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "target_path": "pkg/c.py"}, {"score": 0.2, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/d.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": []}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 0.8, "second_score": 2.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": ["30"], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default timeout is 30 seconds (pkg/a.py:12).", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 1.6, "snippet": "Scheduler", "target_path": "pkg/c.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["MAX_RETRIES", "RateLimiter"], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.8, "second_score": 2.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": -1, "score": 1.6, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 0.2, "snippet": "timeout = 30", "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": ["cache"]}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": ["30", "7"], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": [], "dominance": null, "hits": [], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": false, "withheld_symbols": []}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": null, "hits": [], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}, {"continuation": null, "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["RateLimiter"], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 1.0, "second_score": 2.5, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/b.py"], "dominance": "abs_gap", "hits": [{"_confidence_score_factor": -1, "score": 2.5, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "Scheduler", "truncated": false, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, "ratio": Infinity, "second_score": 0.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [1, 120], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["_validate"], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.6, "second_score": 2.5, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "retry_loop calls _validate( before writing; see pkg/a.py.", "citations": ["pkg/a.py", "pkg/d.py"], "dominance": null, "hits": [{"score": 4.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 1.6, "snippet": "", "symbols": [{"_matched": true, "name": "parse_config", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 30], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, {"continuation": null, "lines": [10, 30], "name": "Scheduler", "truncated": true, "withheld_symbols": []}], "uncovered": ["cache"]}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 1.6, "top_score": 1.6, "uncovered": [], "ungrounded_values": ["7"], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/d.py"], "dominance": "abs_gap", "hits": [{"score": 1.6, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 1.5625, "second_score": 1.6, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": 1.0, "score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, {"continuation": null, "lines": [10, 129], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},-{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 1.28, "second_score": 1.25, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/b.py"], "dominance": "ratio", "hits": [{"score": 1.6, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 2.5, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "target_path": "pkg/c.py"}, {"score": 0.2, "snippet": "timeout = 30", "target_path": "pkg/d.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 151], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": ["cache"]}}+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 2.5, "second_score": 1.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default timeout is 30 seconds (pkg/a.py:12).", "citations": ["pkg/c.py"], "dominance": "abs_gap", "hits": [{"score": 2.5, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "timeout = 30", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "Why is MAX_RETRIES 5?", "question_ids": ["MAX_RETRIES"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 0.2, "top_score": 0.2, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": null, "hits": [{"score": 0.2, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 30], "name": "parse_config", "truncated": false, "withheld_symbols": []}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}, "ratio": 1.25, "second_score": 1.0, "top_score": 1.25, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/d.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": 0.5, "score": 2.5, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 1.0, "top_score": 1.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default timeout is 30 seconds (pkg/a.py:12).", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": null, "hits": [{"_confidence_score_factor": -1, "score": 1.0, "snippet": "timeout = 30", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 151], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": Infinity, "second_score": 0.0, "top_score": 0.2, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"score": 0.2, "snippet": "", "target_path": "pkg/a.py"}], "question": "Where is the cache written?", "question_ids": [], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 129], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": ["cache"]}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 5.0, "second_score": 0.8, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": "ratio", "hits": [{"score": 4.0, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/b.py"}, {"_confidence_score_factor": 0.5, "score": 1.0, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}, {"score": 2.5, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/d.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "timeout = 30", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 21], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.25, "second_score": 1.6, "top_score": 2.0, "uncovered": ["cache"], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/a.py", "pkg/b.py"], "dominance": null, "hits": [{"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "timeout = 30", "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": 1.0, "score": 0.2, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": true, "symbol_bodies": [], "uncovered": ["cache"]}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.5625, "second_score": 1.6, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "FooBar uses retry_loop because HiddenThing_v2 requires it.", "citations": [], "dominance": "agreement", "hits": [{"score": 2.5, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": 0.5, "score": 1.0, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["RateLimiter"], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 2.5, "second_score": 1.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": null, "hits": [{"score": 2.5, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}], "question": "Why is MAX_RETRIES 5?", "question_ids": ["MAX_RETRIES"], "served_named_body": true, "symbol_bodies": [], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 1.6, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/b.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": -1, "score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": true, "symbol_bodies": [], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "high", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": "ratio", "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.6, "second_score": 2.5, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "Scheduler starts 4 workers via spawn_pool in pkg/a.py.", "citations": ["pkg/d.py", "pkg/a.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": 1.0, "score": 4.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 2.5, "snippet": "", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "", "target_path": "pkg/c.py"}], "question": "parse_config", "question_ids": [], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 151], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": ["4"], "withheld_implicated": []}, "kwargs": {"answer_text": "Scheduler starts 4 workers via spawn_pool in pkg/a.py.", "citations": ["pkg/a.py", "pkg/b.py"], "dominance": null, "hits": [], "question": "How many workers does Scheduler start?", "question_ids": [], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "Scheduler", "truncated": true, "withheld_symbols": []}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 4.0, "second_score": 1.0, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "retry_loop calls _validate( before writing; see pkg/a.py.", "citations": ["pkg/d.py"], "dominance": "ratio", "hits": [{"score": 4.0, "snippet": "Scheduler", "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"score": 1.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, {"continuation": null, "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 20.0, "second_score": 0.2, "top_score": 4.0, "uncovered": [], "ungrounded_values": ["7"], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/d.py"], "dominance": "agreement", "hits": [{"score": 4.0, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.6, "second_score": 1.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/b.py", "pkg/d.py"], "dominance": "ratio", "hits": [{"score": 1.6, "snippet": "timeout = 30", "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.25, "second_score": 1.6, "top_score": 2.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/b.py", "pkg/d.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 4.0, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}, {"score": 0.2, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/d.py"}, {"score": 1.6, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "parse_config", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/d.py"], "dominance": null, "hits": [], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 30], "name": "Scheduler", "truncated": false, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": "agreement", "hits": [], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.5625, "second_score": 1.6, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/c.py", "pkg/d.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": -1, "score": 2.5, "snippet": "", "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "_validate", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}, {"score": 1.6, "snippet": "Scheduler", "target_path": "pkg/d.py"}, {"score": 4.0, "snippet": "", "target_path": "pkg/a.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 21], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 2.5, "second_score": 1.6, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": -1, "score": 4.0, "snippet": "", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 0.2, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/c.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 30], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": true, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 1.6, "second_score": 1.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/b.py"], "dominance": null, "hits": [{"score": 1.6, "snippet": "timeout = 30", "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}], "question": "parse_config", "question_ids": ["parse_config"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": Infinity, "second_score": 0.0, "top_score": 4.0, "uncovered": [], "ungrounded_values": ["30", "7"], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/b.py"], "dominance": "abs_gap", "hits": [{"score": 4.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 21], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "on"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 2.5, "second_score": 1.0, "top_score": 2.5, "uncovered": ["default", "retry", "loop"], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "retry_loop calls _validate( before writing; see pkg/a.py.", "citations": ["pkg/b.py", "pkg/d.py"], "dominance": "ratio", "hits": [{"score": 2.5, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "parse_config", "truncated": true, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": Infinity, "second_score": 0.0, "top_score": 2.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/c.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "workers = 4 spawn_pool", "target_path": "pkg/a.py"}], "question": "retry_loop _validate", "question_ids": [], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "retry_loop", "truncated": false, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, {"continuation": null, "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "high", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": "agreement", "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.625, "second_score": 4.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/b.py", "pkg/a.py"], "dominance": "agreement", "hits": [{"score": 2.5, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "_validate", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 4.0, "snippet": "", "target_path": "pkg/b.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}, {"score": 1.0, "snippet": "workers = 4 spawn_pool", "target_path": "pkg/d.py"}, {"score": 4.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.05, "second_score": 4.0, "top_score": 0.2, "uncovered": [], "ungrounded_values": ["4"], "withheld_implicated": []}, "kwargs": {"answer_text": "Scheduler starts 4 workers via spawn_pool in pkg/a.py.", "citations": ["pkg/a.py", "pkg/d.py"], "dominance": null, "hits": [{"score": 0.2, "snippet": "Scheduler", "symbols": [{"_matched": false, "name": "retry_loop", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 4.0, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "target_path": "pkg/c.py"}, {"score": 0.2, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/d.py"}, {"score": 1.0, "snippet": "MAX_RETRIES = 5", "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": []}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 0.8, "second_score": 2.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": ["30"], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default timeout is 30 seconds (pkg/a.py:12).", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"score": 1.6, "snippet": "retry_loop runs", "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "Scheduler", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 1.6, "snippet": "Scheduler", "target_path": "pkg/c.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["MAX_RETRIES", "RateLimiter"], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, "ratio": 0.8, "second_score": 2.0, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/d.py", "pkg/b.py"], "dominance": "agreement", "hits": [{"_confidence_score_factor": -1, "score": 1.6, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 4.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}, {"score": 0.2, "snippet": "timeout = 30", "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}], "uncovered": ["cache"]}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": ["30", "7"], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": [], "dominance": null, "hits": [], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [1, 120], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": false, "withheld_symbols": []}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "low", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}, "ratio": 0.0, "second_score": 0.0, "top_score": 0.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": [], "dominance": null, "hits": [], "question": "How does retry_loop work?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "_validate"}]}, {"continuation": null, "lines": [1, 151], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "0"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["RateLimiter"], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}, "ratio": 1.0, "second_score": 2.5, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "MAX_RETRIES is 5 because of RateLimiter.", "citations": ["pkg/b.py"], "dominance": "abs_gap", "hits": [{"_confidence_score_factor": -1, "score": 2.5, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "retry_loop runs", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "Scheduler", "truncated": false, "withheld_symbols": []}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": true, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, "ratio": Infinity, "second_score": 0.0, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The context provided does not contain the answer.", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": false, "name": "parse_config", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [1, 120], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "1", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": "1"}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": ["_validate"], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.6, "second_score": 2.5, "top_score": 4.0, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "retry_loop calls _validate( before writing; see pkg/a.py.", "citations": ["pkg/a.py", "pkg/d.py"], "dominance": null, "hits": [{"score": 4.0, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/a.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"_confidence_score_factor": -1, "score": 1.6, "snippet": "", "symbols": [{"_matched": true, "name": "parse_config", "signature": "MAX_RETRIES = 5"}], "target_path": "pkg/c.py"}], "question": "Why does FooBar call retry_loop?", "question_ids": ["FooBar", "retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 30], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}, {"continuation": null, "lines": [10, 30], "name": "Scheduler", "truncated": true, "withheld_symbols": []}], "uncovered": ["cache"]}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "1", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": false, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": null, "ratio": 1.0, "second_score": 1.6, "top_score": 1.6, "uncovered": [], "ungrounded_values": ["7"], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "The default is 30 and the cap is 7.", "citations": ["pkg/d.py"], "dominance": "abs_gap", "hits": [{"score": 1.6, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "retry_loop", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": true, "symbol_bodies": [{"continuation": null, "lines": [10, 160], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": true, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 1.5625, "second_score": 1.6, "top_score": 2.5, "uncovered": [], "ungrounded_values": [], "withheld_implicated": ["retry_loop"]}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/a.py"], "dominance": "ratio", "hits": [{"_confidence_score_factor": 1.0, "score": 2.5, "snippet": "MAX_RETRIES = 5", "symbols": [{"_matched": false, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": -1, "score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "class Scheduler"}], "target_path": "pkg/b.py"}], "question": "retry_loop _validate", "question_ids": ["_validate", "retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": "pkg/a.py:200", "lines": [10, 129], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, {"continuation": null, "lines": [10, 129], "name": "parse_config", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "retry_loop"}]}], "uncovered": null}},+{"env": {"REPOWISE_ANSWER_CLAIM_SUPPORT_GATE": "0", "REPOWISE_ANSWER_EARN_HIGH_GROUNDING": "0", "REPOWISE_ANSWER_EARN_HIGH_ON_WEAK_RETRIEVAL": ""}, "expected": {"confidence": "medium", "exclusivity_over_truncated": true, "frame_unsupported": [], "hedged": false, "high_reason": null, "lead_off_top": null, "lookup_body_truncated": false, "named_body_cut": {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": []}, "ratio": 1.28, "second_score": 1.25, "top_score": 1.6, "uncovered": [], "ungrounded_values": [], "withheld_implicated": []}, "kwargs": {"answer_text": "It is the only place that writes the cache, in pkg/b.py.", "citations": ["pkg/b.py"], "dominance": "ratio", "hits": [{"score": 1.6, "snippet": "retry_loop runs", "symbols": [{"_matched": true, "name": "parse_config", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}, {"_confidence_score_factor": 0.5, "score": 2.5, "snippet": "timeout = 30", "symbols": [{"_matched": true, "name": "Scheduler", "signature": "def retry_loop(x)"}], "target_path": "pkg/b.py"}, {"score": 2.5, "snippet": "MAX_RETRIES = 5", "target_path": "pkg/c.py"}, {"score": 0.2, "snippet": "timeout = 30", "target_path": "pkg/d.py"}, {"score": 1.6, "snippet": "workers = 4 spawn_pool", "symbols": [{"_matched": true, "name": "_validate", "signature": "class Scheduler"}], "target_path": "pkg/a.py"}], "question": "What is the default timeout for retry_loop?", "question_ids": ["retry_loop"], "served_named_body": false, "symbol_bodies": [{"continuation": null, "lines": [1, 151], "name": "Scheduler", "truncated": true, "withheld_symbols": [{"body_continues": false, "name": "on"}]}, {"continuation": "pkg/a.py:200", "lines": [10, 160], "name": "retry_loop", "truncated": true, "withheld_symbols": []}], "uncovered": ["cache"]}}]diff --git a/tests/unit/server/mcp/test_answer_citations.py b/tests/unit/server/mcp/test_answer_citations.pynew file mode 100644index 000000000..54a08342c--- /dev/null+++ b/tests/unit/server/mcp/test_answer_citations.py@@ -0,0 +1,108 @@+"""Citations follow the files a synthesized answer names, not only the retrieval hits."""++from __future__ import annotations++from pathlib import Path++from repowise.server.mcp_server.tool_answer.citations import answer_files+from repowise.server.mcp_server.tool_answer.confidence import _grade_answer++CASCADE = "packages/core/src/repowise/core/generation/cascade.py"+DETECTOR = "packages/core/src/repowise/core/ingestion/change_detector.py"+++def _hit(path: str, score: float = 1.0) -> dict:+ return {"target_path": path, "score": score}+++def test_named_pool_file_is_cited_and_ruled_out_hit_is_not() -> None:+ # The reported answer: the budget lives in change_detector.py, which is not+ # a hit, and the answer says the top hit does not compute it.+ answer = (+ f"The budget is computed by `compute_adaptive_budget` in ({DETECTOR}). "+ f"`generation/cascade.py` does not compute it; `expand_cascade` only consumes it."+ )+ got = answer_files(answer, [_hit(CASCADE)], [_hit(CASCADE), _hit(DETECTOR)], [CASCADE], None)+ assert got.citations == [DETECTOR]+ assert got.ruled_out == {CASCADE}+ assert got.drops_top_hit([_hit(CASCADE)], answer) == DETECTOR+++def test_named_live_file_resolves_and_invented_path_does_not(tmp_path: Path) -> None:+ (tmp_path / "pkg").mkdir()+ (tmp_path / "pkg" / "real.py").write_text("x = 1\n", encoding="utf-8")+ answer = "See pkg/real.py and pkg/invented.py for details."+ got = answer_files(answer, [_hit("pkg/other.py")], [], ["pkg/other.py"], tmp_path)+ assert got.citations == ["pkg/real.py"]+++def test_bare_name_resolves_only_to_a_unique_hit() -> None:+ hits = [_hit("a/utils.py"), _hit("b/utils.py"), _hit("c/main.py")]+ got = answer_files("main.py calls utils.py.", hits, [], ["a/utils.py"], None)+ assert got.citations == ["c/main.py"]+++def test_file_named_positively_elsewhere_stays_cited() -> None:+ answer = f"{CASCADE} expands the set. The budget is not in {CASCADE}, it is passed in."+ got = answer_files(answer, [_hit(CASCADE)], [], [CASCADE], None)+ assert got.citations == [CASCADE]+ assert not got.ruled_out+++def test_no_named_file_falls_back_to_unruled_targets() -> None:+ got = answer_files("It retries three times.", [_hit("a.py")], [], ["a.py", "b.py", "c.py"], None)+ assert got.citations == ["a.py", "b.py"]+ assert not got.named+ assert got.drops_top_hit([_hit("a.py")], "It retries three times.") is None+++def test_answer_citing_the_top_hit_keeps_its_grade_inputs() -> None:+ answer = f"See {CASCADE} and the caller in {DETECTOR}."+ got = answer_files(answer, [_hit(CASCADE)], [_hit(DETECTOR)], [CASCADE], None)+ assert got.citations == [CASCADE, DETECTOR]+ assert got.drops_top_hit([_hit(CASCADE)], answer) is None+++def test_grade_holds_high_at_medium_when_answer_leaves_the_top_hit() -> None:+ hits = [+ {"target_path": CASCADE, "score": 9.0, "symbols": [{"name": "expand_cascade"}]},+ {"target_path": "x.py", "score": 1.0},+ ]+ kwargs = dict(+ question="where is the cascade budget computed?",+ question_ids=set(),+ answer_text=f"In {DETECTOR}.",+ hits=hits,+ citations=[CASCADE],+ symbol_bodies=[],+ served_named_body=False,+ dominance="ratio",+ uncovered=[],+ )+ assert _grade_answer(**kwargs).confidence == "high"+ grade = _grade_answer(**kwargs, lead_off_top=DETECTOR)+ assert grade.confidence == "medium"+ assert grade.lead_off_top == DETECTOR+++def test_a_negated_description_does_not_rule_a_file_out() -> None:+ answer = "The handler in pkg/retry.py has no backoff and does not validate input."+ got = answer_files(answer, [_hit("pkg/retry.py")], [], ["pkg/retry.py"], None)+ assert got.citations == ["pkg/retry.py"]+ assert not got.ruled_out+++def test_top_hit_named_by_an_ambiguous_file_name_still_counts_as_named() -> None:+ hits = [_hit("a/utils.py"), _hit("b/utils.py"), _hit("c/main.py")]+ answer = "utils.py holds the parser; c/main.py calls it."+ got = answer_files(answer, hits, [], ["a/utils.py"], None)+ assert got.drops_top_hit(hits, answer) is None+++def test_a_path_leaving_the_checkout_is_never_cited(tmp_path: Path) -> None:+ (tmp_path / "outside.py").write_text("x = 1\n", encoding="utf-8")+ root = tmp_path / "repo"+ root.mkdir()+ got = answer_files("See ../outside.py.", [_hit("a.py")], [], ["a.py"], root)+ assert got.citations == ["a.py"]+ assert not got.named