Explore scratchpad · NVIDIA/hyperflare-inference #628

Raw Markdown for agents: https://autobot.eidonix.com/p/fa29c9ad-efe3-4f53-a551-7accf3549219.md

#1 [high] Change: what PR #628 does, size, and summary-of-changes

PR #628 "helios: gate offload Copy Engine batches during peer-copy graphs" (draft, open 2026-11-30, head 1870a27, base main, 14 files +572/−72). Fixes #627.

What it does in plain terms: adds a process-wide mutex/condvar "gate" (CopyEngineGate, helios/src/offload/copy_gate.rs) with two lease types:

Gate is shared per NativeModel (helios/src/runtime_core/model.rs:27 field copy_gate, created at :662 Arc::new(CopyEngineGate::new())) and threaded through offload::Binding::new(inner, cubins, copy_gate) (helios/src/offload/mod.rs:39-56), NativeModel::attach_offload (model.rs:986 Copiers::with_gate), NativeModel manifest build (model.rs:1032-1039), and server offload attach (helios/src/server/runtime.rs:715-733 open_with_gate).

Graph classification is structural, computed at CUDA graph reconstruction: NativeResources.peer_copy_graphs: Vec<bool> set true when any Node::Copy has a Memory::Peer source or destination (helios/src/runtime_core/mod.rs:117, 919, 1149-1155, 1238), exposed per graph name in ExecutionManifest.peer_copy_graphs + has_peer_copies (helios/src/execution/manifest.rs:436-444, 449-452; populated in helios/src/runtime_core/serving.rs:49, 59, 202).

Execution boundary: RankExecutor restructured into RankExecutorInner + gate state (helios/src/execution/ranks.rs); merge_peer_copy_graphs unions peer flags across local RankPeers::Threads manifests (ranks.rs:29-42); guard taken in submit only if peer_copy_graphs[graph] (ranks.rs:90-105), released in poll for fences <= completed frame fence (ranks.rs:114-121), and all remaining guards cleared in close after inner close (ranks.rs:172-181).

Offload copy sites gated: uncompressed RankWorker::run per BATCH_BYTES batch (helios/src/offload/transfer.rs:398-428), CPU-codec copy_spans_batch flush (helios/src/offload/transfer/codec.rs:958-1025), and five GPU-codec sites (codec.rs:287-292, 315-320, 349-354 encode; 664-670 try_lock decode; 749-755 decode_to_device).

Wire/compat surface: no Protobuf change, no package-format change. heliopause Python manifest builder passes peer_copy_graphs: Vec::new() (heliopause/src/python.rs:331), i.e. the Python path never marks peer-copy graphs. Test-only additions: manifest literals in helios/src/execution/tests.rs:206, model/testing.rs:396, model/contract.rs:983.

#2 [high] Why: issue #627 reproduces an SM120 TP2 prefill deadlock and isolates it to concurrent Copy Engine DMA

#3 [high] Change: what the diff does that the description does not say (ungated paths, per-batch sync)

