From 73f1b524bcdef3e880423e58f9f933ce85ed60b8 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 8 Oct 2026 13:05:39 -0400 Subject: [PATCH 1/2] Cancel superseded CI runs and add job timeouts The PR workflow ran 92 times from 2026-10-06 to 10-08 with no concurrency group; 44 of those runs were superseded by a newer commit on the same branch before they finished, and their jobs waited a median 33 minutes for a shared org runner. The workflow only builds, tests and lints, so cancel the older run, and give each job a 10-minute timeout (the slowest took 2 minutes). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index dadc9ad..b758bdb 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -6,10 +6,19 @@ on: push: branches: [main] +# This workflow only builds, tests and lints (nothing deploys from it), so a +# newer commit on the same pull request or on main makes the older run moot. +# Cancel it rather than let it wait in the org-wide runner queue. From +# 2026-10-06 to 10-08, 44 of 92 runs were superseded before they finished. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build: name: Build runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 @@ -19,6 +28,7 @@ jobs: test: name: Tests runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 @@ -28,6 +38,7 @@ jobs: lint: name: Lint runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 From 2c8d0ea6ad84040854391cd0a3344a6523482936 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Thu, 8 Oct 2026 19:40:05 -0400 Subject: [PATCH 2/2] Never cancel a run on main The concurrency group cancelled superseded runs on main as well as on pull requests. A cancelled run leaves that main commit with no result, and anything that reads main's status sees "cancelled". Pull request runs still cancel when a newer commit arrives. Each push to main now gets a group of its own (run_id), so it is neither cancelled nor left pending behind another push. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pr.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index b758bdb..a663832 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -6,13 +6,14 @@ on: push: branches: [main] -# This workflow only builds, tests and lints (nothing deploys from it), so a -# newer commit on the same pull request or on main makes the older run moot. -# Cancel it rather than let it wait in the org-wide runner queue. From +# A newer commit on a pull request makes the run on its previous head moot. +# Cancel that run rather than let it wait in the org-wide runner queue. From # 2026-10-06 to 10-08, 44 of 92 runs were superseded before they finished. +# Pushes to main get a group of their own per run, so every main commit keeps +# its own result and none is cancelled. concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build: