Skip to content

Measure recall on real regressions (15% raw, 44% within Blot's model) - #53

Merged
Sym-jay merged 1 commit into
mainfrom
recall-bench
Nov 25, 2026
Merged

Sym-jay merged 1 commit into
mainfrom
recall-bench

Conversation

@Sym-jay

@Sym-jay Sym-jay commented Nov 25, 2026

Copy link
Copy Markdown
Owner

First recall measurement for Blot: of the commits that later turned out to cause a bug, how many did Blot warn on at commit time? This PR only measures. No check or classifier changed, and nothing in src/blot/ was touched.

Headline

  • Pairs: 1,067 references (reverts, Django Regression in <sha>., "introduced/caused by ", Fixes:, React Reverts facebook/react#N) across the full history of the 5 reference repos. After filtering, 137 pairs remain (newest 40 per repo for Django and React). 71 are real bugs. The other 66 were reverted for reasons that aren't bugs: wrong branch, flag rollouts, design changes.
  • Hits on target: 11 (Django 10, Express 1). 19 culprits got some warning; 8 of those were elsewhere.
  • Recall, raw: 11/71 (15%). Within Blot's model: 11/25 (44%). "Within model" means the culprit changed a line from a real earlier fix.
Repo Real bugs On target Raw Within model
Flask 3 0 0/3 0/1
requests 4 0 0/4 0/2
Express 8 1 1/8 1/2
Django 39 10 10/39 (26%) 10/19 (53%)
React 17 0 0/17 0/1

Top miss reasons (52 real-bug misses)

  1. 23, outside the model: the changed lines came from features or other non-fix commits.
  2. 18, outside the model: the bug is in new code (pure additions).
  3. 6, classification gaps: these are all the in-model misses. Each changed fix has no fix word:
    • requests b149be5 "loosen URL handling for non-native URL schemes"
    • requests 641f461 "Make sure proxies have their scheme attached."
    • Express 3afbcd0 "… Closes #632"
    • Flask d4076cf "strip the ending slash …"
    • Django 44dd91e "Fixed #4015 -- Changed …" (severity 1)
    • Django 857b104 "Fixed #34619 -- Associated …"
  4. 5, outside the model: build, dependency or CI breakage.

No miss came from tracing or the matcher.

Improvement ideas from the misses (all unmeasured)

  • Django Fixed #N -- at severity 1 ("Changed …", "Associated …"): 2 of the 6 gaps. Judging these by the ticket's type (Trac "Bug" vs "New feature"), the way --github uses labels, might recover them without the noise of the dropped "fix word + PR number" rule.
  • --github on the culprit replays: Express 3afbcd0 "Closes #632" is a GitHub issue that labels could upgrade. Worth running regressions.py run with GitHub enrichment as a follow-up.
  • Refactor hop through Black (9c19aff7): tracing stopped at the reformat on 5 lines whose real origins were fixes (#27417, #26614, #22288, #36689, #26788). Those culprits were caught through other lines, so recall wouldn't move here, but warnings would cite more precise fixes. This supports the existing "KeptLines in the refactor hop" lead.
  • 46 of the 52 misses are outside Blot's model. Raising raw recall much would need a different signal, not a rule tweak.

What's in the PR

  • bench/regressions.py: collect finds and filters pairs (counts per filter, keeps judgements on re-run). run replays each culprit at its parent via _ReplayStore, with co-change counted over the culprit's own ancestors. It also records, for each warning, whether the later fix touched that hunk (near_fix), and the traced origin of every removed line. report prints the tables.
  • bench/regressions/<repo>.json: the 137 pairs, the warnings, and a bug / verdict / note judgement per pair. A revert counts as a bug only when a message, PR, changelog or ticket says what broke.
  • tests/test_regressions.py: reference patterns, AncestorCochange matching a real index built at that commit, an end-to-end collect → run on a scripted revert, near_fix, and the summary.
  • A "Recall: real regressions" section in bench/RESULTS.md, a section in bench/README.md, and an update to CLAUDE.md State.

Checks run

  • pytest: 214 passed, 1 skipped.
  • blot bench --workdir %LOCALAPPDATA%\Temp\wl\b33: 33/33.
  • Replays run twice at the labelled heads, with identical warnings both times: Flask 0/7, requests 0/31, Express 1/19, Django 17/40, React 2/40. The second run took 4–147 s per repo.

Caveats: one judge; the newest 40 pairs only for Django and React; reverts without a stated reason count as "not a bug".

🤖 Generated with Claude Code

bench/regressions.py collects culprit/fix pairs from each reference repo's
full history (reverts, Django's "Regression in <sha>.", "introduced by",
Fixes: trailers, React's "Reverts facebook/react#N"), replays each culprit
at its parent with only its ancestors visible, and reports recall from hand
judgements stored in bench/regressions/<repo>.json.

137 pairs, 71 real bugs, 11 warned on target. All 6 in-model misses are
classification gaps; none came from tracing or the matcher. No check changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant