Skip to content

ci: cancel superseded runs on main, not just on PRs - #663

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
chore/cancel-superseded-main-runs
Sep 6, 2026
Merged

ScriptedAlchemy merged 2 commits into
mainfrom
chore/cancel-superseded-main-runs

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Every push to main used a SHA-keyed concurrency group with no cancellation in ci.yml, docs.yml, and package-preview.yml, so a burst of merges left one queued run per commit (18 queued runs after tonight's four merges). Only the tip matters, so the groups now key on github.event.pull_request.number || github.ref with cancel-in-progress: true: a PR push still cancels the superseded PR run, and a main push (or dispatch) now cancels the superseded main run. Merge-queue entries and dispatches on other refs get their own ref-keyed group as before.

  • ci.yml, package-preview.yml: ref-keyed groups, always cancel.
  • docs.yml: ref-keyed group, but main stays non-cancelling so the Pages deploy job is never killed mid-deployment (workflow-level cancellation would override the job's own cancel-in-progress: false). GitHub already drops superseded pending runs in a group, so the main docs queue is at most one deep.
  • release.yml is unchanged: package-release never cancels a publish in flight.
  • docs/preview-packages.md, website/docs/{en,zh}/guide/distribution/preview-packages.mdx, website/docs/{en,zh}/guide/start/installation.mdx: drop the "every main commit has an installable snapshot" promise — a commit overtaken before its preview published has none; the tip always does.
  • AGENTS.md: notes that the post-merge run to watch is the tip's, since a later push cancels the superseded run.

Trade-off accepted (owner request, 2026-09-06): intermediate main commits may have no completed CI/preview run.

Validation

  • actionlint .github/workflows/{ci,docs,package-preview}.yml — clean.
  • pnpm build && pnpm docs:site:build — green (website prose changed; dead-link and en/zh parity checks pass).
  • No package code touched, skip-changeset.

Deslop

Deslop: Claude Fable 5.1, 0 edits (comments rewritten to describe the new policy; no code).

Self-review

Reviewer: gpt-5.6-sol-medium (generalPurpose). Five findings, all fixed:

  1. docs.yml — workflow-level cancel-in-progress: true would override the deploy job's cancel-in-progress: false and could kill a Pages deployment mid-flight. Fixedmain runs stay non-cancelling in docs.yml; only PR runs cancel.
    2–5. website/docs/{en,zh}/guide/distribution/preview-packages.mdx and website/docs/{en,zh}/guide/start/installation.mdx still promised per-commit, uncancellable main previews. Fixed — all four pages now describe ref-keyed cancellation and tell readers to pin the tip.

Expression check per event (verified by the reviewer): pull_request → PR number; push/workflow_dispatch on main → refs/heads/main; merge_grouprefs/heads/gh-readonly-queue/main/pr-N-<sha> (unique per entry). No cross-event collisions.

Second pass (same reviewer): no merge risks found.

@ScriptedAlchemy ScriptedAlchemy added the skip-changeset PR changes a publishable package but ships no observable change; changeset not required label Sep 6, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@changeset-bot

changeset-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ef3d309

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy merged commit 9d0de93 into main Sep 6, 2026
3 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the chore/cancel-superseded-main-runs branch September 14, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changeset PR changes a publishable package but ships no observable change; changeset not required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant