Never cancel a main or tag run (CI remediation) #5

Merged
stephen merged 2 commits from ci-concurrency-never-cancel-main into main 2026-11-22 20:05:13 +00:00
Owner

Stephen's CI remediation mission, Apple audit #3 and #7 (M2). The workflow's concurrency group was keyed on the ref with cancel-in-progress always on, so a second push to main cancelled the first merge's run (Forgejo records a cancelled job as a failure) and a re-pushed tag cancelled its predecessor.

Now only a pull_request run is cancelled by a newer push to the same PR branch. Outside pull_request the group is the event, the ref and the SHA, so each main push and each tag keeps a group of its own and is neither cancelled nor replaced while queued. fjord-ios's ci.yml already uses this shape (its group is keyed on the event and the head ref or SHA).

Not changed: the jobs, branch protection (this repo has none; that is a separate audit item), and fork-PR grouping (two forks with the same branch name would share a group; the repo is private and has no fork PRs).

Stephen's CI remediation mission, Apple audit #3 and #7 (M2). The workflow's concurrency group was keyed on the ref with cancel-in-progress always on, so a second push to main cancelled the first merge's run (Forgejo records a cancelled job as a failure) and a re-pushed tag cancelled its predecessor. Now only a pull_request run is cancelled by a newer push to the same PR branch. Outside pull_request the group is the event, the ref and the SHA, so each main push and each tag keeps a group of its own and is neither cancelled nor replaced while queued. fjord-ios's ci.yml already uses this shape (its group is keyed on the event and the head ref or SHA). Not changed: the jobs, branch protection (this repo has none; that is a separate audit item), and fork-PR grouping (two forks with the same branch name would share a group; the repo is private and has no fork PRs).
The group was keyed on the ref with cancel-in-progress always on, so a second push to main cancelled the first merge's run, and a re-pushed tag its predecessor. Key the group on the event and the PR branch or the SHA, and cancel only pull_request runs, as fjord-ios does.
Give each main push and tag its own concurrency group, ref and SHA (CI remediation)
All checks were successful
CI / Icon usage lists (pull_request) Successful in 5s
CI / Build and test (iOS Simulator) (pull_request) Successful in 1m46s
fa5dc937e8
A main push and a tag at the same commit shared a group, so one queued behind the other could replace it.
gerri approved these changes 2026-11-22 20:04:46 +00:00
gerri left a comment

Automated Codex review (read-only) of head fa5dc937e8.

  • Low (edge case), .forgejo/workflows/ci.yml:19: The invariant is that every main or tag run retains its own concurrency group. A tag deleted and recreated at the same commit produces the same ref and SHA, so multiple queued runs can still share a group and a newer pending run can replace an older one. The same applies if main returns to a previously pushed commit. Include a unique run identifier in the non-PR group.

  • Low (edge case), .forgejo/workflows/ci.yml:19: The invariant is that only runs for the same PR supersede one another. As acknowledged in the PR body, PRs from two forks with the same branch name share github.head_ref and can cancel one another. Key PR groups by PR number or by source repository and branch. The body states that this private repository has no fork PRs.

BLOCKING: 0

Reviewed head fa5dc937e8 at 2026-11-22T20:04:46Z by codex exec (read-only sandbox).

Automated Codex review (read-only) of head fa5dc937e8968b29eb464da99bd3b8d50c373a13. - **Low** (edge case), `.forgejo/workflows/ci.yml:19`: The invariant is that every main or tag run retains its own concurrency group. A tag deleted and recreated at the same commit produces the same ref and SHA, so multiple queued runs can still share a group and a newer pending run can replace an older one. The same applies if main returns to a previously pushed commit. Include a unique run identifier in the non-PR group. - **Low** (edge case), `.forgejo/workflows/ci.yml:19`: The invariant is that only runs for the same PR supersede one another. As acknowledged in the PR body, PRs from two forks with the same branch name share `github.head_ref` and can cancel one another. Key PR groups by PR number or by source repository and branch. The body states that this private repository has no fork PRs. BLOCKING: 0 --- Reviewed head fa5dc937e8968b29eb464da99bd3b8d50c373a13 at 2026-11-22T20:04:46Z by codex exec (read-only sandbox).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rasterstate/fjord-apple-kit!5
No description provided.