Skip to content

M0 tooling: install the pre-commit hooks, raise the Python floor to 3.14 (#82, #83) - #98

Merged
richardmhope merged 2 commits into
mainfrom
m0-tooling
Jul 31, 2026
Merged

M0 tooling: install the pre-commit hooks, raise the Python floor to 3.14 (#82, #83)#98
richardmhope merged 2 commits into
mainfrom
m0-tooling

Conversation

@richardmhope

Copy link
Copy Markdown
Contributor

Two M0 chores that were left open against the containers epic.

make hooks#83

.pre-commit-config.yaml is committed, .git/hooks is not. Nothing installed the hooks and no
documentation 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 install
by hand.

make hooks installs them, make sync depends on it, and the README quickstart now leads with
make sync and explains why. CI runs the same checks regardless; the hook's value is catching the
mistake before it reaches history.

Python floor >=3.14#82

docs/spikes/python-3.14-compat.md set the condition and #80 met it: both role images are
python: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; ruff py314; mypy 3.14.
  • The 3.13 CI leg is dropped, not kept as a compatibility check. The issue left that open as
    the maintainer's call, but the two options are not both available: with the floor at >=3.14
    a 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.
  • Retargeting ruff surfaced 17 quoted forward references made unnecessary by PEP 649's lazy
    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 lock regenerated, uv sync --locked, make lint, make type, and the full pytest suite
(986 tests) all pass locally on 3.14. make hooks verified to install .git/hooks/pre-commit.

Closes #83
Closes #82

🤖 Generated with Claude Code

richardmhope and others added 2 commits July 31, 2026 16:23
`.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>
@richardmhope
richardmhope merged commit 2580803 into main Jul 31, 2026
2 checks passed
@richardmhope
richardmhope deleted the m0-tooling branch July 31, 2026 06:25
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.

Nothing installs the pre-commit hooks Raise the Python floor to 3.14 now that the images bake it in

1 participant