Repository navigation
Description
Part of #4840.
Symptom
main-watch.yml (a workflow_run workflow) never fires for the "Full Suite Gate (All OS x Python)" runs that post-merge.yml dispatches. Since #4843/#4851 moved the post-merge matrix to a dispatched run, issue #4840 gets no "Failed again" comment and will not auto-close when the matrix goes green.
Evidence (gh api, 2026-10-10)
- Dispatched Full Suite Gate runs 38065552420 (15:55Z, finished 16:40:45Z), 38071555913 (17:23Z) and 38083925457 (20:29Z):
event=workflow_dispatch,actor=github-actions[bot],head_branch=main, conclusionfailure. Each is on the watch list and passes the job'sif. - No Main Watch run exists after any of them finished that carries the run's head SHA. The nearest Main Watch runs after 38065552420 finished (16:40:54Z, 16:44Z, 16:47Z) are for other SHAs. Main Watch runs that did fire are all
workflow_runruns for push events. - main is red: Full Suite Gate (All OS x Python) #4840 comments: three "Failed again (push)" comments (12:45Z, 13:32Z, 14:19Z), none after 15:55Z. The issue itself was opened by the schedule run 38046101970 at 11:38Z, so the schedule path works.
Cause
The dispatched runs were created by post-merge.yml with the repo GITHUB_TOKEN (actor github-actions[bot]). GitHub documents that events created by GITHUB_TOKEN do not create new workflow runs (only workflow_dispatch/repository_dispatch themselves are exempt, which is why the matrix does start). The observed result is that the completion of such a run raises no workflow_run event for main-watch. The docs do not say this in so many words for workflow_run; the evidence above is the confirmation.
Second gap
A run that is failure only because some legs were cancelled (e.g. 38065552420: macOS legs cancelled) is reported identically to a real failure.
Fix
post-merge.ymldispatches withAUTOMATION_PATso the run has a real actor andworkflow_runfires.- A reconcile path in main-watch (schedule + manual): per open
ci-red-mainissue, read the latest completed non-cancelled run of that workflow on main, then comment or close. This covers missed events generally (and the PAT being absent or expired). - The decision logic moves to a tested Python module; the comment says when a failure includes cancelled legs.
Activity
WIP: main-watch sees dispatched runs (PAT dispatch + reconcile + test…