Skip to content

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

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 ci.yaml,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:12.751094Z d03660d 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: d03660d3d1

ℹ️ 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 Isolate push runs from the shared concurrency group

When three commits reach main before the first Gitleaks run finishes, all push runs share Gitleaks-refs/heads/main; setting cancel-in-progress to false preserves the running run but does not preserve the pending one, because GitHub replaces an existing pending run whenever another member of the same concurrency group is queued (GitHub's concurrency documentation). Consequently, the middle commit never runs, and the next invocation scans only its own event.before..github.sha range, so a secret introduced by the skipped commit and left untouched by the following commit can evade this workflow entirely. Use a unique group for push events while retaining the ref-based group for pull requests.

Useful? React with 👍 / 👎.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@EllAchE
EllAchE merged commit 703ab61 into main Sep 13, 2026
2 checks 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.

2 participants