Skip to content

S-138738: Cancel superseded CI runs on pull requests - #3

Merged
EllAchE merged 1 commit into
mainfrom
s-138738-pr-concurrency
Sep 13, 2026
Merged

EllAchE merged 1 commit into
mainfrom
s-138738-pr-concurrency

Conversation

@EllAchE

@EllAchE EllAchE commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Why

Every push to an open pull request here starts a fresh run of gitleaks.yml while the previous one keeps running, so a few rapid pushes bill duplicate suites to completion and delay the check anyone is actually waiting on. The durable-alpha side of this rollout is finished; this extends the same convention to the usestring org.

Summary

  • Add the standard concurrency block so a new push to an open PR cancels the run already in flight for that ref instead of queueing a second one.
  • Push runs are exempt (cancel-in-progress is only true for pull_request), so every commit on the default branch keeps its own complete passing record.
  • Block and comment are byte-identical to the ones already on the converted durable-alpha workflows (devx#1453 convention).

Test plan

  • CI on this PR runs normally with the new block.
  • Push a second commit to this PR and confirm the earlier in-progress run is cancelled.

@EllAchE EllAchE added the claude PR primarily authored by Claude label Sep 13, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-13T03:55:26.215047Z e7dcb53 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7dcb5362d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# A new push to a pull request supersedes the run already in flight, and
# nothing downstream waits on the older one. Push events are exempt: a push
# run is the record that a given commit passed, so it always finishes.
group: ${{ github.workflow }}-${{ github.ref }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude push events from the concurrency group

When three or more main pushes arrive before the first run finishes, they all enter this concurrency group. Setting cancel-in-progress to false protects only the running push: GitHub permits at most one running and one pending run per group and replaces an existing pending run when another is queued. The replacement run scans only its own ${{ github.event.before }}..${{ github.sha }} range (lines 54–61), so commits unique to the canceled pending push are never checked for secrets. Make the group unique for push runs while retaining the shared PR-ref group.

Useful? React with 👍 / 👎.

@EllAchE
EllAchE merged commit a064d04 into main Sep 13, 2026
1 check passed
@EllAchE
EllAchE deleted the s-138738-pr-concurrency branch September 13, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude PR primarily authored by Claude

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant