Skip to content

ci: add job timeouts and concurrency groups - #167

Merged
matej21 merged 2 commits into
mainfrom
ci/job-timeouts
Nov 18, 2026
Merged

matej21 merged 2 commits into
mainfrom
ci/job-timeouts

Conversation

@matej21

@matej21 matej21 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Adds run hygiene to both workflows.

  • timeout-minutes: 10 on every job (5 in ci.yml, 1 in publish.yml).
  • ci.yml: pull requests get a concurrency group per workflow and ref, and a new push cancels the superseded run. Each push to main gets its own group (per SHA), so no commit on main loses its run (a shared group keeps only one pending run).
  • publish.yml: only the timeout; trigger, permissions and steps are unchanged.
  • push was already limited to main (the default branch); no change.

Measured durations (why 10 minutes fits)

Last 15 finished CI runs and last 8 Publish runs (7 succeeded, 1 failed at 130 s), per job, max:

Job Max Range
Lint 20 s 12–20 s
Typecheck 33 s 19–33 s
Package Contents 33 s 21–33 s
Unit & Integration Tests 85 s 56–85 s
Browser Tests 104 s 91–104 s
publish 288 s 151–288 s (successful runs)

Decisions

Decision Where Status
"timeout-minutes: 10 on every job" ci.yml (5 jobs), publish.yml (1 job) done
"push limited to the default branch next to pull_request" ci.yml on.push.branches: [main] done (already in place)
"A concurrency group per workflow and ref with cancel-in-progress: true for PRs" ci.yml top-level concurrency done; deviation for pushes to main: grouped per SHA instead of per ref, so queued main runs are not dropped
"Keep the publish workflow's behaviour unchanged … add a timeout there too" publish.yml done (timeout only)

Status

  • Review round 1 (Claude agent, 6572995): approve, 1 minor + 2 nits, all fixed in 9f7bd21
  • CI: green on 9f7bd21 (run 44323388161)
  • Left before merge: maintainer merge

🤖 Generated with Claude Code

Every job gets timeout-minutes: 10; the slowest recent job (publish)
took at most 288 s, CI jobs at most 104 s. CI cancels superseded PR
runs; publish keeps a per-ref group without cancelling.

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

matej21 commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

Review round 1

Reviewer: Claude agent (Opus 5.5), fresh context, brief + diff only. Commit: 6572995. Verdict: approve (one minor item to fix).

Checked: all 6 jobs in both workflow files have timeout-minutes: 10; push and PR runs never share a concurrency group (refs/heads/main vs refs/pull/N/merge); the cancel-in-progress expression is valid (actionlint clean apart from findings already on main); publish.yml trigger, permissions (id-token: write for provenance) and steps are unchanged; the decision table has one row per quoted decision and each matches the code; durations spot-checked on 4 runs.

Findings:

  1. minor, .github/workflows/ci.yml:8-10: all pushes to main share one group. GitHub keeps only one pending run per group and cancels the older pending one, so with 3+ quick pushes a middle commit on main gets no CI result. The description's "pushes to main always finish" is wrong. Fix: per-SHA group for pushes.
  2. nit, .github/workflows/publish.yml:12-15: the concurrency block was not asked for and has no effect (tags are unique refs). Remove it or fix the comment.
  3. nit, PR description: the publish duration range includes a failed run while the CI numbers are from finished runs.

A shared group keeps only one pending run, so a quick third push
dropped CI for the middle commit. Drop the no-op publish group.

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

matej21 commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

Review round 1 response

  1. minor, push-to-main concurrency: fixed in 9f7bd21. Pushes are grouped per SHA (github.event_name == 'pull_request' && github.ref || github.sha), PRs stay per ref with cancel-in-progress. Description updated.
  2. nit, publish concurrency block: fixed in 9f7bd21. Removed; publish.yml now only gains the timeout.
  3. nit, publish duration range: fixed in the description; the failed run is noted separately and the range covers successful runs only.

@matej21
matej21 merged commit 77d3712 into main Nov 18, 2026
5 checks passed
@matej21
matej21 deleted the ci/job-timeouts branch November 18, 2026 14:33
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.

1 participant