Skip to content

fix(ci): cancel superseded runs on next and hotfixes, cap the Node matrix - #586

Merged
Shinrai merged 1 commit into
nextfrom
fix/ci-cancel-superseded
Nov 26, 2026
Merged

Shinrai merged 1 commit into
nextfrom
fix/ci-cancel-superseded

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

CI on next, hotfixes and the release PRs now cancels superseded runs; only the release base branch keeps a group per run. Commit Subjects on next/hotfixes checks every unreleased commit (default branch vs. the pushed tip), so a cancelled push's commits still get checked. workflow-ci.yml gets max_parallel (default 2, 0 = no cap) for the Node matrix.

The concurrency part lives in each repo's ci.yml, so it needs a fleet re-sync after release, slothlet first. Note that tonight's backlog was mostly ~22 slothlet feature branches re-merged at once, which already cancel per branch; the cap is what limits that case.

Resolves #583

…trix

The ci.yml template (and local-ci.yml) gave every run on next, hotfixes
and the release PRs its own concurrency group, so superseded runs there
never stopped. Only the release base branch keeps a unique group now;
everything else cancels the older run. Release PRs only wait on their
head's run since CI status ownership, so a cancelled run doesn't show.

Commit Subjects on next/hotfixes now compares the default branch with
the pushed tip, so the commits of a push whose run was cancelled are
still checked by the next one.

workflow-ci.yml gets a max_parallel input (default 2, 0 = no cap) that
reusable-build-and-test.yml applies to the Node matrix, so one heavy
repo can't take every hosted job slot in the org.

Resolves #583
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure type: ci Changes to CI workflows, actions, or build pipelines labels Nov 26, 2026
@Shinrai
Shinrai merged commit ee795fd into next Nov 26, 2026
20 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/ci-cancel-superseded branch November 26, 2026 05:19
cldmv-bot Bot added a commit that referenced this pull request Nov 27, 2026
# v4.46.0 — 2026-11-26

Minor release: CI stops wasting the org's hosted runners, the package convention stops bundling, and an optional build check lands for other runner OSes.

## Features

- **Extra-OS build check.** `workflow-ci.yml` gains `extra_build_os`, a JSON list of runner labels (default `[]`). Each label gets one `🍎 Build & Test (<os>)` job on the latest LTS Node that runs the same build-and-test step as the Linux matrix legs — install, `build_command`, `test_command` — with no coverage, lint or Node matrix. It skips docs-only runs, cancels with its run, and a failure blocks `✅ Required PR Check` like a failed matrix leg. For builds that depend on the host platform (per-platform toolchains, the host `make` and `cc`); macOS runners are scarce, so list only what the build needs. ([#587](#587))
- **A cap on the Node matrix.** `workflow-ci.yml` gains `max_parallel` (default 2, `0` = no cap), applied to the build-and-test matrix, so one heavy repo can't take every hosted job slot the org has within a single run. ([#586](#586))

## Bug Fixes

- **Superseded CI runs on `next` and `hotfixes` are cancelled.** The `ci.yml` template gave every run on next, hotfixes and the release PRs a unique concurrency group, so superseded runs never stopped: on 2026-11-26 slothlet held 60 in-progress runs at once and took every hosted job slot in the org for about an hour. Only the release base branch (each push there is a release) keeps a unique group now; everything else cancels the older run. Release PRs only wait on their head's run since CI status ownership (v4.43.0), and the Commit Subjects check on next/hotfixes now compares the default branch with the pushed tip, so a cancelled push's commits are still checked by the next run. The concurrency block lives in each repo's `ci.yml` — re-run org onboarding or re-copy the block per repo. Fixes [#583](#583) ([#586](#586))
- **A docs-only last merge no longer greens the release PR.** The release PR takes its required check from the push run on next, and that push was judged docs-only from its own range — so when the changelog PR was the last merge, the ruleset showed the release PR mergeable while its own full-matrix run was still going. A push to next or hotfixes is now judged by everything unreleased (the default branch compared to the pushed tip); if that compare fails, the push's own range decides. Fixes [#588](#588) ([#590](#590))

## Documentation

- **No more bundling.** `docs/conventions/package-layout.md` now says `dist/` mirrors `src/`, one file per module, minified in place with `keepNames`: no bundling, no `splitting`, no `chunk-*` files, and no code shipped twice — a CLI builds to `dist/bin/` and imports the library by relative path. Bundling duplicates code as soon as a package has more than one entry: vitest-runner's CLI bundle re-shipped the library, and lib-sqlite-wasm needed hashed chunks to keep `instanceof` working across its four entries. The Build section shows the esbuild `bundle: false` script and cites the released references: vitest-runner 1.11.1 (`scripts/build.mjs`), fix-headers 2.5.1, and lib-sqlite-wasm 0.2.1 (`scripts/build-js.mjs`) for TypeScript sources. The bundle-size example uses `dist/**/*.mjs`. Fixes [#582](#582) ([#584](#584))
- **One generic `index.cjs`.** `src/index.cjs` is the same file in every library (`examples/package-layout/src/index.cjs`): after the version guard it returns the single exported value when the ESM entry has one distinct value (aliases count once), otherwise the module object `import` gives. Hand-written `.default` unwraps and attached aliases drift from the ESM exports and break named exports on any package with more than one; packages whose `require()` result changes adopt the shim in their next major. Fixes [#589](#589) ([#584](#584))

## Upgrade notes

- The concurrency change ships in the caller template: re-run org onboarding (or re-copy the block) for every repo's `ci.yml` after this release, slothlet first. Until then, superseded runs on a repo's `next`/`hotfixes` still run to the end.
- Repos whose builds depend on the host platform set `extra_build_os` in `ci.yml`; the default `[]` keeps it off.
- Repos still on a tsup bundle migrate per the new convention; per-repo migration issues follow.
- New libraries copy `examples/package-layout/src/index.cjs`; existing ones that unwrap `.default` adopt the shim in their next major.



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

<!-- co-authors -->

Co-authored-by: Shinrai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant