Skip to content

ci: cancel superseded pull request runs - #37

Merged
kixelated merged 1 commit into
mainfrom
ci/cancel-superseded-runs
Nov 12, 2026
Merged

kixelated merged 1 commit into
mainfrom
ci/cancel-superseded-runs

Conversation

@kixelated

@kixelated kixelated commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A newer push to a PR leaves the older Check run holding a runner until it finishes, and the org shares a 60-job hosted-runner cap.

Approach

Give check.yml a top-level concurrency group per PR with cancel-in-progress: true, so a new push cancels the superseded run.

Impact

No public API or wire impact. Only runs of the same PR cancel each other.

Alternatives

A job-level group: the workflow has one job, so the top-level group is simpler and also covers jobs added later.

Follow-ups

None.

Validation

  • actionlint and zizmor on check.yml: no findings.
  • just check: passes.

Models

Size: XS
Implementer: Claude Code, claude-opus-5-5, high effort

(Written by Claude Opus 5.5 with high)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, low effort
  • Session: 01a1d21b-2f44-7d63-a910-f09fe903baca, round 1
  • Head: ecd8164
  • Base: origin/main at 6c31841
  • Score: 10/10, The concurrency group isolates pull requests and cancels superseded runs without changing check behavior; code inspection found no actionable issues, and builds and tests were not run as instructed.
  • Findings: none

A newer push to a PR left the older run holding a runner until it
finished; the org shares a 60-job hosted-runner cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 12, 2026 23:37
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The workflow groups runs by pull request number, or by Git ref when a pull request number is unavailable. It cancels an in-progress run when a newer run starts in the same group.

Merge Risk: Minimal · up to ecd81

This change cancels superseded CI runs on the same pull request so older runs stop holding hosted runners. It has no product or runtime impact and is safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: adding a concurrency setup so superseded pull request runs are cancelled. The raw summary confirms that check.yml now groups runs per PR and cancels in-progress runs …
Description check Passed The description is directly related to the changeset. It explains the problem of older check runs holding hosted runners, the top-level per-PR concurrency group with cancel-in-progress set to true in …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: adding a concurrency setup so superseded pull request runs are cancelled. The raw summary confirms that check.yml now groups runs per PR and cancels in-progress runs when a newer run starts. The title is short, specific, and uses a conventional commit prefix.

Full details: Description check

Explanation

The description is directly related to the changeset. It explains the problem of older check runs holding hosted runners, the top-level per-PR concurrency group with cancel-in-progress set to true in check.yml, the scope of the change, validation steps, and the review record. It matches the raw summary of the workflow change.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a166c273-8357-4212-98e6-2e52e207d8c7
Commits

Reviewing files that changed from the base of the PR and between 6c31841 and ecd8164.

Files selected for processing: 1

  • .github/workflows/check.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Reviewed the single workflow change in .github/workflows/check.yml.

  • Concurrency group: adds a top-level concurrency block keyed on check-${{ github.event.pull_request.number || github.ref }} with cancel-in-progress: true, so a newer push cancels the superseded run of the same PR.

The group is scoped per PR, so runs for different PRs don't cancel each other. The only trigger is pull_request, so the github.ref fallback is never used. The ready_for_review and draft interplay is unaffected.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated
kixelated merged commit 2847c39 into main Nov 12, 2026
4 checks passed
@kixelated
kixelated deleted the ci/cancel-superseded-runs branch November 12, 2026 23:44
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.

1 participant