Skip to content

main-watch never sees dispatched Full Suite Gate runs (GITHUB_TOKEN dispatch raises no workflow_run) #4859

Closed

Description

@squid-protocol

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, conclusion failure. Each is on the watch list and passes the job's if.
  • 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_run runs 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

  1. post-merge.yml dispatches with AUTOMATION_PAT so the run has a real actor and workflow_run fires.
  2. A reconcile path in main-watch (schedule + manual): per open ci-red-main issue, 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).
  3. The decision logic moves to a tested Python module; the comment says when a failure includes cancelled legs.

Activity

  1. added
    bug
    ci-cd
    on Oct 10, 2026
  2. added
    scope:infra
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugci-cdscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions