Repository navigation
fix(ci): stop push-time release rebuilds and merge a green release when main only added fragments - #8548
Conversation
Each rebuild of release/plugins pushes a new head and cancels the release pull request's running pr-require-checks; with fragments landing on main faster than those checks finish, push-triggered rebuilds kept it from ever settling. A push run now only queues an open release pull request that is current and green (or builds one when none is open); rebuilds happen on the 3-hourly schedule and workflow_dispatch. A push run also waits instead of cancelling a running one, so it cannot cancel a scheduled rebuild. ADR 0048 gains a 2026-10-20 amendment. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
…r fragments check-changelog-fragments.sh --check-release counted every fragment main added after the release was cut as stale, so while fragments kept landing the release pull request was rebuilt before its checks finished and never merged. The gate now fails only when main changed a file the release changes (a consumed fragment edited or removed, a CHANGELOG.md, a plugin.json) since its build base, the release head's merge base with main; fragments added after the build ride the next release. The merge job's decide-rebuild.sh and the merge queue run the same gate. ADR 0048's 2026-10-20 amendment records the new meaning of current. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
In the merge queue the release gate compared against HEAD^1, the queued squash commit's own parent and so its merge base, and always passed. The queue now judges the release, read from the queued pull request's head commit, against merge_group.base_sha, and refuses when either is missing or unreadable. Non-release pull requests in the queue are declined. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
The absent-group-base queue case now asserts the gate's own error, so a setup crash no longer passes it. Queue mode gains cases for a consumed fragment removed on the group's base and a released plugin.json version changed there. The ADR 0048 amendment and the pr-require-checks comment now describe the queue check as base_sha against the queued pull request's head, which refuses when either is missing. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security issues found in the incremental change (cf464fd, The change adds one |
|
claude-review reviewed Incremental review of The change adds one I checked the unset list against what the gate and its library read ( I ran no commands: the Bash sandbox blocked my grep and test runs for approval. The review rests on reading the diff and the two source files. The PR description's claim of 68/68 passing is the author's and unverified by me. |
The release queue gate compares against merge_group.base_sha. GitHub's merge-queue docs say a group carries changes from pull requests ahead of it in the queue, so that base already includes them; say so where the gate is wired. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
The merge_group CI run exports GITHUB_EVENT_NAME=merge_group, which reached the gate under test and sent every pull-request-mode --check-release case down the queue path (rc=2). Unset the gate's environment inputs once at the top of the test file; cases that need one set it themselves. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
No related issue: release pull request cancellation loop observed 2026-10-20 (runs 39375083134, 39375176650 cancelled)
Summary
The plugin release pull request (
release/plugins, e.g. #8194) never settles under steady merges: every push to main that adds a changelog fragment makes it stale, a push-timemergerun rebuilds it, and the new head cancels its running checks. A stale head could not merge anyway, so the release only landed tonight after all enqueues were held for one CI run.Fix
Two parts, chosen with the release owner (committee decision, recorded in the ADR 0048 amendment):
decide-rebuild.sh): on apusheventmergenever rebuilds; it queues the release PR only if green, otherwise defers. Rebuilds happen on the 3-hourly schedule andworkflow_dispatch. Push runs no longer cancel a running scheduled rebuild:cancel-in-progressis nowgithub.event_name != 'push'(release-publish-plugins.yml:53). A waiting push run can still replace a waiting scheduled run in the group's pending slot, and that rebuild then slips to the next schedule. With no release PR open, a push still builds one.scripts/check-changelog-fragments.sh:204-232,--check-release): for every path the head changes, the blob on main must equal the blob at the build base (the head's merge base with main). A consumed fragment edited or removed on main, or a pluginCHANGELOG.md/plugin.jsonchanged on main since the build, refuses (EDITED FRAGMENT,REMOVED FRAGMENT,CHANGED ON BASE). Fragments added after the build are not in the head's diff and ride the next release.Risk for review
In the merge queue (
pr-require-checks.yml:1827-1849)--check-releaseused to compare againstHEAD^1, the queued squash commit's own parent and merge base, so it always passed there. It now judges the release againstmerge_group.base_sha("The SHA of the merge group's parent commit", webhook payload docs). The queue merges by squash (one parent, noHEAD^2), so the release is read from the queued pull request's head commit (steps.queued_pr.outputs.head_sha, passed asCHANGELOG_PR_HEAD), and its build base is that head's merge base withbase_sha. The step refuses when the queued pull request cannot be resolved, whenbase_shais empty or unreadable, or when the release head is missing; it never falls back toHEAD^1. A queued pull request that is not the release is declined, as before it always passed.Queue entries ahead:
base_shaalready includes them. GitHub's merge-queue docs say a group holds "changes from pull requests ahead of it in the queue" (managing a merge queue), and recent queue refs stack on earlier group heads (checked by GitHub Security & Cost), so an entry ahead of the release is seen by the check.Also not changed: the
workflow_dispatchinput description underon:still describes the old rule (left alone to keepon:untouched).Verification
scripts/check-changelog-fragments.test.sh: 6 cases failed before the fix; 63/63 pass after. Queue mode: 4 of 6 new cases failed before the fix (the absent and unreadable base already exited 2); 66/66 pass after. Follow-up: the absent-base case now asserts its error message, and queue cases cover a removed consumed fragment and aplugin.jsonversion change; each fails against a gate mutated to skip that check, and 68/68 pass.decide-rebuild.test.shpasses (stub gate; cases relabeled).scripts/check-affected.sh --testspasses except the pytest-run Python suites, which fail locally for want of pytest and PyYAML on this machine; CI runs them.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT