From efc67767d7a2e2bdd16288854ce85a57ea34e96c Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 6 Dec 2026 01:15:02 +0000 Subject: [PATCH] Release workflow: queue runs per commit, not in one shared group GitHub keeps only one waiting run per concurrency group. With a single "release" group, the 0.13.2 run waiting for PyPI approval held the group, the 0.14.0 run queued behind it, and merging 0.15.0 queued a new run that replaced (cancelled) the 0.14.0 one. The group is now keyed by the commit (or the dispatch ref / release tag), so different versions no longer displace each other; one commit still never runs twice at once, and the release job already marks "Latest" by version. A workflow test guards the group. Contributions: - Claude (Opus 5.5): code edits, review, and conceptual discussion - Jonathan Schultz: overall vision, planning, review, and orchestration Co-authored-by: Jonathan Schultz --- .github/workflows/release.yml | 9 +++++++-- CHANGELOG.md | 7 +++++++ tests/test_workflows.py | 10 ++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1a5868..1b005c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,9 +48,14 @@ on: permissions: contents: read -# One release at a time; never cancel one half-way through publishing. +# One run per commit at a time, and never cancel one half-way through +# publishing. Not one shared group: GitHub keeps only one *waiting* run per +# group, so a release waiting for its PyPI approval made the next merged +# version's run replace (cancel) any run already queued behind it. That is how +# the 0.14.0 run was lost on 2026-12-05. Different versions run independently; +# the release job marks "Latest" by version, not by finishing order. concurrency: - group: release + group: release-${{ inputs.ref || github.event.release.tag_name || github.sha }} cancel-in-progress: false jobs: diff --git a/CHANGELOG.md b/CHANGELOG.md index eca5a51..1423396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht ## [Unreleased] +### Fixed + +- Release automation: a release waiting for its PyPI approval no longer + causes the next merged version's run to cancel a run queued behind it + (runs now queue per commit instead of in one shared group). This is how the + 0.14.0 release run was lost. + ## [0.15.0] - 2026-12-06 ### Changed diff --git a/tests/test_workflows.py b/tests/test_workflows.py index 8e032f9..ba1ec71 100644 --- a/tests/test_workflows.py +++ b/tests/test_workflows.py @@ -37,6 +37,16 @@ def test_default_token_is_read_only(workflow): assert _load(workflow).get("permissions") == {"contents": "read"} +def test_release_runs_queue_per_commit_not_in_one_shared_group(): + """GitHub keeps one waiting run per concurrency group: with a single + "release" group, a second merged version cancelled the run queued + behind a release that was waiting for PyPI approval.""" + conc = _load("release.yml")["concurrency"] + assert conc["cancel-in-progress"] is False + group = conc["group"] + assert "${{" in group and "github.sha" in group and "inputs.ref" in group + + def test_publish_jobs_keep_only_the_oidc_permission(): jobs = _load("release.yml")["jobs"] for name in ("publish-testpypi", "publish-pypi"):