From 1f705806911429e4a260e8002d34db1c4f9373e5 Mon Sep 17 00:00:00 2001 From: Microck Date: Sun, 8 Nov 2026 10:13:13 +0100 Subject: [PATCH 1/2] ci: cancel superseded PR validation without cancelling main or reruns --- .github/workflows/ci.yml | 6 ++++++ .github/workflows/managed-sessions.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c29b1ea..de1c84b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,12 @@ on: permissions: contents: read +# Only newer first-attempt PR validation supersedes an older PR run. +# Keep main pushes and manual reruns isolated, even when rerunning an old PR head. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && format('pr-{0}', github.event.pull_request.number) || format('run-{0}-attempt-{1}', github.run_id, github.run_attempt) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' && github.run_attempt == 1 }} + jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/managed-sessions.yml b/.github/workflows/managed-sessions.yml index f3124b2..b880c48 100644 --- a/.github/workflows/managed-sessions.yml +++ b/.github/workflows/managed-sessions.yml @@ -8,6 +8,12 @@ on: permissions: contents: read +# Only newer first-attempt PR validation supersedes an older PR run. +# Keep main pushes and manual reruns isolated, even when rerunning an old PR head. +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.run_attempt == 1 && format('pr-{0}', github.event.pull_request.number) || format('run-{0}-attempt-{1}', github.run_id, github.run_attempt) }} + cancel-in-progress: ${{ github.event_name == 'pull_request' && github.run_attempt == 1 }} + jobs: runtime: strategy: From c49126c9016635462f29bc434e5a645c2e007a45 Mon Sep 17 00:00:00 2001 From: Microck Date: Sun, 8 Nov 2026 10:14:56 +0100 Subject: [PATCH 2/2] ci: verify superseded-run cancellation with identical validation inputs