Skip to content

Commit 1c46060

Browse files
ci: add concurrency blocks to 5 read-only workflows + drop dead master triggers (#379)
## Summary Five workflows in this repo run on every PR push but lack a \`concurrency:\` block. When a contributor force-pushes or rapid-pushes to a PR branch, each new push spawns a fresh run while the previous one keeps consuming a runner slot — they pile up and serialise rather than the new run cancelling the stale one. The repo already has the canonical pattern in \`codeql.yml\`, \`governance.yml\`, \`hypatia-scan.yml\`, \`panic-attack.yml\`, and \`scorecard-enforcer.yml\`: \`\`\`yaml concurrency: group: \${{ github.workflow }}-\${{ github.ref }} cancel-in-progress: true \`\`\` This PR applies the same pattern (with the standard \"read-only check workflows\" comment) to the five workflows that were missing it: - \`ci.yml\` — the main OCaml/Deno build job (the highest-leverage of the five; runs on every PR) - \`semgrep.yml\` — SAST - \`stdlib-naming.yml\` — case-collision guard - \`spark-theatre-gate.yml\` — reusable workflow caller - \`workflow-linter.yml\` — workflow security linter All five are read-only check workflows (no publish, no mutation), so \`cancel-in-progress: true\` is always safe — the superseded run was about to report a stale result anyway. ## Drive-by cleanup Drop \`master\` from the branch triggers in \`semgrep.yml\` and \`spark-theatre-gate.yml\`. The repo's default and only long-lived branch is \`main\`; the \`master\` entries were dead config. ## Test plan - [ ] CI: all 5 workflows continue to run as before on this PR - [ ] Visual: each workflow's run page now shows a \"Cancelled\" superseded run when a follow-up push lands Refs estate CI hygiene audit 2026-05-26. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 81d128e commit 1c46060

5 files changed

Lines changed: 33 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ on:
1010
permissions:
1111
contents: read
1212

13+
# Actions concurrency pool. Applied only to read-only check workflows
14+
# (no publish/mutation), so cancelling a superseded run is always safe.
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1319
jobs:
1420
build:
1521
runs-on: ubuntu-latest

.github/workflows/semgrep.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@ name: Semgrep SAST
33

44
on:
55
push:
6-
branches: [main, master]
6+
branches: [main]
77
pull_request:
8-
branches: [main, master]
8+
branches: [main]
99
schedule:
1010
- cron: '0 5 * * 1'
1111
workflow_dispatch:
1212

1313
permissions: read-all
1414

15+
# Actions concurrency pool. Applied only to read-only check workflows
16+
# (no publish/mutation), so cancelling a superseded run is always safe.
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
1521
jobs:
1622
semgrep:
1723
runs-on: ubuntu-latest

.github/workflows/spark-theatre-gate.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ name: SPARK Theatre Gate
88
on:
99
pull_request:
1010
push:
11-
branches: [main, master]
11+
branches: [main]
1212

1313
permissions:
1414
contents: read
1515

16+
# Actions concurrency pool. Applied only to read-only check workflows
17+
# (no publish/mutation), so cancelling a superseded run is always safe.
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
1622
jobs:
1723
spark-theatre-gate:
1824
uses: hyperpolymath/standards/.github/workflows/spark-theatre-gate.yml@462003782f3ebb93ea763e81d0d199ce13ef7d73

.github/workflows/stdlib-naming.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ on:
2020
permissions:
2121
contents: read
2222

23+
# Actions concurrency pool. Applied only to read-only check workflows
24+
# (no publish/mutation), so cancelling a superseded run is always safe.
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
2329
jobs:
2430
enforce-lowercase-stdlib:
2531
runs-on: ubuntu-latest

.github/workflows/workflow-linter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ on:
1212

1313
permissions: read-all
1414

15+
# Actions concurrency pool. Applied only to read-only check workflows
16+
# (no publish/mutation), so cancelling a superseded run is always safe.
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
1521
jobs:
1622
lint-workflows:
1723
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)