diff --git a/.github/workflows/anthropic-wif-test.yml b/.github/workflows/anthropic-wif-test.yml index 297cf510b..e57dd084e 100644 --- a/.github/workflows/anthropic-wif-test.yml +++ b/.github/workflows/anthropic-wif-test.yml @@ -12,6 +12,21 @@ permissions: id-token: write contents: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: anthropic-wif-test-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: call-claude: runs-on: ubuntu-latest diff --git a/.github/workflows/api-cost-postgres.yml b/.github/workflows/api-cost-postgres.yml index 422b6f204..6d3b0dcd3 100644 --- a/.github/workflows/api-cost-postgres.yml +++ b/.github/workflows/api-cost-postgres.yml @@ -29,6 +29,21 @@ on: permissions: contents: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: api-cost-postgres-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: migration-matrix: name: PostgreSQL migration matrix (${{ matrix.scenario }}) diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml index c716e8e46..469b48d49 100644 --- a/.github/workflows/auto-assign.yml +++ b/.github/workflows/auto-assign.yml @@ -8,6 +8,21 @@ on: permissions: issues: write + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: auto-assign-${{ github.event.issue.number || github.ref }} + cancel-in-progress: true + jobs: auto-assign: runs-on: ubuntu-latest diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml index 46ff31e6a..ececcb602 100644 --- a/.github/workflows/auto-label.yml +++ b/.github/workflows/auto-label.yml @@ -9,6 +9,21 @@ on: permissions: pull-requests: write issues: write + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: auto-label-${{ github.event.pull_request.number || github.event.issue.number || github.ref }} + cancel-in-progress: true + jobs: label: runs-on: ubuntu-latest diff --git a/.github/workflows/branch-cleanup.yml b/.github/workflows/branch-cleanup.yml index 4aa29fd1f..210e14ba2 100644 --- a/.github/workflows/branch-cleanup.yml +++ b/.github/workflows/branch-cleanup.yml @@ -49,6 +49,21 @@ permissions: contents: write pull-requests: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: branch-cleanup-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: cleanup: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7400d8f4..e1a64e03d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,21 @@ permissions: contents: read actions: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: ci-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: guards: # Fail fast on the class of breakage that shipped to main un-caught: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bdad9e215..6ff1873fb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,6 +14,21 @@ permissions: security-events: write actions: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: codeql-analysis-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: analyze: name: "Security Scan - ${{ matrix.language }}" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 417bb83d7..27be14a4b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -17,9 +17,13 @@ permissions: contents: read actions: read +# Keyed by PR number for PR runs and by commit SHA otherwise. The previous +# github.ref key collided every merge to main into one group, where GitHub +# cancels the pending run -- a burst of merges silently dropped the middle +# commits' verdicts. See the fuller note in ci.yml. concurrency: - group: coverage-${{ github.ref }} - cancel-in-progress: true + group: coverage-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} jobs: coverage: diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index acb002814..4af537153 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -16,6 +16,26 @@ permissions: pull-requests: write statuses: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + # check_suite is the exception to the github.sha fallback used elsewhere: + # on that event GITHUB_SHA is the default branch tip, identical for every + # PR, so github.sha alone would collapse all concurrent check-suite runs + # into one group and drop merge-gate verdicts. check_suite.head_sha is the + # PR head and keeps them isolated. + group: dependabot-auto-merge-${{ github.event.pull_request.number || github.event.check_suite.head_sha || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: approve: if: >- diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 1ff5a5eb5..56bf29340 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -9,6 +9,21 @@ permissions: contents: read pull-requests: write + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: dependency-review-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: dependency-review: runs-on: ubuntu-latest diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 3bc529fd7..1f84fcc22 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -30,6 +30,21 @@ env: TEST_YOUTUBE_URL: https://www.youtube.com/watch?v=auJzb1D-fag VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }} + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: e2e-tests-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: e2e: name: E2E Pipeline Tests diff --git a/.github/workflows/gh-aw-validation.yml b/.github/workflows/gh-aw-validation.yml index 8f0b98fcc..34212ed01 100644 --- a/.github/workflows/gh-aw-validation.yml +++ b/.github/workflows/gh-aw-validation.yml @@ -20,6 +20,21 @@ on: permissions: contents: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: gh-aw-validation-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: validate-gh-aw: runs-on: ubuntu-latest diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index f991e9e32..eaca00393 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -4,6 +4,21 @@ on: types: [opened] permissions: issues: write + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: issue-triage-${{ github.event.issue.number || github.ref }} + cancel-in-progress: true + jobs: triage: runs-on: ubuntu-latest diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index b9e6a5ec1..ae4737ca4 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -6,6 +6,21 @@ on: permissions: {} + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: pr-checks-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: validate: runs-on: ubuntu-latest diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml index 25735e1f6..d77229ff2 100644 --- a/.github/workflows/secret-scan.yml +++ b/.github/workflows/secret-scan.yml @@ -13,9 +13,13 @@ on: permissions: contents: read +# Keyed by PR number for PR runs and by commit SHA otherwise. The previous +# github.ref key collided every merge to main into one group, where GitHub +# cancels the pending run -- a burst of merges silently dropped the middle +# commits' verdicts. See the fuller note in ci.yml. concurrency: - group: secret-scan-${{ github.ref }} - cancel-in-progress: true + group: secret-scan-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} jobs: gitleaks: diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index dee5f5ce8..8f1d55bc4 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -15,6 +15,21 @@ permissions: security-events: write actions: read + +# Supersede superseded work instead of stacking it. Without this, every push +# to a PR branch queued a brand-new full run alongside the ones it obsoleted; +# with ~30 workflows and dozens of open PRs the Actions queue could not drain. +# +# PR runs are keyed by PR number and cancel their predecessors -- that is where +# all the queue pressure comes from, since every `push:` trigger here is already +# filtered to main. Non-PR runs (push, schedule) are keyed by commit SHA so they +# land in singleton groups: keying them on github.ref would collide every merge +# to main into one group, and GitHub cancels the *pending* run in a group, so a +# burst of merges would silently drop the middle commits' verdicts. +concurrency: + group: security-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} + jobs: npm-audit: runs-on: ubuntu-latest