blot-git 0.7.0__tar.gz → 0.7.1__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.
- {blot_git-0.7.0 → blot_git-0.7.1}/.pre-commit-hooks.yaml +1 -1
- {blot_git-0.7.0 → blot_git-0.7.1}/CLAUDE.md +20 -10
- {blot_git-0.7.0 → blot_git-0.7.1}/PKG-INFO +1 -1
- {blot_git-0.7.0 → blot_git-0.7.1}/README.md +1 -1
- {blot_git-0.7.0 → blot_git-0.7.1}/action.yml +1 -1
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/RESULTS.md +71 -4
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/labels/django-django.json +190 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/labels/facebook-react.json +20 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/labels/pallets-flask.json +10 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/labels/psf-requests.json +30 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/pyproject.toml +1 -1
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/__init__.py +1 -1
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/checks/removed_fix.py +1 -1
- blot_git-0.7.1/src/blot/diff.py +473 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_checks.py +80 -0
- blot_git-0.7.1/tests/test_diff.py +481 -0
- blot_git-0.7.1/tests/test_trace.py +61 -0
- blot_git-0.7.0/src/blot/diff.py +0 -186
- blot_git-0.7.0/tests/test_diff.py +0 -80
- {blot_git-0.7.0 → blot_git-0.7.1}/.gitattributes +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.github/ISSUE_TEMPLATE/bench_case.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.github/ISSUE_TEMPLATE/check_idea.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.github/pull_request_template.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.github/workflows/blot.yml +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.github/workflows/ci.yml +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.github/workflows/release.yml +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/.gitignore +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/CONTRIBUTING.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/LICENSE +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/demo/demo.gif +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/demo/make_demo.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/alert.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/faces.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/happy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/idle.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/sad.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/sleepy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/walk.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/blue/worried.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/build_sprites.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/alert.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/faces.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/happy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/idle.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/sad.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/sleepy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/walk.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/mustard/worried.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/alert.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/faces.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/happy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/idle.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/sad.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/sleepy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/walk.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/orange/worried.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/alert.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/faces.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/happy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/idle.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/sad.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/sleepy.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/walk.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/assets/sora/sage/worried.svg +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/README.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/cases.json +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/bench/labels/expressjs-express.json +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/docs/EXPLAINER.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/docs/PRD.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/docs/PYPI.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/docs/competitors.md +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/__main__.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/bench.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/checks/__init__.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/checks/base.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/checks/cochange.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/checks/readded_bug.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/classify.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/cli.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/config.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/fixmap.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/git.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/github.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/guard.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/hooks.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/index.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/mcp.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/report.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/store.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/trace.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/src/blot/why.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/conftest.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_action.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_bench.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_classify.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_cli.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_config.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_git.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_guard.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_hooks.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_index.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_map.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_mcp.py +0 -0
- {blot_git-0.7.0 → blot_git-0.7.1}/tests/test_why_github.py +0 -0
|
@@ -24,13 +24,15 @@ always changes with another (`forgot-related-file`). Mascot: Sora the slime. Own
|
|
|
24
24
|
```bash
|
|
25
25
|
python -m venv .venv && .venv/Scripts/python -m pip install -e ".[dev]"
|
|
26
26
|
.venv/Scripts/python -m pytest -q
|
|
27
|
-
.venv/Scripts/blot bench --workdir <short path> # must stay 33/33
|
|
27
|
+
.venv/Scripts/blot bench --workdir <short path> # must stay 33/33 (e.g. %LOCALAPPDATA%\Temp\wl\b33)
|
|
28
28
|
```
|
|
29
29
|
- Any change to `classify.py` or a check: on each of the 5 clones, checked out at the `head` in its
|
|
30
30
|
labels file, run `blot bench --replay 500 --labels bench/labels/<repo>.json --update-labels`. Keep a
|
|
31
31
|
rule only if precision rises and no `useful` warning disappears; label any new `null` verdicts
|
|
32
32
|
(rules in bench/README.md). Targets: ≤ 1 warning / 10 commits, precision ≥ 80%.
|
|
33
|
-
- Clones live in `%LOCALAPPDATA%\Temp\wl\
|
|
33
|
+
- Clones live in `%LOCALAPPDATA%\Temp\wl\rp\` (labelled heads; `...\wl\replay\` was wiped by a temp
|
|
34
|
+
cleanup on 2026-11-16) and `...\wl\b33\` (case runs; `wl\bench\` was emptied too, so b33 was cloned from
|
|
35
|
+
`rp\` with `origin` set to GitHub). Temp can be cleared: re-clone if `.git` is empty.
|
|
34
36
|
- `blot check` must stay under ~500 ms and never fail a commit because of Blot's own errors.
|
|
35
37
|
|
|
36
38
|
## Release (each release so far followed this)
|
|
@@ -52,24 +54,32 @@ python -m venv .venv && .venv/Scripts/python -m pip install -e ".[dev]"
|
|
|
52
54
|
- Writing code through bash heredocs mangles `\b`, `\n`, `\s`: use the Edit tool for regexes/strings.
|
|
53
55
|
- `gh api` paths: no leading slash (Git Bash rewrites it).
|
|
54
56
|
|
|
55
|
-
## State (2026-11-
|
|
56
|
-
- Released 0.7.
|
|
57
|
+
## State (2026-11-21)
|
|
58
|
+
- Released 0.7.1: checks, `why`, `map`, `--github`, agent guard (`blot guard` / `install-agent-hook`),
|
|
57
59
|
MCP server (`blot mcp` / `install-mcp`, tools `explain_lines` and `load_bearing_lines`), bench/replay
|
|
58
|
-
with labels, parallel indexing, pre-commit framework (`rev: v0.7.
|
|
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).
|
|
59
62
|
- Live-tested in Claude Code: the guard (2026-11-06: the agent cited fix 8efea0c it was undoing) and MCP
|
|
60
63
|
(2026-11-14: an agent called `load_bearing_lines` on its own and answered correctly).
|
|
61
|
-
Throwaway test folder: `Documents
|
|
64
|
+
Throwaway test folder: `Documents\flask-guard-test` (guard hook + `.mcp.json`).
|
|
62
65
|
- `blot map` takes ~1.5 s on Flask app.py. `trace_lines(whole_file=True)` drops `-C` from the first blame so
|
|
63
66
|
map and why agree; checks still use the old path.
|
|
64
|
-
- Precision (2026-11-
|
|
67
|
+
- Precision (2026-11-21, after #45): 69/124 useful (55.6%); Django 1.43 / 10 commits (over the ≤ 1
|
|
68
|
+
target), others ≤ 0.62.
|
|
65
69
|
`forgot-related-file` has 0 useful warnings in 45 labelled; candidate to become opt-in.
|
|
66
70
|
- `--github` measured (2026-11-01): precision unchanged, +7 useful warnings, almost no demotions.
|
|
67
71
|
- Tried and dropped (2026-11-01): "fix word + PR number" as an offline fix rule: +85 warnings at 22%
|
|
68
72
|
useful. Don't retry it without a narrower signal (see bench/RESULTS.md).
|
|
69
73
|
- Known recall limit: tracing only passes commits classified as refactors, so a big non-refactor rewrite
|
|
70
|
-
hides older fixes (e.g. Flask `c2705ffd` hides fix #2935 in `ctx.py` `copy()`).
|
|
74
|
+
hides older fixes (e.g. Flask `c2705ffd` hides fix #2935 in `ctx.py` `copy()`). Diagnosed 2026-11-18:
|
|
75
|
+
`c2705ffd` really changed those tokens (`self.session` → `self._session`), so no "unchanged line" rule
|
|
76
|
+
can reach #2935.
|
|
77
|
+
- Tried and dropped (2026-11-18): hop past non-refactor commits when the line survived them unchanged in
|
|
78
|
+
the same file (normalized or KeptLines). Precision 54.6% → 52.8%: lost 8 warnings (4 useful, e.g. Express's
|
|
79
|
+
open-redirect fix), added 6 (1 useful). `map` on app.py went 1.4 → 3.5 s. Exact-only matching changed no
|
|
80
|
+
warning. `tests/test_trace.py` pins why. Unmeasured leads: KeptLines in the refactor hop (Black's
|
|
81
|
+
trailing commas), renamed attributes.
|
|
71
82
|
- Labels match on commit/check/path/cited commit, not line: when a rule moves a warning to another line,
|
|
72
83
|
re-check its label (#40 found two that way).
|
|
73
|
-
- Contributors: Sandro850 (#30, #38, #40). Open issues: #2–#4, #6 (bench cases), #33 (guard reports)
|
|
74
|
-
#36 (keyword-argument noise).
|
|
84
|
+
- Contributors: Sandro850 (#30, #38, #40, #45). Open issues: #2–#4, #6 (bench cases), #33 (guard reports).
|
|
75
85
|
- Launch: dev.to post published 2026-10-24; the CVE sentence there should mention the withdrawn advisory.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: blot-git
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.1
|
|
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
|
|
@@ -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.
|
|
3
|
+
# - uses: Sym-jay/Blot@v0.7.1
|
|
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
|
|
@@ -74,16 +74,38 @@ CVE-2026-15307 fix). Now the warning points at the code, and both are relabelled
|
|
|
74
74
|
| requests, Express, React | unchanged | unchanged |
|
|
75
75
|
| **All five** | 57/109 (52.3%) | **59/108 (54.6%)** |
|
|
76
76
|
|
|
77
|
-
###
|
|
77
|
+
### Since 0.7.0: a structural matcher (#45, by @Sandro850)
|
|
78
|
+
|
|
79
|
+
`removed-fix` decides whether a removed line survives among the added lines (`KeptLines`). The old
|
|
80
|
+
matcher accepted any inserted token outside `_LOGIC`, which flagged an appended keyword argument (it
|
|
81
|
+
inserts `=`) but let real edits through: `value` → `value.strip()`, arguments inserted mid-list,
|
|
82
|
+
matches stitched across hunks. The new matcher is structural: the fix's existing arguments stay token
|
|
83
|
+
for token, new arguments may only be appended to that same call (a `def` only gains parameters with a
|
|
84
|
+
default), and anything it can't verify counts as an edit.
|
|
85
|
+
|
|
86
|
+
| Repo | Before | After |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| pallets/flask | 4/4 (100%) | 4/4 (100%) |
|
|
89
|
+
| psf/requests | 2/8 (25%) | 2/10 (20%) |
|
|
90
|
+
| expressjs/express | 5/9 (56%) | 5/9 (56%) |
|
|
91
|
+
| django/django | 41/58 (71%), 1.17 / 10 commits | 49/71 (69%), 1.43 / 10 commits |
|
|
92
|
+
| facebook/react | 7/29 (24%) | 9/30 (30%) |
|
|
93
|
+
| **All five** | 59/108 (54.6%) | **69/124 (55.6%)** |
|
|
94
|
+
|
|
95
|
+
The three #36 noise warnings are gone and no useful warning was lost. The stricter matcher adds 19
|
|
96
|
+
warnings (10 useful, e.g. two Django CVE fixes whose code gained `.strip()`; 9 noise). Re-measured
|
|
97
|
+
independently on all five repos before merging. Cost: Django is further over the ≤ 1 / 10 target.
|
|
98
|
+
|
|
99
|
+
### Noise still there (55 warnings)
|
|
78
100
|
|
|
79
101
|
| Pattern | Warnings | Why there's no rule yet |
|
|
80
102
|
|---|---|---|
|
|
81
103
|
| co-change partner not needed (React) | 9 | **0 of 45 co-change warnings across all five repos were useful.** See below. |
|
|
82
104
|
| renames, equivalent API swaps (`substr` → `slice`, `req.connection` → `req.socket`) | 11 | a rename and a switch to a different variable look the same on one line |
|
|
83
|
-
|
|
|
84
|
-
| formatter reflows with f-strings or joined lines (requests' Black commit) | 4 | dropping parentheses can change precedence |
|
|
105
|
+
| formatter reflows with f-strings, joined lines or re-split strings (requests' Black commit) | 6 | dropping parentheses can change precedence |
|
|
85
106
|
| deleting a legacy module or feature in pieces (React) | 6 | intentional, but only the commit message says so |
|
|
86
|
-
|
|
|
107
|
+
| colour-only template changes (Django's dark mode, `3d34265d`) | 5 | the line really changed; only a reader knows it's cosmetic |
|
|
108
|
+
| other: code moved to another file, fix behaviour kept while restructuring, generic re-added lines | 18 | case by case |
|
|
87
109
|
|
|
88
110
|
**`forgot-related-file` has shown no useful warning yet**: 0/45 before this release, 0/9 after. It
|
|
89
111
|
stays on, because the remaining warnings are rare (React only), but it is the first candidate to
|
|
@@ -120,6 +142,51 @@ labelled (all of requests' and Express's, 20 of React's), **10 were useful (22%)
|
|
|
120
142
|
from 52% to about 39%, so the rule was not kept. Its 46 labels stay in `labels/` for any narrower
|
|
121
143
|
attempt. A label written by a maintainer says more than a keyword can.
|
|
122
144
|
|
|
145
|
+
### Tried and dropped: tracing past unchanged lines (2026-11-18)
|
|
146
|
+
|
|
147
|
+
**The gap.** At Flask HEAD, `blot why` and `blot map src/flask/ctx.py` don't link `copy()` to fix
|
|
148
|
+
#2935 (`e08bcf9`). Blame stops at `c2705ffd` ("merge app and request context"), and tracing only goes
|
|
149
|
+
past commits classified as refactors.
|
|
150
|
+
|
|
151
|
+
**Diagnosis: `c2705ffd` really rewrote those lines.** It changed `request=self.request,` /
|
|
152
|
+
`session=self.session,` to `request=self._request,` / `session=self._session,` (the session became
|
|
153
|
+
a lazy property backed by `_session`), dropped `environ=self.request.environ,`, and changed the
|
|
154
|
+
signature to `def copy(self) -> te.Self:`. `git blame -w -M -C -C` also stops at `c2705ffd`. No
|
|
155
|
+
normalized or KeptLines match exists in the parent, so no rule of the form "the line survived
|
|
156
|
+
unchanged" can reach #2935 here. The fix's intent survives; its tokens don't. Replay already warns on
|
|
157
|
+
`c2705ffd` itself (labelled useful), which is when it matters most.
|
|
158
|
+
|
|
159
|
+
**Rule tried anyway, to measure it:** when blame lands on a non-refactor commit that removed a line
|
|
160
|
+
from the same file with the same normalized text (or one the line only reformats, per `KeptLines`),
|
|
161
|
+
hop to the parent like a refactor hop, within `MAX_HOPS`.
|
|
162
|
+
|
|
163
|
+
| Repo | Warnings | Precision, before → with the rule | Lost (useful) | New (useful) |
|
|
164
|
+
|---|---|---|---|---|
|
|
165
|
+
| pallets/flask | 4 → 4 | 4/4 → 3/4 | 1 (1) | 1 (0) |
|
|
166
|
+
| psf/requests | 8 → 9 | 2/8 → 2/9 | 0 | 1 (0) |
|
|
167
|
+
| expressjs/express | 9 → 7 | 5/9 → 4/7 | 2 (1) | 0 |
|
|
168
|
+
| django/django | 58 → 58 | 41/58 → 40/58 | 4 (2) | 4 (1) |
|
|
169
|
+
| facebook/react | 29 → 28 | 7/29 → 7/28 | 1 (0) | 0 |
|
|
170
|
+
| **All five** | **108 → 106** | **59/108 (54.6%) → 56/106 (52.8%)** | **8 (4)** | **6 (1)** |
|
|
171
|
+
|
|
172
|
+
It loses useful warnings because `KeptLines` treats an inserted call as cosmetic, so the rule hops
|
|
173
|
+
past fixes that wrapped a value. Express `76eaa32` changed `this.set('Location', loc)` to
|
|
174
|
+
`this.set('Location', encodeUrl(loc))`, so the warning on the later open-redirect fix
|
|
175
|
+
(`0867302dd`) disappeared. Flask lost the `c2705ffd` warning: `e08bcf9` only added a comma to
|
|
176
|
+
`request=self.request`, and the line it did add, `session=self.session`, gained a trailing comma
|
|
177
|
+
in Black's `025589ee`, which the exact-match refactor hop can't follow. The one useful new warning
|
|
178
|
+
is Django `1b4d021b6`. Cost: `blot check` on the Flask demo went from ~470 to ~485 ms (median of 6),
|
|
179
|
+
and `blot map src/flask/app.py` from 1.4 s to 3.5 s.
|
|
180
|
+
|
|
181
|
+
An **exact-text-only variant** (no `KeptLines`) changed **no warning** on any of the five repos and still cost ~35 ms per check. Neither version was kept. The six new warnings stay
|
|
182
|
+
labelled in `labels/` (reasons prefixed "trace-past-unchanged experiment"). `tests/test_trace.py`
|
|
183
|
+
pins both behaviours: a rewritten line stops the trace, and a fix that wraps a value stays the
|
|
184
|
+
explanation.
|
|
185
|
+
|
|
186
|
+
Two narrower leads came out of this, both unmeasured: let the refactor hop match with `KeptLines`
|
|
187
|
+
(Black's trailing commas, as in `025589ee`), and follow renamed attributes (`self.session` →
|
|
188
|
+
`self._session`).
|
|
189
|
+
|
|
123
190
|
## Reproduce
|
|
124
191
|
|
|
125
192
|
```bash
|
|
@@ -641,6 +641,196 @@
|
|
|
641
641
|
"cited": "b8741c0",
|
|
642
642
|
"verdict": "noise",
|
|
643
643
|
"reason": "cited commit is an error-message wording fix"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"sha": "46c5e76f0",
|
|
647
|
+
"subject": "Fixed #36900 -- Used safe_join() on downloaded template archive.",
|
|
648
|
+
"check": "removed-fix",
|
|
649
|
+
"path": "django/core/management/templates.py",
|
|
650
|
+
"line": 348,
|
|
651
|
+
"cited": "a9a0f0b",
|
|
652
|
+
"verdict": "noise",
|
|
653
|
+
"reason": "trace-past-unchanged experiment (2026-11-18): cited commit is the #17042 startproject/startapp feature, not a fix"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"sha": "76e1bca13",
|
|
657
|
+
"subject": "Fixed #36694 -- Restored missing Index options in PostGISSchemaEditor._create_spatial_index_sql().",
|
|
658
|
+
"check": "removed-fix",
|
|
659
|
+
"path": "django/contrib/gis/db/backends/postgis/schema.py",
|
|
660
|
+
"line": 111,
|
|
661
|
+
"cited": "29345ae",
|
|
662
|
+
"verdict": "noise",
|
|
663
|
+
"reason": "trace-past-unchanged experiment (2026-11-18): restructures the index-name default into kwargs; the #32721 naming fix's behaviour is kept"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"sha": "1b4d021b6",
|
|
667
|
+
"subject": "Fixed #37403 -- Fixed JSONField __in crash on SQLite with Value(None) expressions.",
|
|
668
|
+
"check": "removed-fix",
|
|
669
|
+
"path": "django/db/models/fields/json.py",
|
|
670
|
+
"line": 444,
|
|
671
|
+
"cited": "7e1e198",
|
|
672
|
+
"verdict": "useful",
|
|
673
|
+
"reason": "trace-past-unchanged experiment (2026-11-18): a JSONIn __in fix reworks the Oracle json.loads(param) decoding that the #32096 __in crash fix added"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"sha": "c07486b98",
|
|
677
|
+
"subject": "Fixed #32980 -- Optimized ManyRelatedManager.__init__().",
|
|
678
|
+
"check": "removed-fix",
|
|
679
|
+
"path": "django/db/models/fields/related_descriptors.py",
|
|
680
|
+
"line": 1107,
|
|
681
|
+
"cited": "9777442",
|
|
682
|
+
"verdict": "noise",
|
|
683
|
+
"reason": "trace-past-unchanged experiment (2026-11-18): moves the through-field lookups from __init__ to the class body; #19385's behaviour is kept"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"sha": "21c51c262",
|
|
687
|
+
"subject": "Fixed #37060 -- Propagated AlterField through attname-based to_field references.",
|
|
688
|
+
"check": "removed-fix",
|
|
689
|
+
"path": "django/db/backends/base/schema.py",
|
|
690
|
+
"line": 39,
|
|
691
|
+
"cited": "ee17bb8",
|
|
692
|
+
"verdict": "useful",
|
|
693
|
+
"reason": "extends the relevance condition from fix #29193 (adds `or altered_field.attname in field.to_fields`)"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"sha": "bc9bed573",
|
|
697
|
+
"subject": "Fixed #37088 -- Included attributes in media object equality.",
|
|
698
|
+
"check": "removed-fix",
|
|
699
|
+
"path": "django/forms/widgets.py",
|
|
700
|
+
"line": 145,
|
|
701
|
+
"cited": "959d0c0",
|
|
702
|
+
"verdict": "useful",
|
|
703
|
+
"reason": "changes how Media builds _css_lists/_js_lists, the structure fix #30153's merge ordering works on"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"sha": "42aa0b336",
|
|
707
|
+
"subject": "Fixed CVE-2026-48587 -- Ignored whitespace padding when checking Vary header values.",
|
|
708
|
+
"check": "removed-fix",
|
|
709
|
+
"path": "django/utils/cache.py",
|
|
710
|
+
"line": 336,
|
|
711
|
+
"cited": "00fda7f",
|
|
712
|
+
"verdict": "useful",
|
|
713
|
+
"reason": "CVE-2026-48587: changes the Vary header comparison from fix #13283 (adds .strip())"
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"sha": "f1440a752",
|
|
717
|
+
"subject": "Fixed #36969, #35371 -- Reduced false positives in strings during collectstatic.",
|
|
718
|
+
"check": "removed-fix",
|
|
719
|
+
"path": "django/contrib/staticfiles/storage.py",
|
|
720
|
+
"line": 129,
|
|
721
|
+
"cited": "3047981",
|
|
722
|
+
"verdict": "useful",
|
|
723
|
+
"reason": "changes the pattern tuples and loop that fix #18050 added for @import handling"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"sha": "cd385e6b8",
|
|
727
|
+
"subject": "Fixed #31317 -- Avoided crash in CreateModel with unique_together and AlterUniqueTogether.",
|
|
728
|
+
"check": "removed-fix",
|
|
729
|
+
"path": "django/db/backends/base/schema.py",
|
|
730
|
+
"line": 671,
|
|
731
|
+
"cited": "b949e40",
|
|
732
|
+
"verdict": "noise",
|
|
733
|
+
"reason": "fix #23740's condition is kept: `constraint_kwargs.get(\"unique\") is True` is only extracted into `is_unique_constraint`; the deferred_sql fix doesn't change it"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"sha": "b461519bf",
|
|
737
|
+
"subject": "Refs #36560, CVE-2026-35193 -- Recognized qualified cache-control directives.",
|
|
738
|
+
"check": "removed-fix",
|
|
739
|
+
"path": "django/utils/cache.py",
|
|
740
|
+
"line": 53,
|
|
741
|
+
"cited": "b522469",
|
|
742
|
+
"verdict": "useful",
|
|
743
|
+
"reason": "CVE-2026-35193: changes the cache-control directive parsing from fix #4071 (adds .strip())"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"sha": "7b8504eaa",
|
|
747
|
+
"subject": "Fixed #35813 -- Made migrations track all changes to unmanaged models.",
|
|
748
|
+
"check": "removed-fix",
|
|
749
|
+
"path": "django/db/migrations/autodetector.py",
|
|
750
|
+
"line": 1843,
|
|
751
|
+
"cited": "061caa5",
|
|
752
|
+
"verdict": "useful",
|
|
753
|
+
"reason": "reorganises managed/unmanaged model handling, removing kept_unmanaged_keys paths that fix #24037 (data loss on Meta.managed changes) relied on"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"sha": "3d34265d5",
|
|
757
|
+
"subject": "Fixed #35875 -- Added dark mode support to technical 404 and 500 error views.",
|
|
758
|
+
"check": "removed-fix",
|
|
759
|
+
"path": "django/views/templates/csrf_403.html",
|
|
760
|
+
"line": 13,
|
|
761
|
+
"cited": "6b2d6e1",
|
|
762
|
+
"verdict": "noise",
|
|
763
|
+
"reason": "dark mode: only colours become light-dark(); the styling from fix #13590 is kept"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"sha": "3d34265d5",
|
|
767
|
+
"subject": "Fixed #35875 -- Added dark mode support to technical 404 and 500 error views.",
|
|
768
|
+
"check": "removed-fix",
|
|
769
|
+
"path": "django/views/templates/technical_404.html",
|
|
770
|
+
"line": 13,
|
|
771
|
+
"cited": "0a98333",
|
|
772
|
+
"verdict": "noise",
|
|
773
|
+
"reason": "dark mode: only colours become light-dark(); fix #36853's selectors are kept"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"sha": "3d34265d5",
|
|
777
|
+
"subject": "Fixed #35875 -- Added dark mode support to technical 404 and 500 error views.",
|
|
778
|
+
"check": "removed-fix",
|
|
779
|
+
"path": "django/views/templates/technical_404.html",
|
|
780
|
+
"line": 24,
|
|
781
|
+
"cited": "3b8527e",
|
|
782
|
+
"verdict": "noise",
|
|
783
|
+
"reason": "dark mode: only colours become light-dark(); the exception message style from fix #32637 is kept"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"sha": "3d34265d5",
|
|
787
|
+
"subject": "Fixed #35875 -- Added dark mode support to technical 404 and 500 error views.",
|
|
788
|
+
"check": "removed-fix",
|
|
789
|
+
"path": "django/views/templates/technical_500.html",
|
|
790
|
+
"line": 14,
|
|
791
|
+
"cited": "0a98333",
|
|
792
|
+
"verdict": "noise",
|
|
793
|
+
"reason": "dark mode: only colours become light-dark(); fix #36853's selectors are kept"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"sha": "3d34265d5",
|
|
797
|
+
"subject": "Fixed #35875 -- Added dark mode support to technical 404 and 500 error views.",
|
|
798
|
+
"check": "removed-fix",
|
|
799
|
+
"path": "django/views/templates/technical_500.html",
|
|
800
|
+
"line": 47,
|
|
801
|
+
"cited": "1c00493",
|
|
802
|
+
"verdict": "noise",
|
|
803
|
+
"reason": "dark mode: only colours become light-dark(); unrelated to fix #32624's show/hide markup"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"sha": "8cbdd4a81",
|
|
807
|
+
"subject": "Fixed #37286 -- Preserved unique constraints when removing db_index.",
|
|
808
|
+
"check": "removed-fix",
|
|
809
|
+
"path": "django/db/backends/base/schema.py",
|
|
810
|
+
"line": 1095,
|
|
811
|
+
"cited": "5c17c27",
|
|
812
|
+
"verdict": "useful",
|
|
813
|
+
"reason": "changes the exclude set that fix #30172 added (now also excludes meta_constraint_names)"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"sha": "62ef9d40c",
|
|
817
|
+
"subject": "Refs CVE-2026-15830 -- Fixed WKB geometry collection limit bypasses.",
|
|
818
|
+
"check": "removed-fix",
|
|
819
|
+
"path": "django/contrib/gis/geos/prototypes/io.py",
|
|
820
|
+
"line": 307,
|
|
821
|
+
"cited": "f3822d4",
|
|
822
|
+
"verdict": "useful",
|
|
823
|
+
"reason": "rewrites the str/bytes handling from fix #34026"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"sha": "9014ca519",
|
|
827
|
+
"subject": "Fixed #37418 -- Fixed JSONField/HStoreField crash on deeply nested JSON.",
|
|
828
|
+
"check": "removed-fix",
|
|
829
|
+
"path": "django/forms/fields.py",
|
|
830
|
+
"line": 1366,
|
|
831
|
+
"cited": "6789ded",
|
|
832
|
+
"verdict": "noise",
|
|
833
|
+
"reason": "cited commit adds the JSONField feature (#12990), not a bug fix"
|
|
644
834
|
}
|
|
645
835
|
]
|
|
646
836
|
}
|
|
@@ -911,6 +911,26 @@
|
|
|
911
911
|
"cited": "65a56d0",
|
|
912
912
|
"verdict": "useful",
|
|
913
913
|
"reason": "changes the promise resolution from timing fix #31304"
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"sha": "f4e0d4ed0",
|
|
917
|
+
"subject": "[enableInfiniteRenderLoopDetection] Add a flag to force throwing (#36357)",
|
|
918
|
+
"check": "removed-fix",
|
|
919
|
+
"path": "packages/react-reconciler/src/ReactFiberWorkLoop.js",
|
|
920
|
+
"line": 5197,
|
|
921
|
+
"cited": "b4546cd",
|
|
922
|
+
"verdict": "useful",
|
|
923
|
+
"reason": "changes the warn-instead-of-throw decision that fix #35999 introduced"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"sha": "43bcbf800",
|
|
927
|
+
"subject": "[Fizz] Allow Pending Work to Specialize Abort Reasons (#36586)",
|
|
928
|
+
"check": "removed-fix",
|
|
929
|
+
"path": "packages/react-server/src/ReactFizzServer.js",
|
|
930
|
+
"line": 4207,
|
|
931
|
+
"cited": "96aca5f",
|
|
932
|
+
"verdict": "useful",
|
|
933
|
+
"reason": "changes the ping callbacks in the stack-overflow fix #30419"
|
|
914
934
|
}
|
|
915
935
|
]
|
|
916
936
|
}
|
|
@@ -51,6 +51,16 @@
|
|
|
51
51
|
"cited": "e08bcf9",
|
|
52
52
|
"verdict": "useful",
|
|
53
53
|
"reason": "changes the copy() call that passes session=self.session, from fix #2935 (was mislabelled: the old warning pointed at the docstring line above)"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"sha": "44ffe6c6d",
|
|
57
|
+
"subject": "add __future__ annotations",
|
|
58
|
+
"check": "removed-fix",
|
|
59
|
+
"path": "src/flask/ctx.py",
|
|
60
|
+
"line": 318,
|
|
61
|
+
"cited": "e08bcf9",
|
|
62
|
+
"verdict": "noise",
|
|
63
|
+
"reason": "trace-past-unchanged experiment (2026-11-18): type-hint modernization of the `self.session` annotation; behaviour unchanged"
|
|
54
64
|
}
|
|
55
65
|
]
|
|
56
66
|
}
|
|
@@ -211,6 +211,36 @@
|
|
|
211
211
|
"cited": "6f205ff",
|
|
212
212
|
"verdict": "noise",
|
|
213
213
|
"reason": "same check moved into a helper"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"sha": "561e4b688",
|
|
217
|
+
"subject": "Add inline types to Requests (#7272)",
|
|
218
|
+
"check": "removed-fix",
|
|
219
|
+
"path": "src/requests/models.py",
|
|
220
|
+
"line": 942,
|
|
221
|
+
"cited": "bc5cc0d",
|
|
222
|
+
"verdict": "noise",
|
|
223
|
+
"reason": "trace-past-unchanged experiment (2026-11-18): wrong trail: KeptLines matched the main decode line to the blind-fallback line bc5cc0d added; the edited line predates the fix"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"sha": "2a6f290bc",
|
|
227
|
+
"subject": "Add automatic code formatting to Requests (#6095)",
|
|
228
|
+
"check": "removed-fix",
|
|
229
|
+
"path": "requests/adapters.py",
|
|
230
|
+
"line": 308,
|
|
231
|
+
"cited": "9a8a826",
|
|
232
|
+
"verdict": "noise",
|
|
233
|
+
"reason": "#36 replay: Black reformat; the implicitly concatenated message only moved its split point (same string), but literal tokens differ, so the matcher fails closed"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"sha": "2a6f290bc",
|
|
237
|
+
"subject": "Add automatic code formatting to Requests (#6095)",
|
|
238
|
+
"check": "removed-fix",
|
|
239
|
+
"path": "requests/structures.py",
|
|
240
|
+
"line": 68,
|
|
241
|
+
"cited": "f7596c7",
|
|
242
|
+
"verdict": "noise",
|
|
243
|
+
"reason": "#36 replay: Black joins the multi-line generator onto one line with identical tokens; fragment lines fail closed"
|
|
214
244
|
}
|
|
215
245
|
]
|
|
216
246
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "blot-git"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.1"
|
|
4
4
|
description = "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
|
readme = "docs/PYPI.md" # text-only; the GitHub README's relative Sora images break on PyPI
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -41,7 +41,7 @@ class RemovedFix(Check):
|
|
|
41
41
|
if change.old_path is None or change.deleted or not change.removed or is_skipped(change.old_path, config):
|
|
42
42
|
continue
|
|
43
43
|
# reformatted or extended in place (quotes, wrapping, type hints): not removed either
|
|
44
|
-
kept = KeptLines([text for _, text in change.added])
|
|
44
|
+
kept = KeptLines([text for _, text in change.added], numbers=[n for n, _ in change.added])
|
|
45
45
|
# blank, generic (imports, `return`) and prose lines say nothing about the fix
|
|
46
46
|
texts = {
|
|
47
47
|
n: t for n, t in change.removed
|