Skip to content

CI minutes: shepherd reconcile runs on 25 workflow_run triggers (204 runs/day, 63% cancelled/skipped); thin workflow_run fan-in #4935

Closed

Description

@squid-protocol

Measured over the 24h to 2026-10-11 21:00Z (500 runs, API cap, so a slight undercount):

Workflow Runs Cancelled Skipped Median
CI shepherd (reconcile) 204 (41% of all runs) 99 30 0.4 min
Main Watch 45 0 8 0.3 min
Mainframe Ground Truth 25 4 0 14.7 min
Smoke Tests 24 6 0 12.8 min

Class: workflow_run fan-in triggers and duplicate heavy runs. Members:

  1. Shepherd reconcile: it triggers on completion of 25 workflows, with concurrency group shepherd and cancel-in-progress: false. That's a run per finished workflow, so 63% end up cancelled or skipped, and they queue behind each other on the shared group. Fix: trigger only on the workflows that gate merging (the required checks), filter on PR and label in the job's if:, and let the 20-minute cron catch the rest. Expected saving: about 130 runs a day, and less queueing for label merges.
  2. Main Watch: 45 runs a day on workflow_run, 8 skipped. Fix: trigger only on the gate workflows' completion on main.
  3. Heavy jobs on both pull_request and the post-merge push: Mainframe Ground Truth and Smoke Tests, about 500 wall minutes a day combined. Fix: skip the push run when the merged tree equals the tested PR head (e.g. a squash merge of an up-to-date PR), or move to a merge queue. Part of CI v3 (nice-to-haves after CI v2 / #4825) #4847.
  4. Superseded PR pushes: about 2 cancelled per PR workflow per day. Already fine (cancel-in-progress works); listed for completeness.

Acceptance: shepherd reconcile runs fall by more than half with no slower label merges (compare shepherd (label events) merge latency before and after). Main Watch triggers only on gate workflows. Member 3 either lands or is tracked in #4847 with numbers.

Note: this edits .github/workflows and the shepherd, so the churn workers leave it alone (night-shift "Never"). It's for the CI owner (#4825 hand-off).

🤖 Generated with Claude Code

Activity

  1. added
    ci-cd
    on Oct 11, 2026
  2. squid-protocol commented on Oct 12, 2026

    @squid-protocol
    OwnerAuthor

    Siblings: #4959 (Main Watch runs on every green completion; owner decision). Main Watch trim reviewed in #4958: all 15 entries run on main and are acted on, so nothing to cut without dropping push-time watches (owner call).

  3. squid-protocol commented on Oct 12, 2026

    @squid-protocol
    OwnerAuthor

    Siblings: #4964 (tested-tree gate for the remaining pull_request+push workflows, the sibling gaps of PR #4961).

  4. squid-protocol commented on Oct 12, 2026

    @squid-protocol
    OwnerAuthor

    Closed: all three members have landed: Member 1 (shepherd reconcile fan-in reduction) in PR #4936, Member 2 (Main Watch trigger thinning) in PR #4958, and Member 3 (tested-tree push-run skipping for heavy workflows) in PR #4961. Sibling gaps for remaining workflows are tracked in #4964.

  5. added
    scope:infra
    on Oct 16, 2026
  6. added a commit that references this issue on Oct 25, 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

    ci-cdscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions