Impact Is Not Invalidation: Ask About the Claim, Not the Diff
Organizations: Thomson Reuters Bangalore, India
Abstract
Memory systems for coding agents must decide, when a repository changes, which of their stored claims have become false. Content anchoring invalidates a claim whenever the artifact it came from changes, which fires constantly. Semantic-equivalence classification asks whether a diff preserves behavior, a question about the diff rather than about any stored claim. We show the second signal fails for a reason unrelated to model capability: asked whether a commit preserves behavior, five models spanning a 40x price range fire on 59-72% of real commits and reach precisions of only 0.291 to 0.329 against a 0.25 base rate. Asked instead whether one specific claim still holds, the same models on the same diffs reach 0.705 to 0.974. A control that hands the behavior-preservation judge the claim text, changing only the question, moves precision by 0.010 and 0.016; changing the question moves it by 0.49 and 0.65. We also compare against pytest-testmon, a deployed regression-test selector with coverage-derived dependency data: it reaches 0.868 recall at 0.415 precision, so near-complete knowledge of what a change can reach does not identify what it falsifies. Ground truth is execution, not annotation: a claim is a test function passing at commit t, and it has flipped if that same assertion text fails at t+1. Building this required an observation we did not find in prior work. On a CI-gated mainline a commit that leaves a pre-existing test failing cannot merge, so the naive construction has an empty positive class by design. We report 10,369 claims with 184 execution-verified flips mined from 23 Python libraries, splits held out by repository, a post-knowledge-cutoff split, a shuffled-diff null, a paraphrase control, and a leave-one-repository-out analysis over 17 repositories.
Figures & tables
| Repository | Commits | Claims | Flips | Flip rate | Discarded |
|---|---|---|---|---|---|
| arrow | 26 | 1547 | 19 | 1.2% | 73 |
| boltons | 6 | 360 | 14 | 3.9% | 0 |
| cachetools | 18 | 1080 | 43 | 4.0% | 180 |
| click | 18 | 1068 | 8 | 0.7% | 0 |
| freezegun | 7 | 309 | 1 | 0.3% | 0 |
| inflection | 2 | 120 | 0 | 0.0% | 0 |
| Arm | Signal | Precision | Recall | TP/FP/FN |
|---|---|---|---|---|
| A3 file anchor | structural anchor | 0.21 [0.16,0.26] | 0.30 [0.23,0.38] | 46/173/105 |
| A4 symbol anchor | structural anchor | 0.39 [0.32,0.45] | 0.54 [0.46,0.62] | 81/128/70 |
| A4b testmon | structural anchor | 0.41 [0.36,0.47] | 0.87 [0.81,0.92] | 131/185/20 |
| A5 sem-equiv strict | diff-level LLM | 0.29 [0.24,0.34] | 0.69 [0.61,0.76] | 104/254/47 |
| A6 risk-framed | claim-level LLM | 0.79 [0.72,0.86] | 0.72 [0.64,0.79] | 108/28/43 |
| A4 A6 | union | 0.45 [0.39,0.51] | 0.81 [0.74,0.87] | 122/149/29 |
| Arm | Precision | Recall | Claims re-verified | Flips served stale |
|---|---|---|---|---|
| A4b testmon | 0.415 | 0.868 | 52% | 13% |
| A6 risk-framed | 0.794 | 0.715 | 22% | 28% |
| held-out | post-cutoff | ||||
| Information | Question | flash-lite | opus-5 | flash-lite | opus-5 |
| diff only | behavior-preserving? | 0.291 | 0.309 | 0.338 | 0.278 |
| claim + diff | behavior-preserving? | 0.301 | 0.325 | 0.349 | 0.289 |
| claim + diff | does this claim hold? | 0.794 | 0.974 | 0.750 | 0.913 |
| adding the claim is worth | +0.01 | +0.02 | +0.01 | +0.01 | |
| changing the question is worth | +0.49 | +0.65 | +0.40 | +0.62 | |
| Repository excluded | A6 precision | A4 precision | Gap |
|---|---|---|---|
| none (all held-out) | 0.794 | 0.388 | +40.7 |
| cachetools (43 flips) | 0.775 | 0.431 | +34.4 |
| more-itertools (41 flips) | 0.705 | 0.238 | +46.7 |
| markdown (28 flips) | 0.793 | 0.382 | +41.1 |
| structlog (14 flips) | 0.788 | 0.345 | +44.3 |
| … 13 further repositories, gap between +37.7 and +43.4 | |||
| Arm | Claims re-verified | Flips served stale | Precision at natural rate |
|---|---|---|---|
| A0 always-invalidate | 100% | 0% | 0.018 |
| A3 file anchor | 36% | 70% | 0.014 |
| A4 symbol anchor | 35% | 46% | 0.033 |
| A4b testmon | 52% | 13% | 0.037 |
| A5 sem-equiv strict | 59% | 31% | 0.022 |
| A6 claim-relative | 22% | 28% | 0.174 |
| Claim given to the arm | Precision | Recall | TP/FP/FN |
|---|---|---|---|
| test function (as elsewhere) | 0.794 | 0.715 | 108/28/43 |
| prose note | 0.711 | 0.669 | 101/41/50 |
| for reference: A4b testmon | 0.415 | 0.868 | 131/185/20 |
| for reference: A5 sem-equiv | 0.291 | 0.689 | 104/254/47 |
| A5 sem-equiv | A6 claim-relative | ||||
|---|---|---|---|---|---|
| Model | Tier | precision | fires on | precision | fires on |
| gemini-3.1-flash-lite | floor | 0.291 | 59% | 0.794 | 23% |
| gemini-2.5-flash | floor | 0.329 | 64% | 0.810 | 23% |
| claude-haiku-4.5 | mid | 0.321 | 65% | 0.705 | 29% |
| claude-sonnet-5 | mid | 0.322 | 63% | 0.952 | 17% |
| claude-opus-5 | ceiling | 0.309 | 72% | 0.974 | 19% |
| Split | flips | A4 | A4b | A5 | A6 | |
|---|---|---|---|---|---|---|
| post-cutoff, click | 62 | 8 | 0.00/0.00 | 0.21/1.00 | 0.20/1.00 | 0.53/1.00 |
| held-out, click | 68 | 8 | 0.00/0.00 | 0.19/1.00 | 0.19/1.00 | 0.50/1.00 |
| post-cutoff, boltons | 26 | 14 | 0.75/0.86 | 0.29/0.29 | 0.58/1.00 | 1.00/0.93 |
| post-cutoff, both repos | 88 | 22 | 0.60/0.55 | 0.23/0.55 | 0.34/1.00 | 0.75/0.95 |
| held-out, all 17 repos | 604 | 151 | 0.39/0.54 | 0.41/0.87 | 0.29/0.69 | 0.79/0.72 |
Claim Verification
Claim verification assesses whether statements are supported, contradicted, or unresolved by relevant evidence.
See all 59 papers