Stop the release reporting failure when the changeset PR is already green - #191
Merged
Conversation
…reen The last step of every release run does `gh pr merge --auto --squash`, and GitHub refuses to ENABLE auto-merge on a PR that is already mergeable: GraphQL: Pull request is in clean status (enablePullRequestAutoMerge) So the whole release run goes red after it has already versioned, published, and tagged successfully — the worst kind of red, because it trains everyone to ignore the status. This was unreachable until now only by accident of timing: PR checks took ~20 minutes, so the changeset PR was always still pending when this step ran. Retiring the log-viewer crate cut them to ~2 minutes, so the PR is now routinely green first and the race inverted. Falls back to a plain `--squash` when `--auto` is refused, but only after confirming every check is pass/skipping. Note it does NOT use `gh pr checks --required`: this repo has no required checks configured, so that returns an empty list and would read as green — a guard that checks the wrong thing. An empty bucket list is treated as NOT green, so it fails closed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0152bbE1veqfG1SVJdyLCBxC
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The last step of every release run is:
gh pr merge "$PR_NUMBER" --auto --squashGitHub refuses to enable auto-merge on a PR that is already mergeable:
So the release run reports failure after it has already versioned, published, and tagged successfully. That is the worst kind of red — everything shipped, the status says it didn't, and people learn to ignore the badge.
Seen live on run 32404388603:
Guard,Typecheck,Lint,Test,Build,Format,Version Update 🦋all ✅ — thenAuto-Merge Changeset PR❌ and the run is failed.Why now
This was unreachable by accident of timing. PR checks took ~20 minutes, so the changeset PR was always still pending when this step ran and
--autohad something to queue behind. Retiring the log-viewer crate (#180) cut PR checks to ~2 minutes, so the changeset PR is now routinely green first and the race inverted.Fix
Fall back to a plain
--squashwhen--autois refused — but only after confirming the PR is actually green.It deliberately does not use
gh pr checks --required. This repo has no required checks configured, so--requiredreturns an empty list, the grep finds nothing, and it reads as green — a guard that checks the wrong thing and fails open on a merge. An empty bucket list is therefore treated as not green.Truth table, run locally against the exact expression:
passpass passskipping passpass failpass pending🤖 Generated with Claude Code
https://claude.ai/code/session_0152bbE1veqfG1SVJdyLCBxC