Add python-pins drift check - #27
Merged
Merged
Conversation
aaronelliotross
force-pushed
the
python-pins
branch
from
August 27, 2026 08:02
fef3086 to
9980f0c
Compare
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.
Implements
docs/python-pins.mdin WeMoveEU/dependency-policy. Composite action plus a pytest suite thecigate now runs.What this adds
.github/actions/python-pins/— a stdlib-only checker that finds every place a repo names a Python version (DockerfileFROM,requires-python,uv.lock,.python-version,.tool-versions, workflowpython-version:inputs, ruff/mypy target pins) and fails when they disagree, or whenrequires-pythonis written as a floor instead of==X.Y.*.docker-smoke:github.action_pathlets the script travel with the action, and a step inside the caller'scijob keeps the required status-check context exactlyci.[tool.python-pins] role = "library"— they still have to agree with themselves.actionkit-apiis consumed by six repos spanning 3.11 and 3.14; no single exact pin satisfies both.Why the form rule matters
requires-pythonis a floor.>=3.10is satisfied by 3.14, so when Dependabot walked seven repos' DockerfileFROMtopython:3.14between 2026-06-20 and 2026-08-24, every build stayed green.zenbaki, the only repo with a ceiling, is the only one that never drifted.Closes the actionlint-only caveat
cihere was actionlint only — the caveattiers.ymlalready flags, since a broken action reaches every consumer the momentv14moves. This PR adds the checker's own pytest suite to that job, so a broken parser cannot reach@v14.Verification
19 tests pass. Also run against two real repos before commit:
helpscout-webhook-handler→ exit 1, correctly reporting3.13in.python-version/requires-python/uv.lockagainst3.14in the Dockerfile.analytics→ exit 1 on the form rule only; all five sites agree on 3.13.