Skip to content

Job arrays (#24) - #32

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/job-arrays
Jul 21, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/job-arrays

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Ports spawn's job arrays — N identical, indexed instances from one base config (differing only by index), a peer of the sweeps and queue already shipped, built on the same shared FanOut engine. Closes #24.

  • src/core/jobarray.ts — buildJobArray(base, size) → N members, each with a per-index name and JobArrayMembership; a JobArray class mirroring Sweep. Drops any sweep membership from the base (a launch is one or the other).
  • Tags — buildJobArrayTags / decodeJobArrayTags write/read the wire-compatible spawn:job-array-{id,name,size,index} (so Go spawn list --job-array-id sees them; the instance's spored surfaces JOB_ARRAY_INDEX). Wired into buildLaunchTags + both providers' decode → ManagedInstance.jobArray.
  • SpawnClient.startJobArray + a jobarray progress event; the dashboard reuses the fan-out card. CLI array <name> --count N (+ the launch flags); status shows membership; terminal refreshes on array/orphans.

Scope: launch / status (via list) / cancel (via terminate). Out — retry --failed (needs a persisted record → IndexedDB follow-up) and logs/collect (need node/SSH). Noted in code.

233 tests (jobarray.ts 100%), typecheck + build green.

Port `spawn`'s job arrays — N identical, indexed launches from one base config,
a peer of sweeps/queue on the shared FanOut engine.

- core/jobarray.ts: buildJobArray(base, size) → N members, each with a per-index
  name + JobArrayMembership; JobArray class mirrors Sweep. Drops any sweep
  membership from the base (a launch is one or the other).
- tags.ts: buildJobArrayTags / decodeJobArrayTags — wire-compatible spawn:job-
  array-{id,name,size,index}; wired into buildLaunchTags + both providers'
  decode; ManagedInstance.jobArray.
- SpawnClient.startJobArray + a "jobarray" progress event; dashboard reuses the
  fan-out card; CLI `array <name> --count N` (+ launch flags) and status shows
  membership; terminal refreshes on array/orphans.

Scope: launch / status (list) / cancel (terminate). Out (follow-ups): retry
--failed (needs persisted record), logs/collect (need node access). 233 tests,
jobarray.ts 100%.
@scttfrdmn
scttfrdmn merged commit b93ec09 into main Jul 21, 2026
1 check passed
@scttfrdmn
scttfrdmn deleted the feat/job-arrays branch July 21, 2026 20:26
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.

Job arrays (launch / status / cancel)

1 participant