Commit 10a8d69
chore: pin the lint/type-check toolchain instead of floating it (#533)
requirements.txt pinned all 16 runtime deps with ==, but every entry in
requirements-test.txt used >=, so ruff, mypy and bandit resolved to whatever
was newest on PyPI at the moment CI ran.
Those three decide the Lint and Security Scan verdicts, and unlike a test
runner they change their answer on unchanged code: a new ruff rule or a
widened mypy check reddens a commit nobody touched, and re-running an old
green build stops reproducing it. That is the worst failure mode for an
external contributor, whose first PR goes red for a reason not visible in
the diff.
The drift was already real, not hypothetical. The file read ruff>=0.15.21
while CI had been installing 0.16.0 — a minor-version jump past the 0.15.22
that #522 proposed, which is exactly why Dependabot closed that PR as
redundant ("updatable in another way"). The declared floor and the executed
version had silently diverged.
cache: 'pip' never mitigated this: it caches downloaded wheels, but pip
still resolves against the index and still picks the newest match.
test.yml:336 already guards the coverage job against this class of problem
by reinstalling from the same requirements file, which buys consistency
WITHIN a run. This buys reproducibility ACROSS runs.
Pins ruff==0.16.0, mypy==2.3.0, bandit==1.9.4 — the versions CI already
resolves, so no behaviour changes. The pytest stack deliberately stays on
>=: it changes what runs, not what counts as a violation, and pinning it
would multiply Dependabot volume for less benefit. Dependabot still manages
these files, so upgrades keep arriving — as a reviewable PR with CI
attached rather than silently mid-week.
A parametrized test in tests/unit/shared/test_pinned_dependencies.py keeps
the three from silently loosening again.
Closes #532
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 7ba44c0 commit 10a8d69
3 files changed
Lines changed: 54 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
0 commit comments