From 99453c6a71c3deb3eb09cddc1b90b1b558bd43b9 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-DevOps Date: Sun, 17 May 2026 02:47:52 +0000 Subject: [PATCH] infra(ci): add concurrency blocks to 3 scheduled workflows Add per-SHA concurrency groups with cancel-in-progress: true to scheduled workflows missing concurrency blocks: - gate-check-v3.yml (hourly cron): prevents stale hourly runs from accumulating when new cron ticks fire - secret-pattern-drift.yml (daily 05:00 UTC): same - weekly-platform-go.yml (Mondays 04:17 UTC): same These are lower-frequency than the sweep/minute-level workflows but should still be covered for consistency and runner hygiene. Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/gate-check-v3.yml | 6 ++++++ .gitea/workflows/secret-pattern-drift.yml | 6 ++++++ .gitea/workflows/weekly-platform-go.yml | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/.gitea/workflows/gate-check-v3.yml b/.gitea/workflows/gate-check-v3.yml index 27aba8798..fc0cbf271 100644 --- a/.gitea/workflows/gate-check-v3.yml +++ b/.gitea/workflows/gate-check-v3.yml @@ -32,6 +32,12 @@ on: # iterating all open PRs when PR_NUMBER is empty. workflow_dispatch: +# Cancel stale runs so the 8-runner pool stays available for PR jobs. +# Per-SHA group ensures push and cron runs at different SHAs don't cancel each other. +concurrency: + group: gate-check-v3-${{ github.event.pull_request.head.sha || github.sha }} + cancel-in-progress: true + permissions: # read: contents — for checkout (base ref, not PR head for security) # read: pull-requests — for reading PR info via API diff --git a/.gitea/workflows/secret-pattern-drift.yml b/.gitea/workflows/secret-pattern-drift.yml index 879341ae4..1f8672ad2 100644 --- a/.gitea/workflows/secret-pattern-drift.yml +++ b/.gitea/workflows/secret-pattern-drift.yml @@ -44,6 +44,12 @@ on: - ".github/scripts/lint_secret_pattern_drift.py" - ".githooks/pre-commit" +# Cancel stale runs to keep the 8-runner pool available for PR jobs. +# Per-SHA group ensures push and scheduled runs at different SHAs don't cancel each other. +concurrency: + group: secret-pattern-drift-${{ github.event.pull_request.head.sha || github.sha }} + cancel-in-progress: true + env: GITHUB_SERVER_URL: https://git.moleculesai.app diff --git a/.gitea/workflows/weekly-platform-go.yml b/.gitea/workflows/weekly-platform-go.yml index 6bf9e199b..af81113f1 100644 --- a/.gitea/workflows/weekly-platform-go.yml +++ b/.gitea/workflows/weekly-platform-go.yml @@ -22,6 +22,11 @@ on: - cron: '17 4 * * 1' # Mondays at 04:17 UTC workflow_dispatch: +# Cancel stale runs to keep the 8-runner pool available for PR jobs. +concurrency: + group: weekly-platform-go-${{ github.event.pull_request.head.sha || github.sha }} + cancel-in-progress: true + permissions: contents: read statuses: write -- 2.52.0