Explore scratchpad · NVIDIA/hyperflare-inference #640

Raw Markdown for agents: https://autobot.eidonix.com/p/cf80138d-38da-4ed3-b52e-405a8f563cf5.md

#1 [high] Change: what PR #640 changes, file by file, and its size

PR #640 "helios: allow persistent workers on rank 0 of local multi-rank cores", author original-el8 (COLLABORATOR), opened & updated 2026-11-30, base main, head b7a6204, 4 files +68/-34, open, ready for review, no reviews, CI failed on head.

Three gate changes, all relaxing the same rule from "single-rank only" to "rank 0 of a local (non-cluster) core":

  1. helios/src/runtime_core/model.rs:114-134 validate_persistent_worker_topology — was has_worker && (cores.len() > 1 || cluster.is_some()); now splits into has_rank0_worker (cores.first()) and has_peer_worker (cores.iter().skip(1)), rejecting only has_peer_worker || (has_rank0_worker && cluster.is_some()). Error text changed from "persistent workers are only supported on single-rank cores" to "... on rank 0 of a local core". Called from model.rs:386 inside load_agreeing, after per-core core.validate().
  2. helios/src/runtime_core/selection.rs:285-289 LoadOptions::select — deleted let multi_rank = cores.len() > 1; (was line 225) and replaced !persistent_workers.is_empty() && multi_rank with ... && rank > 0; message "persistent workers are only supported on rank 0".
  3. helios/src/execution/threaded.rs:632-636 ThreadedExecutor::new — dropped the !manifest.persistent_workers.is_empty() term of the rejection, so only peer manifests (ranks.iter(), i.e. the manifests for ranks 1..N, coordinator manifest is separate) with workers are refused; message "... rank 0 of a local core".
  4. helios/src/execution/threaded.rs:1292-1294 same_layout — replaced a field-by-field comparison of a.persistent_workers vs b.persistent_workers with if !b.persistent_workers.is_empty() { return false; }. So the coordinator (a=root) may have a worker; a peer (b) may not. Note this also silently drops the previous per-field equality check; since b must be empty and the old code required equal lengths, any a-vs-b worker comparison now reduces to "b empty". Asymmetric by design (asserts !same_layout(&peer,&root)).
  5. docs/runtime-core-design.md:642-644 text updated.

Tests updated: model.rs:1754-1769 (peer rank + cluster cases), selection.rs:694-724, threaded.rs:1628-1650 new test rank_layout_permits_persistent_worker_only_on_rank_zero.

NOT changed by this PR though still saying "single-rank" or still rejecting: helios/src/execution/parallel.rs:122-126 and :552-556 ("persistent workers are only supported on single-rank cores"), helios/manifest.md:92-94 ("Helios currently supports at most one persistent worker entry on single-rank cores; ... multi-rank cores ... fail validation"), helios/src/execution/parallel/tests.rs:675-704. So the docs in helios/manifest.md now contradict the new behavior for local multi-rank cores — an undeclared gap (see separate entry).

#2 [high] Undeclared: helios/manifest.md and socket-TP rejection text still say "single-rank", docs left stale

PR #640 updates only docs/runtime-core-design.md:642-644. helios/manifest.md:87-95 still reads: "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 a local multi-rank core with a rank-0 worker does pass validation, so helios/manifest.md is now wrong. This is not mentioned in the PR description ("What changed" lists only the 4 files). Cross-check list for the doc angle: docs/runtime-core-design.md (updated), helios/manifest.md (stale), helios/src/execution/parallel.rs:122-126 & :552-556 (stale error text "single-rank cores", correct behavior for socket/multi-host TP but now inconsistent wording with threaded.rs's "rank 0 of a local core"), helios/src/execution/parallel/tests.rs:695,704 asserting contains("single-rank") (still passes since parallel.rs unchanged).

Also note the three rejection sites now use three different wordings: model.rs:130 "rank 0 of a local core", selection.rs:287 "rank 0", threaded.rs:634 "rank 0 of a local core", parallel.rs:124/556 "single-rank cores".

