Skip to content

fix(actions): let the current-head coalescer finish under push bursts - #1769

Merged
seonghobae merged 2 commits into
mainfrom
fix/current-head-coalescer-self-cancellation
Sep 3, 2026
Merged

fix(actions): let the current-head coalescer finish under push bursts#1769
seonghobae merged 2 commits into
mainfrom
fix/current-head-coalescer-self-cancellation

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Problem

current-head-run-coalescer.yml exists to retire redundant queued exact-head runs, but its own concurrency group used cancel-in-progress: true. A second synchronize event could therefore cancel the cleanup worker before it cancelled the redundant runs. Under the organization-wide 60-job Actions ceiling, that is self-defeating: the control-plane job is retired while the jobs consuming the queue survive.

This is one causal contributor to #712. It does not claim to resolve GitHub-side zero-job startup_failure or runner_id=0 admission failures.

Change

  • keep one coalescer execution active to completion with cancel-in-progress: false
  • queue the newest coalescer event behind the active cleanup instead of killing the cleanup worker
  • add a focused regression contract that parses the active concurrency block and rejects a future restoration of cancel-in-progress: true

Verification

  • branch is exactly two commits ahead of main and not behind
  • changed files are limited to the coalescer workflow and its regression contract
  • focused concurrency contract: PASS

Merge policy

This is a central queue-admission/control-plane repair. If its own required workflows cannot start because of the same 60-job ceiling, it is eligible for the narrowly authorized Chicken-and-Eggs bypass, followed immediately by protected-main revalidation. No product or security gate is weakened.

Closes one sub-finding of #712; the remaining startup_failure and runner-acquisition findings stay open.


Devin Review

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: a26e43c3-828f-4797-8b2c-b985a28f5c58

📥 Commits

Reviewing files that changed from the base of the PR and between d302322 and 2022c4e.

📒 Files selected for processing (2)
  • .github/workflows/current-head-run-coalescer.yml
  • tests/test_current_head_coalescer_self_cancellation.py

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

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae merged commit bf28b5d into main Sep 3, 2026
6 of 19 checks passed
@seonghobae
seonghobae deleted the fix/current-head-coalescer-self-cancellation branch September 3, 2026 03:38

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Devin Review

concurrency:
group: current-head-run-coalescer-${{ github.repository }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
# Do not restore cancel-in-progress: true here. This job is the control-plane

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Legacy contract matches comment text

An existing contract searches the whole workflow for cancel-in-progress: true. This comment now satisfies it, although the active policy is false.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

# Do not restore cancel-in-progress: true here. This job is the control-plane
# worker that retires redundant runs; cancelling it during a push burst lets
# the redundant runs survive and worsens the 60-job ceiling.
cancel-in-progress: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 Info: Older workers preserve newer runs

After another push, coalesce rejects the active worker’s stale expected SHA against the live pull request. The pending worker handles the latest head.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

seonghobae added a commit that referenced this pull request Sep 3, 2026
Conflict in current-head-run-coalescer.yml: main's #1769
(bf28b5d) reintroduced the workflow-level cancel-in-progress: false
this branch had already superseded (12d5735) after Devin Review
found it only protects a RUNNING job -- GitHub concurrency groups
still evict a PENDING (queued) run regardless of cancel-in-progress,
which is exactly what queue: max on the job-level concurrency block
fixes. Kept this branch's job-level queue: max fix; updated the new
main-side regression test (test_current_head_coalescer_self_cancellation.py,
added by #1769) to assert queue: max instead of the superseded
cancel-in-progress: false, preserving its actual intent (queue, don't
kill, the active cleanup worker under push bursts).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
seonghobae added a commit that referenced this pull request Sep 3, 2026
…false (#1775)

Bypass-merge authorized by the user (2026-09-03, repeated across multiple /loop sessions) for the confirmed chicken-and-egg situation: this PR's own required checks (noema-review, required-workflow-bootstrap, etc.) have sat `queued` for hours under the org's 60-concurrent-job Actions plan ceiling, the exact structural blocker this PR's own fix partially addresses. Content fully independently verified before merge: full suite 2,651 passed, coverage 100%, interrogate 100%, and the fix (queue: max on the coalescer's concurrency group) directly closes a live regression from #1769 that this backlog's own item 13 depends on.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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