ci(playwright): don't fail merge-group runs when baseline push is ruleset-blocked - #31983
Merged
Merged
Conversation
…eset-blocked The direct-commit baseline refresh (#31907) hit main's repository ruleset (GH013: changes must go through the merge queue) because the workflow token has no bypass grant yet. The job treated that as 'main moved, retry' and failed after 3 attempts — turning every full-mode merge_group run red and ejecting innocent PRs (runs 32750389130, 32750390655): the exact failure mode the pipeline exists to prevent. Detect ruleset rejections in the push output and degrade to a loud ::warning + job-summary note + graceful skip; keep the retry loop and hard failure for genuine push races. Auto-refresh stays inert until a maintainer grants the token bypass on the main ruleset. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
chirag-madlani
requested review from
ShaileshParmar11 and
karanh37
as code owners
August 24, 2026 17:41
Contributor
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ ApprovedUpdates the Playwright CI workflow to gracefully handle ruleset push rejections during baseline refreshes by exiting with a warning instead of failing the merge-group run. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
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.
Why — urgent follow-up to #31907
The direct-commit baseline refresh from #31907 is being rejected by main's repository ruleset (
GH013: Changes must be made through the merge queue) — the workflow token has no bypass grant yet. The job treated the rejection as "main moved, retry", failed after 3 attempts, and turned the first two post-merge full-mode merge_group runs red (32750389130, 32750390655) with all tests green — the exact failure mode this pipeline work exists to prevent.Fix
Detect ruleset/branch-protection rejections (
GH013/ "rule violations" / "protected branch") in the push output and degrade to:::warningannotation naming the missing bypass grant,exit 0— downstream planning keeps using the current baseline.Genuine push races (main moved mid-refresh) keep the retry loop and still hard-fail after 3 attempts.
To actually enable auto-refresh (maintainer action)
Grant bypass on the
mainruleset ("Changes must be made through the merge queue" / "through a pull request" rules) to the identity the job pushes with —RELEASE_BOT_TOKENif configured, else the GitHub Actions app. Until then the refresh job logs a warning and skips; nothing goes red.Tests
🤖 Generated with Claude Code
Greptile Summary
This PR prevents timing-baseline refresh failures from blocking otherwise successful merge-group runs when direct pushes to
mainare rejected by repository rules.Confidence Score: 5/5
The PR appears safe to merge because recognized repository-policy rejections are surfaced without failing merge-group runs, while other push failures still retry and eventually fail.
The changed workflow preserves successful pushes and race retries, and only converts the explicitly intended repository-ruleset rejection path into a warning-backed graceful skip.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Refresh and commit timing baseline] --> B[Push to main] B -->|Success| C[Baseline refreshed] B -->|Ruleset or branch protection rejection| D[Emit warning and summary] D --> E[Exit successfully with existing baseline] B -->|Other push failure| F{Attempts remaining?} F -->|Yes| A F -->|No| G[Fail refresh job]Reviews (1): Last reviewed commit: "ci(playwright): don't fail merge-group r..." | Re-trigger Greptile