You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(consistency): honest caveat for ambiguous symbol misses, no verdict change
ADR-0018 flagged backtick-quoted local variable names (with_tax,
days_overdue) as a nuisance false-positive source: real names, just not
graph-indexed, but flagged CONTRADICTED same as a hallucinated function
name. Investigating a fix surfaced a harder fact: a real local variable
name and a real hallucinated function name are lexically identical --
plain snake_case, no dot, no parens, no capital letter. All 14 invented
names the pilot caught had exactly that shape. Any heuristic that softened
the verdict or confidence for that shape would have silently cost the
14/14 recall already measured and published.
Fix: check_symbol_exists now adds an honest caveat to the explanation text
when a missed symbol has no marker distinguishing it from an ordinary
variable name (new looks_like_bare_name() in claims.py: no dot, no call
parens, no capital) -- status and confidence stay exactly as before,
CONTRADICTED at 1.0 either way. The caveat necessarily appears on both
with_tax and get_tax_rate, since nothing in the text tells them apart --
stated plainly in the explanation and in ADR-0018, not hidden. A clearly
code-shaped miss (TotallyMadeUpClass, CamelCase) gets no caveat, since
there the evidence really is as strong as the confidence claims.
6 new regression tests (test_claims.py's TestLooksLikeBareName,
test_consistency_check.py's two new TestSymbolExistence cases). ADR-0018
updated to reflect the fix and the lexical-ambiguity finding behind it.
518 tests passing (512 + 6 new).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments