blot-git 0.7.1__tar.gz → 0.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. {blot_git-0.7.1 → blot_git-0.7.2}/.pre-commit-hooks.yaml +1 -1
  2. {blot_git-0.7.1 → blot_git-0.7.2}/CLAUDE.md +20 -6
  3. {blot_git-0.7.1 → blot_git-0.7.2}/PKG-INFO +1 -1
  4. {blot_git-0.7.1 → blot_git-0.7.2}/README.md +14 -2
  5. {blot_git-0.7.1 → blot_git-0.7.2}/action.yml +1 -1
  6. {blot_git-0.7.1 → blot_git-0.7.2}/bench/README.md +14 -0
  7. {blot_git-0.7.1 → blot_git-0.7.2}/bench/RESULTS.md +162 -0
  8. {blot_git-0.7.1 → blot_git-0.7.2}/bench/labels/expressjs-express.json +30 -0
  9. {blot_git-0.7.1 → blot_git-0.7.2}/bench/labels/facebook-react.json +40 -0
  10. blot_git-0.7.2/bench/regressions/django-django.json +3808 -0
  11. blot_git-0.7.2/bench/regressions/expressjs-express.json +655 -0
  12. blot_git-0.7.2/bench/regressions/facebook-react.json +4783 -0
  13. blot_git-0.7.2/bench/regressions/pallets-flask.json +325 -0
  14. blot_git-0.7.2/bench/regressions/psf-requests.json +1045 -0
  15. blot_git-0.7.2/bench/regressions.py +429 -0
  16. {blot_git-0.7.1 → blot_git-0.7.2}/pyproject.toml +1 -1
  17. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/__init__.py +1 -1
  18. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/classify.py +4 -1
  19. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_classify.py +6 -0
  20. blot_git-0.7.2/tests/test_regressions.py +125 -0
  21. {blot_git-0.7.1 → blot_git-0.7.2}/.gitattributes +0 -0
  22. {blot_git-0.7.1 → blot_git-0.7.2}/.github/ISSUE_TEMPLATE/bench_case.md +0 -0
  23. {blot_git-0.7.1 → blot_git-0.7.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  24. {blot_git-0.7.1 → blot_git-0.7.2}/.github/ISSUE_TEMPLATE/check_idea.md +0 -0
  25. {blot_git-0.7.1 → blot_git-0.7.2}/.github/pull_request_template.md +0 -0
  26. {blot_git-0.7.1 → blot_git-0.7.2}/.github/workflows/blot.yml +0 -0
  27. {blot_git-0.7.1 → blot_git-0.7.2}/.github/workflows/ci.yml +0 -0
  28. {blot_git-0.7.1 → blot_git-0.7.2}/.github/workflows/release.yml +0 -0
  29. {blot_git-0.7.1 → blot_git-0.7.2}/.gitignore +0 -0
  30. {blot_git-0.7.1 → blot_git-0.7.2}/CONTRIBUTING.md +0 -0
  31. {blot_git-0.7.1 → blot_git-0.7.2}/LICENSE +0 -0
  32. {blot_git-0.7.1 → blot_git-0.7.2}/assets/demo/demo.gif +0 -0
  33. {blot_git-0.7.1 → blot_git-0.7.2}/assets/demo/make_demo.py +0 -0
  34. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/alert.svg +0 -0
  35. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/faces.svg +0 -0
  36. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/happy.svg +0 -0
  37. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/idle.svg +0 -0
  38. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/sad.svg +0 -0
  39. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/sleepy.svg +0 -0
  40. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/walk.svg +0 -0
  41. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/blue/worried.svg +0 -0
  42. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/build_sprites.py +0 -0
  43. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/alert.svg +0 -0
  44. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/faces.svg +0 -0
  45. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/happy.svg +0 -0
  46. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/idle.svg +0 -0
  47. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/sad.svg +0 -0
  48. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/sleepy.svg +0 -0
  49. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/walk.svg +0 -0
  50. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/mustard/worried.svg +0 -0
  51. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/alert.svg +0 -0
  52. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/faces.svg +0 -0
  53. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/happy.svg +0 -0
  54. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/idle.svg +0 -0
  55. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/sad.svg +0 -0
  56. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/sleepy.svg +0 -0
  57. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/walk.svg +0 -0
  58. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/orange/worried.svg +0 -0
  59. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/alert.svg +0 -0
  60. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/faces.svg +0 -0
  61. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/happy.svg +0 -0
  62. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/idle.svg +0 -0
  63. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/sad.svg +0 -0
  64. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/sleepy.svg +0 -0
  65. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/walk.svg +0 -0
  66. {blot_git-0.7.1 → blot_git-0.7.2}/assets/sora/sage/worried.svg +0 -0
  67. {blot_git-0.7.1 → blot_git-0.7.2}/bench/cases.json +0 -0
  68. {blot_git-0.7.1 → blot_git-0.7.2}/bench/labels/django-django.json +0 -0
  69. {blot_git-0.7.1 → blot_git-0.7.2}/bench/labels/pallets-flask.json +0 -0
  70. {blot_git-0.7.1 → blot_git-0.7.2}/bench/labels/psf-requests.json +0 -0
  71. {blot_git-0.7.1 → blot_git-0.7.2}/docs/EXPLAINER.md +0 -0
  72. {blot_git-0.7.1 → blot_git-0.7.2}/docs/PRD.md +0 -0
  73. {blot_git-0.7.1 → blot_git-0.7.2}/docs/PYPI.md +0 -0
  74. {blot_git-0.7.1 → blot_git-0.7.2}/docs/competitors.md +0 -0
  75. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/__main__.py +0 -0
  76. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/bench.py +0 -0
  77. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/checks/__init__.py +0 -0
  78. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/checks/base.py +0 -0
  79. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/checks/cochange.py +0 -0
  80. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/checks/readded_bug.py +0 -0
  81. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/checks/removed_fix.py +0 -0
  82. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/cli.py +0 -0
  83. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/config.py +0 -0
  84. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/diff.py +0 -0
  85. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/fixmap.py +0 -0
  86. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/git.py +0 -0
  87. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/github.py +0 -0
  88. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/guard.py +0 -0
  89. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/hooks.py +0 -0
  90. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/index.py +0 -0
  91. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/mcp.py +0 -0
  92. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/report.py +0 -0
  93. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/store.py +0 -0
  94. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/trace.py +0 -0
  95. {blot_git-0.7.1 → blot_git-0.7.2}/src/blot/why.py +0 -0
  96. {blot_git-0.7.1 → blot_git-0.7.2}/tests/conftest.py +0 -0
  97. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_action.py +0 -0
  98. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_bench.py +0 -0
  99. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_checks.py +0 -0
  100. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_cli.py +0 -0
  101. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_config.py +0 -0
  102. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_diff.py +0 -0
  103. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_git.py +0 -0
  104. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_guard.py +0 -0
  105. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_hooks.py +0 -0
  106. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_index.py +0 -0
  107. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_map.py +0 -0
  108. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_mcp.py +0 -0
  109. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_trace.py +0 -0
  110. {blot_git-0.7.1 → blot_git-0.7.2}/tests/test_why_github.py +0 -0
@@ -1,6 +1,6 @@
1
1
  # Lets users of the pre-commit framework add blot with:
2
2
  # - repo: https://github.com/Sym-jay/Blot
3
- # rev: v0.7.1
3
+ # rev: v0.7.2
4
4
  # hooks: [{id: blot}]
5
5
  # The first commit indexes the repo's history; later commits refresh the index incrementally.
6
6
  - id: blot
@@ -15,7 +15,9 @@ always changes with another (`forgot-related-file`). Mascot: Sora the slime. Own
15
15
  - `fixmap.py` (`blot map`), `mcp.py` (stdio MCP server, both protocol eras; `install-mcp` in `hooks.py`)
16
16
  - `guard.py` (Claude Code hook; installer in `hooks.py`), `why.py`, `github.py` (`index --github` via `gh api graphql`), `bench.py` (cases + `--replay N`)
17
17
  - `bench/cases.json` scripted real-world cases (33/33); `bench/labels/` hand verdicts for every replay
18
- warning on the 5 reference repos; `bench/RESULTS.md` replay numbers and precision
18
+ warning on the 5 reference repos; `bench/RESULTS.md` replay numbers, precision and recall
19
+ - `bench/regressions.py` (collect / run / report) + `bench/regressions/<repo>.json`: recall on real
20
+ regressions (culprit commits named by a later fix), with hand judgements per pair
19
21
  - `action.yml` GitHub Action; `.github/workflows/blot.yml` runs it on Blot's own PRs
20
22
  - `assets/sora/build_sprites.py` and `assets/demo/make_demo.py` regenerate the mascot and demo GIF
21
23
  - `docs/PRD.md` roadmap; `docs/PYPI.md` is the PyPI page (no relative images there)
@@ -54,20 +56,32 @@ python -m venv .venv && .venv/Scripts/python -m pip install -e ".[dev]"
54
56
  - Writing code through bash heredocs mangles `\b`, `\n`, `\s`: use the Edit tool for regexes/strings.
55
57
  - `gh api` paths: no leading slash (Git Bash rewrites it).
56
58
 
57
- ## State (2026-11-21)
58
- - Released 0.7.1: checks, `why`, `map`, `--github`, agent guard (`blot guard` / `install-agent-hook`),
59
+ ## State (2026-11-27)
60
+ - Released 0.7.2: checks, `why`, `map`, `--github`, agent guard (`blot guard` / `install-agent-hook`),
59
61
  MCP server (`blot mcp` / `install-mcp`, tools `explain_lines` and `load_bearing_lines`), bench/replay
60
- with labels, parallel indexing, pre-commit framework (`rev: v0.7.1`), GitHub Action (`@v0.7.1`).
61
- 0.7.1 adds the docstring rule (#40) and the structural `KeptLines` matcher (#45).
62
+ with labels, parallel indexing, pre-commit framework (`rev: v0.7.2`), GitHub Action (`@v0.7.2`).
63
+ 0.7.1 added the docstring rule (#40) and the structural `KeptLines` matcher (#45); 0.7.2 adds the
64
+ explicit bug-fix marker rule (#56).
62
65
  - Live-tested in Claude Code: the guard (2026-11-06: the agent cited fix 8efea0c it was undoing) and MCP
63
66
  (2026-11-14: an agent called `load_bearing_lines` on its own and answered correctly).
64
67
  Throwaway test folder: `Documents\flask-guard-test` (guard hook + `.mcp.json`).
65
68
  - `blot map` takes ~1.5 s on Flask app.py. `trace_lines(whole_file=True)` drops `-C` from the first blame so
66
69
  map and why agree; checks still use the old path.
70
+ - Recall (2026-11-25, first measurement, 0.7.1 checks): 137 culprit/fix pairs (newest 40 per repo for
71
+ Django/React), 71 real bugs; 11 warned on target = **15% raw, 11/25 (44%) within Blot's model**.
72
+ Django 10/39, Express 1/8, Flask/requests/React 0. All 6 in-model misses are classification gaps
73
+ (fixes without fix words: "loosen ...", "Make sure ...", "Closes #632", Django `Fixed #N -- Changed`
74
+ at severity 1); none came from tracing or the matcher. 46 misses are outside the model (new code,
75
+ feature lines, build/deps). Re-run with `bench/regressions.py run` after any classify/check change.
76
+ Judging rule: a revert is a bug only if a message/PR/changelog/ticket says what broke.
67
77
  - Precision (2026-11-21, after #45): 69/124 useful (55.6%); Django 1.43 / 10 commits (over the ≤ 1
68
78
  target), others ≤ 0.62.
69
79
  `forgot-related-file` has 0 useful warnings in 45 labelled; candidate to become opt-in.
70
- - `--github` measured (2026-11-01): precision unchanged, +7 useful warnings, almost no demotions.
80
+ - `--github` re-measured (2026-11-27, after #45): precision 55.6% → 54.5% (+9 useful, +10 noise), recall
81
+ 11 → 12 of 71 on target. Opt-in, not default. `regressions.py run --github` exists.
82
+ - Kept (2026-11-27): explicit bug-fix markers (`[Bugfix]`, `Bugfix:`, …) make a commit a fix
83
+ (`_FIX_MARKER` in classify.py). Recall 11 → 12 of 71 on target (12/27 within model), precision
84
+ 69/124 → 69/125. Rules are now judged on recall (`bench/regressions/`) as well as precision.
71
85
  - Tried and dropped (2026-11-01): "fix word + PR number" as an offline fix rule: +85 warnings at 22%
72
86
  useful. Don't retry it without a narrower signal (see bench/RESULTS.md).
73
87
  - Known recall limit: tracing only passes commits classified as refactors, so a big non-refactor rewrite
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: blot-git
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: A pre-commit check that has read your project's history: warns when a change removes a fix, re-adds a fixed bug, or forgets a file that always changes too.
5
5
  Project-URL: Homepage, https://github.com/Sym-jay/Blot
6
6
  Project-URL: Issues, https://github.com/Sym-jay/Blot/issues
@@ -22,7 +22,19 @@ It runs locally, needs no account or AI, and stays quiet unless the history give
22
22
 
23
23
  *A real run on Flask. Plain `git blame` points to a 2023 commit that only moved this line; Blot traces past it to the 2020 fix that explains it. (Regenerate with `python assets/demo/make_demo.py`.)*
24
24
 
25
- > **Status:** pre-alpha. Milestones M1 and M2 are done: `blot index` builds the history index (Flask's 3,800 commits in ~2 s), `blot install-hook` wires up git, and `blot check` runs the three checks. On Flask it traces an edit to `self_ref = weakref.ref(self)` past the 2023 file split to the 2020 fix, in under 500 ms. Replayed on the last 500 commits of Flask, requests, Express, Django and React, it warns on 0.6–9.5% of commits, and about half of its warnings (57 of 109, each labelled by hand) are worth a reviewer's time; see [bench/RESULTS.md](bench/RESULTS.md). Roadmap: [PRD](docs/PRD.md#12-milestones-4-weeks-part-time).
25
+ > **Status:** alpha. The checks, `why`, `map`, the agent guard and the MCP server all work and are tested live; a check takes about 500 ms on Flask. Measured on the last 500 commits of Flask, requests, Express, Django and React, it warns on 0.6–11% of commits, and 69 of its 124 warnings (56%, each labelled by hand) were worth a reviewer's time. Numbers and method: [bench/RESULTS.md](bench/RESULTS.md).
26
+
27
+ ## What Blot catches, and what it doesn't
28
+
29
+ Blot catches one kind of regression well: **a change that undoes or breaks an earlier bug fix**. Replayed
30
+ on 71 real regressions from the same five repos (commits that a later fix or revert named as the culprit),
31
+ it warned on the right code before 11 of them were committed. Most regressions are a different kind:
32
+ a bug in brand-new code, or in code that never came from a fix. Blot can't see those, so it caught 11 of the
33
+ 25 regressions of its kind (44%), and 15% of all of them.
34
+
35
+ So treat Blot as a reviewer who remembers your project's bug history, not as a bug finder. It stays
36
+ quiet about most changes, and when it speaks, it tells you which earlier fix to check. Details:
37
+ [recall on real regressions](bench/RESULTS.md#recall-real-regressions-measured-2026-11-25).
26
38
 
27
39
  ## Meet Sora
28
40
 
@@ -182,7 +194,7 @@ jobs:
182
194
  blot:
183
195
  runs-on: ubuntu-latest
184
196
  steps:
185
- - uses: Sym-jay/Blot@v0.7.1
197
+ - uses: Sym-jay/Blot@v0.7.2
186
198
  ```
187
199
 
188
200
  The action checks out the pull request with its full history, installs Blot, runs `blot index` and
@@ -1,6 +1,6 @@
1
1
  # Run Blot on a pull request and show its findings as warning annotations.
2
2
  # Usage (in a workflow triggered by pull_request):
3
- # - uses: Sym-jay/Blot@v0.7.1
3
+ # - uses: Sym-jay/Blot@v0.7.2
4
4
  # See "Use in CI" in README.md.
5
5
  name: Blot
6
6
  description: History-aware checks on the commits of a pull request, shown as warning annotations
@@ -67,3 +67,17 @@ GitHub CLI logged in and a GitHub `origin` or `upstream` remote).
67
67
 
68
68
  Target: **at most 1 warning per 10 commits**, and most of those should be worth reading.
69
69
  See [RESULTS.md](RESULTS.md) for the latest numbers.
70
+
71
+ ## 3. Regressions: recall on real history
72
+
73
+ `regressions.py` finds commits that a later fix names as the culprit (`This reverts commit <sha>`,
74
+ Django's `Regression in <sha>.`, and similar), replays each culprit at its parent like `--replay`
75
+ does, and reports how many Blot warned on. `regressions/<owner>-<repo>.json` holds the pairs, the
76
+ warnings and a hand judgement per pair (`bug`, `verdict`, `note`). `collect` keeps judgements, so
77
+ it can be re-run as history grows. See the docstring in `regressions.py` for the verdicts.
78
+
79
+ ```bash
80
+ python bench/regressions.py collect --repo <clone> --out regressions/<owner>-<repo>.json
81
+ python bench/regressions.py run --repo <clone> --file regressions/<owner>-<repo>.json
82
+ python bench/regressions.py report regressions/*.json
83
+ ```
@@ -187,6 +187,168 @@ Two narrower leads came out of this, both unmeasured: let the refactor hop match
187
187
  (Black's trailing commas, as in `025589ee`), and follow renamed attributes (`self.session` →
188
188
  `self._session`).
189
189
 
190
+ ### Tried and dropped: a per-commit warning budget (2026-11-25)
191
+
192
+ Idea: show at most N warnings per commit, ranked by strength (strong defect or CVE wording first, then
193
+ a linked issue), to bring Django under 1 warning per 10 commits. Simulated on the labelled replays
194
+ (after #45), with no new runs:
195
+
196
+ | Budget | Precision | Django, warnings / 10 commits | Useful warnings hidden |
197
+ |---|---|---|---|
198
+ | none | 69/124 (55.6%) | 1.43 | 0 |
199
+ | 3 | 68/114 (59.6%) | 1.37 | 1 |
200
+ | 2 | 65/107 (60.7%) | 1.31 | 4 |
201
+ | 1 | 55/89 (61.8%) | 1.09 | 14 |
202
+
203
+ It doesn't fix the volume: 71 of the 89 commits that warn have a single warning, so Django's rate
204
+ comes from many commits warning once (a Django fix often touches an earlier fix, and 69% of those
205
+ warnings are useful). It also hides useful warnings, because the ranking can't tell them apart: at a
206
+ budget of 2, a requests commit would show two noise warnings and hide its one useful one. The
207
+ precision gain is only noise from a few huge commits being cut. Not kept. If anything, long lists
208
+ could be collapsed in the output ("+4 more") without dropping a warning.
209
+
210
+ ## Recall: real regressions (measured 2026-11-25)
211
+
212
+ Precision asks "when Blot warns, is it worth reading?". Recall asks the other half: **of the commits
213
+ that later turned out to cause a bug, how many did Blot warn on when they were committed?** This is
214
+ the first time it has been measured on real history rather than scripted cases.
215
+
216
+ **Pairs.** [`regressions.py`](regressions.py) reads each reference repo's whole history (at the
217
+ labelled heads above) for fix commits that name their culprit by sha: `This reverts commit <sha>`,
218
+ Django's `Regression in <sha>.`, "regression introduced by / caused by / broken in <sha>",
219
+ `Fixes: <sha>`, and React's `Reverts facebook/react#N` / "regression from #N" (mapped to the one
220
+ commit whose subject ends in `(#N)`). From 1,067 references:
221
+
222
+ | Dropped | Count |
223
+ |---|---|
224
+ | older than the 40 newest pairs per repo (Django and React only) | 614 |
225
+ | culprit already named by an earlier fix | 118 |
226
+ | touches no file Blot checks (tests, docs, generated) | 88 |
227
+ | sha not found, or not an ancestor of the fix | 45 |
228
+ | more than 50 files (the replay's `--max-files`) | 25 |
229
+ | culprit is itself a revert (a re-land, not a bug) | 19 |
230
+ | merge commit | 16 |
231
+ | PR number not mapped to exactly one commit | 5 |
232
+ | **kept** | **137** |
233
+
234
+ **Replay.** Each culprit is checked at its parent with only its ancestors visible, as
235
+ `blot bench --replay` does: `_ReplayStore` hides fixes that weren't ancestors, and co-change counts
236
+ come from the culprit's own ancestors. Blot's checks were not changed.
237
+
238
+ **Judgement.** Every pair was judged by hand (notes in [`regressions/`](regressions/)):
239
+
240
+ - `bug`: did the culprit really cause a bug? A revert counts only if the message, PR, changelog
241
+ or ticket says what broke. 66 of the 137 were reverted for other reasons (wrong branch, flag
242
+ rollouts, design changes, "just kidding"), mostly in requests and React. They are left out.
243
+ - `hit-on-target`: Blot warned, and on the code the later fix was about. `hit-elsewhere`: it
244
+ warned, but about something else. To help decide, each warning records `near_fix`: whether
245
+ the fix changed what the culprit wrote in that hunk.
246
+ - `miss-gap`: no warning, but the culprit changed a line from a real earlier fix, and a warning
247
+ there would have been on target. `miss-outside`: the bug is outside Blot's model (new code, or
248
+ lines that came from features).
249
+
250
+ | Repo | Pairs | Real bugs | Warned | On target | Recall, raw | Within Blot's model | Recall within model |
251
+ |---|---|---|---|---|---|---|---|
252
+ | pallets/flask | 7 | 3 | 0 | 0 | 0/3 | 1 | 0/1 |
253
+ | psf/requests | 31 | 4 | 0 | 0 | 0/4 | 2 | 0/2 |
254
+ | expressjs/express | 19 | 8 | 1 | 1 | 1/8 (12%) | 2 | 1/2 |
255
+ | django/django | 40 | 39 | 17 | 10 | 10/39 (26%) | 19 | 10/19 (53%) |
256
+ | facebook/react | 40 | 17 | 1 | 0 | 0/17 | 1 | 0/1 |
257
+ | **All** | 137 | **71** | 19 | **11** | **11/71 (15%)** | 25 | **11/25 (44%)** |
258
+
259
+ "Within Blot's model" = hits + `miss-gap`. Raw recall counts only on-target hits. Counting every
260
+ warning, 19/71 (27%) of culprits got one.
261
+
262
+ **What it means.** Blot catches regressions of one kind: a change that undoes part of an earlier,
263
+ recognisable fix. In Django, where every fix says `Fixed #N --` and regressions often rework
264
+ recent fixes, 10 of 39 regressions were flagged on the right code. Some of them:
265
+
266
+ - `0246f4788` deprecated `constant_time_compare()` and replaced its calls added by fixes #34384
267
+ and #32800. The change broke mixed-type callers (#36572, a release blocker) and was reverted.
268
+ - `7d9aab8da` moved the `_prepare_related_fields_for_save()` call from fix #29497. The fix for
269
+ #37234 moved it back.
270
+ - `821619aa8` simplified away the `hints=` plumbing from fix #13724. The regression (#37300) lost
271
+ instance hints on prefetch querysets.
272
+ - Express `2bba69f63` removed the default OPTIONS response from fix 9c87eed. Issue #1690
273
+ ("Default OPTIONS Not Functioning") followed, and the change was reverted.
274
+
275
+ Of the 8 `hit-elsewhere` warnings, 6 cite a real fix in another file or function. In the other 2,
276
+ a generic re-added line (`for field in fields:`) happened to sit in the code the fix changed, but
277
+ the cited fix had nothing to do with it.
278
+
279
+ **Why the rest were missed** (52 real-bug misses):
280
+
281
+ | Reason | Misses |
282
+ |---|---|
283
+ | outside the model: changed lines came from features or other non-fix commits | 23 |
284
+ | outside the model: the bug is in new code (pure additions, new functions or checks) | 18 |
285
+ | **classification: the culprit changed lines from a real fix that Blot didn't recognise as one** | **6** |
286
+ | outside the model: build, dependency or CI breakage (`pyproject.toml`, `package.json`, `tox.ini`) | 5 |
287
+
288
+ All 6 in-model misses are classification gaps, and each fix lacks a fix word:
289
+ requests `b149be5` "loosen URL handling for non-native URL schemes", requests `641f461` "Make sure
290
+ proxies have their scheme attached.", Express `3afbcd0` "JSON and JSONP default to UTF-8 … Closes
291
+ #632", Flask `d4076cf` "strip the ending slash for static_url_path", Django `44dd91e` "Fixed #4015
292
+ -- Changed login() and logout() …" (severity 1: "Changed"), and Django `857b104` "Fixed #34619 --
293
+ Associated FilteredSelectMultiple elements to their label". No miss was caused by tracing or the
294
+ matcher. The Black reformat `9c19aff7` stopped tracing on 5 lines, but each of those culprits was
295
+ caught through another line.
296
+
297
+ React is 0/17. Its regressions were in new code or in lines from feature commits, and most
298
+ reverts there are flag rollouts, which have no bug to catch.
299
+
300
+ Caveats: the newest 40 pairs per repo for Django and React, so fixes from 2025-08 on (Django)
301
+ and 2020-08 on (React); a single judge; reverts without a stated reason count as "not a bug", which
302
+ may undercount real regressions in requests and React.
303
+
304
+ ```bash
305
+ python bench/regressions.py collect --repo <clone> --out bench/regressions/<owner>-<repo>.json # finds pairs, keeps judgements
306
+ python bench/regressions.py run --repo <clone> --file bench/regressions/<owner>-<repo>.json # replays culprits (Django ~2.5 min)
307
+ python bench/regressions.py report bench/regressions/*.json
308
+ ```
309
+
310
+ ### `--github` on both measures (2026-11-27)
311
+
312
+ Re-run on today's code (after #45) for the four GitHub-tracked repos, with issue and PR labels
313
+ (`blot bench --replay 500 --github`, `regressions.py run --github`). Django is unchanged, since its
314
+ GitHub Issues are off.
315
+
316
+ | | Without `--github` | With `--github` |
317
+ |---|---|---|
318
+ | Precision, all five | 69/124 (55.6%) | 78/143 (54.5%): +9 useful, +10 noise |
319
+ | Real regressions warned on target | 11/71 | 12/71 |
320
+
321
+ Labels mostly *upgrade* commits (194 upgraded, 4 demoted), so they widen coverage at about the same
322
+ precision. The one regression gained is React `553440bd1`: the warning lands on the hunk the later
323
+ fix touched, citing `9d67847` "[Bugfix] Dropped updates inside a suspended tree". That fix is
324
+ plain from its subject, but without labels Blot misses it because it reads `[Bugfix]` as a project
325
+ tag like `[DevTools]`, an offline classification gap worth measuring on its own. `--github` stays an
326
+ opt-in, not a default. The 6 new replay warnings are labelled (reasons prefixed "--github replay").
327
+
328
+ ### Kept: explicit bug-fix markers (2026-11-27)
329
+
330
+ The lead above, measured on both sides. `[Bugfix] Dropped updates …` was rated a feature: the `[Tag]`
331
+ skip added for `[DevTools] upgrade …` read `[Bugfix]` as a project tag, then "Dropped" as a feature
332
+ verb. Now an explicit marker at the start (`[Bugfix]`, `[Bug fix]`, `[Bug]`, `[Hotfix]`, `[Fix]`,
333
+ `Bugfix:`, `Hotfix:`) makes a commit a fix unless it is routine (docs, tests). About 60 commits in the
334
+ five repos carry one, almost all in React; Django has none, so its results can't change and it wasn't
335
+ re-run.
336
+
337
+ | | Before | With the rule |
338
+ |---|---|---|
339
+ | Real regressions warned on target | 11/71 | **12/71 (17%)** |
340
+ | Within Blot's model | 11/25 | 12/27 (44%) |
341
+ | Precision | 69/124 (55.6%) | 69/125 (55.2%) |
342
+
343
+ Three React regressions changed. Two were "outside the model" only because their removed lines came
344
+ from `Bugfix:` commits that Blot hadn't recognised: `553440bd1` (removing blocking mode) is now
345
+ warned on target, since the bug was the removal itself and Blot flags removing code from fix #19164;
346
+ `6c4bbc783` now warns, but its revert names no bug location, so it counts as elsewhere, the convention
347
+ #53 set for such reverts. `0f1856c49` gained a second warning and stays elsewhere. The one new replay
348
+ warning is noise (an assignment chain reflowed). Precision slips by that one warning, but the rule is
349
+ narrow and the recall gain is real, so it is kept: the first rule judged on recall as well as
350
+ precision.
351
+
190
352
  ## Reproduce
191
353
 
192
354
  ```bash
@@ -241,6 +241,36 @@
241
241
  "cited": "d2de128",
242
242
  "verdict": "noise",
243
243
  "reason": "dev dependency bump; cited commit was a deps bump"
244
+ },
245
+ {
246
+ "sha": "3bb6d96ba",
247
+ "subject": "examples: demonstrate sub directory download",
248
+ "check": "removed-fix",
249
+ "path": "examples/downloads/index.js",
250
+ "line": 13,
251
+ "cited": "e606d99",
252
+ "verdict": "noise",
253
+ "reason": "--github replay: an example page's link list changed; cited fix (Unicode filenames) untouched"
254
+ },
255
+ {
256
+ "sha": "da4d763ff",
257
+ "subject": "Improved fix for open redirect allow list bypass",
258
+ "check": "removed-fix",
259
+ "path": "lib/response.js",
260
+ "line": 908,
261
+ "cited": "a003cfa",
262
+ "verdict": "useful",
263
+ "reason": "--github replay: the improved open-redirect fix changes String(url) from fix #5554"
264
+ },
265
+ {
266
+ "sha": "0b746953c",
267
+ "subject": "Improved fix for open redirect allow list bypass",
268
+ "check": "removed-fix",
269
+ "path": "lib/response.js",
270
+ "line": 908,
271
+ "cited": "a003cfa",
272
+ "verdict": "useful",
273
+ "reason": "--github replay: the improved open-redirect fix changes String(url) from fix #5554 (same change, other branch)"
244
274
  }
245
275
  ]
246
276
  }
@@ -931,6 +931,46 @@
931
931
  "cited": "96aca5f",
932
932
  "verdict": "useful",
933
933
  "reason": "changes the ping callbacks in the stack-overflow fix #30419"
934
+ },
935
+ {
936
+ "sha": "01c4d03d8",
937
+ "subject": "[DevTools] Clear element inspection if host element not owned by any renderer is selected (#35504)",
938
+ "check": "removed-fix",
939
+ "path": "packages/react-devtools-shared/src/backend/agent.js",
940
+ "line": 941,
941
+ "cited": "f963c80",
942
+ "verdict": "noise",
943
+ "reason": "--github replay: cited commit is a feature (\"Implement best renderer\") a label promoted"
944
+ },
945
+ {
946
+ "sha": "c0060cf2a",
947
+ "subject": "[DevTools] Enable support for the React DevTools Client to connect to different host/port/path (#35886)",
948
+ "check": "removed-fix",
949
+ "path": "packages/react-devtools/app.html",
950
+ "line": 161,
951
+ "cited": "aef9303",
952
+ "verdict": "noise",
953
+ "reason": "--github replay: destructuring extended with new fields; cited commit is an upgrade"
954
+ },
955
+ {
956
+ "sha": "aac12ce59",
957
+ "subject": "[DevTools] chore: extract pure functions from fiber/renderer.js (#35924)",
958
+ "check": "removed-fix",
959
+ "path": "packages/react-devtools-shared/src/backend/fiber/renderer.js",
960
+ "line": 4535,
961
+ "cited": "24f215c",
962
+ "verdict": "noise",
963
+ "reason": "--github replay: a refactor passes a new leading argument to the fix's call"
964
+ },
965
+ {
966
+ "sha": "e730b5e65",
967
+ "subject": "[flow] Update files synced to react-native to use modern flow syntax (#36759)",
968
+ "check": "readded-bug",
969
+ "path": "packages/react-reconciler/src/ReactFiberHooks.js",
970
+ "line": 3830,
971
+ "cited": "2dddd1e",
972
+ "verdict": "noise",
973
+ "reason": "[Bugfix] marker replay: an assignment chain reflowed onto other lines, same tokens"
934
974
  }
935
975
  ]
936
976
  }