Pin ruff and mypy so linter releases cannot break CI on their own - #142
Merged
Conversation
Both tools gate the build, and both were installed unpinned. ruff 0.16.x promoted RUF036 to stable, which turned main and every open PR red without any code change on our side; because ruff precedes them in the job, mypy and Build distributions were skipped entirely while it was failing. Pin both to the versions currently green (ruff 0.16.3, mypy 2.3.1) in native-backend-ci.yml and inspect-r-api-update.yml, which install them, and in the dev dependency group so a local run cannot disagree with the run that blocks the merge. Upgrades become a deliberate PR that shows the new diagnostics in isolation. Regenerating uv.lock for the pins also resolves pre-existing drift: the lockfile predated pre-commit in the dev group and still recorded ovvo-nns 1.3.0, so its transitive dependencies land here too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RCeNnGqf75qssMttPCeLaz
OVVO-Financial
changed the base branch from
automation/r-cache-nns-13.2
to
main
August 18, 2026 23:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #141. Stops the failure mode that made #141 red from recurring.
Important
This PR edits protected workflow files, so it needs the
workflow-change-approvedlabel. Without it,Protect workflow baselinerestores.github/workflows/*from the default branch and force-pushes the revert onto this branch, silently undoing the change.Why
ruffandmypyboth gate the build and were both installed unpinned. ruff 0.16.x promotedRUF036to stable, which turnedmainand every open pull request red with no code change on our side — runs #844, #847 and #848 onmainall failed this way. BecauseRun ruffprecedes them in the job,Run mypyandBuild distributionswere skipped entirely the whole time it was failing, so those two steps went unverified on every PR.That is a linter release changing the build's verdict without anyone deciding to take the upgrade. Pinning makes the upgrade an explicit PR, where the new diagnostics show up in isolation and can be fixed on their own terms.
What
Pinned to the versions currently green —
ruff==0.16.3,mypy==2.3.1:.github/workflows/native-backend-ci.yml— the gating job.github/workflows/inspect-r-api-update.yml— kept in lockstep, so a regenerated cache lints identically to the PR that lands itpyproject.toml[dependency-groups] dev— so a localruff check .cannot disagree with the run that blocks the mergeThat last one is not hypothetical: while diagnosing #141, a local ruff 0.15.8 reported "All checks passed" on the exact tree CI was rejecting.
uv.lock
Pinning in
pyproject.tomlrequires the lockfile to agree, so it was regenerated withuv lock --upgrade-package ruff --upgrade-package mypy. The diff is larger than the two pins because it also resolves pre-existing drift — the lockfile predatedpre-commitbeing added to the dev group and still recordedovvo-nns1.3.0 — sopre-commitand its transitive dependencies (cfgv,distlib,filelock,identify,nodeenv,python-discovery,virtualenv) land here as well.uv lock --checkis clean afterward.Ordering
Based on
automation/r-cache-nns-13.2(#141) rather thanmain, because pinning current ruff against a tree without #141'sRUF036fix would just re-fail. Merge #141 first; GitHub retargets this tomainautomatically, and the diff stays exactly these four files.Verification
uv lock --check— clean, 65 packages resolvedruff check .at pinned 0.16.3 — All checks passedmypyat pinned 2.3.1 — Success, 48 source files🤖 Generated with Claude Code
https://claude.ai/code/session_01RCeNnGqf75qssMttPCeLaz
Generated by Claude Code