Skip to content

ci: keep Mergify queue drafts from cancelling their own CI - #8

Merged
ryanleecode merged 2 commits into
mainfrom
fix-queue-ci-cancel
Nov 21, 2026
Merged

ryanleecode merged 2 commits into
mainfrom
fix-queue-ci-cancel

Conversation

@systemfsoftware-maker

Copy link
Copy Markdown

Summary

Pull requests queued for merge were being dequeued with CHECKS_FAILED even though every job on the queue branch had passed on its own. The queue's draft pull request fires several pull_request events in a row while Mergify opens and annotates it. They all shared one concurrency group, so each new event cancelled the run still in flight, the checks / check aggregate reported those cancellations as a failure, and Mergify read that failure and dequeued the pull request.

Queue-draft heads no longer cancel in-progress runs — the same rule the organisation's reusable CI uses. Regular pull requests keep the cancel-on-newer-push behavior, and the aggregate still requires every job to succeed; no check is weakened or skipped.

Evidence from the incident: on the queue branch, the aggregate failed with RESULTS: cancelled cancelled cancelled cancelled, and the next run on the same branch, left uncancelled, went green.

Related: #5 (the pull request the queue could not merge), #2 (where checks / check landed).

Validation

  • dprint check passes (covers this file).
  • Not run: actionlint (not installed) and the test suite — CI configuration only, and the assignment scoped checks to the format check.
  • Pending, and the only place this rule can be observed: the next queued pull request must complete without a cancelled aggregate. Off-host review of this PR is with the conductor.

Compound Engineering

- A queue draft fires several pull_request events in a row; each one cancelled the run in
  flight in the same concurrency group, so the aggregate saw every job cancelled and failed,
  and Mergify dequeued the pull request on that failure.
- Queue-draft heads no longer cancel in-progress runs, matching the org's reusable CI.
- The review asked for the cause to live in the repo, not only in a PR body.
- Solution entry: how queue-draft pull_request events cancelled in-flight runs, why the
  aggregate must keep failing on cancelled batches, and the concurrency invariant to keep.
@ryanleecode
ryanleecode merged commit ecb6a2d into main Nov 21, 2026
13 checks passed

@kiro-systemf kiro-systemf Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 0328fa1: the queue-draft exemption keeps every job required and fixes the self-cancelling queue CI. One P2 is a follow-up: the solutions doc says the queue worked end to end after the fix, but no queue run has happened yet. Correct that wording after the first queued merge proves it.

@kiro-systemf

kiro-systemf Bot commented Nov 21, 2026

Copy link
Copy Markdown

@Mergifyio queue

@mergify

mergify Bot commented Nov 21, 2026

Copy link
Copy Markdown

queue

☑️ This pull request is already merged

Details

Its changes are already in its base branch. To merge other changes, open a new pull request with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants