Skip to content

fix(release): gate Release PR transitions#11094

Draft
gustavovalverde wants to merge 1 commit into
mainfrom
fix/gate-release-pr-transitions
Draft

fix(release): gate Release PR transitions#11094
gustavovalverde wants to merge 1 commit into
mainfrom
fix/gate-release-pr-transitions

Conversation

@gustavovalverde

Copy link
Copy Markdown
Member

Motivation

The v6.2.2 Release PR was merged outside the Mergify queue before approval and Release readiness completed. The post-merge controller initially rejected it, but accepted a late approval on rerun because it queried the PR's live review decision instead of verifying the merge path.

The release squash push also ran release-plz while v6.2.2 was still absent from crates.io, which created the immediate duplicate Release PR #11087. Automatic publication needs one supported transition, and release-plz must not react to its own release commit.

Part of #11092.

Solution

Require GitHub to report the mergify bot as the Release PR merge actor before automatic publication can start. This reuses the existing Mergify queue conditions as the approval and check boundary; a direct or administrator merge remains blocked on every rerun and requires explicitly authorized break-glass recovery.

Give every generated Release PR the reserved chore: release title prefix, and skip Release PR generation for both that prefix and commits authored by the zebra-release app. The generated checklist and release documentation now identify approval followed by Mergify queueing as the single automatic path, while the existing manual check and resume dispatches remain exit hatches into the same controller.

Tests

actionlint, zizmor --pedantic, markdownlint, TOML parsing, and focused release-transition fixtures pass. Live GraphQL evidence confirms that a queued Zebra merge records mergedBy as the mergify bot while the v6.2.2 direct merge records a user.

Specifications & References

Follow-up Work

This PR closes the observed release-squash self-trigger, not the full registry blind window. An unrelated push to main before the previous Cargo release reaches crates.io can still make the prior changes appear unreleased. #11092 tracks the release-in-flight boundary, Cargo acceleration, parallel artifact preparation, rehearsals, and the final single-owner cutover.

AI Disclosure

  • No AI tools were used in this PR
  • AI tools were used: OpenAI Codex for release analysis, implementation, validation, and PR drafting; Claude Opus 5 for an independent architecture review.

PR Checklist

@gustavovalverde gustavovalverde added A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant