M0 tooling: install the pre-commit hooks, raise the Python floor to 3.14 (#82, #83) - #98
Merged
Conversation
`.pre-commit-config.yaml` is committed; `.git/hooks` is not. Nothing in the repo installed them and no documentation asked a contributor to, so a fresh clone had the gitleaks hook configured and inactive — the acceptance criterion on #18, "pre-commit blocks a bad commit", only held for whoever happened to have run `pre-commit install` by hand. `make hooks` installs them, `make sync` now depends on it so the ordinary setup path covers it, and the README quickstart leads with `make sync` and says why. CI runs the same checks either way; the point of the hook is catching the mistake before it reaches history, which for gitleaks is the entire value. Closes #83 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`docs/spikes/python-3.14-compat.md` set the condition: the workspace pinned `>=3.13` so restricted dev environments without a 3.14 build kept working, and the floor would rise "once the M0 containers epic lands a dev image with 3.14 baked in". #80 landed exactly that — both role images are `python:3.14-slim` — and its CI run was the first here to execute the 3.14 leg end to end. 3.14 is now the runtime and a proven test target, so the fallback protects an environment that no longer needs catering for. - `requires-python = ">=3.14"` in the root and all five member manifests, `target-version = "py314"` for ruff, `python_version = "3.14"` for mypy. - The 3.13 CI leg is dropped rather than kept as a compatibility check. With the floor at `>=3.14` a 3.13 leg cannot resolve the environment, so it could only fail — the floor and the matrix have to agree. The workflow says so. - Retargeting ruff surfaced 17 quoted forward references that PEP 649's lazy annotations make unnecessary on 3.14 (UP037); autofixed. Full suite passes. The consequence, stated plainly: 3.13 contributors and images are no longer supported. Closes #82 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Two M0 chores that were left open against the containers epic.
make hooks— #83.pre-commit-config.yamlis committed,.git/hooksis not. Nothing installed the hooks and nodocumentation asked a contributor to, so in a fresh clone the gitleaks hook was configured and
inactive — #18's "pre-commit blocks a bad commit" only held for whoever had run
pre-commit installby hand.
make hooksinstalls them,make syncdepends on it, and the README quickstart now leads withmake syncand explains why. CI runs the same checks regardless; the hook's value is catching themistake before it reaches history.
Python floor
>=3.14— #82docs/spikes/python-3.14-compat.mdset the condition and #80 met it: both role images arepython:3.14-slim, and that PR's CI run was the first here to execute the 3.14 leg end to end.requires-python = ">=3.14"in the root and all five members; ruffpy314; mypy3.14.the maintainer's call, but the two options are not both available: with the floor at
>=3.14a 3.13 leg cannot resolve the workspace, so it could only ever fail. The floor and the matrix
have to agree. The workflow comment records the reasoning.
annotations on 3.14 (UP037) — autofixed, runtime behaviour verified by the suite.
The consequence, stated plainly: 3.13 contributors and images are no longer supported. If that
trade is unwanted, this PR is the place to say so.
Verification
uv lockregenerated,uv sync --locked,make lint,make type, and the fullpytestsuite(986 tests) all pass locally on 3.14.
make hooksverified to install.git/hooks/pre-commit.Closes #83
Closes #82
🤖 Generated with Claude Code