#1 [high] The change: overview and size
PR #723 (open, ready for review, opened 2026-12-04, head 275b7a5, base main, base commit cc0a49d) by lukealonso (COLLABORATOR). Title: "helios,heliopause,ignition: fleet-wide 2-way codec green contexts, graph SM bounds, and ScratchArena reserve_sms floor". Size per pr_files: 27 files, +1438/-285. Largest: helios/src/runtime_core/persistent_worker.rs (+824/-140), ignition/preparation/runtime_core_pb2.py (+95/-95, regenerated), heliopause/src/export/capture.rs (+86/-0), ignition/preparation/scratch.py (+77/-2), tests/preparation/test_scratch.py (+62), tests/preparation/test_capture_graph_metadata.py (+56), helios/src/runtime_core/mod.rs (+103/-16), helios/manifest.md (+24/-15), docs/prefix-cache-offload.md (+8/-5), proto files core.proto/runtime_core.proto (+4 each).
NOTE: pr_diff with no path returned a much larger diff including files NOT in pr_files (.github/workflows/helios-lifecycle.yml, native-serving.yml, AGENTS.md, docs/TODO.txt, docs/api.md, docs/cli-design.md). Those are almost certainly main-branch drift (the tool diffs against an older base), not part of the PR. The authoritative file list is pr_files. Verified discrepancy worth treating carefully; do not attribute those files to the PR.
Three declared sub-changes:
- Backward-compatible proto fields: GraphIndex/Graph
uint32 min_compute_sms = 7anduint32 max_cluster_size = 8(0 = unspecified); capture side collects them (heliopause capture.rs, ignition capture.py); readers in helios runtime_core + core. - GreenContextPartition generalized from mandatory worker+compute split to optional worker / optional codec / compute (2-way codec+compute, 2-way worker+compute, 3-way).
- ignition/preparation/scratch.py ScratchArena gains min_reserve_sms, reserve_sms_floor, require_reserve_sms, resolve_reserve_sms, register_cooperative_plan, register_parallel(reserve_sms=...).
#2 [high] Caveat: pr_diff output is contaminated by base-branch drift
The pr_diff tool (no path arg, and per-path) diffs against a STALE local copy of the base branch: pr_diff includes files that are NOT in pr_files (.github/workflows/helios-lifecycle.yml, native-serving.yml, AGENTS.md, docs/TODO.txt, docs/api.md, docs/cli-design.md) and hunks inside PR files that match already-MERGED PRs. search_history/git fails with "Could not read c513e46a... cannot simplify commit ef38cb93".
Evidence that it is drift, not the PR:
search_codeon ref=main forprepare_async_transfers|PoolMemoryLimit|use_host_vmmin helios/src/runtime_core => no matches, yet orientation packet lists #711 (merged 2026-12-03, "add domain-agnostic AsyncTransfer primitive and runtime-sized device...") as already landed. Same forasync_transferanywhere in helios/src on main.- Line-count reconciliation: real per-file delta = pr_files counts.
- helios/proto/core.proto +4/-0 and runtime_core.proto +4/-0 == exactly the 2 comment lines + 2 field lines for min_compute_sms/max_cluster_size. The DEVICE_POOL / AsyncTransfer / ExternalExtentTable / Engram BF16+IDENTITY enum additions in the pr_diff output are therefore NOT this PR's.
- helios/src/runtime_core/protobuf.rs +14/-0 == 4 lines of field pass-through + 10 lines of test-fixture fields; the +124-line
validate_async_transfersfn in the diff is drift. - helios/src/core/{cache,conversion,schema,protection}.rs +2 each, helios/src/core/export.rs +6, runtime_core/{format,metadata,protection}.rs +2..+6, selection.rs +14/-1 == purely
min_compute_sms: 0, max_cluster_size: 0test/struct fixtures. - ignition/preparation/capture.py +14/-2, but the diff shows
_seed_warmup_workspacesaddmm warm +seal_low/probe-capture/reseal hunks (~+25 lines). Those match merged #658 ("raise GA10B external floor, reseal unified-memory capture window, warm addmm"); the +14/-2 matches only_track_capture_min_compute_sms()+ the trackerwithblock. - ignition/preparation/runtime_core.py +12/-4 matches
RecordedExportGraph(..., *, min_compute_sms=0)+_graphsemission only; theexternal_extents=block in export_model is drift (#711/#720). - heliopause/src/export/capture.rs +86/-0 matches graph_sm_requirements (~40) + call site + ~46-line test; the
validate_external_extentsfn (~86 lines) is drift. - helios/src/model.rs (NOT in pr_files)
validate_continuation_prompt_data== merged #708. helios/manifest.md's new "Asynchronous extent transfers" section and BF16/IDENTITY paragraphs == #711/#664 drift. docs/prefix-cache-offload.md's many non-Green-Context hunks == drift.
CONCLUSION: trust pr_files counts, not pr_diff hunks. The PR's real delta is the three described sub-changes plus test fixtures.
#3 [high] The change: graph SM-budget manifest fields, capture to enforcement
heliopause/src/export/capture.rs (lines at PR head):
const CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION: i32 = 4;:463fn kernel_cluster_size(kernel: &wire::Kernel) -> ExportResult<u32>:465-486: returns 1 when attribute absent/zero; else parses 12-byte blob as 3 native-endian u32s and multiplies max(1) components with u32 overflow check.fn graph_sm_requirements(nodes, declared_min_compute_sms) -> ExportResult<(u32,u32)>:491-500: max_cluster_size = max over Kernel nodes;min_compute_sms = declared_min_compute_sms.max(max_cluster_size)— i.e. the declared floor is raised to the cluster size.- Call site :3438-3448 writes both into
wire::GraphIndex. - Test
graph_sm_requirements_extracts_cluster_dimension_and_merges_declared_floor:5621-5670 asserts (8,8)/(128,8)/(1,1)/(0,0).
ignition/preparation/capture.py:
_track_capture_min_compute_sms():78-83 — importstrack_capture_min_compute_smsfromb12x._lib.utils.device; falls back tonullcontext({"min_compute_sms": 0})on ImportError.- :232-245 wraps
session.capture()in the tracker and storesgraph._flare_min_compute_sms = min_compute_smsonly when > 0.
ignition/preparation/runtime_core.py:
RecordedExportGraph.__init__(..., owners=(), *, min_compute_sms=0):184-189._graphs():296-306 reads_flare_min_compute_sms(or RecordedExportGraph.min_compute_sms), rejects non-int/negative and bool (type(...) is not int), emitsmin_compute_smskey only when > 0.
heliopause/src/export/core.rs:2131-2132 and mod.rs pass through Graph->GraphIndex fields. helios readers: runtime_core/format.rs:226-227 (Graph struct fields), protobuf.rs:586-587 & 1510-1511, describe.rs:543-544 & 789-790 (describe JSON), metadata.rs:381-382.
helios/src/runtime_core/mod.rs enforcement points:
- :789-816 prepare_kernels computes max min_compute_sms / max max_cluster_size over non-worker graphs and passes to GreenContextPartition::create.
- :960-980 prepare_graphs: for each graph, if
graph.min_compute_sms > avail_sms(partition SM count) fail with "graph X requires at least N compute SMs, but partition has M SMs; use --lossless-kv-compression cpu" (suffix only when a codec context exists). - :1064-1094: when a graph function attribute has id == 4 (CLUSTER_DIMENSION), computes cxcycz and errors if cluster_size > partition SM count, or > compute partition co-scheduled alignment.
#4 [high] The change: GreenContextPartition 2-way/3-way generalization
Pre-PR (verified on local main): search_code for reserve_codec_partition|fn offload_context|codec_context in helios/src/runtime_core on main => NO MATCHES; ignition/preparation/scratch.py on main has only def register_parallel(self, *plans) at :107.
Post-PR (helios/src/runtime_core/persistent_worker.rs at PR head):
SmSplitPlannow { primary: Vec, fallback: Option<Vec<...>>, worker_index: Option, codec_index: Option, compute_index: usize, baseline_coscheduled, min_compute_coscheduled, min_compute_sms } :59-90.plan_sm_split(device_sm, requested_worker_sms: Option<u32>, reserve_codec_partition: bool, min_compute_sms: u32, max_cluster_size: u32):84-224. New error when both are absent (:95-99): "green context partition requires a persistent worker or GPU codec reservation".aligned_codec = min_partition.next_multiple_of(coscheduled)when requested — i.e. codec partition is always the MINIMUM partition size (1 aligned partition), not a tunable.required_compute_coscheduled = max_cluster_size > coscheduled ? next_multiple_of(coscheduled) : coscheduled:108-114.required_compute_sms = min_partition.max(min_compute_sms).max(required_compute_coscheduled):133-136; fails iftotal - reserved < required_compute_smswith per-topology message naming--lossless-kv-compression cpufor codec cases :137-170.- 16-CTA preferred coscheduling only applied when
required_compute_coscheduled < PREFERRED_COMPUTE_COSCHEDULED_SMS(:195) — i.e. when max_cluster_size already demands >=16, no 16->baseline fallback is planned (documented as "no fallback below max_cluster_size"). - Group indices are dynamic (worker/codec/compute), so 2-way (codec,compute) puts codec at index 0 and compute at 1 (test :1214-1222), 3-way at 0/1/2 (:1259-1273).
split_sm_groups(plan, invoke):225-240 now takes a slice and Vec.GreenContextPartitiongainedcodec_green_ctx,codec_context,codec_sm_count(:39-52);create()signature(driver, device, requested_worker_sms: Option<u32>, reserve_codec_partition: bool, min_compute_sms: u32, max_cluster_size: u32):242-255.- Error text when Green Context APIs are missing and only codec is requested (:258-266): "GPU prefix-cache compression requires CUDA driver Green Context APIs; use --lossless-kv-compression cpu".
- Post-split validation: worker sm_count >= requested; codec sm_count >= requested; compute sm_count >= max(required_min_compute_sms,1) and compute coscheduled >= required (:320-360 and again after green ctx creation :470-500).
destroy_green_contexts:567-590 also destroys codec_green_ctx; contexts nulled up front so teardown recognises a null worker context.
helios/src/runtime_core/mod.rs:
initialize_with_options(core, ordinal, reserve_codec_partition):342-346;initialize()delegates with false.- Primary context is now retained when
wants_worker.is_some() || reserve_codec_partition:386; distinct error text per case :386-397. prepare_kernels(..., skip_module, reserve_codec_partition):769-780 rejects green-context partitioning without a primary context.apply_context_settingsapplied to codec_context too (guarded by!codec_context.is_null()) :822-830.offload_context():1507-1519: returnspartition.codec_contextwhen non-null elseself.context(NOT the compute context). model.rsprepare_offloadpassesrank.offload_context()at :1062 (real delta: 1 line changed fromexecution_context()tooffload_context()).
helios/src/runtime_core/model.rs (real delta is 7 lines): :715-717
let reserve_codec_partition = options.prefix_cache.enabled() && options.prefix_cache.compression == crate::offload::KvCompression::Gpu; then NativeResources::initialize_with_options(core, *device, reserve_codec_partition) :726-731 and threaded into prepare_kernels :857-865. So enablement is: prefix cache enabled AND compression == gpu, on every rank — no persistent-worker requirement, and no model-specific branch (charter-aligned).
Pre-PR this was gated differently: #709 (merged 2026-12-03) added reserve_codec_partition "enabled only when options.prefix_cache.enabled() && !model.gpu_codec_cubins.is_empty()" AND only inside the persistent-worker branch (plan_sm_split required worker SMs). PR #723 generalizes it to non-worker cores and drops the cubin condition in favour of compression == Gpu.
#5 [high] The change: ScratchArena reserve_sms floor has zero in-repo callers
ignition/preparation/scratch.py at PR head:
__init__(device, *, overlap=True, allocation_pool=None, min_reserve_sms=0):59-63; validatestype(...) is int and >= 0(rejects bool).- New state:
_min_reserve_sms,_max_parallel_reserve_sms,_parallel_reserve_sms: dict,_cooperative_plans: dict:72-75. reserve_sms_floorproperty :113-118: 0 whennot overlap, elsemax(_min_reserve_sms, _max_parallel_reserve_sms).require_reserve_sms(count):120-135: raises RuntimeError ifnot overlaporfrozen; raises ValueError if any already-registered cooperative plan declared less; else raises the floor.resolve_reserve_sms(requested=0, *, plan=None):137-146: returns 0/requested unchanged when overlap disabled; else max(requested, floor, per-plan floor).register_cooperative_plan(plan, *, reserve_sms):148-164: keyed byid(plan); fails closed whenreserve_sms < max(_min_reserve_sms, _parallel_reserve_sms[key]); stores the MIN of repeat registrations (so a later smaller registration is silently accepted into the record but rejected... note: later registration with larger value does not raise the stored one).register_parallel(*plans, reserve_sms=0):166-187: keeps the disjoint-byte-sizing contract; when reserve_sms > 0 it (a) rejects any plan already registered cooperative with a smaller value, (b) records per-plan floor, (c) raises_max_parallel_reserve_sms.release_preparation():230-234 clears_parallel_reserve_smsand_cooperative_plans.
Tests (tests/preparation/test_scratch.py:548-607): floor+biderectional enforcement test and a validation/serial-mode test. Both are pure-CPU (ScratchArena("cpu")), no CUDA required.
USAGE: search_code for register_cooperative_plan|require_reserve_sms|resolve_reserve_sms|min_reserve_sms|reserve_sms_floor across the whole repo returns ONLY ignition/preparation/scratch.py and tests/preparation/test_scratch.py. No in-repo preparation path, recipe, component, or b12x call site passes reserve_sms, and nothing in RECIPES/components consumes resolve_reserve_sms. The repo's own docs still describe only the byte-sizing role: docs/core-design.md:821 "register_parallel(*plans) declares preparation workspaces that must coexist" and docs/preparation-development.md:256 "ScratchArena.register_parallel sizes simultaneous preparation workspaces" — both unchanged by this PR. The PR description says the enforcement is "applied" by the companion recipe PR hyperflare-recipes#157.
#6 [high] Why: #701 (open P1 bug) and merged #709 cover only persistent-worker cores
The problem this PR addresses is the non-persistent-worker half of #701 (open, by ebfio, 2026-12-03, labels bug/performance/priority:P1/triage:investigate): on GB300 SM103 with --lossless-kv-compression gpu (GKV1) the GPU codec ran on rank.execution_context() and collapsed decode from 67.12 tok/s to 0.34–0.61 tok/s while encoding at 6.9–12.4 MB/s, plus a permanent B>=2 hang. Its "Suggested Direction" #1 is literally "bind GKV1 codec streams to ... a dedicated small Green Context partition".
#701 was addressed for persistent-worker cores only by #709 (merged 2026-12-03, by lukealonso): "Reserving a third disjoint SM Green Context partition for GPU codec execution on persistent-worker cores (only when offload and GPU compression are both active)". #709's own text limits the codec partition to cores declaring a PersistentWorker; #723 extends that to standard cores with a 2-way (codec, compute) split, i.e. it is the follow-up for "Standard cores without persistent workers (DeepSeek-V4.1, GLM-5.3, Qwen3.8, Ergo, Gemma)".
Companion open PR #698 (ebfio, 2026-12-02, +65/-53, 1 file helios/src/server/runtime.rs) fixes the cuModuleLoadData startup deadlock of the same bug class. #709 already landed an equivalent reorder plus close_store, so #698 is now largely superseded; #723 does not touch server/runtime.rs at all and therefore neither supersedes nor conflicts with what remains of #698. #698's own note says on SM103 "GKV1 still contends ... because model.rs opens the codec stream on rank.execution_context()" — that residual is exactly what #723 fixes.
Green Context infrastructure lineage: #430 (original-el8, merged 2026-11-23) added Execution.persistent_workers + cuDevSmResourceSplit 2-way split and the #[ignore]d GPU tests; #532 (original-el8, merged 2026-11-26) added the 16-SM PREFERRED_COMPUTE_COSCHEDULED_SMS request with 8-SM fallback (this is the code #723 edits around); #709 (lukealonso, merged 2026-12-03) added the 3-way worker/codec/compute split; #723 generalizes the split to make worker and codec independently optional.
How long wanted: at most ~1 day. #701 opened 2026-12-03 02:18; #709 merged 2026-12-03 20:09; #723 opened 2026-12-04 covering the non-worker remainder. The ScratchArena reserve_sms half has no corresponding issue in the local index at all.
#7 [high] Related work: what #723 adds on top of merged #709, and one doc left stale
Verified by reading #709's diff at origin/main (search_code ref=main: reserve_codec_partition/offload_context/codec_context DO exist in main; search_code on main in helios/src/runtime_core/persistent_worker.rs shows main still has fn plan_sm_split(device_sm: DevSmResource, requested_worker_sms: u32) at :67, GreenContextPartition at :35, PREFERRED_COMPUTE_COSCHEDULED_SMS = 16 at :32).
So what #723 actually changes relative to merged #709:
requested_worker_sms: u32->Option<u32>, and the whole worker group becomes optional (green ctx/context/stream created only whenworker_index.is_some()). #709'screatetook the worker unconditionally.- Enablement moves and widens. #709:
reserve_codec_partition= prefix cache enabled AND!model.gpu_codec_cubins.is_empty(), used only inside the persistent-worker branch. #723 (helios/src/runtime_core/model.rs :715-717):options.prefix_cache.enabled() && options.prefix_cache.compression == KvCompression::Gpu, threaded intoinitialize_with_optionsso the PRIMARY CONTEXT is retained (mod.rs :386) and a green partition is created even on cores with no persistent worker. Dropping thegpu_codec_cubinscondition means the reservation is decided before kernels are loaded, i.e. purely from serving options. - Per-graph SM bounds are new:
plan_sm_splitgainsmin_compute_sms/max_cluster_sizeargs,SmSplitPlangainsworker_index/codec_index/compute_index/baseline_coscheduled/min_compute_sms, and the 16-CTA preference is suppressed whenmax_cluster_sizealready forces >= 16 (:81-83, :195). - mod.rs
prepare_graphsgains two new fail-closed checks that did not exist in #709: per-graphmin_compute_sms > partition SM count(:960-980) and per-kernel-node cluster dimension vs partition SM count / co-scheduled alignment (:1064-1094, attribute id 4). - Docs:
helios/manifest.md(:111-138) now describes 2-way(codec, compute)and per-graph bounds.docs/runtime-core-design.md:654-696(the normative green-context section, which #709 updated) is NOT in this PR's file list and still describes only "two groups ... when prefix-cache offload does not use GPU compression, or three groups ... when prefix-cache offload is enabled with--lossless-kv-compression gpu" — i.e. it presents the codec partition as existing only alongside a persistent worker. That contradicts the post-PR behaviour (2-way codec+compute on a core with nopersistent_workersentry). In #709 the same class of doc gap was a "Should fix" review finding.
#8 [high] Claims and evidence: what is backed, what is unverified
CLAIMS (from PR description) vs evidence found in-tree:
- "235 passed / 525 passed / 250 / 247 / 104 passed" — no CI results reproduced here; orientation packet says "CI on the head commit: pending" and the PR has no reviews and no comments at all (
pr_comments=> "No comments"). All numbers are author-reported and from a single SM120 host (RTX PRO 6000 Blackwell Max-Q, 188 SMs). - The two GPU measurements in the description ("3-way: worker=8 codec=8 compute=172 ... concurrent_coop=138664 (138611.8/s) | gpu_codec_rounds=247" and "2-way: codec=8 compute=180 (cosched=16) | concurrent_coop=73185 | gpu_codec_rounds=126") back ONLY the component-level
#[ignore]d tests. Note the 2-way run halves throughput vs the 3-way run (73185 vs 138664 steps/s although the compute partition is LARGER: 180 vs 172 SMs). The two runs used different cooperative kernels/topologies so the comparison is not apples-to-apples, but nothing in the description reconciles it, and no claim is made about it. - The description's headline behavioural claim — "isolates GPU KV-codec execution fleet-wide without model-specific branches" and "rejecting under-provisioned compute partitions or incompatible cluster dimensions at load time rather than deadlocking or silently truncating at replay time" — is NOT measured end-to-end. The description's own Limitations say "Full-checkpoint
ignition export+ liveflare run --lossless-kv-compression gpuserving across multi-GPU cores, SM103/SM121 hardware execution ... were not run locally." So the #701 regression (which was observed on SM103 only) is unverified on the hardware where it was reported. min_compute_smscapture is unverified end-to-end: the capture path readsb12x._lib.utils.device.track_capture_min_compute_sms()(ignition/preparation/capture.py :78-83), which is new b12x API from the companion flashinfer PR local-inference-lab/flashinfer#217. The pinned flashinfer rev in pyproject.toml:47 is1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e; if that rev predates #217 the tracker import fails and_track_capture_min_compute_smssilently returns{"min_compute_sms": 0}via the ImportError fallback, so every graph would export 0 and the whole SM-floor half of the PR would be a no-op in practice. Could not resolve the rev offline; worth flagging as the first thing a reviewer checks.max_cluster_sizecapture is unsupported-limited:graph_sm_requirements(heliopause/src/export/capture.rs :491-500) raisesmin_compute_smsto at leastmax_cluster_sizeat export, so a graph with a 16-CTA cluster but no b12x floor still gets min_compute_sms >= 16. That means the two new fields are not independent; a reader who only checksmax_cluster_sizesees a different picture than the loader, which usesmin_compute_smsfor the SM check (mod.rs :960-980) andmax_cluster_sizeonly for co-scheduled alignment.- ScratchArena claim "Turns missing
reserve_smson cooperative plans overlapping concurrent collectives into an immediate preparation-timeValueError" — true of the unit tests (tests/preparation/test_scratch.py:548-607) but with zero in-repo callers (see entry 5) the ValueError only fires once the companion recipe PR local-inference-lab/hyperflare-recipes#157 calls the new API. Until then this half of the PR is inert code. - "Preserves backward compatibility with existing exported cores (
min_compute_sms == 0,max_cluster_size == 0)" — supported by the proto comment +0 = unspecifiedhandling; no fixture loads an old signed core in this PR to prove it (charter line 42 asks exactly for that). - Test hygiene: the two new behaviour tests are
#[ignore]d and, unlike the tests #430 added, do NOT checkFLARE_RUN_CUDA_TESTS(search_codeFLARE_RUN_CUDA_TESTS in persistent_worker.rs => no matches). The description ran them with--ignored. The 2-way test's assertions (persistent_worker.rs:3589-3607) do verify: worker_sm_count == 0, null worker_context/worker_stream, codec_sm_count >= 8, compute_sm_count >= 16, coscheduled >= 8, codec+compute <= total,offload_context() == codec_context,execution_context() == compute_context,offload_context() != context, and CU_LIMIT_STACK_SIZE 4096 on both contexts. It also asserts fail-closed behaviour whenmin_compute_sms == total_sms(:3550-3572) with the--lossless-kv-compression cpuhint in the message.
#9 [high] People: author lukealonso, prior green-context reviewers/owners, no engagement yet
Author: lukealonso, COLLABORATOR, one of the three charter-named priority contributors ("@voipmonitor, @original-el8, @lukealonso carry extra weight", charter "Respect contributors"). 51 merged PRs and 0 open/closed-unmerged in the last 180 days. Area history: helios/src (36 PRs), docs (31), ignition/preparation (20), tests/preparation (15), flare-cli/src (14).
Their work that this PR builds directly on or reacts to:
- #709 (merged 2026-12-03, theirs): created the 3-way split and
offload_context(); #723 generalizes it. - #507 (merged, theirs): persistent worker counter schema + Prometheus
/v1/workertelemetry — also touches persistent_worker.rs and runtime_core.proto. - #504 (merged, yatesdr): the original GPU/CPU lossless KV compression feature that #701 broke.
- Merged same-day siblings #720, #721, #716, #711, #708, #707 — evidence of a very high merge rate for this author and of the stale-local-base drift in pr_diff.
Review behaviour: lukealonso has formally reviewed and approved green-context work by others (#430, review APPROVED 2026-11-23 with a "Principle 1 approval for the Execution.persistent_workers captured-graph operation contract"; #532's autobot review was Ready To Merge). They also left substantive inline design objections on #430 (structured vs remainder SM groups; repeated field; bounded drain). That is the same code path #723 now modifies, so their positions there are relevant precedent: they insisted on explicit structured compute groups over cuDevSmResourceSplitByCount remainders, and on bounded drain.
Who else works in these areas: original-el8 (green contexts #430/#532, open #640 rank-0 persistent workers), yatesdr (KV compression #504, selene-manager #612), ebfio (FIRST_TIME_CONTRIBUTOR, filed #701 and PR #698), voipmonitor (ignition scratch/component tuning: #110, #443), kbenkhaled (#664 engram BF16). The orientation packet's "People in these areas: (no commits in these areas in the last 180 days)" is wrong for these files — original-el8 and lukealonso both committed to persistent_worker.rs within that window.
Engagement so far on #723: none. pr_comments returned "No comments"; no reviews; no labels; no CI result on head 275b7a5 at the time of this case file.
#10 [high] Project fit: charter alignment, doc gap, owner-approval gap
CHARTER ALIGNMENT (read_charter):
- Lines up: "Keep the runtime small and model-agnostic" — the codec reservation is decided from
options.prefix_cache.compression == KvCompression::Gpu(model.rs :715-717), not from model identity, and the description explicitly claims no model-specific branches. The 2-way/3-way generalization replaces a worker-presence requirement with a capability requirement, which is the general form. - Lines up: "Captured-graph op contracts ... requires owner approval before you write it." #723 adds two new Protobuf fields to
Graph/GraphIndex(core.proto :248-254, runtime_core.proto :747-753) and new load-time semantics. It is not a new captured-graph operation, but it does change the graph contract, and #430's precedent was that lukealonso gave explicit "Principle 1 approval" forExecution.persistent_workers. Here the author is that approver. Nothing in the PR records an approval for the two new fields. - Lines up: "PR descriptions: Expect four parts — why, what changed, claimed result, evidence." All four present, plus a Limitations section, plus
Discord: lukealonso(AGENTS.md requires it). - Lines up: "Be explicit and pin everything."
min_compute_smsis documented as0 = unspecified; themax_cluster_sizepreference interacts viachecked_next_multiple_of. One soft spot:heliopause/src/export/capture.rshardcodesCU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION: i32 = 4as a local const rather than taking it from a generated CUDA binding — a magic number, though it is named and commented. - Lines up: "GPU kernel code: report concrete defects only" — not applicable, no kernel source changes (the SM120 test uses the existing
kv_codec_gpu.cu). - Tension: charter Code Review "Supported matrix & compatibility: ... verify that existing data, artifacts, and exported cores still load." The PR claims backward compatibility (
0= unspecified) but ships no old-core load fixture and no end-to-endignition exportrun; this is the same gap the description discloses. - Tension: docs are a first-class requirement in this repo (31 docs PRs by this author).
docs/runtime-core-design.md:654-696— the normative description of the green-context topology, which #709 updated for the 3-way split — is not in this PR's file list and still says the codec partition exists only "when prefix-cache offload is enabled with--lossless-kv-compression gpu" alongside a declared persistent worker. The post-PR behaviour adds a 2-way codec+compute topology with no worker entry.helios/manifest.mdwas updated; this normative doc was not. - Non-goal check: none of the listed non-goals (broad hardware coverage, disaggregation, CPU backends, multi-model hosting) are engaged. The change is SM103/SM120/SM121 serving-path only and the description keeps it inside the documented matrix.
- Roadmap check: no roadmap item names green contexts or SM budgeting, so this is not roadmap-driven; it is a "reproducible bug / priority:P1 issue" driven change (#701), which the charter does accept as a merge reason.
#11 [high] Reach: who is affected, new fail-closed startup aborts, SM cost, companion dependencies
WHO/WHAT IS AFFECTED
Configuration and defaults (verified by reading the code, not the description):
- Any
flare runwith prefix-cache offload enabled AND--lossless-kv-compression gpunow takes the primary-context path (NativeResources::initialize_with_options(.., true); mod.rs :386) instead ofcuCtxCreate_v2, on EVERY rank, even when the core declares no persistent worker. Before the PR that path was only reachable for persistent-worker cores. - Hard new startup-abort surface on STANDARD cores that previously started fine with
gpucompression. New failure modes, all with--lossless-kv-compression cpuas the stated remedy:- no CUDA driver Green Context API: "GPU prefix-cache compression requires CUDA driver Green Context APIs; use --lossless-kv-compression cpu" (mod.rs :393-397, persistent_worker.rs :258-266)
- device cannot fit one aligned codec partition + one aligned compute partition (persistent_worker.rs :137-170) — a small-SM or heavily-aligned device that used to run full-grid codec+compute now refuses.
- compute partition below
min_compute_sms(persistent_worker.rs :340-360, :470-490; mod.rs :960-980) - a graph's kernel cluster dimension larger than the partition's SM count or co-scheduled alignment (mod.rs :1064-1094). This one is the most novel: a core whose graph contains a 16-CTA cluster kernel and whose compute partition only gets 8-SM alignment fails to load rather than letting
cuGraphInstantiateWithFlagsfail later with 912 (which is what #532 fixed by requesting 16). The PR turns that class of failure into an earlier, clearer error, but it also means previously-loadable cores on 8-aligned-only devices are now rejected.
docs/prefix-cache-offload.md:63-70 andhelios/manifest.md:111-138 are the user-facing statements of the new 2-way/3-way behaviour and the load-time validation.
Compatibility:
- Wire/proto: two new optional-by-number fields,
0= unspecified; explicitly backward compatible by construction (proto comment "0 means unspecified").ignition/preparation/runtime_core_pb2.pyis regenerated (+95/-95, a full descriptor-blob rewrite, which is how every proto change in this repo lands). - No CLI flag added, no config key added, no dependency pin changed by this PR. The behaviour change is implicit in an existing flag combination (
--prefix-cache-*+--lossless-kv-compression gpu), so operators will not see it in a changelog unless the docs diff is read. - Cores already exported with
min_compute_sms == 0keep loading (the SM-floor check isgraph.min_compute_sms > avail_sms, and 0 never exceeds). Newly exported cores from this branch carry nonzero floors and will be rejected on under-provisioned devices — i.e. the core file format gains a new failure mode going forward, which matters for anyone re-exporting.
Deployment / operator surface:
- The 3-way/2-way split always allocates at least one
min_sm_partition_size-aligned codec partition (8 SMs at 8-SM alignment, 2 SMs on SM8x per the test at persistent_worker.rs :1302-1310). On a 188-SM SM120 card that is 8 SMs (4.3%) permanently unavailable to compute whenevergpucompression is on — that is the intended trade, but it is a real reduction in compute SMs for every non-worker core that previously used all of them. - On SM103 (152 SMs, per #430/#532 evidence) the same trade applies with 8 SMs.
Documentation touched: docs/prefix-cache-offload.md (+8/-5), helios/manifest.md (+24/-15). Documentation NOT touched but describing the changed behaviour: docs/runtime-core-design.md:654-696 (normative green-context topology), docs/core-design.md:818-825 and docs/preparation-development.md:256 (ScratchArena's documented contract, which says only "sizes simultaneous preparation workspaces" and does not mention reserve_sms).
Dependencies: the capture half depends on unpublished b12x API (track_capture_min_compute_sms) delivered by the companion local-inference-lab/flashinfer#217; the ScratchArena half depends on companion recipe adoption local-inference-lab/hyperflare-recipes#157. Both companions are outside this repository.
#12 [high] Related work: #314 overlap, #640 topology interaction, #698 superseded, no revert
Files touched in the neighbourhood, from items_touching and related_items:
persistent_worker.rs: #723 (this), #314 (open, schopde-nvidia, "Add signed tensor execution for diffusion"), #711 (merged), #709 (merged), #532 (merged), #507 (merged), #430 (merged). scratch.py: #723 (this), #543 (merged, lukealonso, "Remove joint kernel tuning and grouped AOT forward compilation"), #443 (merged, voipmonitor), #110 (merged, voipmonitor).
related_items(723) most-overlapping: #314 (open) 19 files in common — a large open diffusion PR touching the same proto/capture/describe files; a real merge-order interaction (both add proto fields and capture plumbing). #711 (merged) 18 files. #465/#432/#410/#408 (all original-el8, closed) 11-12 files. #720 (merged, lukealonso, external_extents visitors) 7 files. #667, #646, #618, #647 (merged, lukealonso) 5-10 files. #504/#492 (yatesdr) 8 files — the KV compression feature. #664 (kbenkhaled) 8 files. #566, #479 — engram/ignition capture.
Open competing/adjacent PRs on the same mechanism:
- #640 (open, original-el8) "helios: allow persistent workers on rank 0 of local multi-rank cores", +68/-34, touches model.rs/selection.rs/threaded.rs/docs/runtime-core-design.md. It relaxes #430's
cores.len() > 1rejection. It does NOT touch persistent_worker.rs or mod.rs, so it does not textually conflict with #723, but both change the topology assumptions aroundNativeResourcespartitioning. #640's autobot review flags exactly the hazard #723's design sidesteps: "asymmetric Green Context SM partitioning (partition_sms = Some(...) on rank 0 vs None on peers) with cooperative kernels". After #723, a multi-rank local core where rank 0 has a worker + gpu compression gets a 3-way split and peer ranks with no worker + gpu compression get a 2-way split — still asymmetriccompute_sm_countacross ranks, which themin_compute_smscheck does not equalise. Worth noting as a cross-PR interaction neither PR's description mentions. - #698 (open, ebfio) 1 file, superseded in substance by #709 but still open. Not touched by #723.
- #314 (open, schopde-nvidia) 19 shared files including both proto files and heliopause capture — the biggest textual-overlap risk outside this PR's own family.
- #622 (open) "Bound a core's persisting L2 cache limit by the serving device" and #576/#696 (open) reference #430 but not these files.
Nothing found that competes with, is superseded by, or reverses #723's ScratchArena half — #543 removed joint kernel tuning from the same file and is the closest prior edit.
No revert or "codec green context didn't work" PR/issue found (searched "revert 709 codec green context", "revert lossless kv compression": no matches).
#13 [high] Recent activity: #430 -> #532 -> #709 -> #723 chain, and a reversed review recommendation
Could not read per-commit history for these files: search_history fails with git: error: Could not read c513e46a... fatal: cannot simplify commit ef38cb93..., and the orientation packet's "Recent activity in those areas" section is entirely "(not available)". So the recent-activity picture below is reconstructed from PR metadata instead of commits.
Reconstructed timeline of the areas #723 touches (all 2026):
- 2026-11-23 #430 merged (original-el8): persistent_workers schema + 2-way green context split,
#[ignore]d GPU tests, lukealonso APPROVED with inline design objections. - 2026-11-26 #532 merged (original-el8): 16-SM
PREFERRED_COMPUTE_COSCHEDULED_SMSrequest + 8-SM baseline fallback +split_sm_groups. This is the code #723 rewrites: #723 keepsplan_sm_split/split_sm_groupsbut changes their signatures and adds the index-based group map. #532's autobot review had explicitly recommended deletingsplit_sm_groups/SmSplitPlanin favour of the ABI'spreferred_coscheduled_sm_countfield (driver.rs:115, written 0 and read nowhere); #723 instead extendsSmSplitPlanfurther (+824/-140 on this file). That is a direct, unmentioned divergence from a prior review recommendation. - 2026-12-02 #698 opened (ebfio): startup deadlock; #711 merged (lukealonso): AsyncTransfer.
- 2026-12-03 #504-family work; #709 opened and merged same day (lukealonso): 3-way split + offload_context + offload-before-worker ordering; #701 filed (ebfio) same window; #708, #707 merged.
- 2026-12-04 #720, #721, #716, #641-family merged; #723 opened.
Relationship to that work: #723 builds directly on #709 (same author, next day) and edits the #430/#532 planner. It reverses none of them: the 2-way worker+compute and 3-way worker+codec+compute behaviours are preserved (tests at persistent_worker.rs :1184-1300 assert the old expectations still hold with the new Option signature). It supersedes #709's model.gpu_codec_cubins.is_empty() gating with a compression == Gpu option check, which is a refinement rather than a reversal.
Note on the stale-base drift in pr_diff: it shows #711's AsyncTransfer/host_vmm/PoolMemoryLimit work inside helios/src/runtime_core/mod.rs and model.rs, plus #658's capture reseal and #664/#708's engram/prompt work. Those are merged on main and are NOT this PR's changes; a reader diffing naively will over-attribute ~700 lines to #723.
#14 [high] Process: ready-for-review, zero reviews, CI pending, 3 separable changes in one PR
PROCESS / STATE at time of case file (2026-12-04):
- State: OPEN, "ready for review", base
main, base commit cc0a49d, head 275b7a5, no labels, no reviewers, no reviews, no comments (pr_comments=> "No comments"). Zero community engagement. - CI: "pending" on head 275b7a5; no CI result available. (The combined
pr_diffoutput shows new CI steps in.github/workflows/helios-lifecycle.yml"Compile Helios runtime-core and server tests" andnative-serving.yml"Test native RoCE transport" — those files are NOT in pr_files and are drift from other merged PRs, not this PR's CI changes.) - Age: opened and last updated the same day (2026-12-04). 0 days old.
- Author is a COLLABORATOR and charter-named priority contributor; 51 merged PRs in 180 days, several merged the same day they were opened (#709 opened 18:08, merged 20:09). Expected review latency for this author is short.
- Not a draft. Description carries all four charter-required parts (why / what changed / claimed result with numbers / evidence) plus an explicit Limitations paragraph and the required
Discord: lukealonsoline.
SIZE, AUTHORITATIVE: 27 files, +1438/-285 per pr_files. Largest single file is helios/src/runtime_core/persistent_worker.rs (+824/-140), 57% of the insertions, and mostly the two new #[ignore]d CUDA tests (the 2-way codec test spans roughly persistent_worker.rs:3295-3792) plus a TestFiles fixture (~66 lines) hoisted for reuse.
The three sub-changes are separable: (a) proto/manifest fields + capture + enforcement — mechanical, and 8 of the touched helios/src/core/* files are pure min_compute_sms: 0, max_cluster_size: 0 struct-literal churn; (b) green-context generalization — the bulk; (c) ScratchArena — 77 lines Python + 62 lines test, independent of (a) and (b). Nothing in the description explains why (c), a preparation-time Python arena change unrelated to Green Contexts, is bundled with a fleet-wide CUDA change; the only link given is that companion recipe PR #157 exercises both. Precedent: yatesdr asked the same on #430 ("Two changes in one PR ... could they be separate PRs, each with its own measured need?").