Findings from reading the diff/code (not stated in the PR description):

  1. Multi-host disk-store peer path is not gated. helios/src/offload/shard.rs:37-49 join_peer still builds super::transfer::Copiers::new(gpu_cubins) — the gate-less constructor. That path is what flare-cli uses for a peer rank with a disk prefix store (flare-cli/src/cluster.rs:254, owner.offload(), owner.gpu_codec_cubins().to_vec(), ...). So a peer rank's own offload copy engine batches (its disk-tier staging through the same Transfers/RankWorker) run without the gate. The PR's Limitations say "multi-host TP ... not tested end-to-end", and claim "pool and CPU codec paths share the same CopyEngineGate wiring" — the multi-host sharded peer path does not.

  2. attach_offload (Selene pool path) is effectively not gated either. NativeModel::attach_offload (helios/src/runtime_core/model.rs:985-991) does pass Copiers::with_gate, but it feeds self.offload.attach(prepared, &copiers), and in selene offload::Startup::attach (selene/src/offload.rs:935-949) the factory is used only when Preparation::Store(store) still has self.pool present: pool.prepare_peer(store, factory). Otherwise the factory is dropped. The factory only matters for the pool-agent peer transfer path. Also NativeModel::attach_offload has exactly one caller (model.rs:981, inside the cache-allocation phase), no other attach site found.

  3. Python/PyO3 core path never marks peer-copy graphs. heliopause/src/python.rs:331 sets peer_copy_graphs: Vec::new(), so any manifest built through Heliopause (in-process Python/SDK path) reports no peer copies regardless of content and the gate never engages there. Description says "defaulting absent entries to false for non-core manifests" — true, but the consequence is those paths get no protection, not just older cores.

  4. Two structural blind spots in peer-copy detection. Memory::Peer marking happens in NativeResources from the allocation's declared memory kind (helios/src/runtime_core/mod.rs:1149-1156), and Memory::Peer means "another rank's device allocation, referenced at its recorded address" (helios/src/runtime_core/format.rs:43-49). Graph copies that go through same-process rank threads but address a local Memory::Device allocation that happens to be peer-mapped are not marked. Only literal Node::Copy nodes count — any kernel-driven DMA (e.g. b12x kernels doing cudaMemcpyAsync inside a kernel, or the DMA-ring code path in helios/tests/collective_core_fixture.py:89-140 twoshot path) is not detected.

  5. Cross-rank gate sharing only within one process. The gate is created per NativeModel; multi-process TP (RankPeers::Processes, i.e. flare run one process per rank, used by multi-host and by docs/prefix-cache-offload.md:1617) gets one gate per process, so a rank's offload batches are not coordinated against another rank's peer-copy graph. Description says "Share one Arc per NativeModel", which is accurate but the reach is narrower than "TP2 deadlock eliminated" suggests outside single-process TP.

  6. Guard release is poll-driven. RankExecutor::poll only pops guards when a FrameCompletion comes back (helios/src/execution/ranks.rs:108-124). Threaded/parallel executors may complete frames out of order? They pop while the front fence <= completed fence, so a head-of-line stall holds every later lease. close() clears remaining leases unconditionally (ranks.rs:170-181).

  7. Deadlock risk in the gate itself for the threaded executor: submit calls enter_peer_graph() (blocking on offload batches) before calling inner submit, from the model worker thread; if an offload worker is concurrently blocked in enter_offload_batch() waiting on peer_graphs_waiting, the gate's condvar protocol says waiting peers take priority, so ok. But OffloadBatchGuard::drop only notify_all()s when the last offload batch drops (copy_gate.rs:97-104); a peer graph waiting while other offload batches remain active can block until all drain — that matches the documented "wait only for in-flight batches to drain".

  8. Undeclared: helios/src/offload/transfer.rs changed RankWorker::run to record+sync the event per batch inside the gated branch and keep the old single record/sync at the end when ungated; the ungated path is behavior-identical, but the gated path now adds a per-batch stream synchronize (transfer.rs:410-430), which is a serialization/latency change for offload throughput that the description does not mention (only "Acquire OffloadBatchGuard per BATCH_BYTES batch").

#4 [high] Project fit: charter root-cause rule and documented "offload never blocks the worker" invariant

Charter (read_charter) fit, as facts:

#5 [high] Change: offload copies become per-batch synchronizing for every prefix-cache run

Offload fast path changes for every prefix-cache run, not only peer-copy runs. copy_gate is Some whenever a NativeModel manages the offload store (helios/src/runtime_core/model.rs:986-989, model.rs:1032-1038), independent of whether any graph in the model has peer copies. Therefore:

#6 [high] Research summary

Case file for PR #628 "helios: gate offload Copy Engine batches during peer-copy graphs" (draft, open 2026-11-30, head 1870a27, base main, 14 files +572/−72, labels bug/performance/priority:P1, no reviews, CI failed, zero comments).

