Skip to content

ci: cancel superseded PR runs and give every job a timeout - #247

Merged
Nic-dorman merged 2 commits into
mainfrom
nic/v2-1867-ant-client-ciyml-concurrency-cancel-in-progress-timeout
Nov 5, 2026
Merged

Nic-dorman merged 2 commits into
mainfrom
nic/v2-1867-ant-client-ciyml-concurrency-cancel-in-progress-timeout

Conversation

@Nic-dorman

Copy link
Copy Markdown
Member

This is the first, small step of V2-1851 (CI cost), split out the way ant-node did it in #268 (V2-1822). The job consolidation comes later, after #244 lands, since that PR also changes ci.yml.

  • concurrency, one group per PR, with cancel-in-progress. A new push now cancels the run still going for the commit it replaces, instead of running both to the end. Runs that run to the end anyway cost a lot: a run is about 318 job-minutes, feat/peer-swarm ran 11 times (about 3,500 job-minutes), and runs 41047797289 and 41047829080 started 15 s apart on the same PR.
  • timeout-minutes on the 10 jobs that had none. Each is set above the slowest successful run in the last 50:
Job Max seen (min) Timeout
E2E Tests (ubuntu, macOS) 87.6 110
Unit Tests (ubuntu, macOS) 24.9 40
Build (ubuntu, macOS) 24.7 40
Browser WASM 10.0 30
Clippy, notices, doc, Security Audit 4.3 20
Format, Release scripts 0.4 10

Until now a hung E2E test could hold a macOS runner for GitHub's 6-hour default.

  • Unchanged: the browser-integration (25, max 23.2) and Merkle E2E (90, max 80.8) timeouts. The Merkle comment no longer says E2E has no cap.

Not touched: pr-checks.yml (kept verbatim across repos), adr-governance.yml, and the release workflows, which must never cancel a release.

Linear issue

Closes V2-1867

Risk tier

  • T0 — docs / tooling / CI / pure UX-output. Repo CI only.
  • T1 — client-only, no network-facing behavior change. CI + prod compat smoke.
  • T2 — node/client logic with behavioral surface, no protocol/format/economics change. Dev testnet + ADR.
  • T3 — protocol / storage format / payments / routing. T2 evidence + adversarial testing.

Compatibility

  • Wire: none
  • Storage: none
  • API: none. ci.yml only.

Semver impact

  • breaking
  • feature
  • fix

Test evidence

  • The "max seen" column comes from the job timings of the last 50 CI runs (successful jobs only), the same data as the V2-1842 audit.
  • actionlint is clean, as it is on main. YAML parse: 12 jobs, every one has timeout-minutes, and the workflow has a concurrency group.
  • This PR's own CI run checks the timeouts against real job times. A second push to this PR would show the cancellation.

New dependency

none

ADR

n/a

Mitigation / rollback

Revert. If a job outgrows its timeout, raise that one number.

🤖 Generated with Claude Code

Nic-dorman and others added 2 commits November 4, 2026 14:16
- A workflow-level concurrency group per PR, with cancel-in-progress.
  A new push now cancels the run still going for the commit it
  replaces, instead of running both to the end. feat/peer-swarm ran
  11 times, about 3,500 job-minutes; runs 41047797289 and 41047829080
  started 15 s apart on the same PR.
- timeout-minutes on the 10 jobs that had none, each above the
  slowest successful run in the last 50: E2E 110 (max 87.6), unit
  tests and build 40 (24.9, 24.7), browser WASM 30 (10.0), clippy,
  notices, doc and audit 20 (4.3), fmt and release scripts 10 (0.4).
  E2E could previously hold a runner for GitHub's 6 h default.
- The browser-integration (25) and Merkle E2E (90) timeouts are
  unchanged. The Merkle comment no longer says E2E has no cap.

pr-checks.yml, adr-governance.yml and the release workflows are not
touched.

Closes V2-1867

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y-cancel-in-progress-timeout

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@MaidSafe-Hermes MaidSafe-Hermes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — reviewed at head 84a067e. The change is limited to .github/workflows/ci.yml. The PR-number concurrency group scopes cancellation to runs for the same PR, and all 12 CI jobs have explicit timeouts; the three matrix job timeouts apply per matrix leg. The other workflow files define no concurrency groups that collide with this key. No actionable code defect found. Both review seats agree (two model families): 2/2 seats reviewed (sol-1 gpt-6.1-sol xhigh; glm-1 z-ai/glm-5.3). Caveat: 18/19 checks pass; Security Audit fails on the inherited crypto-bigint 0.5.5 / RUSTSEC-2026-0387 finding, and Cargo.lock is unchanged from base. This approval is code-scoped; the security audit remains a merge gate.

@Nic-dorman
Nic-dorman merged commit 8972687 into main Nov 5, 2026
57 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants