ci(main): a red main is opened as an issue, not left as a red X on a maintenance tick #2326
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2326
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/1120-2227"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was broken
mainhas no reporter. A red push run is a red X on a run nobody opens, on a workflow nobody watches, and it means "main is broken, and every pull request and every rebase onto it inherits the break".Measured on 2026-11-20:
0ff45aa4(#2291) landed 10:09:39Z and broke four checks on its own push run 8473:Test (Node 18)(task 22381),Test (Node 22)(task 22383),Server smoke and Docker build(task 22389) - and the auto-rebase pass on the same head (8472, task 22379).Test (Node 20)(task 22382) and the three maintenance jobs were green on that head, so this was that commit, not the runner.4c29aa46at 17:51:48Z: 7 h 42 min with main broken and the merge queue frozen.failurein 1-3 s. Each red X was attached to a maintenance workflow and none of them named main's head.workflow_dispatch(run 8493, 17:52:10Z), not from the pipeline.The change
.forgejo/workflows/main-health.yml- every 15 minutes, and on dispatch, read/repos/{repo}/commits/{main's head}/status.failure/error-> open one issue titledmain is redlisting every failing context with its job URL. The head sha is written into the body, so a later tick on the same break adds nothing; a newer red head updates the same issue (comment + body).success-> one closing comment, then close the issue.pending, or a head with no statuses yet -> says so and does nothing (a run in flight is not a verdict).::warningnaming it. It never reports green from a read it could not make, and it never opens a second issue for a break the first one already reports.uses:action; run token only,permissions: contents: read, issues: write.The whole lifecycle was exercised against real heads before this PR (issue #2325, left closed on purpose): opened for
0ff45aa4with the four failing checks (HTTP 201), asked again for the same head and added nothing, updated for a second red head9a70a2fb(comment + body marker), then closed on the green head98676312(comment + close). 3 comments, stateclosed.Measured
Check main's head, dry run of the red path against0ff45aa4(run 8701 is on this branch, sha89170760)A quiet tick is two API reads and one issue listing, ~1.4 s measured locally; 96 ticks a day is under 3 minutes of runner time against the ~1100 the pipeline spends.
Coverage
Unchanged.
ci.yml,auto-rebase.ymlandpr-rebase.ymlare untouched: nothing is edited, skipped, retried or relaxed, and this workflow adds no gate - it cannot merge, arm or rebase anything, andArm auto-mergeremains the only thing that merges. What it adds is a report of a state that was already true and already unread.Still red: nothing. The last 12 h of runs are green (0 failures in 237 runs, 22:00-22:28 the busiest of them). For the record: the 15 red auto-rebase ticks were caused by
0ff45aa4itself and stopped the moment main healed; their 1-3 s failure remains undiagnosed because a run log needs a login this worker does not have, and this workflow would have reported the actual break on the first tick instead of leaving 15 unexplained red X's.