ci: pre-merge guard for the PyPI release build path (+ CHANGELOG fix)#552
Conversation
Extract publish.yml's wheel-build jobs into a reusable build-wheels.yml (workflow_call) so the PyPI release build path can be exercised before merge. publish.yml becomes a thin caller (build via the reusable workflow + PyPI upload). New release-build-check.yml runs the SAME reusable workflow build-only on PRs (manylinux leg, the gap rust-test.yml doesn't cover) and full-matrix on workflow_dispatch (manual pre-release rehearsal). Why: pyo3/numpy 0.29, checkout v7, and blas-src 0.14 are all merged but unreleased, so the next release is the first time publish.yml runs with them; its manylinux / checkout-v7 / py3.9-3.14 path was never exercised by PR CI. A single reusable workflow means the guard can't drift from what actually publishes. Also: - Register release-build-check.yml in the workflow-contract lock tests (EXPECTED_JOBS + GUARD_COVERED_WORKFLOWS) and add it to rust-test.yml path filters, per the existing convention. - Fix CHANGELOG: the pyo3/numpy 0.29 Security entry was filed under 3.5.3 but is unreleased (not in the v3.5.3 tag or PyPI wheels) -> moved to [Unreleased]. Build jobs are a verbatim relocation; the only logic change is a shellcheck-clean wheel count in the on-PR-tested build-linux job. actionlint clean; lock tests (tests/test_openai_review.py) pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Overall Assessment ✅ Looks good. No unmitigated P0/P1 findings. Executive Summary
Methodology No findings. Severity: N/A Code Quality No findings. Severity: N/A Performance No findings. Severity: N/A Maintainability No findings. Severity: N/A Tech Debt No findings. Severity: N/A Security No findings. Severity: N/A Documentation/Tests P3 - Local test execution unavailable in review sandbox. Impact: I could not execute |
Summary
Adds a pre-merge guard for the PyPI release build path and fixes a misfiled CHANGELOG entry.
publish.ymlonly runs onrelease: published, so its build path — the manylinux_2_28 containers,checkout@v7inside glibc-2.28, and the full py3.9–3.14 ABI range — is never exercised by PR CI. The three recent chores (pyo3/numpy 0.29,checkoutv7,blas-src0.14) are all merged but unreleased, so the next release is the first timepublish.ymlruns with them. This makes that path testable before merge.build-wheels.yml(workflow_call, inputlinux_only): the four wheel-build jobs, lifted verbatim frompublish.yml. Single source of truth so the guard can't drift from what actually publishes.publish.yml→ thin caller:build: uses: ./.github/workflows/build-wheels.yml(full matrix) + the unchanged PyPI-upload job (OIDC trusted publishing,environment: pypi).release-build-check.yml: calls the reusable workflow build-only —linux_only(manylinux leg only, the gaprust-test.ymldoesn't cover) on PRs, full matrix onworkflow_dispatch(manual pre-release rehearsal). Gated onready-for-ci, path-filtered, not a required check.release-build-check.ymladded toEXPECTED_JOBS+GUARD_COVERED_WORKFLOWSintests/test_openai_review.pyand torust-test.yml's path filters, per the existing label-guard convention.### Securityentry was filed under## [3.5.3]but is unreleased (not in thev3.5.3tag or its 24 PyPI wheels) — moved to## [Unreleased]. Thecheckoutv7 chore (chore(deps): bump actions/checkout from 6 to 7 #550) intentionally gets no entry (CI-only, not shipped).Methodology references
Validation
actionlint: clean (EXIT=0) on all four touched workflows. The one finding was a pre-existinginfo-level SC2012 (ls | wc -l) inherited verbatim; fixed tofindin the build-linux job only (which runs on this PR), so the verbatim argument for the un-executed macOS/Windows/sdist jobs is intact.tests/test_openai_review.py— 250 passed (the guard'sif:matchesEXPECTED_GUARD, job set matches the tuple,typescarrylabeled+unlabeled).diff origin/main:publish.yml build-wheels.ymlshows only the intended changes (header/workflow_call/linux_onlyinput, threeif: ${{ !inputs.linux_only }}gates, publish job moved out).paths:include the workflow files, addingready-for-ciruns the new Release build check (manylinux py3.9–3.14, both arches, build-only) — a built-in acceptance test of the new reusable build path.linux_only-skipped on PRs and a brand-newworkflow_dispatchisn't dispatchable until it's onmain, so they get no execution test here. Mitigated by (a) the verbatim relocation, (b)rust-test.ymlalready building the macOS-accelerate + Windows-default wheels on this PR via identicalmaturincommands, and (c) a tracked release-checklist step: run theworkflow_dispatchfull dry-run once before the next release.Security / privacy
🤖 Generated with Claude Code