#3 [high] Why: restriction introduced by #430 rejected multi-rank by design pending startup/teardown work

No issue is linked; the PR body gives the motivation in one paragraph only ("blocked local multi-GPU cores from combining a rank-0 persistent worker (such as a GPU-side mover) with plain peer ranks under ThreadedExecutor").

Origin of the restriction being lifted: #430 (merged 2026-11-23, author = same person, original-el8) introduced Execution.persistent_workers and deliberately rejected multi-rank and multi-host cluster cores at four sites — its own description says "Explicitly rejects multi-rank (cores.len() > 1) and multi-host cluster (cluster.is_some()) persistent-worker cores across graph selection, model loading, threaded execution, and socket tensor-parallel execution." The reason given in #430's review thread (lukealonso, 2026-11-23): "Either reject cores.len() > 1 / cluster.is_some() explicitly 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." So the file names a load-time validation relaxation but the original restriction was about untested multi-rank startup/teardown/abandon semantics — see the claims entry for whether that concern is addressed.

Plausible consumer (not linked by the PR, not verified): #465 (closed) "Wire SM103 dynamic GPU expert mover and inline predictor into DeepSeek V4.1 reference recipe" and #431 (merged) PersistentWorker export binding; #430's description places the SM103 mover/predictor recipe in local-inference-lab/hyperflare-recipes.

Age/interest: the restriction existed for 7 days (2026-11-23 → 2026-11-30). No issue, no comments, no reactions, no reviewers so far.

#4 [high] Related work: #430 parent (same author), #431 export, #507 telemetry, #613 teardown, #622 same code path

Same-file / same-topic neighbours found (orientation packet + items_touching):

No competing or superseding PR found for this exact relaxation; no item was found that undoes or reverts it.

#5 [high] Claims vs evidence: load/select covered by unit tests, threaded execution only by same_layout

Claims in the PR body vs what was checked:

#6 [medium] Reach: which gates changed, which still reject, and consumers that assume one manifest

Six rejection sites exist for persistent workers in main; this PR touches three.

Downstream of the relaxation, other code that consumes persistent_workers assumes one manifest (rank 0) but is reached for multi-rank-thread cores:

#7 [medium] People: author authored the whole persistent-worker stack; lukealonso imposed the restriction being lifted

#8 [medium] Project fit: charter's model-agnostic runtime rule is fine; the "check every parallel layout" clause is not met

#9 [medium] Process: ready for review, zero reviews/comments, CI failed on b7a6204

Process facts:

#10 [medium] Reach: gates changed vs untouched; consumers reading rank 0's manifest; no schema/config change

Six rejection sites exist for persistent workers in main; this PR touches three.

Downstream consumers reached for multi-rank-thread cores (all read from rank 0's manifest, so behavior is preserved, but untested):

Operators/config: no new flags, no config keys, no wire/schema change (PersistentWorker message unchanged), no re-export needed for existing cores. Effect is limited to cores exported with a rank-0-only worker on same-host TP; such a core previously failed at load/select. Existing single-rank worker cores and peer/cluster cores behave as before (unit-tested).

#12 [medium] Reach: gates changed vs untouched; consumers reading rank 0's manifest; no schema/config change

Six rejection sites exist for persistent workers in main; this PR touches three.

Downstream consumers reached for multi-rank-thread cores (read rank 0's manifest, so behavior preserved, but untested):

Operators/config: no new flags, config keys, wire or schema change (PersistentWorker message unchanged), no re-export for existing cores. Effect limited to same-host TP cores exported with a rank-0-only worker (previously failed load/select); single-rank and peer/cluster cores behave as before. Users/operators see nothing unless they serve such a core; when they do, the new green-context/primary-context path is taken on rank 0 only and peer ranks keep the ordinary context path (unverified at runtime).

#11 [low] Community: no comments, reviews or reactions; no Autobot case file posted