What it does. Adds a per-NativeModel CopyEngineGate (Mutex+Condvar, new file helios/src/offload/copy_gate.rs) with two RAII leases: PeerGraphGuard (taken around submitting a CUDA graph that contains in-graph Node::Copy against Memory::Peer; waits only for in-flight offload batches to drain, and takes priority over waiting offload batches) and OffloadBatchGuard (taken per 16 MiB BATCH_BYTES window by offload copy workers; multiple workers hold it concurrently across ranks). Graph classification is structural at graph reconstruction (helios/src/runtime_core/mod.rs:919,1149-1156,1238 → ExecutionManifest.peer_copy_graphs/has_peer_copies, helios/src/execution/manifest.rs:436-449), unioned across local RankPeers::Threads manifests (helios/src/execution/ranks.rs:39-52), leased in submit and released in poll/close (ranks.rs:90-124,170-181). Gated copy sites: transfer.rs:398-430, codec.rs:958-1028 (CPU codec) and five GPU-codec entry points (codec.rs:290,318,352,668,752). No Protobuf, package-format or flag change.

Highest-value findings a reader could not learn from the description (all verified in code):

  1. Documented invariant reversed, docs not updated. docs/prefix-cache-offload.md:133 says "Offload work never blocks the model worker thread or the model stream" (:907, :1015 repeat it). With the gate, the model worker thread blocks in enter_peer_graph() until in-flight offload batches drain (ranks.rs:90-96, copy_gate.rs:47-56). No docs file is in the changed set.
  2. Offload fast path changes for every prefix-cache run, not only peer-copy runs. Because the gate is Some whenever offload is attached (model.rs:986-989,1032-1038), RankWorker::run now does record+synchronize per batch (transfer.rs:410-430; the single end-of-job sync at :431-434 is now the gate-less path only), and copy_spans_batch likewise (codec.rs:978-1000,1002,1025-1028). The description's "zero gate overhead on graphs without peer-copy nodes" is true for graph submission only; no offload-throughput measurement is presented.
  3. Several paths remain ungated and the description implies otherwise. helios/src/offload/shard.rs:47 (join_peer, the multi-host disk-store peer path used from flare-cli/src/cluster.rs:254) still builds Copiers::new with no gate; heliopause/src/python.rs:331 passes peer_copy_graphs: Vec::new() so the Python/PyO3 manifest path never marks peer copies; attach_offload's factory only reaches the pool-agent peer path (selene/src/offload.rs:935-949). Multi-process TP gets one gate per process (NativeModel-scoped), so cross-rank coordination does not span processes.
  4. Detection breadth. Only literal Node::Copy nodes with a declared Memory::Peer allocation are marked (format.rs:43-49); kernel-driven DMA or copies to a local allocation that is merely peer-mapped are not.
  5. Guard release is poll-driven: a head-of-line frame holds every later lease (ranks.rs:114-121); close clears the rest.
  6. Charter tension. The charter requires bug fixes to address the root cause (#397); #627's own ablation shows the mechanism is not fully characterised (cross-rank mutex serialization of offload workers still deadlocked), and the PR frames itself as coordinating around the conflict rather than removing it.

Why / evidence. Issue #627 (same author, same day, 0 comments, labels area:selene/bug/P1/triage:investigate) reproduces a TP2 prefill deadlock on 4× RTX PRO 6000 (SM120, driver 595.99.02) with Qwen3.8-Flash-Next prefill7168 (8,613 nodes, 1,176 peer Node::Copy, 4.58 MiB) under 8-way uncached ~6,574-token bursts; cuGraphAddEventRecordNode frontier probes showed both ranks stalling inside a PCIeDmaAllReduce copy + FlagLaunch; skipping only stream.copy_batch passed 48/48, disabling the host cache or pausing copy windows passed 80/80. The PR's validation (compiler checks, 5 new gate/ranks unit tests, 162 helios server tests, 245 flare, 200/201 flare-cli, 19/19 offload CUDA tests, live TP2 runs for Qwen3.8 and GLM-5.3) is described in text only — no logs or artifacts; unpatched main deadlocking during the first burst is the only comparative datapoint, so there is no speedup claim of the kind the charter asks for performance changes (#210).

Related work. Nothing else in the repo covers this deadlock; searches return only #627/#628. The change sits on author yatesdr's Selene/offload series (#80, #92, #141, #168, #504 GPU/CPU KV codec, #525, #527, #589/#497 from others) and touches files last changed by #504/#525 (codec.rs), #497 (transfer.rs), #430/#507 (manifest.rs), #280/#334 (ranks.rs). No overlapping or competing PR; nearest neighbours are #497 (offload restore latency, merged 2026-11-29) and #622 (open, GPU limits) — neither conflicts.

Recent activity / people / community. helios/src/offload was last touched 2026-11-28 by Luke Alonso (#589) before this commit; the branch predates only #626 (0a8c20f4) in the touched files. Author yatesdr is a COLLABORATOR with 80 merged PRs in 180 days, the dominant contributor to Selene/offload (34 helios/src commits); Luke Alonso (229) and Martin Vit (52) are the other helios regulars. No reviews, comments or reactions yet; the flare-autobot review that other PRs in this area received has not appeared.

Project fit / reach. Fits the SM120/SM120-Spark focus, keeps the runtime model-agnostic (no per-model branch, no new flag), and lands in Helios rather than ignition. Affects every --prefix-cache-memory/disk/pool run through the extra per-batch sync and the worker-thread blocking, single-host threaded TP2 most of all; no config, compatibility, wire-format or deployment change; exported cores keep loading (peer_copy_graphs defaults absent → false). Process: draft, CI failed on the head commit, no reviewer assigned.

#7 [high] Related work: no competing or duplicate PR; overlaps #497, #621, #334, #280 and the author's Selene series

Searches for the deadlock topic return only #627 and #628 (queries: "copy engine peer deadlock offload", "PCIeDmaAllReduce peteep copy b12x", "b12x collective peer", "prefix cache offload hang deadlock", "prefill interference offload pause copy priority", "draft helios offload prefix cache copy engine" by yatesdr). No duplicate report, no prior PR attempting this fix, nothing superseded.

Files-overlap picture (items_touching, last 180 days):

#11 [high] Amendment: head 76e1813 (2026-11-30) is a review-response commit that changes the PR's substance

A second commit landed after the 2026-11-30 report: 76e18130 "helios: bound CopyEngineGate fairness, scope gating to peer-copy models, and preserve metrics" (yatesdr). It answers the @flare-autobot "Changes Requested" review of 11:59 UTC on 1870a27. PR now 19 files, ≈+1165/−155 (was 14 files +572/−72); helios/src/offload/copy_gate.rs is 584 lines (was 263). New files in the changed set: docs/prefix-cache-offload.md, heliopause/src/python.rs, helios/src/execution/tests.rs, helios/src/model/contract.rs, helios/src/model/testing.rs, helios/src/runtime_core/serving.rs, helios/src/offload/transfer/lifecycle_tests.rs.

Findings closed by 76e1813

  1. Docs — resolved. docs/prefix-cache-offload.md:133-136 now reads "never blocks the model worker thread except for the bounded Copy Engine drain before launching a graph that contains in-graph peer-to-peer Copy Engine nodes … Single-GPU and non-peer-copy models stay ungated"; §2.10 :917-924 describes the per-model CopyEngineGate, the 120 s bound and the fairness turns; the §2.12 invariant at :1025-1029 is reworded to "waits on offload only for a bounded in-flight 16 MiB batch drain". Residual: docs/same-process-tp.md:177-180 still lists the parked-rank/checkpoint region as unqualified and was not updated.
  2. Per-batch sync on every prefix-cache run — resolved for non-peer-copy models. NativeModel.copy_gate is now Option<Arc<CopyEngineGate>> (helios/src/runtime_core/model.rs:27,662), set only when some rank reconstructed a peer-copy graph: model.copy_gate = model.ranks.iter().any(NativeResources::has_any_peer_copy_graphs).then(|| Arc::new(CopyEngineGate::new())) (model.rs:827-831; helper helios/src/runtime_core/mod.rs:1347-1349). Threaded through Binding (helios/src/offload/mod.rs:42,49,58), attach_offload (model.rs:990-996), manifests() (model.rs:1041-1047), open_with_gate (helios/src/server/runtime.rs:719-731). copy_batch_gated only records+synchronizes when the gate is Some (helios/src/offload/transfer.rs:308-338); the ungated path keeps the single end-of-window sync (transfer.rs:471-474). So the 16 MiB-per-batch blocking sync now applies only to peer-copy models.
  3. Ungated shard/Python paths — mostly resolved. join_peer_with_gate added (helios/src/offload/shard.rs:47-61), used by flare-cli/src/cluster.rs:254-261 with owner.copy_gate(); join_peer survives as a None-gate wrapper (shard.rs:37-45). Still open: heliopause/src/python.rs:331 unchanged (peer_copy_graphs: Vec::new()), though that manifest also sets offload: None (python.rs:318), so the Heliopause path could not engage a gate even if flags were set.
  4. CI failure — retracted as a blocker for this PR. The failing check was Python CPU tests, a main-wide breakage tracked in #623 (closed 12:39 2026-11-30) and fixed by #624 (merged 2026-11-30 12:39, head 078315e, tests-only). Author states Helios lifecycle (lifecycle and kani) passed on 1870a27.
  5. Single-process scope — unchanged: the gate is per NativeModel, so multi-process TP (RankPeers::Processes) still gets one gate per process. PeerGraphLeases is now shared between RankExecutor (helios/src/execution/ranks.rs:143) and serve_rank (helios/src/execution/parallel.rs:563-566,652-663,692), but that is in-process reuse, not cross-process coordination.
  6. Manifest compat — ExecutionManifest::has_peer_copies was deleted and validate() now rejects a populated peer_copy_graphs whose length differs from graphs (helios/src/execution/manifest.rs:835-843; test ranks.rs:215-224). Fine for a field introduced in this same PR.

Still open after 76e1813: no A/B offload throughput/latency measurement (#210, #397) — the author says the new gated CUDA tests and the peer-copy A/B numbers are pending because the SM120 host's GPUs are busy; peer-copy detection is still literal Node::Copy on Memory::Peer only; and the metrics changes below.

#12 [high] Amendment: new risks introduced by the fairness/timeout redesign in 76e1813

New code-level risks introduced by 76e1813 (the fairness/timeout redesign), not present on 1870a27. All file:line at PR head 76e1813.

  1. The "offload wave" can be revoked by the very next peer-graph admission, so the anti-starvation guarantee is best-effort, not structural. maybe_arm_offload_wave() sets turn = Offload with offload_wave_remaining = offload_batches_waiting only when peer_graphs_active == 0 (helios/src/offload/copy_gate.rs:54-68). But enter_peer_graph_timeout then unconditionally sets state.turn = Turn::Peer on every successful admission (copy_gate.rs:159) — and its needs_wait only blocks for an armed wave when peer_graphs_active == 0 (copy_gate.rs:120-125). So while any peer-copy frame is in flight (the normal 2-frame pipelined decode case that motivated the change) a new peer graph is admitted immediately and cancels the offload wave; enter_offload_batch's must_wait then re-blocks on peer_graphs_active > 0 (copy_gate.rs:175-179). Mitigation is indirect: RankExecutor::can_submit returns false while should_drain_for_offload() (helios/src/execution/ranks.rs:182-184; checked at helios/src/server/runtime.rs:2261), which is what is supposed to let leases drain to zero — but (a) it is evaluated earlier in the worker loop than the subsequent submit, (b) it only protects the single-process Worker::run path, and (c) serve_rank (multi-process TP) calls leases.enter(graph)? with no can_submit check at all (helios/src/execution/parallel.rs:652-656). The only test of the property, offload_makes_forward_progress_under_pipelined_peer_graphs (copy_gate.rs:445-500), models the pause itself ("pause pipelining whenever should_drain_for_offload() is true") instead of driving it through Worker/RankExecutor, so it cannot fail if can_submit wiring breaks.

  2. A PeerGraphGuard now waits on the whole GPU-codec transform, not only on Copy Engine time. At the five GPU-codec sites the offload lease is taken before the codec transform under the gpu.codec mutex and released after it completes (helios/src/offload/transfer/codec.rs:288-303, 318-338, 748-780), so the peer graph's drain wait covers encode/decode compute plus the mutex queue, not just the 16 MiB copy. The doc text added at docs/prefix-cache-offload.md:133-136,1025-1029 describes the wait as "a bounded in-flight 16 MiB batch drain", which understates what the model worker can block on.

  3. The 120 s bound converts a stuck offload batch into a served-worker failure, not just a failed request. enter_peer_graph_timeout returns ExecutionError::Drain (copy_gate.rs:131-147); RankExecutor::submit propagates it (execution/ranks.rs:156-160), and Worker::submit propagates with ? into Worker::run (server/runtime.rs:2261,2332-2339), which unwinds to worker.fail_all(&final_error) and tears down the executor (server/runtime.rs:759-776). The docs describe the 120 s only as a bound on "waiting peer-copy graphs" (docs:1025-1029) and never say the outcome is worker shutdown. Economically this is the right trade (fail rather than hang), but it is an undocded failure mode, and the message's own counters (offload_active, turn, wave_remaining) become the only diagnostic.

  4. Multi-process TP can surface the gate wait as a rank-completion deadline. In serve_rank the lease is acquired on COMMIT before executor.submit (parallel.rs:649-657) while the root rank's per-frame completion deadline (started.front() vs TIMEOUT, parallel.rs:670-671; wire.rs:28 = 120 s) is already running for a frame it submitted itself. A peer blocked in the gate for a large fraction of 120 s can therefore surface as "rank graph completion deadline expired" on the root rather than as the gate's own Drain error. Low likelihood (needs a near-timeout drain) but the two 120 s budgets are independent and uncoupled.

  5. Reply.elapsed is now wall-clock minus gate wait, which changes an estimator that drives scheduling, not just telemetry. Transfers::absorb subtracts pending.max_gate_wait (the max across ranks) from the elapsed (helios/src/offload/transfer.rs:780,792-799). That value flows to selene/src/memory.rs:1450-1456 (outbound_rate/inbound_rate) and selene/src/levels.rs:57-110 rankings, which feed worth_fetching/worth_transfer deferral in helios/src/server/runtime.rs:223-229,2805-2860. So gate-stalled transfers report a higher effective bandwidth and become more likely to be judged worth doing. Defensible ("measure the copy, not the pause"), but it is a behavioural change to an admission heuristic, and the max-across-ranks subtraction is an approximation (the elapsed window and the per-rank waits do not start together). The new assertion only checks reply.elapsed < 25 ms in an #[ignore]d test (transfer.rs:2047-2051, inside #[ignore = "requires two CUDA devices"] at transfer.rs:1712).

  6. The new gated verification tests do not run in CI. gated_cpu_and_gpu_codec_capture_and_restore_defer_while_peer_graph_holds_gate is #[ignore = "exercises gated CPU and GPU codec capture and restore against CopyEngineGate"] (codec.rs:1286-1291); the gated transfer arm added to split_pools_cost_each_device_its_part_and_round_trip_units sits in a test ignored for "requires two CUDA devices" (transfer.rs:1712,2013-2053). Combined with the author's "pending GPU re-run" note, no gated copy path has yet been executed anywhere.

  7. Small cleanups confirmed done: ExecutionManifest::has_peer_copies deleted and length validated (manifest.rs:835-843); OffloadBatchGuard no longer re-exported (offload/mod.rs:26); copy_batch_gated/drain_stream deduplicated (transfer.rs:290-339, used from codec.rs:997); Copiers::new is now #[cfg(test)] (transfer.rs:2167-2171), so the only ungated production constructor left is join_peer (offload/shard.rs:37-45) and open() (offload/mod.rs:114-119).

#13 [high] Correction to note 12 item 1: exact remaining starvation path is the multi-process rank loop

Corrected version of item 1 of note #12 — my first draft overstated the mechanism. The wave is not revocable while armed: maybe_arm_offload_wave() only fires at peer_graphs_active == 0 (helios/src/offload/copy_gate.rs:54-68), and once armed a new peer graph does wait because needs_wait blocks on peer_graphs_active == 0 && turn == Offload && wave_remaining > 0 (copy_gate.rs:120-125). So the window is coherent in a single drained state.

What is actually open is narrower and more serious: the anti-starvation guarantee depends entirely on the caller stopping submission, and one caller never does.

Test gap for exactly this: offload_makes_forward_progress_under_pipelined_peer_graphs (copy_gate.rs:445-500) simulates the pipelining loop and asserts the pause behaviour itself ("pause pipelining whenever should_drain_for_offload() is true", copy_gate.rs:453-461) rather than driving Worker/RankExecutor, so it passes whether or not the real can_submit wiring exists, and it has no multi-process analogue.

#14 [high] Research summary

Amendments to the report of 2026-11-30 (PR #628, head moved 1870a27 → 76e1813)

The PR moved. A second commit, 76e18130 "helios: bound CopyEngineGate fairness, scope gating to peer-copy models, and preserve metrics", landed and answers the @flare-autobot "Changes Requested" review of 11:59 UTC. The PR is now 19 files, ≈+1,165/−155 (was 14 files, +572/−72); helios/src/offload/copy_gate.rs is 584 lines (was 263). Three files entered the changed set that materially change prior findings: docs/prefix-cache-offload.md, heliopause/src/python.rs, helios/src/runtime_core/serving.rs.

Findings that are now closed and must not be repeated as live:

What remains open, and what is new. Still unmeasured is the charter's performance requirement (#210/#397): no A/B offload throughput/latency figure, no offload-cost measurement, and detection is still literal Node::Copy on Memory::Peer only. Newly introduced by the redesign: (1) the fairness turnaround is real but its only enabler is RankExecutor::can_submit (execution/ranks.rs:182-184 (not opened), consumed at server/runtime.rs:2261) — the multi-process serve_rank loop takes the lease with no such check at all (execution/parallel.rs:652-656), so peer_graphs_active need never reach zero there and offload can still starve indefinitely on RankPeers::Processes/multi-host, which this same commit wires into the gate; the fairness test (copy_gate.rs:445-500) simulates the pause instead of driving Worker, so it cannot catch this. (2) The lease is held across the whole GPU-codec transform under gpu.codec, so a peer graph waits on encode/decode compute, not just a 16 MiB copy (transfer/codec.rs:288-303, 318-338, 748-780), which understates the doc wording. (3) The 120 s ExecutionError::Drain (copy_gate.rs:131-147) propagates through Worker::submit with ? into worker.fail_all (server/runtime.rs:2332-2339, 759-776), i.e. a stuck offload batch now shuts the served worker down — an undocumented failure mode. (4) Reply.elapsed now subtracts the max gate wait (offload/transfer.rs:780,792-799), which feeds selene/src/memory.rs:1450-1456 → selene/src/levels.rs:57-110 → worth_fetching/worth_transfer deferral (server/runtime.rs:223-229,2805-2860), so the change alters a scheduling heuristic, not just telemetry. (5) The new gated verification is CI-invisible: #[ignore] at transfer/codec.rs:1286-1291 and inside the two-device test at offload/transfer.rs:1712,2013-2053, and the author states the GPU re-run is still pending.

Full detail is in scratchpad notes #11 (what 76e1813 changed, per finding), #12 (new risks with citations) and #13 (the corrected, narrower starvation path).

#15 [high] Consolidated amendment text for the report (supersedes note 12 item 1; use with notes 11-13)

Use this as the authoritative amendment text; note #12's item 1 is superseded by #13 (the offload wave is coherent when armed; the surviving starvation path is the multi-process rank loop).

Event

PR #628 moved from 1870a273 to 76e18130 (yatesdr, 2026-11-30): "helios: bound CopyEngineGate fairness, scope gating to peer-copy models, and preserve metrics". It is a response to the @flare-autobot review of 2026-11-30 11:59 UTC, which had recommended Changes Requested with 3 blockers / 4 should-fix / 3 subtract / 2 nits (starvation under 2-frame pipelined decode; per-16 MiB blocking sync for all prefix-cache users; failing CI). Case file opened 11:45 UTC (23a7b4eb-…); author replied 12:55 UTC with a per-blocker changelog and a validation section. Engagement: still no human review, no inline comment, no reaction — only the bot and the author.

Size / shape change

14 files +572/−72 → 19 files ≈ +1,165/−155 (pr_files). Newly touched: docs/prefix-cache-offload.md (+18/−6), heliopause/src/python.rs (+1), helios/src/execution/tests.rs, helios/src/model/contract.rs, helios/src/model/testing.rs, helios/src/runtime_core/serving.rs, helios/src/offload/transfer/lifecycle_tests.rs. helios/src/offload/copy_gate.rs 263 → 584 lines.

Findings the amendment closes (do not restate as live defects)

  1. Docs invariant updated, not violated. docs/prefix-cache-offload.md:133-136 ("never blocks the model worker thread except for the bounded Copy Engine drain before launching a graph that contains in-graph peer-to-peer Copy Engine nodes … Single-GPU and non-peer-copy models stay ungated"), :917-924 (per-model CopyEngineGate, 120 s bound, fairness turns, "Models without peer-copy graphs omit the gate and keep one synchronization per transfer window"), :1025-1029. Residual gap: docs/same-process-tp.md:177-180 still lists the rank-parked/checkpoint region as not qualified.
  2. Zero-gate overhead is now real for non-peer-copy models. NativeModel.copy_gate: Option<Arc<CopyEngineGate>> (runtime_core/model.rs:27,662), assigned only if any rank reconstructed a peer-copy graph (model.rs:827-831, runtime_core/mod.rs:1347-1349); threaded through Binding (offload/mod.rs:42,49,58), attach_offload (model.rs:990-996), manifests() (model.rs:1041-1047), open_with_gate (server/runtime.rs:719-731), join_peer_with_gate (offload/shard.rs:47-61, from flare-cli/src/cluster.rs:254-261). copy_batch_gated syncs per batch only when Some (offload/transfer.rs:308-338); the ungated path keeps the single end-of-window record+sync (:471-474). This closes the "per-batch sync opposes #497 for every prefix-cache run" finding.
  3. Ungated-path claim now mostly true. Only open() (offload/mod.rs:114-119), join_peer (offload/shard.rs:37-45) and #[cfg(test)] Copiers::new (offload/transfer.rs:2167-2171) are gate-less. heliopause/src/python.rs:331 still sends peer_copy_graphs: Vec::new(), but that manifest also sets offload: None (:318), so the Heliopause path cannot engage a gate even in principle.
  4. CI red retracted as a blocker. The only failing check was Python CPU tests, a main-wide breakage: issue #623 (closed 2026-11-30 12:39) fixed by #624 (merged 2026-11-30 12:39, head 078315e, tests-only, +15/−25). Author states Helios lifecycle (lifecycle + kani) passed on 1870a27. Local validation claimed on 76e1813: cargo check --locked --all-targets under -D warnings on four crates; helios 1,740/1,740 lib tests, flare 245/245, flare-cli 201/201 + 4 integration suites.
  5. ExecutionManifest::has_peer_copies deleted; validate() now rejects a populated peer_copy_graphs whose length differs from graphs (execution/manifest.rs:835-843, test execution/ranks.rs:215-224). Fine — the field is introduced by this same PR, not yet a compat surface.
  6. Lease lifecycle consolidated into PeerGraphLeases (offload/copy_gate.rs:242-305), reused by RankExecutor (execution/ranks.rs:143) and serve_rank (execution/parallel.rs:563-566,652-663,692); the RankExecutorInner delegation boilerplate and the duplicated copy_batch_gated/drain_stream bodies are deduplicated (offload/transfer.rs:290-339, used from transfer/codec.rs:997).

Findings that remain open

New risks introduced by 76e1813 (full citations in notes #12 and #13)

#8 [medium] Recent activity: base c146d7b, only #626 landed since; change builds on #497/#504/#525 and contradicts docs §2.5/§2.10

#9 [medium] People: yatesdr owns the Selene offload tiers; Luke Alonso/Martin Vit/FujitsuPolycom nearby; no one has engaged yet