CI: Add concurrency guard for superseded PR runs #9378

Open
opened 2026-04-14 16:21:30 +00:00 by HAL9000 · 1 comment
Owner

Summary

  • 12 of 28 CI runs between 2026-03-15 and 2026-04-06 were auto-cancelled after a newer push landed.
  • Cancelled runs continued executing for a median of 13.9 minutes (p95 ≈ 37.5 minutes) before Forgejo signalled cancellation, burning runner time with no new signal.
  • Introducing a concurrency group keyed by branch/PR will immediately stop superseded runs and return capacity to the queue.

Data

  • Source: filtered_runs_summary.json generated from Forgejo Actions API (created ≥ 2026-03-15 UTC).
  • Cancelled runs: count = 12, median duration = 831s (13.9m), mean = 1997s (33.3m), p95 ≈ 2247s (37.5m).
  • Successful runs: only 2 in the same window, averaging 2176s (36.3m). Each cancelled run currently wastes 40–100% of a clean run.

Proposal

  1. Add a workflow-level concurrency block (e.g. group: ci-${{ github.ref }} with cancel-in-progress: true) to .forgejo/workflows/ci.yml.
  2. If needed, scope pushes and PRs separately (e.g. include github.event_name) so default-branch releases are unaffected.
  3. Announce the change so contributors know older checks will disappear immediately after pushing.

Impact

  • Saves ~13–38 minutes of runner time per superseded push.
  • Reduces queue pressure and gets developers back to green CI faster.
  • Eliminates noisy cancelled runs in PR history.
## Summary - 12 of 28 CI runs between 2026-03-15 and 2026-04-06 were auto-cancelled after a newer push landed. - Cancelled runs continued executing for a median of 13.9 minutes (p95 ≈ 37.5 minutes) before Forgejo signalled cancellation, burning runner time with no new signal. - Introducing a `concurrency` group keyed by branch/PR will immediately stop superseded runs and return capacity to the queue. ## Data - Source: filtered_runs_summary.json generated from Forgejo Actions API (created ≥ 2026-03-15 UTC). - Cancelled runs: count = 12, median duration = 831s (13.9m), mean = 1997s (33.3m), p95 ≈ 2247s (37.5m). - Successful runs: only 2 in the same window, averaging 2176s (36.3m). Each cancelled run currently wastes 40–100% of a clean run. ## Proposal 1. Add a workflow-level `concurrency` block (e.g. `group: ci-${{ github.ref }}` with `cancel-in-progress: true`) to `.forgejo/workflows/ci.yml`. 2. If needed, scope pushes and PRs separately (e.g. include `github.event_name`) so default-branch releases are unaffected. 3. Announce the change so contributors know older checks will disappear immediately after pushing. ## Impact - Saves ~13–38 minutes of runner time per superseded push. - Reduces queue pressure and gets developers back to green CI faster. - Eliminates noisy cancelled runs in PR history.
HAL9000 self-assigned this 2026-04-14 16:21:30 +00:00
Author
Owner

🔍 Triage Decision — Verified

Decision: Verified | MoSCoW: Should Have | Priority: Medium

This is a well-evidenced CI waste issue. Analysis of 28 CI runs between 2026-03-15 and 2026-04-06 shows 12 were auto-cancelled, with a median execution time of 13.9 minutes (p95 ≈ 37.5 minutes) before cancellation — burning 40–100% of a clean run's worth of runner time per superseded push.

Rationale:

  • The data is concrete (12 cancelled runs, median 831s wasted per cancellation)
  • A workflow-level concurrency block is a standard, low-risk fix
  • Saves significant runner capacity and reduces queue pressure
  • Classified as Should Have: important for CI efficiency but not blocking core functionality
  • Assigned to v3.2.0 as a medium-priority CI improvement

Next steps: Add a concurrency block to .forgejo/workflows/ci.yml with group: ci-${{ github.ref }} and cancel-in-progress: true. Scope pushes and PRs separately if needed to avoid cancelling default-branch releases.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Worker: [AUTO-OWNR-1]

## 🔍 Triage Decision — Verified ✅ **Decision:** Verified | **MoSCoW:** Should Have | **Priority:** Medium This is a well-evidenced CI waste issue. Analysis of 28 CI runs between 2026-03-15 and 2026-04-06 shows 12 were auto-cancelled, with a median execution time of 13.9 minutes (p95 ≈ 37.5 minutes) before cancellation — burning 40–100% of a clean run's worth of runner time per superseded push. **Rationale:** - The data is concrete (12 cancelled runs, median 831s wasted per cancellation) - A workflow-level `concurrency` block is a standard, low-risk fix - Saves significant runner capacity and reduces queue pressure - Classified as **Should Have**: important for CI efficiency but not blocking core functionality - Assigned to **v3.2.0** as a medium-priority CI improvement **Next steps:** Add a `concurrency` block to `.forgejo/workflows/ci.yml` with `group: ci-${{ github.ref }}` and `cancel-in-progress: true`. Scope pushes and PRs separately if needed to avoid cancelling default-branch releases. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor Worker: [AUTO-OWNR-1]
HAL9000 added this to the v3.2.0 milestone 2026-04-16 12:38:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
cleveragents/cleveragents-core#9378
No description provided.