Skip to content

Pin ruff and mypy so linter releases cannot break CI on their own - #142

Merged
OVVO-Financial merged 2 commits into
mainfrom
claude/nns-parity-cache-regen-9efvyv
Aug 18, 2026
Merged

Pin ruff and mypy so linter releases cannot break CI on their own#142
OVVO-Financial merged 2 commits into
mainfrom
claude/nns-parity-cache-regen-9efvyv

Conversation

@OVVO-Financial

Copy link
Copy Markdown
Owner

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-approved label. Without it, Protect workflow baseline restores .github/workflows/* from the default branch and force-pushes the revert onto this branch, silently undoing the change.

Why

ruff and mypy both gate the build and were both installed unpinned. ruff 0.16.x promoted RUF036 to stable, which turned main and every open pull request red with no code change on our side — runs #844, #847 and #848 on main all failed this way. Because Run ruff precedes them in the job, Run mypy and Build distributions were 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 it
  • pyproject.toml [dependency-groups] dev — so a local ruff check . cannot disagree with the run that blocks the merge

That 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.toml requires the lockfile to agree, so it was regenerated with uv lock --upgrade-package ruff --upgrade-package mypy. The diff is larger than the two pins because it also resolves pre-existing drift — the lockfile predated pre-commit being added to the dev group and still recorded ovvo-nns 1.3.0 — so pre-commit and its transitive dependencies (cfgv, distlib, filelock, identify, nodeenv, python-discovery, virtualenv) land here as well. uv lock --check is clean afterward.

Ordering

Based on automation/r-cache-nns-13.2 (#141) rather than main, because pinning current ruff against a tree without #141's RUF036 fix would just re-fail. Merge #141 first; GitHub retargets this to main automatically, and the diff stays exactly these four files.

Verification

  • uv lock --check — clean, 65 packages resolved
  • both workflow files parse as YAML
  • ruff check . at pinned 0.16.3 — All checks passed
  • mypy at pinned 2.3.1 — Success, 48 source files

🤖 Generated with Claude Code

https://claude.ai/code/session_01RCeNnGqf75qssMttPCeLaz


Generated by Claude Code

claude and others added 2 commits August 18, 2026 23:06
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
OVVO-Financial changed the base branch from automation/r-cache-nns-13.2 to main August 18, 2026 23:08
@OVVO-Financial
OVVO-Financial merged commit 117722f into main Aug 18, 2026
5 checks passed
@OVVO-Financial
OVVO-Financial deleted the claude/nns-parity-cache-regen-9efvyv branch August 19, 2026 00:49
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.

2 participants