Opened by a workflow run, Nov 30, 2026 7:26 AM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: original-el8 (COLLABORATOR; git author "Jason Cook"; Discord el8) — owner of the persistent-worker stack (#430, #431, #432, #465, #472)
Motivation: Helios refused Execution.persistent_workers for any core with more than one rank. The author wants a local multi-GPU core to run one persistent worker (e.g. a GPU-side mover) on rank 0 while peer ranks stay plain under ThreadedExecutor. Peer-rank and multi-host (cluster) workers must stay rejected.
Scale: +68 / −34 in 4 files
Proposal:
runtime_core/model.rs:114-134:validate_persistent_worker_topologynow rejects only peer-rank workers (cores.iter().skip(1)) or a rank-0 worker on a clustered core; new message "rank 0 of a local core".runtime_core/selection.rs:285-289:LoadOptions::selectguard changes frommulti_ranktorank > 0, keeping rank 0's worker graph.execution/threaded.rs:632-636:ThreadedExecutor::newrejects only peer manifests carrying workers.execution/threaded.rs:1292-1294:same_layoutbecomes asymmetric — any worker on the peer manifest fails; the previous field-wise worker-descriptor comparison is dropped.docs/runtime-core-design.md:642-644reworded; three unit tests updated/added. Touches:helios/src/execution/threaded.rs(executor construction and rank-layout equality)helios/src/runtime_core/model.rs(load-time topology validation)helios/src/runtime_core/selection.rs(graph selection per rank) Related items:- #430 Add Execution.persistent_workers green-context lifecycle (merged): parent feature; its reviewer required the multi-rank rejection this PR lifts
- #431 PersistentWorker export binding (merged): produces the exported worker such a core would carry
- #613 helios teardown fix (merged): same worker teardown area, merged one day earlier
- #507 persistent worker metrics / /v1/worker (merged): telemetry reading rank 0's manifest, still documented as single-rank
- #622 L2 limit for persistent-worker contexts (open): same feature path, different files, no overlap
Link: https://github.com/NVIDIA/hyperflare-inference/pull/640
Autobot comments: Three findings the description hides. (1)
helios/manifest.md:92-94still says "multi-rank cores … fail validation", now false — onlydocs/runtime-core-design.mdwas updated, andparallel.rs:122-126/:552-556keep the old "single-rank cores" wording, so four sites now use three different messages. (2) The restriction being lifted was requested by maintainer lukealonso in #430's review "until multi-rank coordination and failure-abandonment (GraphExecutor::abandon, partialfinish_startupfailures) are implemented and tested"; this PR changes predicates only and adds no such handling. (3) Evidence is unit-level for validation, selection andsame_layout; no test constructs aThreadedExecutorwith a rank-0 worker, andexecution/tests.rs:1371-1373still asserts only rejections, so the "initialize" and live-execution claims are unverified (the body admits no live multi-GPU run). CI failed on headb7a6204; zero reviews or comments so far. No new config, wire or dependency changes.
Value Proposition
Value Proposition — PR #640 "helios: allow persistent workers on rank 0 of local multi-rank cores"
Charter alignment — mostly in the right place. The change is a topology predicate inside Helios, holding no per-model branches or new flags, which matches the charter's "keep the runtime small and model-agnostic (#267, #334)" and lands in the runtime layer rather than in recipes. But it collides with two other charter rules: the supported-matrix review standard ("check interactions across every … parallel layout") because the touched interaction is precisely a live same-host multi-rank layout that was never exercised, and "bring real evidence," since the motivation is one sentence ("GPU-side mover") with no issue, benchmark, or failing reproduction attached.
Novelty & status — genuinely additive, not superseded or obsolete. No competing or reverting PR/issue exists; #613 (teardown) and #622 (L2 limits) touch adjacent ground without overlap, and nothing on main has changed these four files since branching. So the question is not redundancy.
The real question is #430's unresolved condition. The gate being removed was imposed deliberately by the maintainer (lukealonso) in review of the parent PR #430, with an explicit either/or: keep rejecting cores.len() > 1 / cluster.is_some() until multi-rank coordination and failure-abandonment (GraphExecutor::abandon, partial finish_startup failures) are implemented and tested, or validate multi-rank startup and teardown directly. #640 removes the first option and adds none of the second: ThreadedExecutor::new's drain/abort paths and finish_startup are unchanged and untested with a worker present. That is a policy reversal, not a bug fix.
Value vs cost. The beneficiary is narrow but real: same-host RankPeers::Threads cores with a worker on rank 0, which currently fail at load. The evidence is unit-level for load/select/layout only; the PR itself concedes live multi-GPU loading/execution was not run, and the layout-comparison test asserts a worker-bearing manifest never matches even itself under same_layout. Add the stale helios/manifest.md:87-95 (still says multi-rank worker cores fail validation), inconsistent error wording across sites, and a failed CI run on b7a6204, and the maintenance cost is currently under-supported relative to a seven-day-old deliberate restriction.
Verdict: Worth it with changes. original-el8 is a priority contributor and this continues his own persistent-worker stack, so this is not a low-value close. To merge: (1) get maintainer sign-off that #430's multi-rank condition is satisfied — the contract area required approval before; (2) supply at least one live/threaded multi-rank execution test covering startup and teardown with a rank-0 worker; (3) update helios/manifest.md and unify error text; (4) explain the CI failure. Without (1) and (2), it is a predicate relaxation that trades away a documented safety guarantee for an unexercised configuration.
Full report Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:review, enhancement
Threshold: 65%
Triage
- [✓]
triage:review: 95.3% -
triage:design-review: 4.2% -
triage:validation: 0.3% -
triage:investigate: 0.1% -
triage:partial: 0.0% -
none: 0.0% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
enhancement: 92.4% -
community: 43.8% -
performance: 26.9% -
duplicate: 11.9% -
bug: 2.0% -
documentation: 0.3%
Area
-
area:api: 10.7% -
area:scheduling: 6.8% -
area:preparation: 6.0% -
area:packaging: 3.3% -
area:kernels: 1.6% -
area:memory: 1.2% -
area:orbit: 0.7% -
area:rocenante: 0.7% -
area:engram: 0.5% -
area:selene: 0.5% -
area:caching: 0.2%
Model
-
model:deepseek-v4.1: 1.0% -
model:glm-5.3: 0.3% -
model:kimi-k3.1: 0.2% -
model:inkling-small: 0.2% -
model:deepseek-v4: 0.2% -
model:mimo-v2.6: 0.2% -
model:qwen3.8-flash-next: 0.1% -
model:muse-glimmer: 0.1% -
model:nemotron-3.5-bolt: 0.1% -
model:gemma4: 0.0% -
model:qwen3.8-27b: 0.0%
Apply Labels (Intake)
Applied: +triage:review, +enhancement
Subtraction and simplicity
helios/src/execution/threaded.rs:1292-1294— delete. The newif !b.persistent_workers.is_empty() { return false; }insame_layoutis a second validator for a ruleThreadedExecutor::newalready enforces at:632-636, beforesame_layoutis ever consulted, with a precise error instead of"rank graph I/O schemas differ".helios/src/runtime_core/selection.rs:285-289— delete.LoadOptions::selectispub(super)with one production caller (model.rs:441), which runsvalidate_persistent_worker_topologyatmodel.rs:386; that function rejects exactly any peer-rank worker, so therank > 0branch is unreachable outside the synthetic test.helios/src/runtime_core/model.rs:118-127— collapse. The same five-line closure body is written twice (has_rank0_worker,has_peer_worker).helios/manifest.md:92-95— stale spec the PR forgot. It still says "multi-rank cores … fail validation before execution". Onlydocs/runtime-core-design.md:642-644was reworded.- Otherwise the diff is lean: no new flags, config keys,
LoadOptionsfields, wrappers or fallback branches; the test changes are proportionate; nothing speculative was added.
(No summary was written: this is the report's Key findings section.)
Correctness and contracts
Reviewed PR #640 (correctness / contracts / system-level lens) at head b7a6204 by opening every changed file, its callers and tests. No Blocker: the predicate change is correct and narrow — model.rs:118-132, selection.rs:285-289 and threaded.rs:632-636 admit exactly a local core whose rank 0 carries one worker, and peer/cluster cases still fail. No wire/proto change, no new locks or allocations, and the metrics reader (server/runtime.rs:631-634) still sees exactly the one worker, so no metric span shrink.
Major findings:
- F1 (Major) SM-partition asymmetry becomes reachable: only the worker-bearing rank takes the Green-Context path (
runtime_core/mod.rs:369-401,:893-911), so on rank 0 a cooperative kernel is clamped even when its attribute restores cleanly (mod.rs:1002-1006) while peers keep full-SM grids. That is the residency mismatchdocs/same-process-tp.md:32-33says preparation must validate and:177-180lists as not qualified;same_layoutcompares neither grids nor SM capacity. The PR did not run live multi-GPU. - F2 (Major) The "initialize" claim is untested: the only new test exercises
same_layout(threaded.rs:1631-1651);execution/tests.rs:1371-1373still covers only rejections, and startup is gated onworker.control(transport.rs:797-805), reachable only from the native path. - F3 (Major)
helios/manifest.md:89-95still says multi-rank worker cores "fail validation before execution" — now false; onlydocs/runtime-core-design.md:642-644was updated, and the PR body omits the file. - F4 (Minor)
same_layoutbecame directional and self-false and dropped worker-field comparison (threaded.rs:1292-1294, test:1648-1650). - F5 (Minor) The newly reachable
abandonpath forgets rank 0's resources without writing the worker stop flag (threaded.rs:1004-1012→transport.rs:979-990). - F6 (Minor) Three different error strings for one rule, plus an undocumented ordering dependency where
selectalone cannot reject a clustered rank-0 worker (selection.rs:285-288).
Open: which CI workflow failed on b7a6204; whether Ignition can export a rank-0-only worker for a multi-rank core; whether rank-0 worker start/dispatch/drain works inside a ThreadedExecutor; and whether #430's multi-rank startup/teardown condition is now considered satisfied (no maintainer statement exists).
Final review
Recommendation: Changes Requested
The predicate relaxations in model.rs, selection.rs, and threaded.rs are narrow, model-agnostic, and cleanly scoped to rank 0 of local multi-rank cores, while preserving peer-rank and multi-host cluster rejections. However, the PR lifts a maintainer-imposed safety gate from PR #430 without exercising or hardening the multi-rank initialization, partial-startup-failure, and failure-abandonment paths that #430 explicitly required before enabling multi-rank persistent workers, leaves helios/manifest.md contradicting the code, and exposes unvalidated cooperative-collective SM-partition asymmetry across ranks. Add real threaded lifecycle coverage (and address startup/abandonment handling), update helios/manifest.md, address/verify the cooperative SM-partition asymmetry, and run the full --release crate test gates before merging.
Merge Risk
Level: Medium
- Blast radius: Only affects local multi-rank (
RankPeers::Threads) cores that declareExecution.persistent_workerson rank 0; single-rank cores, plain local multi-rank cores, and multi-host cluster cores are unchanged, and no serving hot path (DispatchRing,poll, wire formats) was altered. - Unexercised runtime surface: Admitting rank-0 workers on local multi-rank cores makes two untested multi-GPU/lifecycle interactions reachable: (1) asymmetric Green Context SM partitioning (
partition_sms = Some(...)on rank 0 vs.Noneon peers) with cooperative kernels, and (2)ThreadedExecutorstartup failure /GraphExecutor::abandonwhile rank 0's persistent worker is live. - Policy reversal without maintainer sign-off: PR #430's approval required keeping
cores.len() > 1rejected until multi-rank startup, teardown, and failure-abandonment (GraphExecutor::abandon, partialfinish_startupfailures) were implemented and tested.
Walkthrough
helios/src/runtime_core/model.rs:114-134, 1718-1772: Relaxedvalidate_persistent_worker_topologyto allow rank 0 (cores.first()) to carry a persistent worker whencluster.is_none(), while rejecting peer ranks (cores.iter().skip(1)) and clustered cores with"persistent workers are only supported on rank 0 of a local core"; updated unit tests accordingly.helios/src/runtime_core/selection.rs:224-225, 282-289, 650-721: Removedlet multi_rank = cores.len() > 1;and changedLoadOptions::select's guard frommulti_ranktorank > 0("persistent workers are only supported on rank 0"); updated selection unit tests to retain rank 0's worker graph alongside a plain peer.helios/src/execution/threaded.rs:632-636, 1292-1294, 1631-1651: Removed!manifest.persistent_workers.is_empty()fromThreadedExecutor::newso only peer manifests with workers are rejected, replacedsame_layout's worker-field comparison withif !b.persistent_workers.is_empty() { return false; }, and addedrank_layout_permits_persistent_worker_only_on_rank_zero.docs/runtime-core-design.md:642-644: Updated theExecution.persistent_workerstopology paragraph to state that local cores may declare a worker on rank 0 while peer ranks and multi-host cluster cores are rejected.
Pre-merge Checks
- [PASS] Security / malicious screen: Diff is +68 / −34 across 4 files, limited to topology/layout predicates, unit tests, and one doc paragraph; no new unsafe blocks, I/O, dependencies, or prompt-injection concerns.
- [WARN] Charter & value fit: Model-agnostic runtime change from priority contributor
@original-el8, but reverses PR #430's maintainer-imposed gate without fulfilling its multi-rank lifecycle condition or supplying a live multi-GPU run / concrete reproducer. - [PASS] Related / duplicate / conflict check: Additive follow-up to #430, #431, #507, and #613; no conflicting or superseding PRs touching these functions.
- [WARN] Tests & verification evidence: Claimed "initialize rank-0 persistent workers" behavior is untested in
ThreadedExecutor, only debug--libsubsets onflare-helioswere run (not--releaseacross affected crates perdocs/design-review.md:180-185), and live multi-GPU execution was not run.
Blockers
- Unmet PR #430 multi-rank lifecycle condition and untested initialization/teardown paths (
helios/src/execution/threaded.rs:632-636, 766-822, 1004-1012, 1631-1651;helios/src/execution/transport.rs:793-808, 979-990;helios/src/server/session.rs:96-101, 125-133):- Verified behavior/impact: In PR #430,
@lukealonsorequired rejectingcores.len() > 1explicitly until multi-rank coordination and failure-abandonment (GraphExecutor::abandon, partialfinish_startupfailures) are implemented and tested, or multi-rank startup and teardown are validated directly. This PR lifts the gate while adding zero tests that constructThreadedExecutor::newwith a rank-0 worker (the new test atthreaded.rs:1631-1651only callssame_layout, andhelios/src/execution/tests.rs:1371-1373only asserts peer rejection), leaving the PR's claim that local multi-rank cores can initialize rank-0 persistent workers unverified (docs/design-review.md:187-189). Furthermore, two concrete lifecycle hazards remain on the newly reachable multi-rank paths:- Startup ordering (
threaded.rs:766-775):result.local.finish_startup()?launches rank 0's persistent worker before confirming peers'Reply::Started. Because peer ranks cannot have persistent workers, peerfinish_startup()does no CUDA work; if a peer fails startup, rank 0 has already launched the worker and peer-join cleanup (threaded.rs:802-810) callsstd::process::abort()beforeresult.local.close()at:813runs. - Failure abandonment (
threaded.rs:1009-1012->transport.rs:979-990): When a poisoned multi-rank session or failed peer drain takesself.local.abandon(error),GraphExecutor::abandonforgetsself.resourcesand returnsShutdown { drained: false, .. }without signaling the worker'sstop_flag.DrainGuard(session.rs:125-133) then forgetsNativeModel, soNativeResources::release_execution_resources()never runs either, leaving rank 0's persistent worker spinning on its SM partition until process exit (including in in-process Rust SDK consumers).
- Startup ordering (
- Concrete fix:
- Receive
Reply::Startedfrom all peers before callingresult.local.finish_startup()?inthreaded.rs:766-775so rank 0's worker never starts on a failed peer startup. - Decide and implement explicit abandonment semantics for a running rank-0 worker in
GraphExecutor::abandon(e.g., best-effortcontrol.stop()or non-blockingstop_flag = 1write before forgettingresources, or document explicitly why it is intentionally left running). - Add a threaded CPU test (or test double via
PersistentWorkerControl) exercisingThreadedExecutor::newwith a rank-0 worker + plain peer(s), verifying start-once after peers are ready, clean stop onclose(), and partialfinish_startup/ abandonment behavior; obtain maintainer sign-off from@lukealonsothat #430's multi-rank condition is satisfied.
- Receive
- Verified behavior/impact: In PR #430,
Should Fix
- Unvalidated SM-partition asymmetry for cooperative TP collectives (
helios/src/runtime_core/mod.rs:369-402, 763-781, 893-911, 1002-1017, 1335-1374;docs/same-process-tp.md:30-34):- Verified behavior/impact:
NativeResourcescreates a primary context +GreenContextPartitiononly when a rank declares a persistent worker (now rank 0 only), settingpartition_sms = Some(partition.compute_sm_count)(mod.rs:906), while peer ranks usecuCtxCreate_v2withpartition_sms = None(mod.rs:397-401, 910). Atmod.rs:1002-1006,status == 0 && partition_sms.is_some()triggersclamp_cooperative_launchon rank 0 even when the cooperative attribute restored cleanly, clamping rank 0's grid toblocks_per_sm * compute_sm_countwhile peers keep their captured full-device grid. While single-GPU cooperative kernels tolerate largest-axis reduction (docs/runtime-core-design.md:906-915) and collectives whose grids already fitcompute_sm_countare unaffected (mod.rs:144), any full-device cooperative collective expecting symmetric CTA counts across ranks will silently receive fewer CTAs on rank 0 than on peers — risking a barrier hang underdocs/same-process-tp.md:32-33. Because no live multi-GPU test ran, neither cooperative grid symmetry nor VMM peer access (peer_access.rs:38-57) alongside a rank-0 Green Context has been verified. - Concrete fix: Either reject multi-rank loads when rank 0's cooperative clamp actually shrinks a grid relative to its peers (or require preparation validation that multi-rank cooperative collectives fit
compute_sm_countwithout clamping and document that invariant indocs/same-process-tp.md:30-34anddocs/runtime-core-design.md:906-915), and validate with a live two-GPU run.
- Verified behavior/impact:
- Contradictory specification in
helios/manifest.md(helios/manifest.md:89-95):- Verified behavior/impact:
helios/manifest.md:92-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."This directly contradicts both the code anddocs/runtime-core-design.md:642-644. - Concrete fix: Reword
helios/manifest.md:92-95to matchdocs/runtime-core-design.md:642-644(at most one entry on rank 0 of a local core; peer ranks and multi-host cluster cores fail validation).
- Verified behavior/impact:
- Run required
--releaseverification gates and confirm green CI (docs/design-review.md:180-185;.github/workflows/native-serving.yml:56-77(not opened)):- Verified behavior/impact: The PR body reports only CPU debug
--libruns onflare-helios, omitting--release, integration tests, and downstream crates (flare,flare-cli,heliopause) required bydocs/design-review.md:180-185. - Concrete fix: Run
cargo test --locked --releaseonhelios --features runtime-core,server,flare,flare-cli, andheliopause, and ensure CI workflows pass on the updated head.
- Verified behavior/impact: The PR body reports only CPU debug
Subtract / Simplify
- Delete the redundant worker check in
same_layout(helios/src/execution/threaded.rs:1292-1294):ThreadedExecutor::new(threaded.rs:632-636) is the only non-test caller ofsame_layout(threaded.rs:639) and already rejects any peer rank with non-emptypersistent_workerswith the precise topology error beforesame_layoutis called. Removing:1292-1294eliminates unreachable production code and freesrank_layout_permits_persistent_worker_only_on_rank_zero(threaded.rs:1631-1651) to be replaced with a realThreadedExecutor::newtest. - Delete the unreachable peer-rank worker check in
LoadOptions::select(helios/src/runtime_core/selection.rs:285-289):selectispub(super)(selection.rs:76) with one production caller (helios/src/runtime_core/model.rs:441), which always runs aftervalidate_persistent_worker_topology(model.rs:386). Deleting:285-289removes both an unreachable production branch and the third divergent error string ("persistent workers are only supported on rank 0"). (If standalone defense-in-depth inselectis explicitly desired, also checkself.cluster_rank.is_some()—already present onLoadOptionsatselection.rs:79—and unify the error message withmodel.rs:130.) - Collapse the duplicated closure in
validate_persistent_worker_topology(helios/src/runtime_core/model.rs:118-128): Replace the two identical 5-line closures (has_rank0_workerandhas_peer_worker) with a single pass:let unsupported = cores.iter().enumerate().any(|(rank, core)| { core.execution .as_ref() .is_some_and(|execution| !execution.persistent_workers.is_empty()) && (rank > 0 || cluster.is_some()) }); if unsupported { ... }
Nits
helios/src/execution/tests.rs:1371: Update the now-stale comment// Multi-rank execution rejects persistent workers explicitly.to clarify that peer-rank persistent workers are rejected.helios/src/execution/parallel.rs:124, 556: Update"persistent workers are only supported on single-rank cores"to"persistent workers are only supported on rank 0 of a local core"(or note socket TP specifically) so error wording stays consistent across execution backends.helios/src/runtime_core/model.rs:1089-1092:NativeModel::dropiteratesself.ranks.iter_mut().rev(), runningrelease_execution_resources()(which unmaps device and mapped-host allocations) on peers before rank 0 stops its persistent worker. While normalServingSession::close()stops the worker first viaGraphExecutor::close(), stopping all persistent workers before unmapping any rank's allocations is clean defense-in-depth ifNativeModelis ever dropped directly with a live worker.
Dropped on verification
- Correctness lens F6 claim that
LoadOptions::selecthas no cluster state/argument: Verified false —LoadOptionsalready holdsself.cluster_rank(helios/src/runtime_core/selection.rs:79). Dropped that premise; kept the simpler deletion/unification item under Subtract / Simplify. - Correctness lens F4 claim that
same_layoutnewly became non-reflexive (!same_layout(&root, &root)): Verified overstated —same_layoutwas already non-reflexive forengram(helios/src/execution/threaded.rs:1276, asserted at:1620) andoffload(:1283). Replaced with the stronger verified finding that:1292-1294is redundant with:632-636. - Overbroad framing of Correctness lens F1 implying all cooperative kernels deadlock under asymmetric SM partitions: Narrowed to the verified hazard — single-GPU cooperative kernels tolerate largest-axis reduction (
docs/runtime-core-design.md:906-915) and collectives already fittingcompute_sm_countare not shrunk (helios/src/runtime_core/mod.rs:144); the defect specifically affects full-device cooperative collectives assuming symmetric CTA counts across ranks (docs/same-process-tp.md:32-33). - Speculation about which CI workflow failed on
b7a6204: CI logs are not accessible from this environment and the dossier noted approval gating on same-day PRs; dropped causal speculation while retaining the verified gap between reported CPU debug--libruns and the required--releasesuite.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.0% -
triage:design-review: 0.6% -
triage:validation: 0.4% -
triage:partial: 0.0% -
triage:investigate: 0.0% -
none: 0.0% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.