Repository navigation
fix: cap ruff and mypy at the series the generated config was checked with - #20
Merged
Merged
Conversation
… with The dev group gave ruff and mypy floors only, and a render ships no uv.lock, so a new project linted with whatever was newest on the day it was rendered. A ruff minor promotes preview rules into the families the config selects, so make check could turn red on an unchanged project, and the template's own CI tested a different toolchain every day. ruff and mypy are now capped at the minor series a render resolves today and passes its gate with (0.17 and 2.4). pre-commit keeps its floor only: it decides no rule. The template CI pins copier and jinja2-time, so a CI result can be reproduced later. Dependabot cannot read pyproject.toml.jinja, so a weekly Tool bounds workflow renders the template with the caps lifted, runs the generated gate on what that resolves, and fails when a newer series is out. Closes #17
This was referenced Oct 17, 2026
Merged
Merged
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.
The problem
The generated dev group gave ruff and mypy floors only (
ruff>=0.15.1,mypy>=1.19.1), and a render ships nouv.lock. A new project therefore lints with whatever is newest on the day of its firstuv sync, and the template's own CI tests a different toolchain every day. A ruff minor promotes preview rules into the families the config selects (RUF071 in 0.17), somake checkcan go red without a single changed line in the template or the project. The floors no longer described the config anyway:mypy>=1.19.1resolves to 2.4.0.The decision
ruff>=0.17.1,<0.18andmypy>=2.4.0,<2.5. These are the versions a render resolves today and passes its gate with. Those two decide whethermake checkis green.pre-commitkeeps its floor only, because it decides no rule. Dev groups are not part of the published metadata, so the caps cost consumers nothing.CONTRIBUTING.md) pincopier==9.19.1andjinja2-time==0.2.0, so a CI result can be reproduced later.Tool boundsworkflow, weekly and on dispatch. Dependabot cannot readpyproject.toml.jinja, so without it a cap would go stale without anyone noticing. It renders the template, lifts the caps, runs the generated gate on whatever that resolves, and fails when a newer ruff or mypy series is out. The log also says whether the gate passes with the caps lifted, which tells you whether the raise is a one-line PR or needs config work first. It is a separate workflow because CI's own gate requires every job to succeed, and a schedule-only job there would be skipped on every pull request (The generated All checks passed gate counts a skipped job as passed #16 is about this same thing).Evidence
Render before and after:
On the render,
uv lockresolves ruff 0.17.1 and mypy 2.4.0. The generated gate:ruff checkandruff format --checkclean,mypyclean, 1 test passed,uv buildOK.actionlint1.7.12 is clean on both template workflows.The
Tool boundssteps run locally against renders (sed -i -Ebecomessed -i '' -Eon macOS; nothing else changed):Under the 0.16 cap the same probe gets
All checks passed!. That is the case this PR is for: the rule set changes in a template PR, not when ruff releases.For the existing libraries
They are covered by their committed
uv.lockand the weekly Dependabot dev group, as the issue says. Adding the same caps to theirpyproject.tomlis optional. I have not checked whether Dependabot's uv support raises an upper bound or stops at it, so a library should check that before it takes the caps.Closes #17