From c43528b7b28471a8d0d3b6ab0a7a6f46734b07ce Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sun, 2 Aug 2026 16:37:58 +0200 Subject: [PATCH] Cancels superseded PR CI runs on a new push, never during a live deploy A new push to a PR previously left the prior CI attempt running independently instead of superseding it. Scoped strictly to pull_request events, since deploy-test/deploy-production only ever run on a push to master or a manual workflow_dispatch. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01FWyStNL2ZsjrS7FLd7xvvN --- .gitea/workflows/continuous_integration.yaml | 9 +++++++++ aidlc-docs/features/slpsoftware-api/audit.md | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.gitea/workflows/continuous_integration.yaml b/.gitea/workflows/continuous_integration.yaml index 5be0a81..8674d2a 100644 --- a/.gitea/workflows/continuous_integration.yaml +++ b/.gitea/workflows/continuous_integration.yaml @@ -16,6 +16,15 @@ on: push: branches: [master] +# A new push to the same PR does not cancel an already-running CI attempt by default (each +# `synchronize` event starts an independent run) — this opts in to cancelling the superseded one, +# but ONLY for pull_request events. `deploy-test`/`deploy-production` never run on a pull_request +# (they require a push to master or a workflow_dispatch, see those jobs' `if:` conditions), so +# scoping cancel-in-progress to pull_request here can never abort a live deploy mid-flight. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + # Reusable settings for this workflow. Change these in one place if the .NET/Node/pnpm version, # artifact names, or deploy destinations change. The env context is NOT available inside a called # reusable workflow's `with:` inputs (see the `config` job below, which works around this by passing diff --git a/aidlc-docs/features/slpsoftware-api/audit.md b/aidlc-docs/features/slpsoftware-api/audit.md index 10b0294..b00a0cd 100644 --- a/aidlc-docs/features/slpsoftware-api/audit.md +++ b/aidlc-docs/features/slpsoftware-api/audit.md @@ -935,3 +935,15 @@ **Context**: Operations, Production Readiness Validation stage complete — the final stage of this feature's AI-DLC lifecycle. Presenting the feature-completion gate; awaiting the user's final approval to close out `slpsoftware-api`. --- + +## Post-Completion Q&A — CI Concurrency Cancellation + +**Timestamp**: 2026-08-02T17:50:00Z + +**User Input**: "Ja, commit alle openstaande wijzigingen. Is het trouwens mogelijk een workflow run te stoppen als er een nieuwe push wordt gedaan naar de pull request of zou dat al moeten gebeuren?" — followed by "Ja, voeg maar toe" after being told this isn't automatic and being shown the fix. + +**AI Response**: "Committed the Operations-phase doc changes (commit `81af6cd`, not pushed). Answered the concurrency question: confirmed via the Gitea server's `/api/v1/version` (1.27.0, well past when Gitea Actions gained `concurrency:` support) that neither Gitea nor GitHub Actions cancels a previous run on a new PR push by default — each `synchronize` event starts an independent run. Added a workflow-level `concurrency` block to `continuous_integration.yaml`, scoped to only cancel on `pull_request` events (`cancel-in-progress: ${{ github.event_name == 'pull_request' }}`) — verified `deploy-test`/`deploy-production`'s existing `if:` conditions never trigger on a `pull_request` event (only push-to-master or `workflow_dispatch`), so this can never abort a live deploy mid-flight." + +**Context**: Post-completion CI/CD hygiene improvement, within this feature's already-established Operations-phase scope (it already owns the retargeted `continuous_integration.yaml`). Not yet committed — awaiting the user's decision on whether to fold this into a new commit or the next one. + +---