ci: file an issue the moment main goes red - #272
Merged
Conversation
A red main silently stops the whole repo. On 2026-08-05 a regression
reddened CI on main; the fix was pushed to a PR branch and that branch went
green, but nothing re-runs a base-branch run, so main's own run stayed red.
Auto-merge's green-base guard then refused every merge for ~16h, holding
back 17 PRs while logging its refusal into a workflow nobody opens.
The cost was not the breakage, it was the misattribution: the symptom
("the agent can't merge") points away from the cause ("the base is broken").
Ported from OrangeCat, adapted to this repo's CI workflow name. Files or
updates ONE issue on a failed CI run on main, closes it when main is green
again, and says in the body that clearing it means re-running MAIN's run,
not the branch's.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
catomean
added a commit
that referenced
this pull request
Aug 6, 2026
…very run #272 added the alarm on `workflow_run`. That covers pushes to main — but every merge in this repo is an auto-merge made with GITHUB_TOKEN, which fires no push event. The sweep therefore re-arms ci.yml by dispatch, and GitHub emits no `workflow_run` for a dispatched run. The alarm was blind on the path producing almost every main CI run. Proven within the hour: main went red on a66baa5 (a transient puppeteer 403 fetching chrome-headless-shell), the sweep started refusing merges again, and no issue was filed. Now dual-path, one policy: - scripts/ci/main-red-alert.sh holds the verdict logic, so the two callers cannot drift. - main-red-alert.yml keeps the push path and calls the script. - ci.yml gains a post-main job, gated to dispatched runs on main, which resolves its own verdict from the job results and calls the same script. `skipped` counts as success (jobs here are conditional on event type); failure outranks cancelled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 6, 2026
…very run (#277) #272 added the alarm on `workflow_run`. That covers pushes to main — but every merge in this repo is an auto-merge made with GITHUB_TOKEN, which fires no push event. The sweep therefore re-arms ci.yml by dispatch, and GitHub emits no `workflow_run` for a dispatched run. The alarm was blind on the path producing almost every main CI run. Proven within the hour: main went red on a66baa5 (a transient puppeteer 403 fetching chrome-headless-shell), the sweep started refusing merges again, and no issue was filed. Now dual-path, one policy: - scripts/ci/main-red-alert.sh holds the verdict logic, so the two callers cannot drift. - main-red-alert.yml keeps the push path and calls the script. - ci.yml gains a post-main job, gated to dispatched runs on main, which resolves its own verdict from the job results and calls the same script. `skipped` counts as success (jobs here are conditional on event type); failure outranks cancelled. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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
A red
mainsilently stops the whole repo, and the symptom points away from the cause.On 2026-08-05 a regression reddened CI on
main. The fix was pushed to a PR branch, that branch went green — but nothing re-runs a base-branch run, so main's own run stayed red. Auto-merge's green-base guard then refused every merge for ~16 hours, holding back 17 PRs, loggingrefusing to merge onto a broken baseinto a workflow nobody opens. It presented as "the agent can't merge" rather than "the base is broken".What
Ported from OrangeCat (
main-red-alert.yml), adapted to this repo's CI workflow name (CI Pipeline):main; comments on it for subsequent failures instead of spamming new ones.mainsucceeds.cancelled— the CI concurrency group cancels superseded runs, and reading that as a failure is how "cancelled" gets misread as "broken".gh run rerun <id> --failed). Re-running your own branch does not clear it.Verification
workflows: ['CI Pipeline']matchesci.yml'snameexactly (checked, not assumed).issues: write,actions: read.workflow_runworkflows only run from the default branch, so this takes effect once merged.🤖 Generated with Claude Code