From 274ee02d5b9c9e8dacfdbb38e31e8a5db1e2803d Mon Sep 17 00:00:00 2001 From: Shinrai Date: Mon, 3 Aug 2026 20:39:54 -0700 Subject: [PATCH 1/3] fix(ci): never supersede release-relevant CI runs so release PRs stay green MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Give pushes to master/main/next/hotfixes and the next/hotfixes → master/main release PRs a UNIQUE concurrency group per run (run_id appended) instead of a per-ref group with cancel-in-progress. During the burst of pushes a release makes to next/hotfixes (the feature squash, the post-hotfix master→next sync merge, the bot's `chore: bump version`), the earlier run was cancelled into a red X on the release PR; each now runs to completion and posts a green check. Feature branches / feature PRs keep cancel-in-progress. A bare `cancel-in-progress: false` wouldn't suffice — GitHub still cancels the middle PENDING run when a newer one queues; a unique-per-run group avoids all of it. Mirrors the CLDMV/.github core-cicd `ci.yml` template change. --- .github/workflows/ci.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74273d4..08c44d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,14 +136,23 @@ on: required: false default: true -# Cancel superseded runs on feature branches; keep every master/main run as the -# permanent green record. Keyed on github.ref so push and pull_request events -# for the same branch share a group (the `if:` on the ci job already prevents -# non-fork PR sync from running, but the shared group guards against edge -# cases). +# Concurrency policy, by context: +# - FEATURE branches / feature PRs → cancel superseded runs (per-ref group + +# cancel-in-progress): a newer push makes the older run redundant. +# - RELEASE-relevant contexts → NEVER superseded. Pushes to +# master/main/next/hotfixes and the next/hotfixes → master/main release PRs +# each get a UNIQUE group per run (run_id appended), so nothing cancels them. +# During the burst of pushes a release makes to next/hotfixes (the feature +# squash, the post-hotfix master→next sync merge, the bot's `chore: bump +# version`), every run completes and posts a GREEN check instead of the +# earlier one being cancelled into a red X on the release PR. A bare +# `cancel-in-progress: false` is NOT enough — GitHub still cancels the middle +# PENDING run when a newer one queues; a unique group avoids all of it. +# github.head_ref is set only on pull_request (the PR's head → next/hotfixes for +# release PRs); github.ref carries the branch on push. concurrency: - group: ci-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }} + group: ci-${{ github.workflow }}-${{ github.ref }}${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/hotfixes' || github.head_ref == 'next' || github.head_ref == 'hotfixes') && format('-{0}', github.run_id) || '' }} + cancel-in-progress: true # Workflow-level: matches the broadest write surface the called # `workflow-ci.yml` reaches across its branches: From b781ac7bd36de14ed71b60a6b4005e872a5c84fd Mon Sep 17 00:00:00 2001 From: "cldmv-bot[bot]" <230771808+cldmv-bot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 04:20:37 +0000 Subject: [PATCH 2/3] chore: bump version to 1.3.8 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c34c71e..91b523c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cldmv/fix-headers", - "version": "1.3.7", + "version": "1.3.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cldmv/fix-headers", - "version": "1.3.7", + "version": "1.3.8", "license": "Apache-2.0", "dependencies": { "ignore": "^7.0.5" diff --git a/package.json b/package.json index a46ab05..43894a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cldmv/fix-headers", - "version": "1.3.7", + "version": "1.3.8", "description": "Multi-language project header normalizer with auto-detection and override support.", "type": "module", "main": "./index.cjs", From 8d3be355b7e9ae1180d2c5cade873058141fcd3d Mon Sep 17 00:00:00 2001 From: Shinrai Date: Mon, 3 Aug 2026 21:43:52 -0700 Subject: [PATCH 3/3] fix(ci): derive release base in never-supersede concurrency (not hardcoded master/main) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The concurrency group must never supersede release-relevant runs so the release PR posts a green check. The base branch is now DERIVED the same way resolve-release-base does — the CLDMV_RELEASE_BASE var, else the repo's default_branch — instead of the hardcoded refs/heads/master || refs/heads/main. next/hotfixes stay literal (the flow's fixed integration branches) and the release-PR detection (github.head_ref == next/hotfixes) was already base-agnostic. Mirrors the CLDMV/.github core-cicd ci.yml template. --- .github/workflows/ci.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08c44d3..642eed3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,19 +139,23 @@ on: # Concurrency policy, by context: # - FEATURE branches / feature PRs → cancel superseded runs (per-ref group + # cancel-in-progress): a newer push makes the older run redundant. -# - RELEASE-relevant contexts → NEVER superseded. Pushes to -# master/main/next/hotfixes and the next/hotfixes → master/main release PRs -# each get a UNIQUE group per run (run_id appended), so nothing cancels them. -# During the burst of pushes a release makes to next/hotfixes (the feature -# squash, the post-hotfix master→next sync merge, the bot's `chore: bump -# version`), every run completes and posts a GREEN check instead of the -# earlier one being cancelled into a red X on the release PR. A bare -# `cancel-in-progress: false` is NOT enough — GitHub still cancels the middle -# PENDING run when a newer one queues; a unique group avoids all of it. -# github.head_ref is set only on pull_request (the PR's head → next/hotfixes for -# release PRs); github.ref carries the branch on push. +# - RELEASE-relevant contexts → NEVER superseded. Pushes to the release base +# branch (derived: the CLDMV_RELEASE_BASE var → the repo's default branch), +# to next/hotfixes, and the next/hotfixes → base release PRs each get a +# UNIQUE group per run (run_id appended), so nothing cancels them. During +# the burst of pushes a release makes to next/hotfixes (the feature squash, +# the post-hotfix base→next sync merge, the bot's `chore: bump version`), +# every run completes and posts a GREEN check instead of the earlier one +# being cancelled into a red X on the release PR. A bare +# `cancel-in-progress: false` is NOT enough — GitHub still cancels the +# middle PENDING run when a newer one queues; a unique group avoids it. +# The base is NOT hardcoded to master/main — it derives the same way +# resolve-release-base does (CLDMV_RELEASE_BASE override → default_branch). +# next/hotfixes are the flow's fixed integration-branch names. github.head_ref +# is set only on pull_request (the release PR's head → next/hotfixes); +# github.ref carries the branch on push. concurrency: - group: ci-${{ github.workflow }}-${{ github.ref }}${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/hotfixes' || github.head_ref == 'next' || github.head_ref == 'hotfixes') && format('-{0}', github.run_id) || '' }} + group: ci-${{ github.workflow }}-${{ github.ref }}${{ (github.ref == format('refs/heads/{0}', vars.CLDMV_RELEASE_BASE != '' && vars.CLDMV_RELEASE_BASE || github.event.repository.default_branch) || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/hotfixes' || github.head_ref == 'next' || github.head_ref == 'hotfixes') && format('-{0}', github.run_id) || '' }} cancel-in-progress: true # Workflow-level: matches the broadest write surface the called