[AAASM-4453] ✅ (ci): Build all supported-Python wheels + drift guard - #240
Conversation
Claude Code — 4-point review1. CI — ✅ All green, including the new drift-guard job 2. Scope vs ticket (AAASM-4453) — ✅ Matches. (a) Single source of truth: one 3. Side effects (CI/CD) — ✅ No regression. The single-source substitution preserves all four platform jobs (no platform dropped) and the sdist job; the two macOS 4. Front-end — N/A. Workflow YAML + shell only; no front-end code, no Playwright. Overall: APPROVE. Stacked on #239 — merge #239 first, then this. (Not merging / not changing Jira per review scope.) — Claude Code |
AAASM-4446 added cp312/cp313/cp314 by hardcoding "3.12 3.13 3.14" in four places (each job's --interpreter) plus the two macOS setup-python lists, so adding or dropping a supported version means editing six sites and any missed site silently drifts. Introduce a single PYTHON_INTERPRETERS env var and consume it everywhere: the four maturin --interpreter args reference it directly, and the macOS jobs translate it to setup-python's newline-separated form in a small Expand step. Adding a version is now a one-line env edit; the drift guard added next pins that env to pyproject's declared support. Refs AAASM-4453
Fail-fast check that the release wheel matrix matches declared Python support: the PYTHON_INTERPRETERS list in release-python.yml must equal the "Programming Language :: Python :: 3.x" classifiers in pyproject.toml, the requires-python floor must equal the lowest built version, and no wheel job may hardcode a literal --interpreter list bypassing the single source. This is the root-cause fix for AAASM-4446: the cp312-only-vs-declared-3.13 drift now fails a check instead of silently shipping a broken install. Refs AAASM-4453
Exercises check-wheel-python-matrix.sh against synthetic pyproject/workflow fixtures for the passing case, both drift directions, requires-python floor drift, a hardcoded --interpreter literal, and unparseable-input fail-loud — plus one run against the repo's real files proving the shipped config passes. 8 cases, mirrors the existing test_pep440_to_tag.sh style. Refs AAASM-4453
New workflow that lints and runs check-wheel-python-matrix.sh plus its fixture suite on any PR touching pyproject.toml or the release workflow (and the guard's own files). Mirrors release-python-conversion-test.yml: a dedicated sibling workflow so the guard runs at PR time — not release time — without widening ci.yaml's path allow-list. This closes the AAASM-4446 loop: the matrix can no longer silently drift from requires-python + classifiers, because a divergent PR fails this check. Refs AAASM-4453
c19b071 to
65dde0d
Compare
Description
Systemic follow-up to AAASM-4446. That bug's immediate fix (PR #239) added cp313/cp314 to the release matrix; this PR makes the matrix provably track declared Python support so it can't silently drift again.
Two parts:
Single source of truth. PR [AAASM-4446] 🔧 (ci): Build cp313 wheels in the release matrix #239 hardcoded
3.12 3.13 3.14in six places. This introduces onePYTHON_INTERPRETERSenv var inrelease-python.ymlthat every wheel job consumes (maturin--interpreter), and the macOS jobs translate it tosetup-python's newline form in a small Expand step. Adding or dropping a supported version is now a one-line env edit.PR-time drift guard. A new
.github/scripts/check-wheel-python-matrix.shfails if:PYTHON_INTERPRETERSlist != theProgramming Language :: Python :: 3.xclassifiers inpyproject.toml,requires-pythonfloor != the lowest built version, or--interpreter <version>(bypassing the single source).It runs on every PR (not just release) via a dedicated
wheel-python-matrix.ymlworkflow, triggered onpyproject.toml/release-python.yml/ the guard's own files — mirroring the existingrelease-python-conversion-test.ymlpattern rather than wideningci.yaml's path allow-list. The guard is covered by an 8-case fixture suite (test_check-wheel-python-matrix.sh).This is the root-cause fix for the AAASM-4446 bug class: "claim support you don't build wheels for" now fails a check in review.
Type of Change
Breaking Changes
Related Issues
Stacking
Stacked on #239 ([AAASM-4446]). Base branch is
masterper convention, but this branch is cut on top ofv0.0.1/AAASM-4446/release_cp313_wheels, so it includes #239's commit. Merge #239 first; after it merges the diff here reduces to the single-source refactor + drift guard.Testing
test_check-wheel-python-matrix.sh, 8 cases)Validated locally:
actionlintclean on bothrelease-python.ymlandwheel-python-matrix.yml;shellcheckclean on the guard + test; the guard passes against the real repo files and fails (rc=1) on a deliberate classifier/matrix desync and on a hardcoded--interpreterliteral; the fixture suite reports 8 passed / 0 failed. The real multi-interpreter maturin build (macOS multi-setup-python+ manylinux multi-interp) can only be exercised at an rc dispatch, not locally — that proof lands at the next rc.Checklist