Skip to content

Commit f0fbc89

Browse files
harden(ci): estate-wide concurrency-cancel guard + scope affinescript-verify push (#122)
## Why Root-cause follow-up to echo-types#62. `echo-types` (and the estate) is public, so Actions minutes are free/unlimited — the repo-wide `queued`/no-progress stalls are **shared account-wide concurrent-job-slot** exhaustion. These canonical templates propagate estate-wide, so the fix belongs here, not per-repo. ## Changes - **+`concurrency{cancel-in-progress:true}`** on 10 read-only check templates that lacked it: `scorecard`, `scorecard-enforcer`, `governance`, `codeql`, `language-policy`, `makefile-blocker`, `secret-scanner`, `doc-format`, `echidna-verify`, `affinescript-verify`. All read-only (no publish/mutation) → cancelling a superseded run is always safe. - **`affinescript-verify.yml`**: `on: [push, pull_request]` → push scoped to `[main, master]` (PR trigger still covers feature branches). This was the estate-wide twin of the `agda.yml` `"**"`-push storm: a full AffineScript verify on every WIP push to every branch in every consumer repo. **Zero verify coverage lost.** - **Untouched by design**: `mirror` / `instant-sync` / `boj-build` (publish/sync/build — mid-cancel unsafe); `hypatia-scan` / `casket-pages` (already guarded). All 10 changed files YAML-validated. ## Follow-on (not in this PR) Landing this fixes the canonical source; consumer repos still carry stale copies until a sweep redistributes them (verisimiser#59-style rollout). Recommend that sweep as the closing step once this merges. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d1b809a commit f0fbc89

10 files changed

Lines changed: 90 additions & 2 deletions

.github/workflows/affinescript-verify.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
name: AffineScript Verify
3-
on: [push, pull_request]
3+
# Direct pushes only on integration branches. Feature-branch validation
4+
# is fully covered by pull_request — running a full AffineScript verify
5+
# on every WIP push to every branch in every consumer repo was a dominant
6+
# estate-wide drain on the shared Actions concurrency pool. No coverage
7+
# is lost: PRs and post-merge main/master still verify.
8+
on:
9+
push:
10+
branches: [main, master]
11+
pull_request:
12+
13+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
14+
# updates do not pile up queued runs against the shared account-wide
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
420

521
permissions:
622
contents: read

.github/workflows/codeql.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ on:
99
schedule:
1010
- cron: '0 6 * * 1'
1111

12+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
13+
# updates do not pile up queued runs against the shared account-wide
14+
# Actions concurrency pool. Applied only to read-only check workflows
15+
# (no publish/mutation), so cancelling a superseded run is always safe.
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
1220
permissions:
1321
contents: read
1422

.github/workflows/doc-format.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
pull_request:
88
branches: [main, master]
99

10+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
11+
# updates do not pile up queued runs against the shared account-wide
12+
# Actions concurrency pool. Applied only to read-only check workflows
13+
# (no publish/mutation), so cancelling a superseded run is always safe.
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1018
permissions:
1119
contents: read
1220

.github/workflows/echidna-verify.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ on:
2929
- cron: '0 6 * * 1'
3030
workflow_dispatch:
3131

32+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
33+
# updates do not pile up queued runs against the shared account-wide
34+
# Actions concurrency pool. Applied only to read-only check workflows
35+
# (no publish/mutation), so cancelling a superseded run is always safe.
36+
concurrency:
37+
group: ${{ github.workflow }}-${{ github.ref }}
38+
cancel-in-progress: true
39+
3240
permissions:
3341
contents: read
3442

.github/workflows/governance.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ on:
1818
pull_request:
1919
workflow_dispatch:
2020

21+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
22+
# updates do not pile up queued runs against the shared account-wide
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+
2129
permissions:
2230
contents: read
2331

.github/workflows/language-policy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
pull_request:
88
branches: [main, master]
99

10+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
11+
# updates do not pile up queued runs against the shared account-wide
12+
# Actions concurrency pool. Applied only to read-only check workflows
13+
# (no publish/mutation), so cancelling a superseded run is always safe.
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1018
permissions:
1119
contents: read
1220

.github/workflows/makefile-blocker.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ on:
1313
- '**/Makefile.*'
1414
- '**/*.mk'
1515

16+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
17+
# updates do not pile up queued runs against the shared account-wide
18+
# Actions concurrency pool. Applied only to read-only check workflows
19+
# (no publish/mutation), so cancelling a superseded run is always safe.
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
1624
permissions:
1725
contents: read
1826

.github/workflows/scorecard-enforcer.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ on:
99
- cron: '0 6 * * 1' # Weekly on Monday
1010
workflow_dispatch:
1111

12+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
13+
# updates do not pile up queued runs against the shared account-wide
14+
# Actions concurrency pool. Applied only to read-only check workflows
15+
# (no publish/mutation), so cancelling a superseded run is always safe.
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
1220
permissions:
1321
contents: read
1422

.github/workflows/scorecard.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
- cron: '0 4 * * *'
88
workflow_dispatch:
99

10+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
11+
# updates do not pile up queued runs against the shared account-wide
12+
# Actions concurrency pool. Applied only to read-only check workflows
13+
# (no publish/mutation), so cancelling a superseded run is always safe.
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1018
permissions:
1119
contents: read
1220

.github/workflows/secret-scanner.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
push:
88
branches: [main]
99

10+
# Estate guardrail: cancel superseded runs so re-pushes / rebased PR
11+
# updates do not pile up queued runs against the shared account-wide
12+
# Actions concurrency pool. Applied only to read-only check workflows
13+
# (no publish/mutation), so cancelling a superseded run is always safe.
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
1018
permissions:
1119
contents: read
1220

@@ -70,4 +78,4 @@ jobs:
7078
if [ $found -eq 1 ]; then
7179
echo "::error::Potential hardcoded secrets detected. Use environment variables instead."
7280
exit 1
73-
fi
81+
fi

0 commit comments

Comments
 (0)