Skip to content

fix(ci): key PR concurrency by pull request number - #20

Merged
kyle-sexton merged 1 commit into
mainfrom
fix-concurrency-pr-number
Jul 13, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix-concurrency-pr-number

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Problem

The concurrency groups added in #19 key on github.head_ref, which is the bare branch name — not unique across fork PRs. Two forks opening PRs from same-named branches (e.g. both named patch-1) resolve to the same concurrency group and cancel each other's in-flight runs.

Fix

Re-key the ci and pr-title groups to ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}. The PR number is unique per PR; run_id is the fallback for non-PR events (pushes to main).

Checked for the caller/called same-group deadlock class (melodic-software/standards#98): pr-title.yml calls the reusable semantic-pr.yml, which defines no job-level concurrency, and ci.yml uses composite actions only — so a plain re-key is safe in both.

Part of melodic-software/github-iac#82

🤖 Generated with Claude Code

https://claude.ai/code/session_01EPDbXgonTuFwFwdTtHaCmw


Note

Low Risk
Workflow-only concurrency key change with no application or security logic; low risk aside from slightly different cancel behavior per PR.

Overview
Fixes fork PRs cancelling each other's CI by re-keying workflow concurrency groups away from github.head_ref (bare branch names like patch-1 collide across forks) to github.event.pull_request.number, with github.run_id still used for non-PR runs (e.g. pushes to main).

Applies the same group expression and inline rationale in ci and pr-title; behavior is still cancel-in-progress per group, but each PR now gets an isolated cancellation scope.

Reviewed by Cursor Bugbot for commit 03fc8c7. Bugbot is set up for automated code reviews on this repo. Configure here.

head_ref is the bare branch name, which is not unique across fork PRs:
two forks opening PRs from same-named branches resolve to the same
concurrency group and cancel each other's runs. The pull request number
is unique per PR, so key the ci and pr-title groups by it, falling back
to run_id for non-PR events (pushes to main).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EPDbXgonTuFwFwdTtHaCmw
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_5c33fc8f-9f67-49e1-accf-9b7af068cbe9)

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

Risk: low. Not approving because Cursor Bugbot completed as skipped (usage limit reached) and did not produce a clean automated review. Human review is still needed before merge; no reviewers assigned because the sole maintainer is the PR author.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@kyle-sexton
kyle-sexton merged commit 631ed94 into main Jul 13, 2026
13 checks passed
@kyle-sexton
kyle-sexton deleted the fix-concurrency-pr-number branch July 13, 2026 20:46
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