Skip to content

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

fix(answer): read "the evidence does not identify/show/specify" as a hedge (#2708)

Swati Ahujacc4ffbd4e33a
diff --git a/packages/server/src/repowise/server/mcp_server/tool_answer/config.py b/packages/server/src/repowise/server/mcp_server/tool_answer/config.py
index b16cec5bf..daed05938 100644
--- a/packages/server/src/repowise/server/mcp_server/tool_answer/config.py
+++ b/packages/server/src/repowise/server/mcp_server/tool_answer/config.py
@@ -145,6 +145,17 @@ _HEDGE_MARKERS = (
"not shown here",
"material shown",
"not visible in",
+ # Scoped to the retrieved material: bare, they read behaviour
+ # ("the validator does not show an error") as a hedge.
+ "evidence does not identify",
+ "evidence does not show",
+ "evidence does not specify",
+ "material does not identify",
+ "material does not show",
+ "material does not specify",
+ "excerpts do not identify",
+ "excerpts do not show",
+ "excerpts do not specify",
"unable to determine",
"not contain sufficient",
"not contain enough",
diff --git a/tests/unit/server/mcp/test_answer_calibration.py b/tests/unit/server/mcp/test_answer_calibration.py
index eea98dba3..4d03a1914 100644
--- a/tests/unit/server/mcp/test_answer_calibration.py
+++ b/tests/unit/server/mcp/test_answer_calibration.py
@@ -44,6 +44,15 @@ class TestHedgeMarkers:
long_preamble = "The module handles ingestion. " * 40
assert _answer_is_hedged(long_preamble + "However, the excerpts do not include the value.")
+ def test_evidence_that_names_no_answer_detected(self) -> None:
+ assert _answer_is_hedged("The evidence does not identify which caller sets it.")
+ assert _answer_is_hedged("The material does not show the retry count.")
+ assert _answer_is_hedged("The evidence does not specify which default ports it drops.")
+
+ def test_behaviour_described_with_the_same_verbs_not_hedged(self) -> None:
+ assert not _answer_is_hedged("The validator does not show an error on empty input.")
+ assert not _answer_is_hedged("The caller does not specify a timeout, so 5s applies.")
+
def test_direct_answer_not_hedged(self) -> None:
assert not _answer_is_hedged("The default is 2, set in git_indexer/_constants.py.")