Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

ci: isolate main workflow concurrency by commit

Louis Beaumont6e15ac2d1190
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 325f86857..e9640a235 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,12 +21,10 @@ on:
- '.github/scripts/**'
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.sha || github.ref }}
# Cancel superseded runs on PR branches (saves minutes when a contributor
- # rapidly re-pushes), but let main runs always finish — pushes to main
- # land faster than this workflow's longest job (cargo test on ubuntu, ~30
- # min), so cancelling-in-progress on main means CI never reports a single
- # green/red signal for any commit (we hit 30 consecutive cancellations).
+ # rapidly re-pushes). Main pushes use the commit SHA in the group so a
+ # newer merge does not sit pending behind a stale long-running commit.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml
index ae5214f71..b4e8a40d8 100644
--- a/.github/workflows/e2e-test.yml
+++ b/.github/workflows/e2e-test.yml
@@ -14,9 +14,9 @@ on:
workflow_dispatch:
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- # See ci.yml — cancel superseded runs only on PR branches; let main
- # always finish so we actually report a signal for every commit.
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.sha || github.ref }}
+ # See ci.yml — cancel superseded PR runs, while main pushes use a
+ # per-commit group so newer merges do not wait behind stale E2E runs.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
diff --git a/.github/workflows/eval-diarization.yml b/.github/workflows/eval-diarization.yml
index 95c99df92..ea7c315ee 100644
--- a/.github/workflows/eval-diarization.yml
+++ b/.github/workflows/eval-diarization.yml
@@ -55,7 +55,7 @@ on:
default: 'abjxc,bxpwa,dhorc'
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.sha || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
diff --git a/.github/workflows/eval-meeting-detection.yml b/.github/workflows/eval-meeting-detection.yml
index 694a234ed..6741b3bb5 100644
--- a/.github/workflows/eval-meeting-detection.yml
+++ b/.github/workflows/eval-meeting-detection.yml
@@ -34,7 +34,7 @@ on:
workflow_dispatch:
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.sha || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
diff --git a/.github/workflows/test-frontend.yml b/.github/workflows/test-frontend.yml
index cd5f6c1c8..c96a8e392 100644
--- a/.github/workflows/test-frontend.yml
+++ b/.github/workflows/test-frontend.yml
@@ -26,9 +26,9 @@ on:
- '.github/workflows/test-frontend.yml'
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- # Same rule as ci.yml — cancel superseded PR runs, but always finish
- # main so we report a real signal for every commit landed there.
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.sha || github.ref }}
+ # Same rule as ci.yml — cancel superseded PR runs, while main pushes
+ # use a per-commit group and do not queue behind stale commits.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
diff --git a/.github/workflows/windows-integration-test.yml b/.github/workflows/windows-integration-test.yml
index 35fdda22e..72fa6f193 100644
--- a/.github/workflows/windows-integration-test.yml
+++ b/.github/workflows/windows-integration-test.yml
@@ -8,11 +8,9 @@ on:
workflow_dispatch:
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- # Cancel only on PR re-pushes; main runs always finish (this job takes
- # longer than the typical gap between commits, so cancel-in-progress
- # on main meant 100% of recent runs got cancelled before producing
- # any signal).
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.sha || github.ref }}
+ # Cancel only on PR re-pushes. Main runs use a per-commit group so this
+ # long job cannot leave the latest merge pending behind an older commit.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env: