Case file — PR #640 "helios: allow persistent workers on rank 0 of local multi-rank cores"
Author original-el8 (COLLABORATOR; git author "Jason Cook"; Discord el8), base main, head b7a6204, opened and last updated 2026-11-30, open, marked ready for review, no reviews, no comments, no labels, no linked issue. 4 files, +68 / −34.
Key findings
- The PR relaxes three of the six existing "persistent workers are single-rank only" gates, not all of them. It changes
validate_persistent_worker_topology(helios/src/runtime_core/model.rs:114-134),LoadOptions::select(helios/src/runtime_core/selection.rs:285-289), andThreadedExecutor::new+same_layout(helios/src/execution/threaded.rs:632-636,:1292-1294). Socket/multi-host TP (helios/src/execution/parallel.rs:122-126,:552-556), the in-process Python loader (heliopause/src/python.rs:368(not opened)) and Ignition preparation (ignition/preparation/execution.py:333-336,:352-355) still reject workers — consistent with the stated scope, but they keep the old "single-rank cores" wording. - An undeclared stale-docs gap.
helios/manifest.md:87-95still states "Helios currently supports at most one persistent worker entry on single-rank cores; cores declaring more than one entry, multi-rank cores, and multi-host cluster cores declaring a persistent worker fail validation before execution." After this PR that sentence is false for local multi-rank cores. Onlydocs/runtime-core-design.md:642-644was updated. The PR description's "What changed" list does not mentionhelios/manifest.md. - The restriction being lifted was imposed deliberately, by the maintainer, in review of the parent PR #430 (same author). #430's review thread (lukealonso, 2026-11-23) asked to "Either reject
cores.len() > 1/cluster.is_some()explicitly until multi-rank coordination and failure-abandonment (GraphExecutor::abandon, partialfinish_startupfailures) are implemented and tested, or validate multi-rank startup and teardown directly." #640 takes the first option away by changing only predicates — it adds no multi-rank startup/teardown/failure-abandonment handling. That is the central open question for reviewers. - Evidence is unit-test level for load/select/layout only; there is no test that a rank-0 worker actually runs in a threaded rank group. The new test
rank_layout_permits_persistent_worker_only_on_rank_zero(helios/src/execution/threaded.rs:1628-1651) only exercisessame_layout.helios/src/execution/tests.rs:1371-1373still asserts only the rejection directions. The PR body itself lists "live multi-GPU core loading/execution with a persistent worker" as not executed. same_layoutbecomes asymmetric and loses its field-wise worker comparison. It now returns false whenever the peer manifestbcarries any worker (threaded.rs:1292-1294), replacing a full comparison ofworker_sm_count/graph/metrics_count. The new test asserts!same_layout(&root, &root)for a worker-bearing manifest, i.e. a worker-bearing manifest never matches another worker-bearing manifest, including itself.- CI failed on the head commit (per the orientation packet); zero reviews and zero comments so far, so the change has had no human sign-off in its first day. #430, by contrast, had three review rounds.
The change, in plain terms
Before: if any rank of a core declared Execution.persistent_workers, load, graph selection and threaded execution all refused it with "persistent workers are only supported on single-rank cores". After: a core whose first core (rank 0) declares a worker and whose peer cores declare none is accepted, provided the core is local (cluster.is_none()); peer-rank workers and clustered (multi-host) cores with a rank-0 worker still fail.
helios/src/runtime_core/model.rs:114-134— splitshas_workerintohas_rank0_worker(cores.first()) andhas_peer_worker(cores.iter().skip(1)); rejectshas_peer_worker || (has_rank0_worker && cluster.is_some()). Message: "persistent workers are only supported on rank 0 of a local core". Called frommodel.rs:386insideload_agreeing, after per-corevalidate().helios/src/runtime_core/selection.rs— deleteslet multi_rank = cores.len() > 1;and replaces the guard at:285-289with!persistent_workers.is_empty() && rank > 0("only supported on rank 0"). The one-worker-per-rank check at:282-284is untouched.helios/src/execution/threaded.rs:632-636— drops the!manifest.persistent_workers.is_empty()term, so only peer manifests (ranks, i.e. ranks 1..N; the coordinator manifest is the separatemanifestargument) are refused.helios/src/execution/threaded.rs:1292-1294— worker comparison insame_layoutcollapsed toif !b.persistent_workers.is_empty() { return false; }.docs/runtime-core-design.md:642-644— spec reworded to "local core … on rank 0", "peer ranks or multi-host cluster cores … rejected".- Tests updated at
model.rs:1754-1769(adds[worker, plain]accepted,[plain, worker]rejected),selection.rs:694-724(adds[worker_core(), core()]accepted with worker graph retained on rank 0;[worker, worker]and[core, worker]rejected), and the new threaded test above.
The why
- No linked issue and no attached report, benchmark, or failing scenario; the whole motivation is the PR body's "blocked local multi-GPU cores from combining a rank-0 persistent worker (such as a GPU-side mover) with plain peer ranks under
ThreadedExecutor." - The rule being relaxed originates in #430 ("Add Execution.persistent_workers green-context lifecycle", merged 2026-11-23, same author), whose description explicitly rejects multi-rank and multi-host cluster cores across selection, model loading, threaded execution and socket TP. The restriction therefore existed for seven days before this PR. Interest so far is one author, no commenters, no reactions.
- The parent work also includes #431 (PersistentWorker export binding, merged, same author) which makes exported cores carry a worker — the piece that would let a local TP core actually declare a rank-0-only worker. Whether Ignition can currently emit a worker on only rank 0 of a multi-rank
PreparedExecutionwas not verified;ignition/preparation/execution.py:182-183enforces only one worker per rank and no multi-rank rule.
Related work
- #430 (merged 2026-11-23, original-el8) — parent feature; this PR removes one of its validations, against the reviewer's stated condition. No conflict.
- #431 (merged, original-el8) — export binding for workers; stacked prerequisite in spirit.
- #507 (merged 2026-11-25, lukealonso, replacing the author's closed #472) — persistent-worker metrics /
/v1/worker/flare parallax; its description still scopes telemetry to "Prepared single-rank cores".helios/src/server/runtime.rs:631-634readsmanifest.persistent_workers.first()from rank 0's manifest, so telemetry keeps working for a newly-accepted multi-rank-thread core — plausible by reading, not exercised. - #613 (merged 2026-11-29, lukealonso) — teardown change so
release_execution_resources()stops persistent workers and synchronizes contexts; this is the teardown area #430 deferred, and it was merged one day before #640 but with no rank-0-in-multi-rank test. - #622 (open, Raydius) — L2/cache limit for persistent-worker green contexts in
helios/src/runtime_core/mod.rs; same feature path, different files, no overlap or conflict. - #628 (open, yatesdr) — edits
runtime_core/model.rsbut a different function (offload Copy Engine); #576 (open) and other recent merged items (#613, #566, #504) touchexecution/threaded.rsin the dispatch/startup area, none touchsame_layoutorThreadedExecutor::new's worker gate. - No competing, superseding, or reverting PR/issue found for this relaxation. Socket-TP (
parallel.rs) and the Python loader paths are untouched by design.
Recent activity in these areas
helios/src on main in the last 60 days: 0a8c20f4 (#626), c146d7be (#620), 59adc480 (#540), e0290571 (#586), 6cb7e3b7 (#619), e4d8eb60 (#615), c3489b23 (#582), e80b1f2 (#618) — all merged 2026-11-29/30, none touching this PR's changed files (the orientation packet reports no commits on the default branch since the PR branched that touch them). The closest recent neighbour in this exact code is #613 (teardown of persistent workers, merged 2026-11-29), which this PR builds on implicitly but does not extend. #640 does not reverse any of that work; it reverses #430's validation policy.
People
- original-el8 / Jason Cook — owns the whole persistent-worker stack (#430, #431, #432 closed, #465 closed, #472 closed; #507 was merged from lukealonso after GitHub rejected pushes to the org fork). Broader record: 24 merged, 28 closed, 8 open in 180 days; merged areas docs (14),
helios/src(13),helios(5),ignition/preparation(5),ignition/recipes(4). Has two other PRs opened the same day: #639 (ignition CompilePool) and #632 (GPU prefix calibration). - lukealonso — dominant committer in
helios/src(229 commits / 180 days) anddocs(384); the reviewer who required the multi-rank rejection in #430 and who merged #507/#613. He has not engaged with #640. - yatesdr (47 commits in
helios/src) reviewed #430's concurrency/memory questions; owns #628. Martin Vit (52) also active inhelios/src. - Nobody has reviewed or commented on #640 yet.
Community
Nothing found. pr_comments returns "No comments"; no reviews, no labels, no reactions, no linked issue, no Autobot case-file comment on #640 (unlike #622, which has an Autobot intake note). The only community signal is contrast: #430 drew 17 discussion entries across three review rounds — including the requirement this PR relaxes — and #640 drew none in its first day.
Project fit (charter)
- Lines up: the change is model-agnostic and purely a topology predicate, matching the charter's "Keep the runtime small and model-agnostic … shouldn't accumulate per-model branches (#267, #334)". It is also a continuation of an existing roadmap-area feature rather than a new surface.
- Does not line up: the charter's supported-matrix clause — "Check interactions across every supported model, cache scheme, parallel layout, multi-host setup, and hardware target named in the docs" — is exactly what this change touches (same-host TP with a rank-0 worker), and no live layout was exercised; one doc (
helios/manifest.md) still describes the old rule, and the "What gets merged" list wants a maintainer request, roadmap item, reproducible bug, measured issue or bad docs — here the justification is one sentence with no measurement or failing reproduction attached. - Process precedent: #430 was approved under "Principle 1 approval for the
Execution.persistent_workerscaptured-graph operation contract", i.e. this contract area was treated as needing explicit maintainer sign-off. No such sign-off exists here. - Persistent workers are specified in
docs/runtime-core-design.md§4 (~lines 628-672) andhelios/manifest.md:87-150; the user-visible surface isflare parallaxtelemetry (docs/cli-design.md:143(not opened)), unaffected.
Claims and evidence
| Claim | Evidence |
|---|---|
| Topology validation now admits rank-0 worker + plain peers | Code verified (model.rs:128); unit test model.rs:1754 passes [worker_core(), plain_core()] with cluster=None. Holds. |
| Selection retains rank 0's worker graph and rejects peer-rank workers | Code verified (selection.rs:285); unit test selection.rs:694-707 asserts worker_loop survives on rank 0 and rank 1's list is empty. Holds. |
| Threaded execution accepts a rank-0 worker | Only same_layout is exercised (threaded.rs:1628-1651); no ThreadedExecutor::new success case with a worker, and execution/tests.rs:1371-1373 still tests only rejections. Unverified. |
| Peer ranks / multi-host cluster workers still rejected | Verified in all three edited sites and in the new tests (model.rs:1758-1771, selection.rs:709-720, threaded.rs:632). parallel.rs and the Python paths also unchanged. Holds. |
| "load, select, and initialize rank-0 persistent workers" | Initialization goes through finish_startup (execution/transport.rs:793-808) which requires worker.control, produced only by the native path (runtime_core/serving.rs:181). No test drives this with a rank-0 worker in a threaded group. Unverified. |
| Test results (133 / 186 / 1,167 passed, 0 failed) | CPU-only --lib runs on -p flare-helios; CI's native-serving job runs the full suite with --features runtime-core,server (native-serving.yml:56-68), so the reported runs are a subset with a different feature set for the third command (--features runtime-core only). Tests as reported are consistent; they don't cover integration tests. |
| #430's startup/teardown concern addressed | Not addressed: no new startup/abandon/partial-finish_startup handling; ThreadedExecutor::new's drain/abort paths (threaded.rs:777-822) unchanged and untested with a worker present. |
Reach
- Who is affected: only someone serving a same-host, multi-rank (
RankPeers::Threads) core whose rank 0 carries a worker; such a core previously failed at load/select/executor construction. Single-rank worker cores, peer-worker cores and clustered cores behave as before. - Downstream consumers reached with a rank-0 worker present (all read rank 0's manifest, so behaviour is preserved by reading, untested at runtime):
helios/src/server/runtime.rs:631-634(metrics);helios/src/execution/transport.rs:793-808(worker start viacontrol);helios/src/runtime_core/mod.rs:369-380,:765-780,:888-908,:1243-1256,:1385-1389,:1393-1398(primary-context retention, green-context partition, worker graph,execution_context(),start_persistent_worker) — per-rankNativeResources, so only rank 0 takes the green-context path while peers usecuCtxCreate_v2(:397-400);runtime_core/serving.rs:101-184(descriptor withcontrol: self.persistent_worker_control(), empty for peers). - Entry point:
LoadedSession::new(helios/src/server/session.rs:26-42) requires every rank in-process for a local session and passes ranks 1..N asRankPeers::Threads, so the accepted topology is exactly what a local multi-GPU core loads into. - Configuration/defaults/dependencies: no new flags, config keys, protobuf/wire changes or dependency changes; no re-export of existing cores needed.
- Documentation:
docs/runtime-core-design.mdupdated;helios/manifest.md:92-94left stale; error wording now differs across sites ("rank 0 of a local core" inmodel.rs/threaded.rs, "rank 0" inselection.rs, "single-rank cores" inparallel.rs:124/:556).
Process
Open, ready for review, hours old at review time; no reviews, no labels, no linked issue, no stacked-PR statement; base main and nothing on main changed these files since branching. CI on head b7a6204 failed — which workflow is not visible from here. Candidates: .github/workflows/native-serving.yml:56-68 (not opened) (cargo test --locked --release … --features runtime-core,server, ubuntu-24.04 + windows-2022) and helios-lifecycle.yml:36-47 (TLA+ check.py (not opened), Kani --lib proofs; no persistent-worker references in the verified models). Note that other PRs of the same day (#622) needed CI approval to run, so a red/queued run could reflect an approval gate rather than a real failure — worth confirming before treating CI as evidence.
Open questions / not found
- Which CI workflow failed on
b7a6204, and why. - Whether Ignition/Heliopause can currently export a local multi-rank core with a worker on rank 0 only (prerequisite for the scenario this PR unblocks); export tests appear single-rank only.
- Whether rank-0 worker startup, dispatch and drain actually work inside a
ThreadedExecutor(no test, no live multi-GPU run). - The specific user-facing scenario ("GPU-side mover") — no issue, benchmark or reproduction is attached anywhere; the trail points only at #430's SM103 mover/predictor recipe context and #465 (closed).
- No maintainer statement anywhere on whether the multi-rank startup/teardown condition from #430 is now considered satisfied.