Skip to content

Next release#1296

Merged
josephjclark merged 8 commits intomainfrom
release/next
Mar 13, 2026
Merged

Next release#1296
josephjclark merged 8 commits intomainfrom
release/next

Conversation

@josephjclark
Copy link
Collaborator

@josephjclark josephjclark commented Mar 12, 2026

  • CLI fixes
  • Maybe flaky test fixes
  • Fastlanes

@github-project-automation github-project-automation bot moved this to New Issues in Core Mar 12, 2026
stuartc and others added 6 commits March 13, 2026 10:30
* Add --queues CLI option for slot group configuration (#1288)

Introduce queue-aware slot allocation to support fast lanes. Workers can
now dedicate specific slots to specific queues via a new `--queues` flag
(e.g. `--queues "fast_lane:1 manual,*:4"`).

- Add parseQueues() with SlotGroup type and full validation
- Add --queues CLI option with WORKER_QUEUES env var support
- Enforce mutual exclusivity between --queues and --capacity
- Derive effectiveCapacity from slot groups in start.ts
- Add queues field to ClaimPayload in lexicon

* Review fixes: remove dead code, add TODO and duplicate queue warnings

- Remove unreachable ?? 5 fallback in start.ts (capacity always has default)
- Add TODO(#1289) for passing slotGroups to createWorker
- Warn on duplicate queue names within a preference chain
- Warn on identical queue configurations across slot groups
- Add test for WORKER_QUEUES + WORKER_CAPACITY env var mutual exclusivity

* Add changeset for queues CLI option

* Fix ws-worker build: make capacity non-optional in Args type

capacity always receives a default value via setArg, so the type
should reflect that rather than requiring a runtime fallback.

* Fix formatting for prettier

* Implement per-group workloops and queue-aware claiming (#1289)

Each slot group now gets its own independent workloop, tracks its own
active runs and capacity, and sends queue-scoped claims to Lightning.
The join payload includes a queues map so Lightning knows the slot
distribution. Default behavior (no --queues) is preserved with a single
manual,* group.

* Extract groupHasCapacity helper to consolidate repeated capacity checks

The pattern of computing pending claims and comparing against maxSlots
was duplicated 4 times across server.ts. Extracts it into a single
groupHasCapacity() function in parse-queues.ts with 5 unit tests.

* Consolidate redundant claim tests

Fold run-to-group tracking assertions into the existing execute test,
remove the redundant workloop-stop test (already covered), and drop
the now-covered todo.

* Fix formatting for prettier

* Fix CLI args ignored when invoked via pnpm start

pnpm v7+ passes the '--' separator through to process.argv, causing
yargs to treat all subsequent flags as positional arguments. Strip a
leading '--' before parsing so --queues and other flags work correctly
whether invoked via pnpm, npm, or directly.

* Add ES2021 lib to ws-worker tsconfig for Promise.any

The per-group workloops use Promise.any which requires ES2021 or later
in the TypeScript lib setting.

* Add JUnit XML test reporting for CircleCI Tests tab

Pipes AVA TAP output through tap-xunit to generate JUnit XML,
enabling test results to display in CircleCI's Tests UI.

* Fix tap-xunit not found by using npx

* Add per-package test:ci scripts for clean JUnit XML output

Each package now produces its own XML file instead of piping
combined pnpm -r output through tap-xunit, which was corrupted
by pnpm's interleaved logging.

* Fix "no tests found" warning in worker.test.ts

Remove redundant env var guard wrapping an already-skipped test.
AVA now sees the test as registered but skipped instead of finding
zero tests and emitting a warning that causes a non-zero exit.

* Refactor claim() to accept group as a standalone parameter

Move group from ClaimOptions to a required positional parameter,
making the function signature clearer about its dependencies.

* Rename slots/queues terminology to workloops and merge runtime types

- Rename --queues CLI option to --workloops (env: WORKER_WORKLOOPS)
- Change queue separator from comma to angle bracket (fast_lane>*:4)
- Rename SlotGroup → WorkloopConfig, maxSlots → capacity
- Merge RuntimeSlotGroup + Workloop into single Workloop interface
  with stub stop/isStopped that get overwritten by startWorkloop()
- Rename parse-queues.ts → parse-workloops.ts
- Update all imports, types, variable names, and tests

* Separate workloop parsing from runtime with WorkloopHandle pattern

Move Workloop, createWorkloop, and workloopHasCapacity out of
parse-workloops.ts (pure parsing) into api/workloop.ts (runtime).

startWorkloop now returns a WorkloopHandle { stop, isStopped } instead
of mutating the Workloop object. ServerApp stores handles in a
workloopHandles Map, keeping Workloop as pure state with no lifecycle
methods. Also fixes syntax error on claim.ts L81 and updates error
message expectations in tests.

* Fastlanes simpler workloops (#1297)
* remove app.openClaims, which is not useful anymore
…1287)

* added a unit test for deploying a new project

* remove only

* enable mock lightning to load a project from yaml

* update tests

* failed attempt to repro

* fix issue where a project with no local diffs can wrongly report diffs on deploy]#

* fix types

* fix tests

* approve builds

* fix test

* remove dev log

* revert dev log

* fix lockfile
@josephjclark josephjclark merged commit 5461698 into main Mar 13, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from New Issues to Done in Core Mar 13, 2026
@josephjclark josephjclark deleted the release/next branch March 13, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants