Skip to content

fix(dispatcher): any failed suite on a queue branch reads as queue CI #321

Description

@sydevs-bot

Summary

A failing check suite on a gh-readonly-queue/* branch is read as a merge-queue CI failure whatever posted it. On sydevs/SahajAtlasWeb#489 one failed at 21:24Z on 2026-11-25 while the queue's own CI run was still going; that run (Actions run 45703832793) concluded success at 21:27:02Z and GitHub merged the PR at 21:27:34Z. The dispatcher had already recorded queueFail against head 6ccbee46, bumped fixCi to 2, and fired a fix-ci session that found nothing to repair.

Approach

  • dispatcher/resolve.mjs:180-184 maps a queue-branch workflow_run or check_suite to queue-failed on its conclusion alone. The PR-head path does not work that way: dispatcher/gather.mjs:342-353 drops ci.ignoreCheckNames and reduces to the base ruleset's required checks before anything reads red.
  • Narrow the queue path the same way: accept the failure only from GitHub Actions' own suite — ev.check_suite.app.slug === 'github-actions', a workflow_run always being Actions — and keep the cancelled exclusion in QUEUE_FAILED (dispatcher/resolve.mjs:30). A Cloudflare Workers build, or any other app's suite on the ephemeral branch, is advisory on the PR head and must be advisory here too.
  • Carry what failed into the record. resolve passes only run, which is null for a check_suite event, and dispatcher/decide.mjs:1170 stores that, so afterwards nothing names the suite — this ticket cannot say which app's suite fired it. Record the app slug and the suite or run url, and print them beside pr#<n>:queue-failed in the resolve log line.
  • Cover both directions in dispatcher/test/resolve.test.mjs.

The cost is more than one wasted session. dispatcher/decide.mjs:280-282 keeps queueFail against the head while nothing re-arms it, so every later pass repairs instead of re-arming. A spurious entry on a head that is not already mid-queue spends all three ceilings.ciFixIterations passes and ends in a handback, on a PR whose required checks are green.

Acceptance criteria

  • A check_suite.completed with conclusion failure on a gh-readonly-queue/* branch, from an app other than GitHub Actions, resolves to zero targets.
  • A workflow_run failure on a queue branch whose event is merge_group resolves to pr#<n>:queue-failed. One from any other trigger, and every check_suite, resolves to zero targets. (review, Ardnived, 2026-11-26)
  • A recorded queueFail names the run that failed: the run page url the event carried, never null. (review, Ardnived, 2026-11-26)
  • The resolve log line for a queue failure names that run. (review, Ardnived, 2026-11-26)

Verification checklist

  • node --test dispatcher/test/*.test.mjs passes from the checkout and from a .claude/worktrees/<slug> worktree.
  • claude plugin validate passes.
  • The new non-Actions resolve test fails against dispatcher/resolve.mjs as it stands before the fix.

Notes

Evidence, all from 2026-11-25 on sydevs/SahajAtlasWeb#489:

  • Dispatch SahajAtlasWeb-489-fix-ci-20261125T212444548Z-cb1b, reason queue-failed, event check_suite.completed, fired 21:24:44Z. The resolve job logged check_suite.completed → 1 target(s): pr#489:queue-failed (job 139521292282).
  • The PR's status record carries queueFail {"sha":"6ccbee46…","run":null} and fixCi: 2.
  • The one queue run on gh-readonly-queue/main/pr-489-2b8e2a7d… was Actions run 45703832793: success, 21:27:02Z. list_workflow_runs with that branch returns total_count: 1.
  • PR merged 21:27:34Z by sydevs-dispatcher[bot]. Every required check on head 6ccbee46 was green.

In review the reviewer chose to test the trigger rather than the posting app: workflow_run.event === 'merge_group' is the queue's own gate by definition, where app.slug only named who posted a suite. Criteria 2 to 4 above carry that amendment; the ## Approach bullet describing the app test is the original proposal, not what shipped. The decision is on the PR's question thread.

Alternative rejected: read the queue branch's Actions run back before firing. It costs an extra call per event and still races — the queue's CI run was in progress when this event arrived, so the answer would have been "no failure yet" rather than "no failure".

Which app posted the failing suite is not recoverable from the record, which is why recording it is part of the fix. Cloudflare Workers Builds is the only other check-posting app on that repo.

Activity

  1. added theissue type on Nov 25, 2026
  2. added
    proposal
    on Nov 25, 2026
  3. Ardnived commented on Nov 25, 2026

    @Ardnived
    Contributor

    @sydevs-bot implement

  4. added
    bot:working
    and removed
    proposal
    on Nov 25, 2026
  5. sydevs-dispatcher commented on Nov 25, 2026

    @sydevs-dispatcher

    🤖 no session running
    approved by Ardnived

    recent dispatches
    • 22:15Z implement · attempt 1 · session · done
    • 22:15Z implement · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  6. removed
    bot:working
    on Nov 26, 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

    No labels
    No labels

    Type

    Fields

    Priority

    High

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions