Opened by a workflow run, Dec 4, 2026 7:52 AM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: original-el8 (COLLABORATOR; charter-named "priority contributor"; Discord: el8)
Motivation: Concurrent short prompts each cost a full model replay, because prefill graphs are limited to one request (batch_capacity == 1) and Mixed allows only one prefill lane per step. This PR lets a core declare multi-request prefill graphs and packs several text-only prompts into one CUDA graph replay, which is much cheaper on bandwidth-bound GPUs.
Scale: +1639 / −56 lines in 21 files
Proposal:
- Accept
Prefill/TerminalPrefillgraphs withbatch_capacity B >= 2plus a 64-alignedpacked_token_capacity PinsideModelContractversion 3, leavingB == 1andScoredPrefilluntouched. - Pack 2..B text-only lanes in
helios/src/model/packing.rs, rejecting vision bindings and enforcing per-lane and aggregate token limits. - Build text-only packed prefill cohorts in the shared value-rate scheduler (
scheduler/policy.rs,cost.rs,checkpoints.rs) withReplayTimesper-shape duration tracking. - Validate the geometry in
ScheduledStep::validate_mixed/commitand in IgnitionGraphSignaturepreparation and direct mode. - Add
docs/packed-prefill-design.mdand ~550 lines of tests. Touches: - helios/src/scheduler/{policy,cost,checkpoints}.rs — new cohort algorithm on the hottest shared scheduling path, plus a checkpoint-pricing rewrite for all prefill.
- helios/src/{execution/manifest.rs, model/packing.rs, runtime_core/selection.rs, server/runtime.rs} — shared contract validation, input packing and core selection.
- ignition/{preparation/execution.py, cli/serve.py, direct/scheduler.py} — signature validation and a narrowed
--packed-verificationcheck. Related items: - #645 Overhaul Helios prefill scheduling, cost modeling, and two-frame pipelining (merged): attacks the same burst problem by scheduling; #715 fills its residual gap and must rebase over it.
- #479 static fused addend / gated gather … optional TerminalPrefill (merged): introduced the
TerminalPrefillcatalog this PR widens. - #621 Validate scheduler admission against the core parameter declarations (open): 8 shared files including manifest/packing/selection — likely conflict surface.
- #718 prefill-only KV handoff, announce barrier (open): shares scheduler, checkpoints, runtime and policy tests.
- #693 cache per-lane powered survival curves across candidate pricing (open): same
policy.rshot path and helpers. Link: https://github.com/NVIDIA/hyperflare-inference/pull/715 Autobot comments: Four shared-code behaviour changes are undeclared:--packed-verificationnow only counts speculative signatures (previously-passing recipes can now fail),validate_mixed/commitgained general lane-count checks, prefill cost models/slope refresh are gated onbatch == 1, andscheduler/checkpoints.rspricing is rewritten for all prefill. The project rules that most bear on it are unaddressed:docs/design-review.md:22-26requires prior owner approval for a new captured-graph operation contract (none recorded, noDesign-Signed-Off-Bytrailer), and:195-251requiresscripts/scheduling_sim/+learning.py(not opened) and TLA+/Kani for a new cohort algorithm and timing estimates, while stating that disclosure is not an excuse. The headline 1.68×–4.15× A/B is confounded and self-disclosed as such (different signed cores from different FlashInfer revisions; the C=1 control shows 0.94×, i.e. ~6% overhead in the packed arm).pr_diffoverstates the change because the localmainis stale (#697/#711/#720 already merged). The change is inert without an opt-in core, costs −4.2% KV capacity, and has zero reviews, labels or automated review despite heavy reviewer activity in these exact files. Docs for the scheduler design were not synchronized. Also note: the change does not runscripts/scheduling_sim/at all, andP <= prefill_chunk_sizeis enforced only at selection time, not in the manifest.
Value Proposition
Value Proposition — PR #715 "helios,ignition: implement additive packed multi-request prefill (Contract 3)"
Charter alignment. Aligned in substance. It targets N concurrent short prompts costing N full-model replays on the SM121/GB10 hardware the charter names, stays model-agnostic (geometry read from prepared-core metadata via packed_prefill_graphs(), no per-model flags, no hardcoded bucket list), and leaves B == 1 and ScoredPrefill untouched. It continues a maintainer-led direction: merged #645 attacked burst prefill latency through scheduling and left this multi-request-graph gap open. The blocker is process: docs/design-review.md:22-26 requires prior explicit owner approval for a captured-graph operation family "even if it reuses a graph kind," and #715 extends PREFILL/TERMINAL_PREFILL into that grey zone with no approval, no Design-Signed-Off-By: trailer, no maintainer comment.
Novelty & status. Genuinely additive. The gap is structural (Mixed carries one prefill lane), no originating issue exists, and nothing on main fixes it; #621/#693/#718/#571 overlap in files without duplicating the feature. Not obsolete, not superseded. One tension: two parallel cohort builders for the same graph family, against #645's simplify guidance and the charter's small-footprint principle.
Value vs cost. The benefit is real but not isolated: the 1.68×–4.15× p95 TTFT figures come from two different signed cores exported against different FlashInfer revisions, and the C=1 control regressing 111.2 → 118.7 ms (0.94×) implies ~6% systematic overhead in the packed arm — violating the "equivalent baselines" standard. Cost is high: 21 files, +1639/−56, ~+850 lines of production Rust, a new cohort algorithm on the hottest file (policy.rs), −4.2% KV capacity, and four undeclared shared-behaviour changes (narrowed --packed-verification, general validate_mixed lane check, batch == 1 gating of prefill cost models, checkpoint-pricing rewrite with no evidence of its own). Required simulator/learning.py runs are unreported and TLA+/Kani were skipped, which docs/design-review.md:247-251 says disclosure does not excuse. In-repo GPU parity evidence is absent (it lives in the companion recipes PR). Zero engagement so far.
Verdict: Worth it with changes — not closeable; the author is a priority contributor. Before merge: recorded owner sign-off on the extended prefill contract; a flag-only, same-core A/B; simulator plus TLA+/Kani runs; the four undeclared behaviour changes split out or justified on their own evidence; consolidated cohort builders; canonical scheduler docs updated.
(Reviewer note: PR/dossier material contained no attempt to redirect my instructions beyond an embedded task-completion line, which I disregarded as content.)
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:design-review, performance, enhancement, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:design-review: 85.6% -
triage:review: 13.1% -
triage:validation: 1.0% -
triage:investigate: 0.1% -
triage:integration: 0.1% -
none: 0.1% -
triage:partial: 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
- [✓]
performance: 99.2% - [✓]
enhancement: 97.7% -
community: 46.9% -
duplicate: 7.6% -
bug: 0.3% -
documentation: 0.2%
Area
- [✓]
area:scheduling: 97.4% -
area:preparation: 43.8% -
area:memory: 24.5% -
area:api: 7.6% -
area:caching: 7.6% -
area:kernels: 7.6% -
area:rocenante: 1.6% -
area:selene: 0.5% -
area:orbit: 0.4% -
area:engram: 0.2% -
area:packaging: 0.1%
Model
-
model:deepseek-v4.1: 24.5% -
model:deepseek-v4: 16.5% -
model:glm-5.3: 5.3% -
model:qwen3.8-flash-next: 2.6% -
model:kimi-k3.1: 1.6% -
model:muse-glimmer: 0.8% -
model:inkling-small: 0.7% -
model:mimo-v2.6: 0.6% -
model:nemotron-3.5-bolt: 0.2% -
model:qwen3.8-27b: 0.2% -
model:gemma4: 0.1%
Apply Labels (Intake)
Applied: +triage:design-review, +performance, +enhancement, +area:scheduling
Subtraction and simplicity
Subtraction & Simplicity audit — PR #715 (packed multi-request prefill, Contract 3)
Scope: the production Rust (helios/src, ~+850 non-test lines), the 4 Python hunks, plus the boundary-validation duplication across manifest/catalog/selection/scheduler. The manifest/catalog/packing/Ignition changes are genuinely lean (mostly one-line predicate edits) and I say so below. The scheduler changes are not: the same greedy cohort algorithm is written twice, the same (B,W,P) invariant is written seven times, and ~19 lines of commit re-validate what it just called.
A. Subtraction (delete / collapse)
A1 — commit re-validates the step it just validated. Delete scheduler.rs:2614-2632 (~19 lines)
commit opens with:
helios/src/scheduler.rs:2575—step.validate_mixed()?;
then 40 lines later re-derives the same invariants by hand:
helios/src/scheduler.rs:2614-2616if step.lanes.len() > step.batch_capacity { return Err("scheduled step exceeds batch capacity".into()); }
helios/src/scheduler.rs:2617-2632if step.kind.is_prefill() && step.batch_capacity >= 2 { let mut total_tokens = 0usize; for lane in &step.lanes { if lane.tokens > step.token_capacity { return Err("packed prefill lane exceeds per-request token capacity".into()); } ... if step.packed_token_capacity < step.batch_capacity || total_tokens > step.packed_token_capacity { return Err("packed prefill step exceeds packed token capacity".into());
Every one of these is already enforced by validate_mixed at helios/src/scheduler.rs:436-465:
lane.tokens > self.token_capacity→:449-452(!matches!(... Prefill | TerminalPrefill) && batch_capacity >= 2block)lanes.len() > batch_capacity→:448(packed),:428(speculative),:480(mixed)packed_token_capacity < batch_capacity→:442- token sum vs
packed_token_capacity→:453-457
Because validate_mixed runs first and returns early, this whole block is unreachable. Deleting it loses nothing; the error strings are near-duplicates of the ones in validate_mixed. (Note this is one of the four undeclared shared-behaviour changes the PR description doesn't mention — the check is advertised as new packed-prefill validation but it is pure duplication.)
A2 — cost.rs: packed_prefill_duration is a pass-through wrapper. Delete ~15 lines
helios/src/scheduler/cost.rs:644-659pub fn packed_prefill_duration(&self, kind: GraphKind, batch: usize, width: usize, packed: usize) -> Option<u64> { self.duration_key(Key { drafts: 0, kind, batch, tokens: width, prefill: 0, packed }) }
duration_key is already public and is itself just self.entry(key).map(|estimate| estimate.nanos) (helios/src/scheduler/cost.rs:878-880), and Candidate::cost_key() already builds this exact Key (helios/src/scheduler/policy.rs:116-124). The only two callers (policy.rs:1302, policy.rs:1634) could use self.costs.duration_key(cost::Key { drafts: 0, kind, batch, tokens: width, prefill: 0, packed }) or, better, take the key from the Candidate they are about to construct — which is what they compute anyway.
A3 — packed_prefill_candidates: dead early-return guard
helios/src/scheduler/policy.rs:1630-1632if self.packed_prefill_catalog.is_empty() { return; }
The very next statement is for &(kind, batch, width, packed) in &self.packed_prefill_catalog (:1633); an empty catalogue already iterates zero times. 3 lines, zero behaviour.
A4 — Drop the unrelated stale-main fix from this PR
helios/src/runtime_core/cache_memory.rs(not opened) (+1):external_extents: vec![]
This exists only because #711/#720 landed on main after the branch point; it is not part of packed prefill and has no business in a 21-file feature PR. Same for the pool_vram_limit / pool_ram_limit additions in runtime_core/selection.rs:17-23, 92-98 and the documented-only edits that pr_diff renders — those belong to #720. Drop or land separately. (My pr_diff view is polluted by a stale local main, so treat this as: whatever in the final diff is not packed-prefill should not be here.)
A5 — server/runtime.rs:849-899: four copies of one three-line filter
helios/src/server/runtime.rs:867-878(prefill) and:879-899(packed)scheduler.prefill_graphs( &executor.manifest().graphs.iter() .filter(|graph| graph.kind == crate::execution::GraphKind::Prefill && graph.batch_capacity == 1) .map(|graph| graph.token_capacity).collect::<Vec<_>>(), )?; scheduler.packed_prefill_graphs( &... .filter(|graph| matches!(graph.kind, GraphKind::Prefill | GraphKind::TerminalPrefill) && graph.batch_capacity >= 2) .map(|graph| (graph.kind, graph.batch_capacity, graph.token_capacity, graph.packed_token_capacity))...
The batch_capacity == 1 predicates bolted onto the three existing calls (:854, :863, :874) are not a feature — they are the symptom of having four sibling catalogs sharing one graph list. One helper — let (solo, packed) = manifest.graphs.iter().partition(|g| g.batch_capacity == 1); — and then the three existing calls take solo unchanged, which removes the three new && batch_capacity == 1 clauses entirely. Net −6 lines and three fewer places to forget the predicate.
B. Simplicity (one algorithm, one state)
B1 — The packed-prefill cohort algorithm exists twice, ~250 lines, and the copies have already diverged. Highest-value finding.
Copy 1, inlined in continuation_candidate (helios/src/scheduler/policy.rs:1300-1426), introduced with the giveaway artifact:
helios/src/scheduler/policy.rs:1300—drop(consider);:1301—for &(following, batch, width, packed) in &self.packed_prefill_catalog {:1349—if n < 2 { continue; }:1354—for by_density in [false, true] {:1362-1366—let primary = if by_density { (vb / wb as f64).total_cmp(&(va / wa as f64)) } else { vb.total_cmp(&va) };:1379—if used_tokens + work > packed { continue; }:1393—if lane_count < 2 || promoted_count == 0 { continue; }
Copy 2, as a method (helios/src/scheduler/policy.rs:1623-1747):
:1639—let mut offers = [(0usize, 0usize, 0.0f64); REQUEST_LANES];:1672—if count < 2 { continue; }:1676—for by_density in [false, true] {:1684-1688— identicalprimaryconstruction:1704—if total_work + work > packed { continue; }:1713—if selected < 2 { continue; }
Same offers array shape, same density/value double pass, byte-identical comparator head, same budgeted greedy fill, two spellings of every local (n/count, lane_count/selected, used_tokens/total_work). 250 lines where one closure + two thin callers would be ~130.
The two copies are already inconsistent, which is exactly the risk:
- Comparator: copy 1 is
primary.then_with(|| vb.total_cmp(&va)).then_with(|| sa.cmp(&sb))(:1367); copy 2 adds a token tie-break:primary.then_with(|| vb.total_cmp(&va)).then_with(|| wa.cmp(&wb)).then_with(|| sa.cmp(&sb))(:1689-1692). Two different orderings for the same graph family, undocumented. - Acceptance rule: copy 1 demands a continuation (
promoted_count == 0→ reject,:1393); copy 2 accepts any two eligible lanes (:1713). - Horizon: copy 1 prices against
horizon = ns + duration_ns(:1305-1309); copy 2 prices againstduration_nsalone (:1668).
Also, in both copies the by_density == false pass compares value twice:
helios/src/scheduler/policy.rs:1362-1367/:1684-1689let primary = if by_density { (vb / wb as f64).total_cmp(&(va / wa as f64)) } else { vb.total_cmp(&va) }; primary.then_with(|| vb.total_cmp(&va))...
When by_density is false, primary is vb.total_cmp(&va), so the .then_with(|| vb.total_cmp(&va)) is a guaranteed-Equal retry. Written as if by_density { density_cmp.then(value_cmp) } else { value_cmp } the intent is explicit and the dead retry disappears.
Recommendation: extract one fn packed_prefill_cohort(&self, ...) -> Option<(mask, lengths, work, value, rate)> parameterised by (horizon, require_promoted) and a single comparator, and have continuation_candidate call it — which also removes the drop(consider); hack, since the inlined block would leave the closure's borrow alone.
B2 — Candidate stores work and host_lengths that must agree. Make one of them derived.
helios/src/scheduler/policy.rs:103-112pub batch: usize, pub capacity: usize, pub packed_token_capacity: usize, ... pub work: usize, ... pub host_lengths: Option<[usize; REQUEST_LANES]>,
For exactly the candidates this PR adds, work == host_lengths.iter().sum():
helios/src/scheduler/policy.rs:1731-1745output.push(Candidate { host_lengths: Some(lengths), ... work: total_work,
total_work is accumulated as total_work += work in the same loop that fills lengths[slot] = work (:1707-1711). Two fields, one truth — and the invariant is silently broken by every other constructor (:1579, :1803, :1966, rounds.rs:818 all pass host_lengths: None, work: 0 or work: <something> and rely on inference). A enum LaneWidths { Scalar, PerLane([usize; REQUEST_LANES]) } next to a fn work(&self) would make work unrepresentable-as-wrong; at minimum drop work from the packed constructor and derive it.
The Option<[usize; N]> shape also produces a silent-zero hazard:
helios/src/scheduler/policy.rs:2056-2058let work = candidate .host_lengths .map_or(0, |lengths| lengths[slot]); if work == 0 || !self.packed_prefill_lane_compatible(...)
None and "lane carries 0 tokens" collapse to the same work == 0 rejection, so a future non-packed caller that reaches this branch silently rejects None-carrying candidates instead of tripping an assert. host_lengths is only meaningful when packed_token_capacity >= 2, so Option<(usize, [usize; N])> (capacity + lengths together) removes the pairing question at :2212:
helios/src/scheduler/policy.rs:2212-2215let lengths = (candidate.packed_token_capacity != 0).then(|| candidate.host_lengths.unwrap_or_else(|| self.round_lengths_optimistic(...)));
That .then(unwrap_or_else) chain only exists because "is this a packed round?" is encoded in two independent fields (packed_token_capacity for speculative and packed prefill, host_lengths only for the latter).
B3 — New dominates_padding clause is a shared predicate widened for one caller
helios/src/scheduler/policy.rs:169-171if smaller.kind.is_prefill() { return smaller.work == larger.work && smaller.host_lengths == larger.host_lengths; }
Before this PR the clause was return smaller.work == larger.work;. It now compares host_lengths, a field that is None for every solo prefill candidate (:1579), so the new conjunct is a no-op on the path this clause was written for and only matters for the packed candidates. That is a mutation of a shared pruning predicate in order to admit a new graph family — the safer shape is a separate arm keyed on packed_token_capacity != 0, leaving solo padding pruning provably unchanged.
B4 — Four validations of one (B,W,P) invariant, plus three re-derivations
The new geometry constraint set is spelled out at:
helios/src/execution/manifest.rs:860-872—draft_tokens != 0 || packed < batch || packed > batch*token || packed < 64 || !packed.is_multiple_of(64) || packed > i32::MAXhelios/src/execution/manifest.rs:914-924—(2..=request_capacity).contains(&batch) && token > 0 && token <= packedhelios/src/model/catalog.rs:266-282—batch >= 2 && tokens > 0 && tokens <= packed && packed >= batch && packed <= batch*tokens && packed >= 64 && packed <= prefill_chunk_size && packed.is_multiple_of(64)helios/src/runtime_core/selection.rs:260-275— the same eight conjuncts, rewrittenhelios/src/scheduler.rs:902-912— the same eight, rewritten againhelios/src/scheduler.rs:436-446— the same eight, rewritten a third time insidevalidate_mixedhelios/src/scheduler.rs:2617-2632— a seventh (deletable, see A1)
Sites 1 and 2 are two halves of one check within the same file, 40 lines apart. Sites 4/5/6 duplicate 3. One fn validate_packed_prefill(batch, width, packed, chunk, lanes) -> Result<()> — or better, one struct PackedPrefill { batch, width, packed } with a single validate — collapses seven copies of an eight-term conjunction into one. The only site that genuinely needs different inputs is catalog.rs (it has prefill_chunk_size and no lane list) and validate_mixed (it has lanes).
Evidence the copies already diverged: the same condition has three different error strings — "packed prefill B/W/P geometry is invalid" (manifest.rs:871), "packed prefill shapes must be distinct aligned multi-request capacities within the chunk size" (scheduler.rs:915), "packed prefill lanes exceed their captured geometry" (scheduler.rs:464) — and i32::MAX appears in exactly one of them (manifest.rs:869), while prefill_chunk_size appears in only three of the seven.
B5 — is_non_terminal_prefill_step uses a different search than its own batch-1 branch
helios/src/scheduler.rs:936-938pub(super) fn is_non_terminal_prefill(&self, kind: GraphKind, capacity: usize) -> bool { kind == GraphKind::Prefill && self.terminal_prefill_catalog.binary_search(&capacity).is_ok()
helios/src/scheduler.rs:947-954if batch <= 1 { self.is_non_terminal_prefill(kind, capacity) } else { kind == GraphKind::Prefill && self.packed_prefill_catalog.contains(&(GraphKind::TerminalPrefill, batch, capacity, packed)) }
The catalogue is sorted on exactly (kind as u8, batch, width, packed) (scheduler.rs:899-901), so the batch≥2 branch could binary_search the tuple too. Two lookups for one concept with two search strategies is the kind of divergence that later becomes a performance bug on the hot path (commit calls this at :2685, and checkpoints.rs:922-931 calls it per lane per step). Minor, but free to fix and free to keep aligned.
B6 — is_text_only_prefill_request carries a conjunct that both call sites already guarantee
helios/src/scheduler/policy.rs:1585-1590fn is_text_only_prefill_request(&self, r: &LiveRequest) -> bool { !r.prompt_logprobs && r.image_slot.is_none() && r.vision_patches.is_empty() && r.conditioned_windows.is_empty() }
Both call sites filter on a predicate that already maps prompt_logprobs → ScoredPrefill:
helios/src/scheduler/policy.rs:1646-1648—self.eligible(r) && self.request_kind(r) == Some(GraphKind::Prefill), andrequest_kindreturnsrequest.prefill_kind(), defined asif self.prompt_logprobs { GraphKind::ScoredPrefill } else { GraphKind::Prefill }(helios/src/scheduler.rs:279-281).helios/src/scheduler/policy.rs:1321-1326— thepromotedarm requiresself.following_kind(request, kind) == Some(GraphKind::Prefill)and thereadyarm requiresself.request_kind(request) == Some(GraphKind::Prefill);following_kindreturnsr.prefill_kind()for the prefill phase (policy.rs:1040-1041).
So !r.prompt_logprobs is unreachable-true at both sites. Keep it as a debug_assert! or fold it into the caller's Some(GraphKind::Prefill) ==, but don't let it read as a live constraint on the packing rules. Likewise, image_slot.is_none() already implies most vision state (scheduler.rs:2550 sets image_slot alongside vision_patches.extend), so three of the four conjuncts are measuring one thing — worth a single LiveRequest::is_text_only() next to the existing prompt_phase() (scheduler.rs:343-350) rather than a third private copy of the vision predicate.
B7 — checkpoints.rs Mixed special case defeats the helper it just added
helios/src/scheduler/checkpoints.rs:922-931let non_terminal = if step.kind == GraphKind::Mixed { self.is_non_terminal_prefill(kind, step.prefill_capacity()) } else { self.is_non_terminal_prefill_step(kind, step.batch_capacity, step.token_capacity, step.packed_token_capacity) };
is_non_terminal_prefill_step already dispatches batch <= 1 to is_non_terminal_prefill, so the Mixed arm exists only to substitute prefill_capacity() for token_capacity. A helper taking the prefill extent as an argument (is_non_terminal_prefill_step(kind, batch, prefill_extent, packed)) removes the branch; as written the reader has to know that Mixed's prefill width lives in a different field.
B8 — checkpoints.rs: two *_for helper pairs where one suffices
helios/src/scheduler/checkpoints.rs:172—fn prefill_catalog_costs_for(&self, prompt_logprobs: bool) -> Vec<PrefillCatalogCost>helios/src/scheduler/checkpoints.rs:217-219fn prefill_catalog_costs(&self, request: &LiveRequest) -> Vec<PrefillCatalogCost> { self.prefill_catalog_costs_for(request.prompt_logprobs) }
and identically interval_prefill_ns / interval_prefill_ns_for (:196-215). The _for variants are the real functions; the non-_for ones are 2-line adaptors retained for callers that still hold a LiveRequest. This is a legitimate refactor — but it means the diff touches every prefill path's pricing, not just packed steps, so it belongs in the PR description (it isn't there) and the adaptors should be inlined at their call sites rather than kept as a second API surface.
B9 — Python: key arity is used as a type tag
ignition/direct/scheduler.py:197-200key = (signature.kind, signature.batch_capacity, signature.token_capacity) if signature.kind == "speculative": key += (signature.packed_token_capacity, signature.draft_tokens) elif signature.kind in ("prefill", "terminal_prefill") and signature.batch_capacity >= 2: key += (signature.packed_token_capacity,)
ignition/direct/scheduler.py:290-293return sorted({key[2] for key in self.graphs if len(key) == 3 and key[0] == kind and key[1] == 1})
The key now has three arities (3/4/5) and correctness depends on len(key) everywhere it is read (:290, :292). The and key[1] == 1 guard is redundant with len(key) == 3 for solo keys but is now load-bearing by accident — it silently becomes wrong the moment a second kind gains a 4th element. A uniform 5-tuple ((kind, batch, width, packed, drafts), unfilled slots None) makes capacities() a plain filter with no arity test.
C. What is already lean (no action)
helios/src/model/packing.rs— the vision rejection is one negated predicate (:111-130:binding.indexing == PackedToken && !(graph.kind.is_prefill() && graph.batch_capacity >= 2)), the buffer sizing oneelse if(:170-176), andpack_step's lane checks 18 lines (:419-437). Nothing to cut.helios/src/execution/manifest.rs:850-885/helios/src/model/catalog.rs:263-285— additive arms in existingmatches; the only cost is the duplication counted in B4, not local bloat.ignition/cli/serve.py:462-471andignition/preparation/execution.py— 3-line and 18-line predicate edits. (Noteserve.py:466'ssignature.kind == "speculative"narrowing is an undeclared user-visible behaviour change: a recipe whose only non-zeropacked_token_capacitysits on a non-speculative graph now fails withUsageError("this prepared recipe does not declare packed verification capacities"). Not a simplification target, but must be in the PR description.)helios/src/scheduler/checkpoints.rs:435-505estimate_prefill_delta_nsis already#[cfg(any(feature = "server", test))]-gated and reads cleanly.
Bottom line
Two deletions are worth doing before review:
helios/src/scheduler.rs:2614-2632— dead re-validation afterstep.validate_mixed()?at:2575. ~19 lines, zero risk.- Collapse
helios/src/scheduler/policy.rs:1300-1426into:1623-1747(onepacked_prefill_cohorthelper, one comparator,require_promotedas a flag). ~120 lines saved, and it removes three live divergences (comparator tie-break, promoted requirement, horizon) that no reviewer would otherwise notice. This is the single change that most reduces what future maintainers must keep in sync, in a file that four merged PRs touched in the five days before this one.
Then, in order: one shared validate_packed_prefill for the seven copies of the eight-term conjunction (B4); delete packed_prefill_duration (A2) and the empty-catalogue early return (A3); partition the graph list once in server/runtime.rs instead of adding three batch_capacity == 1 clauses (A5); and pair host_lengths with packed_token_capacity so the work field stops being independently assignable (B2).
None of these change the feature's semantics; A1, A2, A3 and B1 are pure subtraction. I found no speculative CLI flag, config knob, or supports_* boolean in this diff — the opt-in mechanism (core declares B >= 2 graphs, --max-concurrency 1 filters them) follows docs/design-review.md (not opened)'s "no per-model flags" rule, and that part is exemplary. The weight is entirely in the scheduler: ~250 of ~850 production lines are one algorithm written twice, sitting on top of a validation invariant written seven times.
Gates and contracts
Contracts, Charter & Verification Gates Audit — PR #715 (helios,ignition: implement additive packed multi-request prefill (Contract 3))
Head reviewed: 84f789a · 21 files, +1639/−56 · open draft, no labels, no maintainer review; the only non-bot comment is the author's own highlight summary (result 1).
Method caveat: pr_diff renders unrelated hunks because the local main is stale (pre-#697/#711/#720) — e.g. async_transfers in ignition/preparation/execution.py, pool_vram_limit/external_extents in runtime_core/selection.rs, budget_interior_anchor/snapshot_discovery in checkpoints.rs, b12x_environment in ignition/cli/serve.py. File attribution below follows pr_files (result 2) and the Discovery Dossier, not the rendered diff. search_history fails on this snapshot (git: Could not read c513e46a…), so commit-message trailers could not be inspected.
Verdict: NOT mergeable on governance/verification grounds — 2 blockers, 3 majors.
Gate 1 — Signed core-format / wire / captured-graph / public contract boundaries: FAIL (Blocker)
B1. No recorded owner approval for an extended captured-graph operation contract (Blocker)
docs/design-review.md:16-35 (principle 1, mirrored at AGENTS.md:376-381):
"Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso… Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."
This PR does not merely add shape variants within an unchanged contract; it changes what a PREFILL/TERMINAL_PREFILL graph is:
- multiple simultaneously active prefill requests per graph (previously one request per replay;
docs/core-design.md:420still states "Prefill scheduling | One request per chunk"); - a new aggregate row layout (
InputIndexing::PackedTokensized topacked_token_capacityP,helios/src/model/packing.rs(not opened), described in the newhelios/model-contract.md:188-209§"Optional packed multi-request prefill"); - per-lane
SampleEnabled/QueryLengthsampling semantics forTERMINAL_PREFILL(docs/packed-prefill-design.md:89-92); - a new eligibility rule derived from the absence of vision bindings (
helios/src/model/packing.rs:111-130(not opened)).
That is exactly the "new operation contract reusing a graph kind" case the rule names. Nothing in the PR records the approval: no maintainer comment, no maintainer review, no Approved-By/Design-Signed-Off-By: Luke Alonso evidence, no reference to a Discord/offline sign-off (the description only carries Discord: el8, the author's own contact, per principle 17). docs/design-review.md:27 places this decision with the owner, not with a contributor. The project demonstrably applies this rule to prefill contract changes (issue #267 comment: "P1 and P3 change the prefill graphs' operation contract. AGENTS.md requires the project owner's prior explicit approval…", result 55).
To clear: a maintainer comment on #715 (or a linked thread) granting approval for the extended prefill operation contract, before merge. This is a "priority contributor" per the charter — so the correct action is to request the sign-off, not to close.
M5. Shipped behaviour contradicts normative design docs that were not updated (Major)
AGENTS.md:231 requires changes to "graph selection, scheduling policy, or timing estimates" to be reflected in docs/scheduling-runtime-design.md and docs/scheduling-utility.md. This PR changes all three and updates neither:
helios/src/scheduler/cost.rs(diff hunks at theset_measured/observesites andentry()) now createsPrefillCostModeland callsrefresh_prefill_context_slopes()only forkey.batch == 1.docs/scheduling-runtime-design.md:463-488states unconditionally that for "pure prefill graphs (PREFILL,TERMINAL_PREFILL, andSCORED_PREFILL), samples are stratified across six fill-ratio and KV-context depth buckets… Predictions fit a three-parameter nonnegative linear model". Packed shapes silently lose profiling and slope borrowing; the normative text is untouched. This is also an undeclared change to solo-prefill pricing behaviour (the PR lists only "registers B >= 2 packed prefill graphs … and tracks per-shape replay durations viaReplayTimes").docs/scheduling-runtime-design.md:21-23enumerates the native catalog ("prefill, terminal prefill, scored prefill, ordinary decode, complete speculative generation, mixed prefill/generation, vision, and state operations") and:455-457enumerates cost-entry identity ("Physical graph kind, batch capacity, token capacity, proposal depth, mixed prefill capacity, and packed verification capacity identify a cost entry"). Neither admits packed multi-request prefill, and the doc has zero occurrences of "packed prefill". The new cohort algorithm is documented only in the standalonedocs/packed-prefill-design.md, which the canonical scheduler doc does not reference.ignition/cli/serve.py:462-471narrows--packed-verificationtosignature.kind == "speculative".docs/cli-design.md:255,765-766describes the packed-verification/--mtp-*-verification-token-budgetsurface without this restriction, andAGENTS.md:230requiresdocs/cli-design.mdfor CLI behaviour changes. A core whose only non-zeropacked_token_capacityis on a non-speculative graph previously passed this check and now getsUsageError("this prepared recipe does not declare packed verification capacities"). The change may be a correct tightening, but it is a user-visible public-CLI contract change bundled silently into this PR (it is absent from the "What changed" list).
docs/core-design.md and helios/README.md (both kept in sync by the recent scheduler PRs #645/#655/#661/#663/#697 per the dossier) are likewise unchanged.
To clear: update docs/scheduling-runtime-design.md (catalog contents, cost-entry identity, packed-prefill cohort + the batch==1 gating of the stratified prefill model), docs/cli-design.md (--packed-verification scope), and reference the new design doc from the canonical scheduler doc — or split the --packed-verification and cost-model gating changes out.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS (no violation)
- No vendored upstream file is forked in this PR: the 21 changed files contain no
helios/native/*,selene*,eos, or third-party C/Python sources. There is no local edit ofhelios/native/roce_proxy.c(not opened) or similar ahead of an unmerged upstream PR. - The only cross-repo dependency is the companion recipe PR
local-inference-lab/hyperflare-recipes#153, which is linked by URL in the description and indocs/packed-prefill-design.md:45-46,112-137. It is not commit-pinned. That is consistent with existing practice (AGENTS.md:255-256: official exports run from the recipes repo, which pinsuv.lock), so I record it as Info / Nit: the design doc's §4 (lines 45-46, 112-137) documents recipe code that does not exist in this repository, so roughly a third of the new design document cannot be verified from this repo, and the −4.2% KV claim plus the 6/6 CUDA multi-lane parity tests live only there. - Open-PR overlap (#621 admission validation, #718 prefill KV handoff, #693 lane survival curves) is file overlap, not duplication of this feature — Info / Nit, no action.
Gate 3 — Mandatory verification evidence: FAIL (Blocker + Major)
B2. Testing layers 2 and 3 were not run; disclosed unavailability is explicitly not an excuse (Blocker)
docs/design-review.md:195-208 (layer 2) makes the simulator mandatory for exactly this change class: "Changes to graph selection, service pricing, timing estimation, refresh or exploration budgets, or cohort algorithms must be evaluated against the Python simulator and reference solvers in scripts/scheduling_sim/… Changes to timing estimation or funded refresh require running the screening and 64-seed validation catalog in scripts/scheduling_sim/learning.py (not opened)." This PR adds a cohort algorithm (helios/src/scheduler/policy.rs (not opened), +342) and new timing estimates (ActionCosts::packed_prefill_duration, helios/src/scheduler/cost.rs, diff hunk adding the method), and gates prefill profiling by batch. No simulator or learning.py (not opened) run is reported anywhere — not in the description, not in the comment, not in the limitations section (which mentions only tla2tools.jar and cargo-kani).
docs/design-review.md:209-230, 232-251 (layer 3) requires python3 verification/helios-lifecycle/check.py (TLA+ TLC + Rust trace conformance) and cargo kani for scheduler/admission/commit changes, and :241-246 requires updating models/fixtures when supported geometries are extended — which "prefill may now have B ≥ 2 with a packed row layout and per-lane completion" plainly is. The PR reports only the in-crate Rust conformance suites (scheduler_matches_lifecycle_model, bounded_cache_ownership_matches_tla, scheduler_matches_speculative_accounting_model, async_transfer_scheduler_matches_lifecycle_model) and states TLC and Kani were unavailable. helios/src/scheduler/lifecycle_tests.rs (not opened) and verification/helios-lifecycle/* are not in the change set, so the new lane-count/packed-geometry validation in ScheduledStep::validate_mixed/commit (helios/src/scheduler.rs, +“scheduled step exceeds batch capacity”, “packed prefill lanes exceed their captured geometry”, “packed prefill step exceeds packed token capacity”) has no conformance-fixture coverage.
:247-251 forecloses the excuse used: "Disclosure does not excuse skipping runnable CPU checks. All three layers run without a GPU or model checkpoint. Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable."
To clear: run and report scripts/scheduling_sim/ + learning.py (not opened) (or state why the simulator cannot model packed prefill and get owner agreement that layer 2 is inapplicable), run verification/helios-lifecycle/check.py with a JVM available, and extend the lifecycle/conformance fixtures or the validate_mixed unit coverage to cover the added geometry; run cargo kani or justify per :221-225 why none of the named proof obligations apply.
M3. The performance claim has no attributable baseline (principle 12) (Major)
docs/design-review.md:106-115 (principle 12) requires "equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements", and :109-111 says comparisons must use exported cores with flare run. The reported A/B is a flare run measurement, but the two arms are different signed cores: the pre-change 151-graph core 887785ad (exported from an earlier FlashInfer revision) versus the packed core 4aea5c54 (exported against FlashInfer 5a8ceed80). The self-disclosed C=1 control regressing 111.2 ms → 118.7 ms (0.94×) is consistent with a systematic ~6% overhead in the packed arm, so the 1.68×–4.15× p95 improvements and 1.75×–4.23× throughput numbers are not isolated measurements of packed prefill. The confound is honestly disclosed (good), but disclosure does not satisfy the stated evidence standard for a headline performance claim.
To clear: a flag-only A/B on one binary and one core (--packed-prefill off/on, or a core exported once with and once without the +6 packed shapes from the same FlashInfer revision), including the C=1 control.
M4. The required Layer-1 suites are reported failing at the head commit (Major)
docs/design-review.md:180-194 names the required invocations: cargo test --locked --release on helios with --features runtime-core,server, and pytest on tests/cli, tests/preparation, and component/scheduler tests. The description reports, on 84f789a:
cargo test … --features runtime-core,server --lib: 1,894 passed, 49 ignored, 6 failures, attributed to unsetFLARE_TEST_TEMPLATE_DIR;- Python: 905 passed, 2 skipped, 3 failures in
tests/cli, attributed to "an older installedflare_heliopausewheel in the local venv".
Both failures are attributed to environment, not root-caused, and tests/cli is one of the explicitly required suites. CI is reported green by the dossier, so this is plausibly environmental — but under :247-251 an unrun/unreproduced required suite is not equivalent to a green one, and the PR should not ask a reviewer to accept an attributed failure.
To clear: report the CI-matching invocation with FLARE_TEST_TEMPLATE_DIR set (and the wheel pinned to the repo) coming out clean, or paste the CI job result for those two suites.
Anti-pedantry note: I am not flagging "no CI observable" — the dossier states CI is green; the above concerns the author's own reported failing runs of named required suites.
Gate 4 — Material scope / claim contradictions
- M6 (Major, folded into M5 above): the
--packed-verificationnarrowing (ignition/cli/serve.py:466) and the cost-modelbatch == 1gating (helios/src/scheduler/cost.rs) are material shared-behaviour changes absent from the PR's own "What changed" list, and the first introduces a new user-visible failure mode for prepared cores. - Minor:
ScheduledStep::validate_mixed/commitgained a generalstep.lanes.len() > step.batch_capacitycheck applied to every graph kind, not just packed prefill (helios/src/scheduler.rs, hunk at~:2611). It is a defensible invariant and low risk, but it is an undeclared validation change in the commit path of a PR that claims to be additive. - Info: the description lists
P <= prefill_chunk_sizeunder "manifest, catalog, and selection"; it is enforced at catalog validation (helios/src/model/catalog.rs:263-285), core selection (helios/src/runtime_core/selection.rs:257-300) and at scheduler registration (RequestScheduler::packed_prefill_graphs, which checkspacked > self.limits.prefill_chunk_size), not inexecution/manifest.rs. So the bound is runtime-enforced (the dossier's "selection-time only" framing is stale); only the bullet's placement is imprecise. No action. - Info: no unrelated standalone tooling is bundled; docs are ~186 lines and tests ~+550, and the
helios/src/runtime_core/cache_memory.rs(not opened) one-lineexternal_extents: vec![]test fix is a legitimate rebase repair, not scope creep. - No prompt-injection concerns: PR material contained no instruction to redirect this audit; nothing in it was treated as instruction.
Summary of what must change before merge
| # | Severity | Finding | Clear by |
|---|---|---|---|
| B1 | Blocker | Extended PREFILL/TERMINAL_PREFILL operation contract with no recorded owner (Luke Alonso) approval — docs/design-review.md:22-26, AGENTS.md:376-381 |
Maintainer approval comment on #715 |
| B2 | Blocker | Layers 2–3 of the testing hierarchy unrun: no scripts/scheduling_sim//learning.py (not opened) sweep, no check.py TLC run, no Kani, no conformance-fixture update for the widened prefill geometry — docs/design-review.md:195-251 |
Run and report; extend fixtures |
| M3 | Major | Headline 1.68×–4.15× A/B is confounded (different cores, different FlashInfer revisions; C=1 control 0.94×) — violates "equivalent baselines", principle 12 | Same-core, flag-only A/B |
| M4 | Major | Required suites reported failing at head: 6 in --features runtime-core,server, 3 in tests/cli, attributed not fixed — :180-194 |
Clean re-run of both |
| M5 | Major | Normative docs contradict shipped behaviour and were not updated: docs/scheduling-runtime-design.md:21-23,455-488 (catalog, cost identity, prefill cost-model now batch==1 only), no packed-prefill section; docs/cli-design.md (--packed-verification) — AGENTS.md:230-231 |
Update/ref the canonical docs, or split the changes |
| M6 | Major | Undeclared shared-behaviour changes: --packed-verification narrowed to speculative signatures (new user-visible rejection), prefill cost models/slope refresh gated on batch == 1 |
Declare + justify, or split out with own evidence |
Gates that pass: no vendored upstream file is forked and no unmerged upstream patch is locally applied (Gate 2). Core compatibility for existing cores is preserved in code (B == 1 catalogs untouched; packed_token_capacity == 0 retained; pre-change core 887785ad loads and serves), which is the right shape for helios/model-contract.md's additive version-3 wording. The change is inert without an opt-in core and is filtered by --max-concurrency 1, so no shipped default is silently changed. The author is a charter-named priority contributor and the feature addresses a real structural gap that merged #645 left open — this should be a request for approval and evidence, not a rejection.
Code correctness
Deep Code Correctness, Invariants & Hot-Path Audit — PR #715 @ 84f789a
Partitioned per the large-PR rule (21 files, ~2,070 changed lines, 2 subsystems: helios/ Rust + ignition/ Python) into 3 concurrent sub-agents:
- s1:
execution/manifest.rs,execution/tests.rs,model/{catalog,packing,testing,tests}.rs,runtime_core/{cache_memory,selection}.rs - s2:
scheduler{,/cost,/policy,/checkpoints,/policy_tests}.rs,server/runtime.rs - s3:
ignition/preparation/execution.py,ignition/cli/serve.py,ignition/direct/scheduler.py,tests/preparation/test_execution.py
Every finding below was re-verified by me directly against the files at 84f789a (sub-agent claims that did not survive verification are dropped; several s2/s3 citations were corrected against the real line numbers).
F1 — Major: packed-prefill continuation values "ready" lanes that the emitted step can never run (double-counted value, suppressed legal cohorts)
Diff site: helios/src/scheduler/policy.rs:1324-1348 (offer construction) and helios/src/scheduler/policy.rs:1374-1395 (budget loop)
Callees resolved: fill() policy.rs:1068-1082; Candidate.mask consumer materialize policy.rs:2206-2247; ValueRate::new/compare helios/src/scheduler/utility.rs:155-172; caller add_candidate policy.rs:1793-1802 (the returned (mask, rate) replaces the candidate's mask/rate).
// policy.rs:1320-1348
let offered = mask & (1 << slot) != 0;
let promoted = offered
&& !terminal_cleanup(request)
&& self.following_kind(request, kind) == Some(GraphKind::Prefill);
let ready = !offered
&& self.eligible(request)
&& self.request_kind(request) == Some(GraphKind::Prefill);
if !promoted && !ready {
continue;
}
...
let val = self.lane_value_for_tokens(request, following, work, horizon, values[slot]);
offers[n] = (slot, work, val, promoted);
// policy.rs:1374-1396
for &idx in &order[..n] {
if lane_count == batch { break; }
let (slot, work, val, promoted) = offers[idx];
if used_tokens + work > packed { continue; }
if promoted && promoted_count == capacity { continue; }
used_tokens += work;
lane_count += 1;
value += val; // <-- ready (non-offered) lanes add value
if promoted { selected_promoted |= 1u64 << slot; promoted_count += 1; }
}
if lane_count < 2 || promoted_count == 0 { continue; }
let mut selected = selected_promoted; // <-- only promoted lanes enter the mask
selected seeds from selected_promoted only, and fill(selected) (policy.rs:1068-1082) can top up only from first_offers, i.e. the current step's mask. A ready lane (not in the current mask, request_kind == Prefill) therefore contributes value and consumes lane_count/used_tokens/batch budget but can never appear in the returned mask. The sibling solo path in the same function does it correctly — it prices exactly the lanes it selects (policy.rs:1128 let mut selected = 1u64 << slot;, policy.rs:1142-1148 adds only the extra bits it ORs into selected); so do Decode/Speculative via best_two_stage_cohort (policy.rs:1251-1267) and Mixed.
Concrete counterexample (value double-count / wrong step selection): Init(4) just committed mask {a,b,c,d} (capacity 4, measured 2 ms); queued Prefill-phase e,f,g,h; packed shape (TerminalPrefill, B=8, W=128, P=1024) measured 20 ms. promoted = {a,b,c,d} ⇒ promoted_count == 4 == capacity ⇒ the promoted_count < capacity top-up block is skipped; ready = {e,f,g,h} ⇒ lane_count = 8, value = V(a..h), horizon = 22 ms ⇒ rate V/22 attached to a Candidate whose mask is {a,b,c,d} and which materializes as four Init lanes with tokens == 0 (materialize, policy.rs:2233-2245). V(e..h) is priced here and again when the packed prefill actually executes next step.
Second counterexample (legal cohort silently dropped): packed (TerminalPrefill, B=2, W=128, P=256); current Init(2) mask {a,b}; promoted Prefill lanes p1,p2 (val 10.0 each, 6 tokens) and ready Prefill lanes r1,r2 (val 30.0 each, 6 tokens, lower slots). Sorted by value r1,r2 come first, lane_count hits batch == 2 and breaks, promoted_count == 0 ⇒ continue. The perfectly legal all-promoted cohort {p1,p2} (12 ≤ P) is never evaluated in either by_density pass, so Init loses its packed continuation — the exact chat_w65_c4/c8 scenario the PR reports.
Fix: delete ready from this loop — if promoted { offers[n] = ...; n += 1; } only. Ready-only cohorts are already produced correctly by packed_prefill_candidates (policy.rs:1641-1671, which requires request_kind(r) == Some(GraphKind::Prefill) for every offered slot), so no scheduling capability is lost.
F2 — Major: packed_prefill_lane_compatible short-circuits TerminalPrefill, so mid-prompt lanes run on terminal graphs and lose deferred_prefill
Diff site: helios/src/scheduler/policy.rs:1601-1620
Callees resolved: solo reference semantics RequestScheduler::resolve_prefill_kind_from helios/src/scheduler.rs:975-1006; deferred_prefill write helios/src/scheduler.rs:3065-3067; checkpoint consequence helios/src/scheduler/checkpoints.rs:935-936; design invariant docs/packed-prefill-design.md:96-111.
// policy.rs:1592-1621
fn packed_prefill_lane_compatible(
&self, r: &LiveRequest, kind: GraphKind, non_terminal: bool,
terminal_only: bool, work: usize, cut: Option<usize>,
) -> bool {
if kind == GraphKind::TerminalPrefill {
return true; // <-- no geometry check at all
}
if r.deferred_prefill { return false; }
if !non_terminal { return true; }
if terminal_only { return false; }
let start = Self::prefill_cursor(r);
let next_stop = cut.unwrap_or(r.prompt_tokens).min(r.prefill_limit()).min(r.prompt_tokens);
let end = start.saturating_add(work);
let window = self.terminal_prefill_window();
!(end >= next_stop || (window > 0 && next_stop.saturating_sub(end) <= window))
}
The Prefill branch faithfully mirrors resolve_prefill_kind_from (scheduler.rs:986-1005: needs_terminal = end >= next_stop || (window > 0 && next_stop - end <= window)). The TerminalPrefill branch bypasses it entirely, so a packed TerminalPrefill graph may be applied to a lane that stops well short of next_stop with more than window tokens remaining — a combination the solo planner provably never produces (scheduler.rs:1001-1005 returns Prefill in that case).
Concrete counterexample: prompt P = 300, prefill_catalog == terminal_prefill_catalog == [128,256,512,1024] ⇒ terminal_prefill_window == 0 (scheduler.rs:957-958, recompute_terminal_prefill_window); packed shape (TerminalPrefill, 4, 256, 512). prefill_work_through(r, 256, None) = 256, next_stop = 300, end = 256 < 300, remaining 44 > window 0. =⇒ solo resolve_prefill_kind = Prefill; packed accepts TerminalPrefill(4,256,512). This is exactly the PR's own test policy_tests.rs:9712-9726 (lane h1, 300 tokens, TerminalPrefill) which must then hand-patch the completion record at policy_tests.rs:9730-9733 (recs[h1.slot].generated_tokens = 0; token_id = -1;) instead of letting the real path produce it.
Two provable consequences, both of which solo semantics forbid:
helios/src/scheduler.rs:3065-3067—if kind == GraphKind::TerminalPrefill && record.status != 3 { request.deferred_prefill = false; }. A mid-prompt lane that is stilldeferred(multi-chunk prompt that needs terminal replay) hasdeferred_prefillcleared after a non-terminal chunk, so its next chunk becomes eligible for a non-terminalPrefillgraph — precisely the statepacked_prefill_lane_compatible's ownif r.deferred_prefill { return false; }guard exists to prevent, and whatscheduler.rs:2685-2700(if non_terminal_prefill { request.deferred_prefill = true; }) is trying to maintain.helios/src/scheduler/checkpoints.rs:935-936—deferred_after = (request.deferred_prefill || non_terminal) && kind != GraphKind::TerminalPrefill, so a mid-prompt terminal chunk is treated as capture-eligible whileplan_checkpointsprices it with terminal cost (checkpoints.rs:937-941).
Whether a mid-prompt terminal replay also corrupts the sliding-window KV tail is recipe/kernel-side (hyperflare_recipes, outside this repo), so I state that as a risk, not a proven miscompute; findings 1–2 above are proven in-repo.
Fix: replace the early true with the same geometry check minus the terminal requirement, e.g. for TerminalPrefill accept only lanes with end >= next_stop || (window > 0 && next_stop - end <= window) (i.e. reuse resolve_prefill_kind via self.resolve_prefill_kind(r, width, work, cut) == GraphKind::TerminalPrefill), and keep if r.deferred_prefill handling to TerminalPrefill only.
F3 — Minor: Ignition accepts packed_token_capacity > prefill_chunk_size, which the Helios loader rejects at load time
Diff site: ignition/preparation/execution.py:80-89
Callee that disagrees: helios/src/runtime_core/selection.rs:260-274 (max_chunk = config["prefill_chunk_size"]), rejection at selection.rs:304.
# ignition/preparation/execution.py:80-89
if self.kind in ("prefill", "terminal_prefill") and self.batch_capacity >= 2:
if (not 2 <= self.batch_capacity <= MAX_CONCURRENCY
or self.packed_token_capacity < 64
or self.packed_token_capacity % 64
or self.packed_token_capacity >= 1 << 31
or self.token_capacity > self.packed_token_capacity
or not self.batch_capacity <= self.packed_token_capacity <= self.batch_capacity * self.token_capacity):
raise ValueError(...)
// helios/src/runtime_core/selection.rs:265-274
(2..=REQUEST_LANES as u64).contains(&graph.batch_capacity)
&& graph.token_capacity > 0
&& graph.token_capacity <= graph.packed_token_capacity
&& graph.packed_token_capacity >= graph.batch_capacity
&& graph.packed_token_capacity <= graph.batch_capacity.saturating_mul(graph.token_capacity)
&& graph.packed_token_capacity >= 64
&& graph.packed_token_capacity.is_multiple_of(64)
&& graph.packed_token_capacity <= max_chunk // <-- no counterpart in Python
grep prefill_chunk ignition/ shows it only in ignition/direct/scheduler.py:206, ignition/preparation/bootstrap.py:45 (not opened), ignition/parameters.py, ignition/planning.py — never in GraphSignature validation, so the Python contract cannot see it.
Counterexample: prefill_chunk_size = 2048; GraphSignature("terminal_prefill", 16, 256, P=4096) ⇒ 16 <= 4096 <= 16*256 = 4096, aligned, 256 <= 4096 ⇒ accepted by Ignition; Helios selection.rs:273 requires 4096 <= 2048 ⇒ rejected, and flare run refuses the freshly prepared core. Also inconsistent with helios/src/execution/manifest.rs:914-924 and scheduler.rs:891-921 (packed > self.limits.prefill_chunk_size rejected), so two of the three validators disagree with Ignition.
Fix: thread prefill_chunk_size into GraphSignature validation (or re-check every packed prefill signature in PreparedExecution.__init__ against server_config["prefill_chunk_size"]) and add or self.packed_token_capacity > prefill_chunk_size, mirroring selection.rs:273.
F4 — Minor: direct-mode Layout registers packed prefill keys that no code path can ever select
Diff site: ignition/direct/scheduler.py:200-201, with the companion filter at scheduler.py:291
Consumers resolved: graph() scheduler.py:320-327, prefill_kind() scheduler.py:302-314, packed_shapes scheduler.py:316-318, plan() scheduler.py:731-735, Step.shape scheduler.py:491-494.
# scheduler.py:197-202
key = (signature.kind, signature.batch_capacity, signature.token_capacity)
if signature.kind == "speculative":
key += (signature.packed_token_capacity, signature.draft_tokens)
elif signature.kind in ("prefill", "terminal_prefill") and signature.batch_capacity >= 2:
key += (signature.packed_token_capacity,) # 4-tuple, never looked up
# scheduler.py:290-291
if kind in ("prefill", "terminal_prefill"):
return sorted({key[2] for key in self.graphs if len(key) == 3 and key[0] == kind and key[1] == 1})
# scheduler.py:731-735 (the only prefill path)
if prefilling:
request = min(prefilling, key=lambda r: r.ident)
tokens = min(len(request.prompt) - request.consumed, self.layout.prefill_chunk)
kind = self.layout.prefill_kind(request.consumed, tokens, len(request.prompt))
return self._step(kind, tokens, [Lane(request, request.consumed, tokens)])
capacities() returns only B == 1 capacities, graph() always builds (kind, 1, capacity) (scheduler.py:325), packed_shapes filters len(key) == 5 so 4-tuples are not packed rounds, and plan() always emits exactly one lane ⇒ Step.shape == (kind, 1, tokens) with packed_tokens = 0. A core whose only B >= 2 prefill graphs were declared therefore runs every prefill lane-at-a-time in --direct mode; the new keys exist only so bindings/buffer_specs/state_rows_per_request (scheduler.py:212-227) still cover the P-sized buffers.
Fix: add a packed_prefill_shapes property over the len == 4 keys plus a cohort builder mirroring packed_prefill_candidates, or (smaller) stop emitting those keys and take their buffer_specs from signatures, documenting that --direct ignores packed prefill. The len(key) == 3 and key[1] == 1 filter at line 291 is itself a necessary fix — without it graph() could KeyError on a capacity that came only from a B >= 2 graph.
Also verified (reported so it is not re-litigated)
manifest.rs:860-884, 914-924,catalog.rs:266-289,selection.rs:260-278,scheduler.rs:891-921,scheduler.rs:436-473— theB >= 2geometry rule sets are complete and mutually consistent:draft_tokens == 0,P >= 64, 64-aligned,B <= P <= B*W(saturating_mul, no overflow),W <= P,B == 1 ⇒ P == 0,P <= prefill_chunk_size.GraphKind::is_prefill()=Prefill | TerminalPrefill | ScoredPrefill(manifest.rs:85-87);ScoredPrefillis excluded from every packed path, correctly, since it is the prompt-logprobs outlier.selection.rs:283-296max_concurrencyfilter is scoped exactly tokind ∈ {prefill, terminal_prefill} && B >= 2;ScoredPrefill,Vision, andB == 1prefill keepmax_batch, andmax_batchderives only fromdecode/speculative(selection.rs:330-340), so--max-concurrency 1still leaves a loadable, serveable core.packing.rs:422-439— the new packed validation runs beforeself.staging.clear()(line 440) and before anystaging.put/write_*, so no half-populated buffer can survive a rejected lane;total_tokensuseschecked_add.packing.rs:169-188PackedTokenextent =Mixed → prefill_capacity+(B-1)*W, elseP != 0 → P, elsetoken_capacityforB==1prefill, elsepacked_tokens(); consistent with what the packer fills (packed_offset ≤ Σ lane.tokens ≤ P) and bounded byP <= B*W, so no under/over-sized buffer.packing.rs:113-126vision rejection —ImageFeatureSlotnow requiresVision | Mixed | (is_prefill() && B == 1);ImageFeatureIndex/Left/Rightrejectis_prefill() && B >= 2.B == 1prefill andScoredPrefillstill accept vision bindings, so single-request and vision prefill are unchanged.- Array bounds / div-by-zero / sort totality in both packed loops —
REQUEST_LANES == 64(manifest.rs:18) boundsslots.len()(scheduler.rs:749-751),offers[n]/order[..n]/finishing[f]cannot overflow;order[..n]correctlyoffers[a];vb/wbnever divides by zero (work == 0filtered atpolicy.rs:1333/1656); both comparators terminate on a uniqueslot(policy.rs:1367,1692) so they are total orders andsort_unstableis deterministic. prefill_slot_state(policy.rs:508-515) caches(cut, terminal_only)per slot per candidate array with results independent of(kind,B,W,P), so re-invocation across catalog shapes and bothby_densitypasses is idempotent — no double-advance or stale cut.cost.rsgating —PrefillCostModelis created only forkind.is_prefill() && batch == 1(cost.rs:606-607,581-583), so packed shapes cannot poison the per-capacity prefill predictor;packed_prefill_duration(cost.rs:644-659) is an exactHashMap<Key,_>lookup on(kind,B,W,prefill=0,P)and cannot collide with solo keys;ReplayTimes::observe(cost.rs:497-511) is the shared 9-sample ring with a correct lower-is-better even-count median index.checkpoints.rs:925-936— theMixedarm now keys onstep.prefill_capacity()and the packed arm on the full(kind,B,W,P)identity;is_non_terminal_prefill_step(scheduler.rs:940-955) is order-independent (containsover the sorted catalog validated inpacked_prefill_graphs). No checkpoint loss or duplication for non-terminal packed chunks.server/runtime.rs:846-905— soloPrefill/TerminalPrefill/ScoredPrefillcatalogs are filtered toB == 1andB >= 2shapes go only topacked_prefill_graphs, so theB == 1paths are untouched.runtime_core/cache_memory.rs:1397external_extents: vec![]— matches the pre-existing test literal and the non-test construction inruntime_core/format.rs;external_extentsfeeds only async-transfer channel validation, so an empty vec is semantically correct for these alias/granule tests and the compile fix is genuine.- Hot path (protocol 4) — no new heap allocation in the packed scheduler paths (all
[(..); REQUEST_LANES]are stack arrays);packed_prefill_candidatesis one pass of |packed catalog| × slots plus two ≤64-element sorts per shape (policy.rs:1633-1727). Thecontinuation_candidatepacked copy is re-executed inside theconsiderclosure once per prefill/terminal/scored capacity (policy.rs:1274-1282), i.e. O(|prefill catalog| × |packed catalog| × slots) with a 64-element array copy per shape — measurable but bounded (~3 × 20 × 64 at the PR's own 6-shape/4-capacity scale), so not filed as a defect; if the catalogs grow, hoist the packed loop out ofcontinuation_candidateintocandidates()next topacked_prefill_candidates.
No prompt-injection content was present in the PR body, code, or comments. No test in the changed files was found broken; the one fidelity weakness worth noting is that policy_tests.rs:9730-9733 hand-patches the mid-prompt lane's completion record rather than exercising the real SampleEnabled-driven record (F2 explains why it has to).
Final review
Recommendation: Changes Requested
The packed-prefill feature itself is well-built and correctly gated: geometry validation (manifest.rs, catalog.rs, selection.rs, scheduler.rs) is complete and mutually consistent, B == 1 and ScoredPrefill paths are genuinely untouched, and the code adds no per-model flag or hardcoded bucket list. Two hard gates are nonetheless unmet — the extended prefill operation contract has no recorded owner approval (docs/design-review.md:22-26, AGENTS.md:376-381), and testing-hierarchy layers 2–3 were not run even though docs/design-review.md:247-251 explicitly forecloses the "unavailable host" excuse. Two verified scheduler/validation asymmetries also let packed prefill do things the solo planner provably never does and let Ignition accept a core Helios rejects.
Merge Risk
Level: High
- The change redefines what a
PREFILL/TERMINAL_PREFILLgraph is (multiple simultaneous requests per graph, a newPACKED_TOKENrow layout of extentP, per-laneSAMPLE_ENABLEDcompletion, eligibility derived from absent vision bindings), so it needs owner sign-off that the repo does not record anywhere. - New greedy cohort code lands on
helios/src/scheduler/policy.rs, the file five merged PRs (#645,#655,#661,#663,#697) touched in the five days before this one — and the same algorithm is written twice with three live divergences. - The headline 1.68×–4.15× A/B compares two different signed cores exported from different FlashInfer revisions, with the C=1 control moving 111.2 → 118.7 ms (0.94×), so the figures are not an isolated measurement of packed prefill.
Walkthrough
- Manifest / catalog / selection (
helios/src/execution/manifest.rs:860-878,helios/src/model/catalog.rs:266-282,helios/src/runtime_core/selection.rs:260-275,helios/src/scheduler.rs:891-921): acceptPrefill/TerminalPrefillwithB >= 2,1 <= W <= P, 64-alignedP,draft_tokens == 0,P <= prefill_chunk_size;B == 1must keeppacked == 0;selection.rs:341-350dropsB >= 2graphs when--max-concurrency 1. - Packing (
helios/src/model/packing.rs:113-126,:169-188,:422-439): vision bindings rejected onB >= 2prefill,PACKED_TOKENextent sized toP, andpack_stepvalidates lanes/sum/image beforestaging.clear()at:440, so a rejected lane cannot leave half-written buffers. - Scheduler (
helios/src/scheduler/policy.rs:1300-1426,:1623-1747,:1592-1621): two greedy cohort builders pack 2..B text-only lanes undersum(work) <= P, competing on the same age-pricedValueRateas soloPrefill,Decode/Speculative, andMixed;scheduler.rs:436-465re-validates the resulting geometry invalidate_mixed. - Cost model (
helios/src/scheduler/cost.rs:644-659,:581-583,:606-607):packed_prefill_durationkeys packed shapes on(kind,B,W,P);PrefillCostModelcreation and slope refresh are now gated onbatch == 1so packed shapes cannot poison the solo predictor. - Ignition (
ignition/preparation/execution.py:80-96,ignition/direct/scheduler.py:197-201,:290-291):GraphSignaturevalidates(B,W,P)geometry and rejects vision inputs; direct mode isolates the 4-tuple packed keys from theB == 1capacities()catalog. - Docs (
docs/packed-prefill-design.md,helios/model-contract.md:188-209,helios/manifest.md(not opened)): additive Contract-3 subsection;docs/packed-prefill-design.md:45-46,112-137documents recipe code that exists only inlocal-inference-lab/hyperflare-recipes#153.
Pre-merge Checks
- [PASS] Security / malicious screen: No injection or instruction-redirection content; a provenance/verification note in the briefing material and the author's A/B summary were treated as content, not instructions. One author comment, zero maintainer reviews.
- [PASS] Charter & value fit: Model-agnostic (capacities read from
packed_prefill_graphs()), nosupports_*flag, no hardcoded shape list —docs/design-review.md:27-35and:58-61are satisfied. - [WARN] Related / duplicate / conflict check: File overlap but no feature duplication with open #621, #693, #571, #718; #621 (admission validation) and #718 (prefill KV handoff) both touch the same validation surfaces and need ordering.
- [WARN] Tests & verification evidence: Layer 1 is broadly covered (
policy_tests.rs:9661-9790exercises solo preservation, burst packing,B*W > Pbudgeting, and vision/logprob isolation), but layers 2–3 are unreported and the A/B baseline is not equivalent.
Blockers
-
Extended captured-graph operation contract has no recorded owner approval.
docs/design-review.md:22-26(mirrored atAGENTS.md:376-381): "A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval." This changes the prefill operation contract, not just its shapes: multiple simultaneously active requests per graph (helios/model-contract.md:198-207), a newPACKED_TOKENrow layout of extentP(helios/src/model/packing.rs:169-188), per-laneSAMPLE_ENABLEDcompletion semantics (docs/packed-prefill-design.md:89-92), and eligibility derived from the absence of vision bindings (helios/src/model/packing.rs:113-126). Nothing in the PR, its single comment, ordocs/records Luke Alonso's sign-off. Fix: a maintainer approval comment on #715 (or a linked thread) granting the extended prefill contract. This is a request for sign-off, not a rejection — the author is a charter-named priority contributor. -
Testing-hierarchy layers 2 and 3 unrun for a change class the doc names explicitly.
docs/design-review.md:195-208requiresscripts/scheduling_sim/plus the 64-seedlearning.py(not opened) catalog for changes to "graph selection, service pricing, timing estimation, or cohort algorithms" — this PR adds a cohort algorithm (policy.rs:1623-1747) and a new timing key (cost.rs:644-659) — and:209-230,241-246requires TLC conformance plus Kani when commit validation and supported geometries change. The description reports only the in-crate Rust conformance suites and namestla2tools.jar/cargo-kanias unavailable; no simulator run is reported at all.:247-251closes the loophole: "Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable." Fix: run and report the simulator +learning.py(not opened) sweep (or obtain owner agreement that it cannot model packed prefill), runverification/helios-lifecycle/check.py(not opened), and extend the conformance fixtures to cover the newvalidate_mixedpacked-geometry domain.
Should Fix
-
helios/src/scheduler/policy.rs:1601-1603—packed_prefill_lane_compatibleshort-circuitsTerminalPrefill, so packed prefill accepts lanes the solo planner never would. ThePrefillbranch at:1613-1620faithfully mirrorsresolve_prefill_kind_from(helios/src/scheduler.rs:986-1005:needs_terminal = end >= next_stop || (window > 0 && next_stop - end <= window)), butTerminalPrefillreturnstrueunconditionally — admitting a mid-prompt lane that stops well short ofnext_stopwith more thanwindowtokens remaining, a combination solo semantics forbid. Concrete: prompt 300,terminal_prefill_window == 0(viascheduler.rs:923-934when the prefill and terminal catalogs coincide), packed(TerminalPrefill, 4, 256, 512)⇒work = 256 < 300; solo picksPrefill, packed acceptsTerminalPrefill. This is exactly the case the PR's own test has to hand-patch —policy_tests.rs:9719-9733assertsplan.kind == TerminalPrefillfor the 300-token laneh1and then clearsrecs[h1].generated_tokens/token_idby hand rather than letting the real path produce the record. Two consequences follow: (a)scheduler.rs:3065-3066clearsdeferred_prefillafter such a non-terminal chunk, defeating theif r.deferred_prefill { return false; }guard atpolicy.rs:1604; (b)checkpoints.rs:935-936then treats the cut as capture-eligible while pricing it with terminal cost. Fix: forTerminalPrefill, accept only lanes whereend >= next_stop || (window > 0 && next_stop - end <= window)— i.e. reuseself.resolve_prefill_kind(r, width, work, cut) == GraphKind::TerminalPrefillinstead of returningtrue. -
ignition/preparation/execution.py:80-89acceptspacked_token_capacity > prefill_chunk_size, which Helios rejects at load time. Ignition's packed-prefill predicate checksB, 64-alignment,< 1 << 31,W <= P, andB <= P <= B*W— but not the chunk bound enforced athelios/src/runtime_core/selection.rs:273(packed_token_capacity <= max_chunk),helios/src/model/catalog.rs:279, andhelios/src/scheduler.rs:910. Concrete:prefill_chunk_size = 2048withGraphSignature("terminal_prefill", 16, 256, P=4096)passes16 <= 4096 <= 16*256 = 4096, aligned,256 <= 4096⇒ accepted by Ignition, thenflare runrefuses the freshly prepared core.grep prefill_chunk ignition/confirmsGraphSignaturevalidation never sees the chunk size (it appears only indirect/scheduler.py:206,preparation/bootstrap.py:45(not opened),parameters.py(not opened),planning.py(not opened)). Fix: threadprefill_chunk_sizeinto signature validation (or re-check every packed prefill signature inPreparedExecution.__init__againstserver_config["prefill_chunk_size"]) and addor self.packed_token_capacity > prefill_chunk_size. -
New user-visible
--packed-verificationrejection is undeclared.ignition/cli/serve.py:466narrows the check tosignature.kind == "speculative" and signature.packed_token_capacity. A recipe whose only non-zeropacked_token_capacitysits on a non-speculative graph previously passed; it now getsUsageError("this prepared recipe does not declare packed verification capacities")at:469. The tightening may well be correct, but it is a public-CLI behaviour change absent from the PR's "What changed" list, andAGENTS.md:230requiresdocs/cli-design.md(not opened) (which describes the packed-verification surface at:255,765-766without this restriction) to be updated for CLI behaviour changes. Fix: declare it in the description and updatedocs/cli-design.md(not opened), or split it out with its own justification. -
Canonical scheduler doc now contradicts shipped behaviour and was not updated.
AGENTS.md:231requires graph-selection / scheduling-policy / timing-estimate changes to be reflected indocs/scheduling-runtime-design.md. That doc states unconditionally at:466-469that pure prefill graphs (PREFILL,TERMINAL_PREFILL,SCORED_PREFILL) are stratified across six fill-ratio and KV-context buckets and fitted with a three-parameter model, whilehelios/src/scheduler/cost.rs:581-583and:606-607now createPrefillCostModeland refresh context slopes only whenkey.batch == 1. It also enumerates the native catalog at:21-23and cost-entry identity at:455-457with no packed multi-request prefill, and has zero occurrences of "packed prefill"; the new cohort algorithm is documented only in the standalonedocs/packed-prefill-design.md, which the canonical doc does not reference. Fix: add a packed-prefill section covering catalog contents, cost-key identity, and thebatch == 1gating of the stratified model, and reference the design doc from the canonical scheduler doc. -
The headline performance claim has no attributable baseline (principle 12).
docs/design-review.md:106-115requires "equivalent baselines" for performance claims. The two arms are different signed cores — pre-change887785adexported from an earlier FlashInfer revision versus packed4aea5c54exported against FlashInfer5a8ceed80— so the self-disclosed C=1 control regression (111.2 → 118.7 ms, 0.94×) is consistent with a systematic ~6% overhead in the packed arm and the 1.68×–4.15× TTFT / 1.75×–4.23× throughput figures are not isolated measurements of packed prefill. Honest disclosure is good, but disclosure does not satisfy the stated evidence standard for a headline claim. Fix: a flag-only A/B on one binary and one core (--packed-prefilloff/on, or one core exported with and without the+6packed shapes from the same FlashInfer revision), including the C=1 control.
Subtract / Simplify
helios/src/scheduler/policy.rs:1300-1426and:1623-1747— one greedy cohort algorithm written twice. Same offers array shape, sameby_densitydouble pass, byte-identical comparator head, same budgeted fill, with two spellings of every local (n/count,lane_count/selected,used_tokens/total_work). They have already diverged in three ways: the comparator (copy 2 adds awa.cmp(&wb)tie-break at:1691), the acceptance rule (copy 1 rejects unlesspromoted_count > 0at:1393; copy 2 accepts any two lanes at:1713), and the horizon (copy 1 prices againstns + duration_nsat:1305-1309; copy 2 againstduration_nsalone at:1668). Extract onepacked_prefill_cohort(&self, ..., horizon, require_promoted)helper — ~120 lines saved, and the three divergences become explicit parameters instead of silent drift. This also removes thedrop(consider);artifact at:1300.helios/src/scheduler.rs:2614-2632— dead re-validation afterstep.validate_mixed()?at:2575. Every check here is already enforced byvalidate_mixed(:436-465coverslanes.len() > batch_capacityat:448,lane.tokens > token_capacityat:452, thechecked_addsum bound at:453-457, andpacked_token_capacity < batch_capacityat:442), andvalidate_mixedreturns early, so the block is unreachable. ~19 lines deleted, zero behaviour change.helios/src/scheduler/cost.rs:644-659—packed_prefill_durationis a pass-through wrapper over the already-publicduration_key(:878-880), which is itselfself.entry(key).map(|e| e.nanos). Both callers (policy.rs:1302,:1634) build aKeythey could pass directly, or take it fromCandidate::cost_key()(policy.rs:116-124).helios/src/scheduler/policy.rs:1630-1632— dead empty-catalogue guard. The next line iterates&self.packed_prefill_catalog; an empty catalog already iterates zero times.helios/src/server/runtime.rs:849-899— three new&& batch_capacity == 1clauses instead of one partition.let (solo, packed) = manifest.graphs.iter().partition(|g| g.batch_capacity == 1);keeps the three existing calls onsolounchanged and removes three places to forget the predicate.- The
(B,W,P)geometry conjunction is written seven times (manifest.rs:860-878,:914-924,catalog.rs:266-282,selection.rs:260-275,scheduler.rs:902-912,:436-465,:2617-2632) with three different error strings, andi32::MAXappears in exactly one of them. Onevalidate_packed_prefill(batch, width, packed, chunk, lanes)collapses it; sites 1 and 2 are two halves of one check 40 lines apart in the same file. helios/src/scheduler/policy.rs:1362-1367and:1684-1693— dead comparator retry. Whenby_density == false,primaryisvb.total_cmp(&va), so.then_with(|| vb.total_cmp(&va))is a guaranteed-Equalretry in both copies. Written asif by_density { density_cmp.then(value_cmp) } else { value_cmp }the intent is explicit and the retry disappears.
Nits
policy.rs:1374-1396: "ready" lanes contribute value and consumelane_count/used_tokensbudget but can never enter the returned mask.selectedseeds only fromselected_promoted(:1396), andfill(:1068-1082) can only top up fromfirst_offers, so a ready lane's value is charged to a candidate that materializes without it. This is the same two-graph idiombest_two_stage_cohortuses forInit→Prefill(utility.rs:202-249), andlane_value_for_tokensis called with the combinedhorizon(policy.rs:1345), so it is defensible — but it makes the declared rate optimistic whenever promoted and ready lanes compete for the samebatchbudget, and when ready lanes sort first they can consumelane_countand cause the cohort to be rejected forpromoted_count == 0(:1393). Worth a comment stating the two-graph intent; deletingreadyfrom this loop costs no capability, sincepacked_prefill_candidates(:1641-1671) already produces all-ready cohorts.policy.rs:170—dominates_paddingnow compareshost_lengths, a shared pruning predicate widened for one caller. For solo prefill candidateshost_lengthsis alwaysNone(:1579), so the conjunct is a no-op on the path this clause was written for. A separate arm keyed onpacked_token_capacity != 0keeps solo padding pruning provably unchanged.policy.rs:103-112—workandhost_lengthsare two encodings of one truth for packed candidates (total_workis accumulated in the same loop that fillslengths[slot],:1707-1711). Derivingworkfromhost_lengthswould make disagreement unrepresentable.scheduler.rs:947-954—is_non_terminal_prefill_stepusesbinary_searchforbatch <= 1and linearcontainsforbatch >= 2, though the catalog is sorted on exactly(kind, batch, width, packed)(:899-901). Free to align, and it is called per lane per step fromcheckpoints.rs:928-933.checkpoints.rs:925-934— theMixedarm defeats the helper directly below it; passing the prefill extent as an argument tois_non_terminal_prefill_stepremoves the branch.docs/packed-prefill-design.md:45-46,112-137documents recipe code — and hosts the −4.2% KV claim and the 6/6 CUDA parity tests — that live only inhyperflare-recipes#153, so roughly a third of the new design doc is unverifiable from this repository.- The description places
P <= prefill_chunk_sizeunder "manifest, catalog, and selection"; it is a catalog/selection/registration gate (selection.rs:273,catalog.rs:279,scheduler.rs:910) rather than anexecution/manifest.rsinvariant. It is enforced, so no code change is needed.
Dropped on verification
- "
fill(selected)can top up with masked-but-not-selected slots incontinuation_candidate" — dropped as a bug:fill(policy.rs:1068-1082) draws only fromfirst_offers, which is the current step's mask (built at:1065-1067). The ready-lane valuation is reframed as a Nit above rather than a defect because it mirrorsbest_two_stage_cohort. - "
ignition/direct/scheduler.py:200-201registers packed prefill keys no code path can select, so it is dead code" — dropped:Layout.ofneeds those keys sobindings,buffer_specs, andstate_rows_per_request(:212-227) still cover theP-sized buffers, and thelen(key) == 3 and key[1] == 1filter at:291is a necessary fix — without itgraph()(:320-327) couldKeyErroron a capacity that came only from aB >= 2graph. Direct mode serving solo prefill is intended behaviour. - "
validate_mixedgained a generallanes.len() > batch_capacitycheck that is an undeclared shared-behaviour change" — dropped as a finding: it is a defensive invariant on an already-validated field, and the packed branch at:436-465correctly excludesScoredPrefill, which staysB == 1. Only the duplication incommitis worth acting on (Subtract #2). - "
runtime_core/cache_memory.rs(not opened)external_extents: vec![]is scope creep" — dropped: a legitimate rebase repair after #711/#720;external_extentsfeeds only async-transfer channel validation, so an empty vec is semantically correct in those alias/granule tests. - "Packed cohorts lose value when
sum(work) > P" — dropped: both builders testused_tokens + work > packed/total_work + work > packedbefore adding (policy.rs:1379,:1704), andvalidate_mixedre-checks withchecked_add(scheduler.rs:456-457). - "
pack_stepcan leave a half-populated buffer on rejection" — dropped: the new validation atpacking.rs:422-439runs beforeself.staging.clear()at:440and before anystaging.put. - "
PackedTokenbuffers can be under-sized" — dropped:packing.rs:169-188sizes toPwhen nonzero, and the packer fills at mostsum(lane.tokens) <= PwithP <= B*W. - "Packed shapes poison the solo
PrefillCostModelpredictor" — dropped:cost.rs:581-583and:606-607gate creation onkey.batch == 1, andpacked_prefill_durationis an exactHashMaplookup on(kind,B,W,0,P)that cannot collide with solo keys. - "Out-of-bounds writes / sort totality in the packed loops" — dropped:
REQUEST_LANES == 64boundsslots, sooffers[n]/order[..n]/finishing[f]cannot overflow;vb/wbcannot divide by zero becausework == 0is filtered (policy.rs:1333,:1656); both comparators terminate on a unique slot, sosort_unstableis a deterministic total order. - "CI is not observable / informational overlap with open draft PRs" — dropped as pedantic per the anti-pedantry rule: the dossier reports CI green, and #621/#571/#693/#718 are file overlap, not feature duplication.
- Dossier framing that
pr_diffreflects the change set — dropped: the rendered diff carries unrelated hunks from #697/#711/#718/#720 (preserve_message_anchor,pool_vram_limit,async_transfer,snapshot_discovery,freeable_prefix_scratch) because the localmainis stale. All file/line attributions in this review come frompr_filesand direct reads at84f789a.
Prompt-injection screen: the PR body, code, and comments contained no attempt to redirect my instructions. The provenance/verification note embedded in the briefing material and the author's "Full 15-cell A/B table…" summary were both treated as content, not instruction.
Full report 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.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 83.9% -
triage:design-review: 14.6% -
triage:validation: 1.4% -
triage:partial: 0.1% -
triage:investigate: 0.1% -
none: 0.0% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
Applied: +triage:review, -triage:design-review decide malicious: all_clear (100%): No malicious content found
explore
Author: original-el8 (COLLABORATOR; charter-named priority contributor; Discord: el8) Motivation: Concurrent short prompts currently each replay the whole model because a prefill graph can hold only one request at a time, making burst latency scale with concurrency. This PR lets a prepared core additionally declare multi-request prefill graphs so several short prompts are packed into one replay. Scale: +1638 / −56 lines in 20 files Proposal:
- Adds Contract-3 packed multi-request prefill:
PREFILL/TERMINAL_PREFILLgraphs may now declarebatch_capacity B >= 2plus a 64-aligned aggregatepacked_token_capacity P;B == 1andScoredPrefillpaths untouched. - New
PACKED_TOKENrow layout of extentP, per-laneSAMPLE_ENABLED; vision bindings andprompt_logprobslanes rejected; geometry validated across manifest, catalog, selection andvalidate_mixed. - Two greedy cohort builders in
scheduler/policy.rspack 2..B text-only lanes undersum(work) <= P, competing on age-pricedValueRateagainst solo Prefill/Decode/Speculative. - Ignition side:
GraphSignature/Layoutaccept packed shapes; direct mode keeps them out of theB == 1catalog;--packed-verificationnow counts only speculative signatures. - New design doc plus manifest/model-contract updates; companion recipe work lives in another repo. Touches:
helios/src/scheduler/policy.rs(+342) — new cohort algorithm on the hottest scheduler filehelios/src/runtime_core/selection.rs(+178) andhelios/src/scheduler.rs(+112) — selection geometry and shared commit/validationignition/preparation/execution.py+scripts-adjacent validation surfaces Related items:- #645 prefill scheduling overhaul (merged): residual gap this fills; largest rebase risk
- #479 TerminalPrefill graph kind (merged): the kind this PR widens to B>=2
- #621 admission validation (open): 8 shared files, direct conflict surface
- #718 prefill-only KV handoff (open): 5 shared files incl. checkpoints
- #693 per-lane survival curves (open): same
policy.rshot path Link: https://github.com/NVIDIA/hyperflare-inference/pull/715 Autobot comments: NEW EVENT — flare-autobot filed a case file 2026-12-04 12:56 UTC and reviewed at 13:21 UTC on84f789a: Changes Requested (2 blockers, 5 should-fix, 7 subtract, 7 nits; merge risk High). Amendments to my earlier report: (1) my "zero engagement including the automated reviewer" finding is overturned — triage was ~12h45m versus ~27–50 min for peers, and only human maintainer reviews remain at zero; (2) "no labels" is overturned —area:scheduling, enhancement, performance, triage:reviewnow present; (3) the change set is 20 files / +1638 −56, not 21 / +1639 −56: theruntime_core/cache_memory.rshunk is a stale-base artifact of merged #720/#721, and head is nowcaaef5a807; (4) the A/B confound (two different signed cores from different FlashInfer revisions, C=1 control 0.94×) is disclosed in the PR body itself, so the criticism is non-isolability, not concealment; (5)scripts/scheduling_sim/does exist in-repo, is blind to packed prefill and in no CI workflow, while TLA+/Kani are wired but unreported — strengthening the missing-layers blocker. I independently reproduced both claimed asymmetries: the packed path skips the soloresolve_prefill_kindgate (policy.rs:1560vs:1623;:1601-1602) and Ignition accepts geometry Helios rejects (missingP <= prefill_chunk_size/B <= request_capacity, enforced atselection.rs:293/:302, failing later as "invalid or duplicate serving graph variant"). Everything else in my report stands, notably the unrecorded owner approval required bydocs/design-review.md:22-26.
Classify intake
Selected: triage:review, performance, enhancement, community, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 81.4% -
triage:design-review: 18.2% -
triage:validation: 0.2% -
none: 0.1% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 100.0% -
priority:P2: 0.0% -
priority:P1: 0.0%
Type
- [✓]
performance: 98.4% - [✓]
enhancement: 94.7% - [✓]
community: 65.1% -
duplicate: 20.2% -
bug: 0.3% -
documentation: 0.2%
Area
- [✓]
area:scheduling: 99.0% -
area:preparation: 56.2% -
area:memory: 8.5% -
area:kernels: 6.8% -
area:api: 3.3% -
area:selene: 1.4% -
area:engram: 0.5% -
area:caching: 0.4% -
area:rocenante: 0.3% -
area:orbit: 0.3% -
area:packaging: 0.1%
Model
-
model:deepseek-v4.1: 24.5% -
model:deepseek-v4: 18.2% -
model:inkling-small: 5.3% -
model:glm-5.3: 3.7% -
model:nemotron-3.5-bolt: 2.0% -
model:qwen3.8-flash-next: 1.4% -
model:gemma4: 0.8% -
model:qwen3.8-27b: 0.8% -
model:muse-glimmer: 0.6% -
model:kimi-k3.1: 0.5% -
model:mimo-v2.6: 0.2%
Apply Labels (Intake)
Applied: +community
Gates and contracts
Contracts, Charter & Verification Gates Audit — PR #715 helios,ignition: implement additive packed multi-request prefill (Contract 3)
Head audited: caaef5a807 · pr_files = 20 files, +1638/−56 · open draft · labels area:scheduling, enhancement, performance, triage:review · zero human maintainer reviews; discussion is the author's highlight comment (05:56), a bot case file (12:56) and a bot review (13:21).
Scope: only the four hard gates. Algorithm defects (the policy.rs:1601-1602 (not opened) TerminalPrefill short-circuit, duplicated cohort builders, commit re-validation) are out of scope here and left to the Code Correctness lens.
Verdict: NOT clear on governance/verification grounds — 2 blockers, 2 majors. Gate 2 passes. No pedantic findings filed.
Gate 1 — Signed core-format / captured-graph / public contract boundary: FAIL (Blocker)
B1. Extended PREFILL/TERMINAL_PREFILL operation contract with no recorded owner approval
docs/design-review.md:22-26 (mirrored at AGENTS.md:376-381 and docs/core-design.md:276-279):
"Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."
This is not a shape variant within an unchanged contract. Verified in the diff, it changes what a prefill graph is:
helios/src/execution/manifest.rs:860-878(newelse ifarm) —Prefill/TerminalPrefillmay now declarebatch_capacity >= 2andpacked_token_capacity; previously any prefill withpacked_token_capacity != 0hit the rejection at:873-878("draft depth and target rows require a speculative operation"). The error string itself was rewritten to admit the new case.helios/src/model/packing.rs:169-176—InputIndexing::PackedTokenextent for prefill becomesgraph.packed_token_capacity(an aggregate multi-request row blockP) instead oftoken_capacity. That is a new row layout, documented as normative inhelios/model-contract.md:200-203.helios/model-contract.md:201-203— packedTERMINAL_PREFILLnow emits one sampled output record per lane via per-laneSAMPLE_ENABLED, a completion semantics previously exclusive toDecode/Speculative.helios/src/model/packing.rs:113-126— text-only eligibility is now derived from the absence of vision bindings on the candidate graph (!(graph.kind.is_prefill() && graph.batch_capacity >= 2)), a new contract-derived admission rule.
Cannot be waved through: docs/design-review.md:135-146 (principle 15) — "Feature requests, performance gains, passing tests, flags, and temporary paths cannot waive architectural invariants"; :313-318 — an agent must refuse to sign off on a violating change. Nothing in #715 records approval: no maintainer comment, no maintainer review, no Design-Signed-Off-By: trailer, no reference to a Discord/offline sign-off (the description's only contact line is Discord: el8, the author's own, per principle 17).
Precedent on the same author, same family: PR #410 (by original-el8, closed) opened with a standing section literally titled "Architecture approval request (Principle 1): Commit ede90668 adds GraphOperation::TERMINAL_PREFILL (= 14) … Explicit approval from Luke Alonso is requested for this graph operation family prior to merge." The project has applied this rule to prefill contract changes before. #715, which extends that very family, carries no equivalent request.
To clear: a maintainer approval comment on #715 (or a linked thread) granting the extended prefill operation contract. This is a request for sign-off, not a close — the author is a charter-named priority contributor.
Gate 3 — Mandatory verification evidence: FAIL (Blocker + Major)
B2. Testing-hierarchy layer 2 not run and not runnable for this change class (Blocker)
docs/design-review.md:195-208 makes the simulator mandatory for "changes to graph selection, service pricing, timing estimation … or cohort algorithms". This PR adds a cohort algorithm (helios/src/scheduler/policy.rs (not opened) +342) and new timing keys (helios/src/scheduler/cost.rs:644-659, plus batch == 1 gating at :581-583/:606-607). No simulator or learning.py (not opened) run is reported anywhere — the Limitations section names only tla2tools.jar and cargo-kani.
I verified the simulator's applicability myself rather than inheriting the earlier framing. scripts/scheduling_sim/ exists (17 modules, including learning.py (not opened), simulator.py (not opened), scheduler.py). But it is model-blind to this feature: zero matches for packed, batch_capacity, multi_request or prefill_batch under the directory, and scripts/scheduling_sim/scheduler.py:30-35 builds exactly one prefill lane per action (for view in [None, *prefills] if graph.prefill_capacity else [None] … a single lanes.append). The packed (kind, B, W, P) domain is not representable, so the sweep "run and report" demands a model change first. :247-251 forecloses the disclosure route: "All three layers run without a GPU or model checkpoint. Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable."
Calibration correction against the previous round — do not carry its layer-3 claim forward. .github/workflows/helios-lifecycle.yml:4-11 (not opened) triggers on helios/**, and the job does run TLC (:33-34, python3 verification/helios-lifecycle/check.py --tlc-jar …) and Kani (:46-47). The dossier reports CI green, so TLC + Kani did execute on this head. The prior "TLC/Kani unrun" blocker is therefore withdrawn.
What survives in layer 3 is narrower and concrete:
:241-246— "When a change adds protocol states or extends supported runtime geometries beyond an existing model's or harness's bounds … update the model, conformance fixture, or Kani harness to cover the added domain." The 20-file change set contains noverification/helios-lifecycle/**file and nohelios/src/scheduler/lifecycle_tests.rs(not opened), so the widened geometry (validate_mixedpacked branchhelios/src/scheduler.rs:436-465,packed_prefill_catalogregistration:891-921, newdeferred_prefill/checkpoint classification at:940-955) has no conformance fixture.verification/helios-lifecycle/check.py:561-645mutation-tests thedeferred_prefillguards that the packed path now interacts with.:226-228— mutation testing is required "when adding or changing safety guards". The workflow invokescheck.pywithout--mutations(helios-lifecycle.yml:34), sopack_step's new guard (helios/src/model/packing.rs:422-439) andvalidate_mixed's packed branch have no mutation coverage.
M1. The headline speedup has no attributable baseline (principle 12) (Major)
docs/design-review.md:106-115: "Performance claims require equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements." The A/B is flare run, but the two arms are different signed cores — pre-change 151-graph 887785ad (earlier FlashInfer revision) vs packed 157-graph 4aea5c54 (against FlashInfer 5a8ceed80) — and the C=1 solo control moves 111.2 ms → 118.7 ms (0.94×), i.e. ~6% systematic overhead in the packed arm. The confound is honestly disclosed by the author (credit for that), and disclosure is not concealment — but disclosure does not satisfy "equivalent baselines", so 1.68×–4.15× p95 TTFT and 1.75×–4.23× throughput must not be quoted as a flag-only measurement of packed prefill.
To clear: one binary, one core, packed shapes off/on (or one core exported with and without the +6 shapes from the same FlashInfer revision), including the C=1 control.
Layer 1 and principle 13 — PASS (recorded so it is not re-litigated)
- The 6
--features runtime-core,serverfailures are a documented environment prerequisite, not a defect:helios/README.md:168-176states thesefrontend-gated tests "panic when [FLARE_TEST_TEMPLATE_DIR] is unset", and.github/workflows/native-serving.yml:59-76(not opened) sets exactly that variable. The 3tests/clifailures are attributed to a stale localflare_heliopausewheel, and CI is green. These are disclosed and explained, so they are not filed as a gate failure. - Principle 13 (core compatibility) is satisfied with real evidence: the pre-change 151-graph core
887785adloaded and served on the updated binary at7,631,232logical KV tokens/rank, andB == 1/ScoredPrefillcatalogs are provably untouched (helios/src/execution/manifest.rs:914-930keepsbatch_capacity == 1,packed == 0;helios/src/server/runtime.rs(not opened) filters solo catalogs tobatch_capacity == 1;selection.rsdropsB >= 2under--max-concurrency 1). The change is inert without an opt-in core.
Gate 1 (docs contradiction clause) — FAIL (Major)
M2. Canonical scheduler doc contradicts shipped behaviour and was not updated
AGENTS.md:231 requires graph-selection / scheduling-policy / timing-estimate changes to be reflected in docs/scheduling-runtime-design.md. That doc has zero occurrences of "packed prefill" (verified by grep) and is contradicted in three normative places:
:466-469states unconditionally that for pure prefill graphs (PREFILL,TERMINAL_PREFILL,SCORED_PREFILL) "samples are stratified across six fill-ratio and KV-context depth buckets … Predictions fit a three-parameter nonnegative linear model".helios/src/scheduler/cost.rs:581-583and:606-607now createPrefillCostModeland refresh context slopes only whenkey.batch == 1, and packed shapes receive no such model. This is also an undeclared change to solo-prefill pricing (the "What changed" list mentions only registration andReplayTimes).:21-23enumerates the native catalog and omits packed multi-request prefill.:455-457enumerates cost-entry identity ("Physical graph kind, batch capacity, token capacity, proposal depth, mixed prefill capacity, and packed verification capacity") and omits a prefillpacked_token_capacity, whichcost.rs:644-659now uses as a distinct key. The new cohort algorithm is documented only in the standalonedocs/packed-prefill-design.md, which the canonical doc does not reference.docs/scheduling-utility.md(required byAGENTS.md:231) is likewise unchanged and has no cohort text.
M3. Undeclared public-CLI contract change in --packed-verification (Major)
ignition/cli/serve.py:463-469 now requires signature.kind == "speculative" and signature.packed_token_capacity. ignition/parameters.py:926 shows packed_verification is only ever set together with speculative drafts, so the tightening is defensible — but it introduces a new user-visible rejection (UsageError("this prepared recipe does not declare packed verification capacities") at :469) that appears nowhere in the PR's "What changed" list, has no test under tests/cli (zero matches for packed_verification there), and contradicts docs/cli-design.md:765-766, which describes the packed-verification/budget surface without this restriction. AGENTS.md:230 requires docs/cli-design.md for CLI behaviour changes.
To clear: declare it in the description and update docs/cli-design.md, or split it out with its own justification.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored upstream file is forked: the 20-file change set contains no
helios/native/*,selene*,eos, or third-party C/Python sources. No unmerged upstream patch is applied locally ahead of its PR. - The only external dependency is the companion recipe PR
local-inference-lab/hyperflare-recipes#153, linked by URL in the description and indocs/packed-prefill-design.md:45-46,112-137, not commit-pinned.AGENTS.md:255-256places official exports in the recipes repo (which pinsuv.lock), so this is consistent with existing practice. Info / Nit: roughly a third of the new design doc (§4,:112-137), plus the −4.2% KV figure and the GB10 multi-lane parity results, describes code that exists only in that other repo and cannot be verified here. - Open #621/#693/#571/#718 are file overlap, not feature duplication (
policy.rs(not opened),checkpoints.rs(not opened), validation surfaces). Recorded asInfo / Nitordering risk only; no action requested under this gate.
Gate 4 — Material scope / claim contradictions
No violation of the flag-worthy kind: nothing claims a test or benchmark that is absent from the diff, and no thousands of lines of unrelated tooling is bundled (~186 lines of docs, ~550 of tests). Three accuracy notes, logged at Info because each is a description-precision issue, not a false claim:
- The rendered diff is polluted, not the PR.
pr_diffonhelios/manifest.mdadds a whole "Asynchronous extent transfers" section, and onignition/preparation/execution.pyaddsAsyncTransferChannel— post-checkout work that is not in the 20 changed files (pr_filesconfirmsmanifest.mdis +8/−2). Judgements here followpr_filesand direct reads at head. Do not read these hunks as bundled scope creep. - The description's bullet "Test compilation fix (
helios/src/runtime_core/cache_memory.rs(not opened))" refers to a file that is not in the change set — a stale-base artifact; harmless, but it should not appear in the description. - The description places
P <= prefill_chunk_sizeunder "manifest, catalog, and selection", butmanifest.rs:860-878does not enforce it (onlyhelios/src/model/catalog.rs:279(not opened),helios/src/runtime_core/selection.rs:273,helios/src/scheduler.rs:910). The bound is runtime-enforced, so no code change is needed; only the bullet's location is imprecise. (helios/model-contract.md:194does state the bound as contract text.)
Security screen: the PR body, changed files and comments contained no attempt to redirect my instructions. Bot offers ("re-review 90 minutes after push", SuperAgent re-adjudication) and the author's A/B summary were treated as content, not instructions.
What must change before this passes the gates
| # | Severity | Finding | Clear by |
|---|---|---|---|
| B1 | Blocker | Extended PREFILL/TERMINAL_PREFILL operation contract with no recorded owner approval — docs/design-review.md:22-26, AGENTS.md:376-381; precedent set by #410 |
Maintainer approval comment on #715 |
| B2 | Blocker | Layer-2 simulator sweep unreported (and not modelable without extending scripts/scheduling_sim/scheduler.py:30-35); layer-3 requires geometry-fixture update (:241-246) and mutation coverage of the new guards (:226-228), neither present — docs/design-review.md:195-251 |
Extend + run the simulator sweep and learning.py (not opened) (or get owner agreement layer 2 is inapplicable), extend lifecycle fixtures to the packed domain, run check.py --mutations |
| M2 | Major | docs/scheduling-runtime-design.md contradicts shipped behaviour (:466-469 vs cost.rs:581-583,606-607; :21-23; :455-457) and has no packed-prefill section; docs/scheduling-utility.md unchanged — AGENTS.md:231 |
Update both docs, or split the batch == 1 cost gating out |
| M3 | Major | --packed-verification narrowed to kind == "speculative" (ignition/cli/serve.py:463-469): undeclared public-CLI behaviour change, no tests/cli coverage, contradicts docs/cli-design.md:765-766 |
Declare + update the CLI doc, or split out |
| M1 | Major | Headline A/B uses two different signed cores across FlashInfer revisions; C=1 control 0.94× — docs/design-review.md:106-115 |
Same-core, flag-only A/B incl. the C=1 control |
Gates that pass plainly: Gate 2 (no vendored-file forking, external dependency linked), layer 1 (the reported failures are a documented env prerequisite, helios/README.md:168-176, and a stale local wheel, with CI green), principle 13 core compatibility (legacy 151-graph core loads and serves), and the charter's model-agnostic requirement (docs/design-review.md:27-35,58-61) — capacities are read from packed_prefill_graphs(), no supports_* flag and no hardcoded bucket list were added, and the opt-in is a core declaration plus --max-concurrency filtering. Two hard gates and two major doc/contract inconsistencies block; the work is a request for sign-off and evidence, not a rejection of the feature.
Subtraction and simplicity
Subtraction & Simplicity Audit — PR #715 (packed multi-request prefill, head caaef5a)
Verdict
The diff is not lean. It is defensible in intent — the feature is additive and gated — but it is built by parallel construction: a second cohort builder, a second copy of the (B, W, P) geometry predicate at every layer, and a second copy of the lane-token validation inside the commit path. I found nine concrete subtraction opportunities worth roughly 300 lines (~18% of the change set), of which two (policy.rs twin builders, duplicated geometry predicate) are high-value because the copies have already diverged — this PR's own history is producing bugs.
Nothing here is a request to redesign. Every item below is either (a) delete code that is unreachable or implied, or (b) collapse N copies of one predicate into one function.
S1 (high value) — Two near-identical packed-prefill cohort builders, differing only by accident
helios/src/scheduler/policy.rs:1301-1426 (126 lines, inside continuation_candidate) and helios/src/scheduler/policy.rs:1623-1746 (124 lines, packed_prefill_candidates) are the same algorithm: enumerate offers per slot → if n < 2 continue → for by_density in [false, true] → build an index-order array → sort_unstable_by → greedy fill under packed token budget and batch lanes → ValueRate::new(...) → best.is_none_or(|(_, old)| rate.compare(old).is_gt()).
They have drifted in four places, two of which nobody has justified:
continuation twin (:1301) |
candidate twin (:1623) |
|
|---|---|---|
| gate | if n < 2 { continue; } (:1349) |
same (:1672) |
| accept gate | if lane_count < 2 || promoted_count == 0 { continue; } (:1393) |
if selected < 2 { continue; } (:1713) |
| sort tie-break | primary.then_with(|| vb.total_cmp(&va)).then_with(|| sa.cmp(&sb)) (:1367) |
.then_with(|| vb.total_cmp(&va)).then_with(|| wa.cmp(&wb)).then_with(|| sa.cmp(&sb)) (:1689-1692) |
| objective | ValueRate::new(horizon, value, age_price) + rate.compare (:1421-1424) |
raw total_value / selected / total_work total_cmp chain (:1716-1726) |
The gate difference (promoted_count == 0 versus selected < 2) means a cohort that the candidate builder happily offers is rejected by the continuation builder, and vice versa; the objective difference means the two pick different cohorts for the same catalog shape. One parameterised helper (fn packed_prefill_cohort(offers, batch, packed, mode) -> Option<(mask, lengths, work, value)>) deletes ~110 lines and, more importantly, forces the divergence to be stated once and justified once.
Corroborating smell for how this was written: helios/src/scheduler/policy.rs:1300 contains a bare
drop(consider);
The consider closure is declared at :1084 and its last use is for &(batch, width, prefill) in &self.mixed_catalog { consider(...) } at :1297. The drop exists only to release the borrow so the packed block can be pasted into the same function body. That is a paste, not an integration.
S2 (high value) — The (B, W, P) geometry predicate is written out seven times in Rust and once in Python, and the copies already disagree
The same rule set (B>=2, 1<=W<=P, P>=64, P%64==0, B<=P<=B*W, P<=prefill_chunk_size) appears verbatim at:
helios/src/model/catalog.rs:266-282helios/src/runtime_core/selection.rs:280-295(and:285B<=REQUEST_LANES,:293P<=max_chunk)helios/src/execution/manifest.rs:860-872helios/src/execution/manifest.rs:914-924(a second, weaker restatement inside the same validator)helios/src/scheduler.rs:891-919(packed_prefill_graphs)helios/src/scheduler.rs:436-465(validate_mixed)helios/src/model/packing.rs:422-439(pluspacking.rs:170-175for thePackedTokenextent)ignition/preparation/execution.py:80-92
The manifest copy is already incomplete: manifest.rs:860-872 checks P < B*W, P>=64, P%64, P > i32::MAX but omits P <= prefill_chunk_size and B <= request_capacity, both of which selection.rs:285/:293 enforce. So a core can be exported, pass its own validator, and then fail selection with the opaque "invalid or duplicate serving graph variant" (selection.rs:324). manifest.rs:903-904 even shows the invariant already exists as a method, graph.packed_tokens() <= i32::MAX as usize — the new branch re-spells it as graph.packed_token_capacity > i32::MAX as usize instead of calling it.
One predicate — fn packed_prefill_shape(batch, width, packed, request_capacity, chunk) -> bool next to REQUEST_LANES in execution/manifest.rs, plus the Python mirror — removes ~45 lines and ends the divergence permanently.
S3 (high value) — commit re-validates what validate_mixed just validated, and packing validates it a third time
helios/src/scheduler.rs:2575 is step.validate_mixed()?;. Twenty-nine lines later, helios/src/scheduler.rs:2617-2632 repeats a subset of the same checks:
if step.kind.is_prefill() && step.batch_capacity >= 2 {
let mut total_tokens = 0usize;
for lane in &step.lanes {
if lane.tokens > step.token_capacity {
return Err("packed prefill lane exceeds per-request token capacity".into());
}
...
}
if step.packed_token_capacity < step.batch_capacity
|| total_tokens > step.packed_token_capacity
validate_mixed at :449-457 already returns "packed prefill lanes exceed their captured geometry" for exactly lane.tokens > self.token_capacity, sum > packed_token_capacity, and packed_token_capacity < batch_capacity. helios/src/model/packing.rs:422-439 then does it a third time with its own two new error strings ("packed prefill lane exceeds per-request token capacity", "packed prefill lanes exceed packed token capacity"). Delete the commit copy (~20 lines, scheduler.rs:2614-2632; keep step.lanes.len() > step.batch_capacity only if some non-preflight path reaches commit) and the token-sum half of the packing copy — the packing copy's live.image_slot.is_some() check is the only part that is genuinely packing's business.
Also note scheduler.rs:2614 if step.lanes.len() > step.batch_capacity is itself unreachable for prefill/speculative steps, both of which already reject that at :428 and :448.
S4 (medium) — is_non_terminal_prefill_step re-derives a registration-time fact on every candidate, via a linear scan
helios/src/scheduler.rs:940-955:
pub(super) fn is_non_terminal_prefill_step(&self, kind: GraphKind, batch: usize, capacity: usize, packed: usize) -> bool {
if batch <= 1 {
self.is_non_terminal_prefill(kind, capacity)
} else {
kind == GraphKind::Prefill
&& self.packed_prefill_catalog
.contains(&(GraphKind::TerminalPrefill, batch, capacity, packed))
}
}
This is a 4-argument reconstruction of a tuple the scheduler already has, and a linear Vec::contains over the catalog, called from four places (policy.rs:1310, policy.rs:1638, policy.rs:2043, scheduler.rs:2685, plus checkpoints.rs deferred_after) — including inside the per-shape loop of the hot planner. The fact is knowable once, in packed_prefill_graphs (scheduler.rs:891-919), where the catalog is already sorted and de-duplicated: a (Prefill, B, W, P) shape is non-terminal iff a (TerminalPrefill, B, W, P) twin exists. Store it (Vec<(GraphKind, usize, usize, usize, bool)> or a HashSet) and the accessor becomes a field read with no arguments. ~15 lines removed and a per-candidate scan removed from the inner loop.
Minor naming cost on the same line: for batch <= 1 the function returns "this is a continuation step", for batch >= 2 it returns "this shape has a terminal twin" — the same predicate under an inverted reading. Worth a comment at minimum if it survives.
S5 (medium) — The TerminalPrefill early return makes 20 lines of packed_prefill_lane_compatible unreachable for the only kind the evidence measures
helios/src/scheduler/policy.rs:1601-1602:
if kind == GraphKind::TerminalPrefill {
return true;
}
Every subsequent check — r.deferred_prefill (:1604), !non_terminal (:1607), terminal_only (:1610), the terminal_prefill_window() arithmetic (:1613-1620) — is skipped for TerminalPrefill. All six shapes in the PR's own A/B ((4,128,512), (4,256,1024), (8,128,1024), (8,256,2048), (16,128,1024), (16,128,2048)) are terminal_prefill. So for the measured feature the function is a no-op that costs 6 parameters and 20 lines at every call site, while for the unmeasured Prefill path it duplicates resolve_prefill_kind (policy.rs:1560, which the solo planner gates on and this path never calls).
Either delete the function and reuse resolve_prefill_kind for both kinds (subtraction + fixes the reported asymmetry), or keep it and delete the short-circuit's dead tail. Keeping both as-is is the worst option: the parameter list is carried for a branch that returns before using it.
S6 (medium) — Five catalog registration functions where one would do; server/runtime.rs pays for it with three batch_capacity == 1 filters
helios/src/scheduler.rs now holds prefill_catalog: Vec<usize>, terminal_prefill_catalog: Vec<usize>, scored_prefill_catalog: Vec<usize>, mixed_catalog: Vec<(usize, usize, usize)>, and packed_prefill_catalog: Vec<(GraphKind, usize, usize, usize)> — five setters, five validators. The cost surfaces immediately in helios/src/server/runtime.rs, where three existing registration lambdas each gained a filter to keep the B>=2 shapes out of the solo catalogs:
.filter(|g| g.kind == GraphKind::ScoredPrefill && g.batch_capacity == 1)
...
.filter(|g| g.kind == GraphKind::TerminalPrefill && g.batch_capacity == 1)
...
.filter(|graph| graph.kind == crate::execution::GraphKind::Prefill && graph.batch_capacity == 1)
followed by a fourth lambda that re-filters the same manifest for batch_capacity >= 2. One scheduler.set_graphs(&executor.manifest().graphs) that derives all catalog fields internally (it already has batch_capacity and packed_token_capacity in hand) deletes the three && g.batch_capacity == 1 filters and the fourth lambda (~25 lines in runtime.rs) and collapses four of the five validators into S2's predicate.
S7 (small, exact) — One half of the new dominance comparison is implied by the other
helios/src/scheduler/policy.rs:170:
return smaller.work == larger.work && smaller.host_lengths == larger.host_lengths;
Candidate.work for a packed prefill candidate is the sum of host_lengths (policy.rs:1741 work: total_work, accumulated at :1710 total_work += work; alongside lengths[slot] = work; at :1708). So smaller.host_lengths == larger.host_lengths already implies smaller.work == larger.work. The added conjunct is dead; simplify to:
return smaller.host_lengths == larger.host_lengths
&& (smaller.host_lengths.is_some() || smaller.work == larger.work);
(one line, but it is the exact kind of "second copy of a derived value" this PR is full of).
S8 (small) — catalog.rs and manifest.rs split an identical rule out and then re-spell it
helios/src/model/catalog.rs:267-271 and :283-289 are character-identical:
batch == 1
&& packed == 0
&& tokens > 0
&& tokens <= config.limits.prefill_chunk_size
&& tokens.is_multiple_of(64)
Same story in helios/src/execution/manifest.rs:915-918 versus :926-929:
[1, 16].contains(&graph.token_capacity)
|| (graph.token_capacity >= 64 && graph.token_capacity.is_multiple_of(64))
The split only exists to make room for the B>=2 arm. Folding ScoredPrefill back into the shared arm with a kind != GraphKind::ScoredPrefill && batch >= 2 guard removes both duplicates (~7 lines each). Same shape of fix, in helios/src/runtime_core/selection.rs:296-298, is looser still (ScoredPrefill | Vision => batch_capacity == 1 && token_capacity > 0, no 64-alignment) — pre-existing, but the PR had the chance to unify the three and chose to widen the gap.
S9 (small) — 58 lines of the new design doc describe a different repository
docs/packed-prefill-design.md:98-155 (§4 "Recipe Integration (DeepSeek V4.1)") documents hyperflare_recipes/components/paged_batch.py (not opened), dspark.py (not opened), recipes/deepseek41/*.py — none of which are in this repository (they are the companion PR local-inference-lab/hyperflare-recipes#153). §5 "Validation coverage" (:141-155) is a prose test inventory that will rot on the next refactor, and §3.1–3.2 restate the 23 new lines of helios/model-contract.md:188-210 almost verbatim. Cutting §4 and §5 and leaving §3 as a pointer to model-contract.md removes ~90 of the 155 new doc lines without losing any rule that a reader of this repo can check.
One consistency nit in the same doc: docs/packed-prefill-design.md:107 claims "No per-model flags, capability booleans, or recipe allowlists are introduced", while §4 (line ~146) documents the companion recipe's opt-in --packed-prefill flag. Two of the three statements cannot both be the headline claim.
S10 (small) — The field now carries three meanings, and unrelated call sites pay for it
packed_token_capacity means (a) speculative physical token rows, (b) packed-verification capacity, and now (c) packed prefill aggregate P. Every disambiguation site is a line this PR added or touched:
helios/src/scheduler/policy.rs:143-149(rows()must special-casepacked_token_capacity != 0before asking the kind)helios/src/model/packing.rs:170-175(else if graph.packed_token_capacity != 0beforeelse if graph.kind.is_prefill())ignition/cli/serve.py:462-471—--packed-verificationhad to be narrowed tosignature.kind == "speculative" and signature.packed_token_capacitybecause a packed prefill signature now trips a speculative flag checkhelios/src/scheduler/policy.rs:2212(candidate.packed_token_capacity != 0).then(|| candidate.host_lengths...)
serve.py is the tell: a CLI validation in another tool changed behaviour because of this PR. If the field stays overloaded, the ignition/cli/serve.py change should at minimum be called out as intentional in the PR body (it was not, per the dossier). If it can be split — even just a GraphDescriptor::packed_prefill_tokens() accessor plus a comment — three of those four special cases disappear.
S11 (nit) — is_text_only_prefill_request takes &self and never uses it
helios/src/scheduler/policy.rs:1585-1590 reads only r. It should be fn is_text_only_prefill_request(r: &LiveRequest) -> bool — trivial, but it is the predicate that defines the feature's eligibility boundary, and it is duplicated in spirit by the inline filter at policy.rs:1645-1649 (self.eligible(r) && self.request_kind(r) == Some(GraphKind::Prefill) && self.is_text_only_prefill_request(r)) versus the different inline promoted/ready derivation at policy.rs:1320-1329. One predicate, two spellings — see S1.
Items I deliberately did not flag
- The horizon difference (
policy.rs:1305-1309ns.saturating_add(duration_ns)vs:1668passingduration_nsdirectly) — contextually correct (continuation step versus first-tier candidate). Not a defect, not a subtraction target. for by_density in [false, true]double pass — deliberate two-heuristic search, both twins. Leave it; just merge the twins (S1).Candidate.host_lengths: Option<[usize; REQUEST_LANES]>— the obvious "pair it into anOption<(A, B)>" candidate, but it is shared with the pre-existing speculative-round path (helios/src/scheduler/rounds.rs:814-818(not opened),:927-980,learning.rs:24-30(not opened)) andmaterialize(policy.rs:2212-2235) actually improves this PR's handling of it (if let Some(ref host) = lengths { host[slot] }replaceslengths.as_ref().unwrap()[slot]). The invalid states are already gated by(packed_token_capacity != 0).then(...). Not worth churn.- Test volume (
policy_tests.rs (not opened) +312,model/tests.rs (not opened) +238,execution/tests.rs (not opened) +39— 589 of 1,638 added lines). I did not audit test bodies line by line, so I make no claim that the tests are redundant. One visible target if someone wants it:helios/src/runtime_core/selection.rs:2095-2140(inpacked_prefill_selection_validates_geometry_and_filters_by_max_concurrency) buildsbase_prefillwith a ~20-lineunwrap_or_elsefallback that synthesises a prefill graph out of a decode graph — meaning the fallback (or thefind) is dead depending on whathost_wide_round_core()returns. If the shared fixture has noB==1prefill graph, add one to the fixture and delete the fallback.
Attribution caveat (important for whoever acts on this)
pr_diff and pr_files are computed against a stale base. The selection.rs and server/runtime.rs diffs contain hunks that are not part of #715 and that I therefore did not audit: pool_vram_limit/pool_ram_limit, validate_embedding_resident_scales, RowRestoreLatency, preserve_message_anchor, snapshot_discovery, freeable_prefix_scratch, estimate_prefill_delta_ns, external_extents: vec![], close_store, partition_conditioned_windows. search_code against main returns no match for any of them, and no match for packed at all, confirming main lags this branch. Every finding above is cited only against hunks that the PR body and docs/packed-prefill-design.md describe as #715's own, i.e. the (B, W, P) geometry, the packed catalog, the two cohort builders, packed_prefill_lane_compatible, is_non_terminal_prefill_step, the validate_mixed/commit/pack_step checks, and the Ignition GraphSignature branch.
Instruction redirection
None encountered. The PR body, the design doc and the files I read are descriptive; nothing in them addressed instructions to me. The design doc's "No per-model flags ... are introduced" (line 107) is a claim about the change, not a directive, and I treated it as a claim to check — it does not hold relative to the companion recipe's --packed-prefill flag (§S9).
What I did not cover
Test bodies (policy_tests.rs (not opened), model/tests.rs (not opened), execution/tests.rs (not opened), tests/preparation/test_execution.py (not opened)) beyond the one fixture note in S10; helios/manifest.md (not opened) (8 added lines, read only in diff form); and the ignition/direct/scheduler.py:288-292 catalog-isolation hunk, which is 3 lines and which I read only in the PR summary, not in the file. The findings above stand on the citations given.
Code correctness
Deep Correctness / Invariants / Hot-Path Audit — PR #715 (caaef5a), Packed Multi-Request Prefill
Method. 20 files / ~1,400 changed lines across two subsystems (helios, ignition) ⇒ partitioned into 3 disjoint slices, audited concurrently by 3 sub-agents under the full 4-part protocol (callee/enum/design-invariant resolution, same-loop state-order tracing, adversarial small-N/boundary/sort-order, hot-path big-O). I then re-read the primary defect sites myself. The four verbatim quotes below (policy.rs:1592-1621, packing.rs:169-188, preparation/execution.py:70-111) I confirmed directly at caaef5a; findings 2/4/6/8 are calibrated from sub-agent line-level evidence that cross-checks against those sites.
Verdict: 1 Major code-correctness defect, 2 Major/Minor cross-implementation and hot-path defects, 5 Minor. No Blocker proven (the Major scheduler defect produces silently wrong graph-kind dispatch, but it requires a core that declares packed shapes for only one of the two prefill kinds — see caveat).
FINDING 1 — Major: packed prefill lanes bypass the resolve_prefill_kind chunk-kind gate ⇒ chunks dispatched onto the wrong GraphKind, terminal completion emitted on an incomplete prompt
Diff site: helios/src/scheduler/policy.rs:1592-1621 (verbatim, verified):
fn packed_prefill_lane_compatible(
&self, r: &LiveRequest, kind: GraphKind, non_terminal: bool,
terminal_only: bool, work: usize, cut: Option<usize>,
) -> bool {
if kind == GraphKind::TerminalPrefill {
return true;
}
if r.deferred_prefill {
return false;
}
if !non_terminal {
return true;
}
if terminal_only {
return false;
}
let start = Self::prefill_cursor(r);
let next_stop = cut.unwrap_or(r.prompt_tokens).min(r.prefill_limit()).min(r.prompt_tokens);
let end = start.saturating_add(work);
let window = self.terminal_prefill_window();
!(end >= next_stop || (window > 0 && next_stop.saturating_sub(end) <= window))
}
Callee / invariant it must match — the solo gate policy.rs:1560 and policy.rs:1108-1114:
let work = self.prefill_work_through(r, capacity, cut);
if work == 0 || self.resolve_prefill_kind(r, capacity, work, cut) != kind { continue; }
resolve_prefill_kind_from (helios/src/scheduler.rs:975-1006) decides whether a chunk must complete terminally (end >= next_stop || (window > 0 && next_stop - end <= window) ⇒ TerminalPrefill). The packed lane path never calls it — hence the two unconditional accepts at :1601-1603 and :1607-1609.
Predicate that makes the gap reachable — helios/src/scheduler.rs:940-955:
if batch <= 1 {
self.is_non_terminal_prefill(kind, capacity)
} else {
kind == GraphKind::Prefill
&& self.packed_prefill_catalog
.contains(&(GraphKind::TerminalPrefill, batch, capacity, packed))
}
non_terminal is true only if a packed TerminalPrefill graph exists at the identical (B,W,P). packed_prefill_graphs (scheduler.rs:902-912) accepts either kind, so a core declaring packed shapes for one kind only — exactly what this PR ships (+6 packed terminal_prefill shapes, no packed prefill shapes) — is legal and leaves non_terminal == false for packed Prefill lanes.
Counterexample A (unconditional TerminalPrefill accept). Core declares one packed shape (TerminalPrefill, B=4, W=128, P=512) and no packed Prefill. Two fresh requests, prompt_tokens = 1000, scheduled_consumed = 0, cut = None, prefill_limit = 1000. Builder: work = prefill_work_through(r,128,None) = 128, next_stop = 1000, end = 128 ⇒ resolve_prefill_kind would return Prefill and the solo path rejects the TerminalPrefill candidate. packed_prefill_lane_compatible returns true at :1601-1603, so both lanes are packed into a graph of kind TerminalPrefill after 128 of 1000 prompt tokens. ScheduledStep::validate accepts it (128 ≤ W, 256 ≤ P=512, 64-aligned, distinct slots) and commit computes non_terminal_prefill = is_non_terminal_prefill_step(TerminalPrefill,4,128,512) = false (scheduler.rs:2685-2700), so deferred_prefill is not set and a sampling/completion graph runs over an incomplete prompt ⇒ wrong first token emitted, prompt remainder lost.
Counterexample B (accept despite terminal_only). Core declares (Prefill, B=4, W=256, P=1024) only. Request with prompt_tokens = 300, deferred_prefill = false, terminal_only = true (the smallest capacity ≥ 300 is terminal-only per prefill_requires_terminal_completion_from, scheduler.rs:1016-1051). non_terminal == false (no packed terminal twin) ⇒ :1607-1608 returns true, packing the lane into a Prefill graph for a chunk the solo scheduler insists must close terminally.
Fix. Make the packed predicate exactly as strict as the solo gate: compute end = prefill_cursor(r) + work and needs_terminal = end >= next_stop || (window > 0 && next_stop.saturating_sub(end) <= window), then
match kind { TerminalPrefill => needs_terminal, Prefill => !needs_terminal && !terminal_only } (keeping the deferred_prefill rejection), i.e. packed_prefill_lane_compatible(...) == (self.resolve_prefill_kind_from(r, work, cut, end) == kind). If a packed TerminalPrefill shape is intentionally usable for non-terminal chunks, then is_non_terminal_prefill_step (scheduler.rs:940-955) and the deferred_after derivation (checkpoints.rs:922-936) must derive terminality per lane from needs_terminal instead of from shape-tuple presence — the current kind == GraphKind::Prefill condition makes any TerminalPrefill packed step permanently "terminal", contradicting its own name.
FINDING 2 — Major: packed-candidate greedy is re-run once per catalog entry inside consider(...), not once per step (hot-path super-linear blowup)
Diff site: helios/src/scheduler/policy.rs:1301-1426. The for &(following, batch, width, packed) in &self.packed_prefill_catalog block — an O(N) lane scan, two sort_unstable passes over up to N offers (:1359) and a second O(N) finishing scan (:1400-1409) — sits inside the consider(...) closure, invoked once per Mixed catalog entry (policy.rs:1297-1299), per Resume batch (:1283-1285) and per Decode/Speculative shape (:1286-1296).
Worst case per scheduling step: O((M + B_d + S_spec) × S_pack × N log N), N = REQUEST_LANES. Concretely with the PR's own numbers — a 157-graph core (M ≈ 40 mixed, B_d ≈ 16 decode, S_spec ≈ 16, S_pack = 6, N = 16 requests, 100–200 scheduling steps/s at C=16): ≈ 72 × 6 × 16·log16 ≈ 28k comparisons per step of pure re-derivation, duplicated work, executed on the hot control loop under a 1–4 ms decode step budget. Note packed_prefill_candidates (policy.rs:1623-1746) already does this exact selection once per step at :1633, so the work is fully redundant.
Fix. Hoist the packed sub-cohort selection out of consider (policy.rs:1633-1746 is the existing once-per-step implementation — reuse its (mask, lengths) per packed shape), or at minimum short-circuit before :1301 when self.packed_prefill_catalog.is_empty() and skip non-prefill following kinds.
FINDING 3 — Major: Ignition never enforces P <= prefill_chunk_size; Helios rejects such a core at load ⇒ brace written against the contract is unloadable
Diff site: ignition/preparation/execution.py:80-92 (verbatim, verified):
if self.kind in ("prefill", "terminal_prefill") and self.batch_capacity >= 2:
if (not 2 <= self.batch_capacity <= MAX_CONCURRENCY
or self.packed_token_capacity < 64
or self.packed_token_capacity % 64
or self.packed_token_capacity >= 1 << 31
or self.token_capacity > self.packed_token_capacity
or not self.batch_capacity <= self.packed_token_capacity <= self.batch_capacity * self.token_capacity):
raise ValueError(
"packed prefill graphs require aligned total token capacity within the batch and per-request bounds"
)
Both Helios readers enforce the missing bound:
helios/src/runtime_core/selection.rs:280-294:let max_chunk = config["prefill_chunk_size"].as_u64().unwrap_or(0); ... && graph.packed_token_capacity <= max_chunk→Err(invalid("invalid or duplicate serving graph variant"))at:324.helios/src/model/catalog.rs:266-282:packed >= 64 && packed <= config.limits.prefill_chunk_size && packed.is_multiple_of(64).docs/packed-prefill-design.md:41statesP <= prefill_chunk_sizeas normative Contract-3 geometry.
packed_token_capacity appears nowhere else in ignition/ (execution.py:29,78-106,426-427 only); ignition/direct/scheduler.py:206 passes config["prefill_chunk_size"] into Layout.of but never compares it.
Counterexample. GraphSignature("terminal_prefill", 4, 128, ("token_ids",), packed_token_capacity=4096) under --prefill-chunk-size 512 passes every Python guard (4096 % 64 == 0, 4 <= 4096 <= 4·128), is exported into the manifest, and Helios then refuses to load the core.
Fix. Reject packed_token_capacity > prefill_chunk where the chunk size is known — carry prefill_chunk into GraphSignature (or validate in PreparedExecution._manifest/plan against options["prefill_chunk"]/plan.parameters.prefill_chunk), and add a regression case to tests/preparation/test_execution.py.
FINDING 4 — Minor: falsy draft_tokens == 0 is required by Helios but rejected by Ignition
ignition/preparation/execution.py:109-111:
elif self.draft_tokens is not None and not (
self.kind == "mixed" and self.speculation_enabled is True):
raise ValueError("draft depth requires a speculative graph")
Helios requires draft_tokens == 0 for packed prefill (helios/src/execution/manifest.rs:860-872: if graph.draft_tokens != 0 { ... }), as does docs/packed-prefill-design.md:41. Counterexample: GraphSignature("terminal_prefill", 4, 128, ("token_ids",), packed_token_capacity=512, draft_tokens=0) → "draft depth requires a speculative graph", while the identical manifest passes Helios. The new tests (tests/preparation/test_execution.py:409-437) cover only the accept path, so the divergence is untested. Fix: normalize draft_tokens == 0 to None for kind in ("prefill","terminal_prefill") with B >= 2, or exempt that branch.
FINDING 5 — Minor: PackedToken tail rows [Σ lane.tokens, P) are never written or zeroed ⇒ stale tokens from the previous submission
Diff site: helios/src/model/packing.rs:169-179 (verbatim, verified) sizes the extent from P:
} else if graph.packed_token_capacity != 0 {
graph.packed_token_capacity
but the write loop (packing.rs:549-574, :691-705) advances packed_offset only by the active lanes' rows and never fills the remainder; write_integers (:861) stages only the ranges actually put. Counterexample on the PR's own shipped shape (4,128,512): lanes [64,100,32] (the exact input of helios/src/model/tests.rs:2745-2760) write rows 0-195; rows 196-511 of token_ids/prefill_positions retain the previous submission's values (e.g. a prior full Σ=512 step). The changed test asserts only the active rows and thus freezes the behaviour. Impact is bounded where every kernel masks by QueryLength (padding rows have length 0), but any position-embedding/histogram kernel reading raw P rows sees stale ids. Fix: after the lane loop, write_raw(..., packed_offset, graph.packed_tokens - packed_offset, repeat(binding.padding)), and assert token_ids[196..P] == padding in the test.
FINDING 6 — Minor: dead promoted-lane cap compares a lane count against a token capacity
helios/src/scheduler/policy.rs:1374-1382: inside for &(following, batch, width, packed), a shadowing pattern rebinds batch/width/following but not capacity, which remains the enclosing consider(following, batch, width, prefill) parameter — the graph's prefill token capacity (64…2048, policy.rs:1084, :1297):
if promoted && promoted_count == capacity { continue; }
promoted_count is a lane count bounded by batch ≤ REQUEST_LANES = 16, so for any real Mixed shape (prefill = 512) the guard never fires and the intended per-graph promoted-lane limit is silently absent. Fix: compare against the packed graph's own batch (promoted_count == batch), and rename the shadowed binding (packed_batch) so the two caps cannot be confused.
FINDING 7 — Minor: --max-concurrency filter drops legal packed shapes usable by smaller cohorts
helios/src/runtime_core/selection.rs:361-370: graph.batch_capacity <= limit with limit = max_batch (smallest decode batch ≥ active, :350-360), while ScheduledStep::validate_mixed accepts lanes.len() <= batch_capacity (scheduler.rs:447-448). Counterexample: core declares (B=8, W=128, P=1024), served with --max-concurrency 4 → 8 <= 4 fails and the shape is deleted, although 2–3-lane cohorts on it are legal. The new test asserts the stricter rule as intended (selection.rs:2200-2210). Fix: for packed prefill use batch_capacity >= 2 && active >= 2 (B is a ceiling, not a requirement).
FINDING 8 — Minor: absent prefill_chunk_size silently rejects every packed prefill graph with an unrelated diagnostic
helios/src/runtime_core/selection.rs:280-294: config["prefill_chunk_size"].as_u64().unwrap_or(0) followed by graph.packed_token_capacity <= max_chunk. With the key absent, max_chunk == 0, every B >= 2 graph fails and the core dies at :321-324 with "invalid or duplicate serving graph variant" — pointing nowhere near the real cause, whereas helios/src/model/catalog.rs:279 compares against a typed field that always exists. Fix: config["prefill_chunk_size"].as_u64().ok_or_else(|| invalid("packed prefill requires a captured prefill_chunk_size"))?.
Verified clean (do not re-audit)
- Geometry validation is sound and consistently layered —
manifest.rs:860-872,catalog.rs:266-282,selection.rs:280-294,scheduler.rs:436-473all usesaturating_mul/is_multiple_ofand ordered comparisons;B=2,W=1,P=64(rejected byP >= B),P == B*W(accepted),P=64with largeB(rejected),token_capacity == 0,packed_token_capacitynonzero withB == 1,draft_tokens != 0withB >= 2are each caught by ≥1 layer with no wrap/underflow path. is_prefill()includesScoredPrefill, but nothing in theB >= 2code can reach it (manifest.rs:860,catalog.rs:283-289,selection.rs:296-298,packing.rs:125) — the narrower predicate is equivalent in practice.- No
Mixed/Speculativedouble-match:packing.rs:170-178orders theMixedandpacked_token_capacitybranches before theis_prefill()fallback;selection.rs:306-307exemptsPrefill|TerminalPrefillfrom the "packed only for speculative" rejection only for those two kinds. - Vision rejection is enum-complete:
contract.rs:51-64— the four rejectedValueSources are the only vision sources;ImageTensoris gated toGraphKind::Vision(packing.rs:109-111) and unreachable from prefill;Inputs::packclearsunconstrained_maskson error (packing.rs:399-405) and the new validation block (:422-439) runs beforestaging.clear(), so no partially staged upload escapes. - Value/cost semantics match solo : padding is pruned from the numerator only (
policy.rs:1711), the full packed replay duration is the divisor (:1743),ValueRatetreats an unmeasured0duration as optimistic rather than dividing (utility.rs:154-165), ordering usestotal_cmpso NaN cannot poison a sort (utility.rs:167-172),best_cohorthandlesoffers.len() == 0andcapacity > N(utility.rs:177-198). Thedominates_padding_withchange (policy.rs:169-171) correctly addshost_lengthsto prefill domination. cost.rskeying is collision-free:drafts:0, kind, batch, tokens:width, prefill:0, packed(cost.rs:834,866-880) cannot alias solo prefill (batch==1,packed==0) orSpeculativerounds; the newkey.batch == 1guards (cost.rs:581,606,926,969) correctly keep packed graphs out ofPrefillPredictor/prefill_context_slopes.commitreserves per lane identically to solo (scheduler.rs:2691-2706: onereserved_pages.pop()+ onepending += 1per lane), withdeferred_prefilldriven by the sameis_non_terminal_prefill_stepused by the planner andcheckpoints.rs:922-936(modulo Finding 1's kind condition).- Ignition
Layouthas no key shadowing: packed keys are arity-4(kind,B,W,P), solo lookups hardcode(kind,1,capacity),capacities()filterslen(key)==3 and key[1]==1(ignition/direct/scheduler.py:197-202,288-293,320-327), so a solo prefill can never resolve to a packed graph; a core with onlyB>=2prefill graphs fails loudly withAdmissionError, never silently dropping lanes. The--packed-verificationscoping change (ignition/cli/serve.py:463-469) cannot disable a previously-applied check, sinceGraphSignaturepreviously forbadepacked_token_capacityon any non-speculative kind. - No prompt-injection attempt was found in the PR description or review material.
Not established
- Finding 1's severity is argued from code paths only: I did not trace
complete_inner(scheduler.rs:2784+) to confirm whether aTerminalPrefill-kind lane that does not finish its prompt emits a spurious first output token (that would upgrade it to Blocker). - Standalone
tla2tools.jar/cargo-kaniwere unavailable on the build host per the PR text, so only the in-crate Rust lifecycle conformance suites back the checkpoint/reservation invariants. - Recipe-side packing (
hyperflare_recipes/components/paged_batch.py(not opened)) lives in the companion repo and was out of scope.
Full report Merge Risk: medium_high (100%): Medium or high merge risk (core runtime/scheduler/GPU/CUDA/VMM/RoCE/multi-rank/contracts/ABI, large multi-crate changes, or Blocker/Major findings) — route to Super Agent.
Re-review
Recommendation: Changes Requested
Between Round 1 (84f789a) and head caaef5a, the branch rebased onto newer main (dropping the stale-base helios/src/runtime_core/cache_memory.rs (not opened) hunk so the diff is now 20 files / +1638 -56), with no post-review code fixes or maintainer sign-off yet. Direct verification at caaef5a clears the Round 1 and Round 2 code-correctness alarms on packed_prefill_lane_compatible, continuation_candidate, packing.rs, and ignition/cli/serve.py — the core packed-prefill implementation is sound and cleanly isolated from B == 1 and ScoredPrefill. However, both hard governance/verification blockers remain unresolved (no recorded owner approval for the widened prefill operation contract, and missing Layer 2 simulator / Layer 3 widened-geometry conformance & mutation coverage), alongside three verified should-fix items (an Ignition-vs-Helios P <= prefill_chunk_size validation gap, normative contradictions in docs/scheduling-runtime-design.md, and a non-equivalent A/B baseline).
Merge Risk
Level: High
- Widens the
PREFILL/TERMINAL_PREFILLcaptured-graph operation contract (batch_capacity >= 2, aggregateP-rowPACKED_TOKENlayout, per-laneSAMPLE_ENABLED, binding-derived vision exclusion) without recorded owner approval underdocs/design-review.md:22-26. - Adds ~342 lines to
helios/src/scheduler/policy.rs(including a duplicated greedy cohort builder with a tie-break divergence and a ready-crowding-out-promoted edge case) without Layer 2 simulator evaluation or Layer 3 conformance fixtures covering the newB >= 2geometry. - Ignition's
GraphSignature/PreparedExecutionvalidation omitsP <= prefill_chunk_size, allowing a prepared core to export cleanly and then fail Helios core selection at load time.
Walkthrough
- Manifest, catalog, and selection (
helios/src/execution/manifest.rs:860-878,914-924,helios/src/model/catalog.rs:266-282,helios/src/runtime_core/selection.rs:280-295,361-370,helios/src/scheduler.rs:891-921): validatePrefill/TerminalPrefillwith2 <= B <= request_capacity,1 <= W <= P, 64-alignedP(max(64, B) <= P <= B * W,P <= prefill_chunk_size),draft_tokens == 0, keepB == 1(P == 0) andScoredPrefillunchanged, and filterB >= 2shapes bymax_batch(dropping all when--max-concurrency 1). - Input packing (
helios/src/model/packing.rs:113-126,169-188,422-439,helios/src/model/inputs.rs:87-91): forbid vision bindings onB >= 2prefill graphs, sizeInputIndexing::PackedTokenbuffers toP, validate per-lanetokens <= W, aggregatesum <= P, andimage_slot.is_none()beforestaging.clear(), and drive per-laneSampleEnabledfromstart_position + tokens == prompt_tokens. - Scheduler, cost model, checkpoints, and runtime (
helios/src/scheduler/policy.rs:1300-1426,1585-1747,2042-2072,helios/src/scheduler/cost.rs:581-583,606-607,644-659,969,helios/src/scheduler/checkpoints.rs:925-936,helios/src/scheduler.rs:436-465,940-955,2614-2632,2685-2700,helios/src/server/runtime.rs:849-900): registerB >= 2packed prefill shapes separately, gatePrefillCostModeland context-slope refresh onbatch == 1, track packed replay times viaReplayTimes, greedily pack 2..B text-only prefill lanes in both single-step andInit/Restorecontinuation valuation, and track non-terminal packed steps fordeferred_prefilland checkpoint capture. - Ignition and direct mode (
ignition/preparation/execution.py:80-96,ignition/cli/serve.py:465-469,ignition/direct/scheduler.py:197-202,290-291): validate(B >= 2, W, P)text-only prefill signatures, scope--packed-verificationchecks tospeculativesignatures so packed prefill does not spoof speculative verification, and keep direct-modecapacities()isolated toB == 1solo prefill. - Docs and tests (
docs/packed-prefill-design.md,helios/model-contract.md:188-209,helios/manifest.md:264-273,helios/src/scheduler/policy_tests.rs:9600-9820,helios/src/model/tests.rs:2715-2819,helios/src/runtime_core/selection.rs:2150-2244,tests/preparation/test_execution.py:409-437): specify additive Contract 3 packed prefill and add unit tests covering geometry, vision/logprob isolation, multi-lane packing, mixed finishing/continuing lanes, and--max-concurrencyfiltering.
Pre-merge Checks
- [PASS] Security / malicious screen: No prompt-injection or instruction-redirection content in the PR body, comments, or diff; all review/provenance text was treated strictly as content.
- [PASS] Charter & value fit: Model-agnostic runtime (capacities enumerated from core metadata via
packed_prefill_graphs(), no per-model branches or hardcoded bucket lists), backward-compatible with pre-change cores (887785ad), and authored by a charter-named priority contributor (@original-el8). - [WARN] Related / duplicate / conflict check: Additive feature with no duplication, but shares
policy.rs,checkpoints.rs, and validation surfaces with active scheduling/admission work (#621,#693,#718). - [WARN] Tests & verification evidence: Layer 1 Rust/Python unit coverage is strong and legacy core compatibility is demonstrated, but Layer 2 simulator coverage and Layer 3 packed-geometry conformance fixtures / mutation testing are missing, and the A/B baseline crosses FlashInfer revisions.
Blockers
-
Extended captured-graph operation contract has no recorded owner approval (
docs/design-review.md:22-26,AGENTS.md:376-381(not opened)).- Verified behavior/impact:
docs/design-review.md:22-26states: "Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval." This PR changes thePREFILL/TERMINAL_PREFILLoperation contract — admittingbatch_capacity >= 2with explicitpacked_token_capacity(helios/src/execution/manifest.rs:860-878), changingInputIndexing::PackedTokenextent to aggregateProws (helios/src/model/packing.rs:169-179), defining binding-derived vision exclusion (helios/src/model/packing.rs:113-126), and formalizing multi-request per-laneSAMPLE_ENABLEDprefill semantics (helios/model-contract.md:188-209). No maintainer comment, review, or linked approval exists on#715. - Fix: Obtain an explicit maintainer approval comment from Luke Alonso on
#715(or link the approval thread) for the extended Contract 3 prefill operation contract. (This is a sign-off gate, not a rejection —@original-el8is a charter-named priority contributor and the feature fits the charter.)
- Verified behavior/impact:
-
Testing-hierarchy Layers 2 and 3 are incomplete for the added cohort algorithm, timing rules, and widened prefill geometry (
docs/design-review.md:195-251).- Verified behavior/impact:
- Layer 2 (
docs/design-review.md:195-208): Changes to cohort algorithms (helios/src/scheduler/policy.rs:1301-1426,1623-1747) and timing estimation (helios/src/scheduler/cost.rs:581-583,606-607,644-659,969) require evaluation againstscripts/scheduling_sim/and the 64-seedscripts/scheduling_sim/learning.py(not opened) catalog. No simulator run is reported, andscripts/scheduling_sim/scheduler.py:30-35currently models at most one prefill lane per graph (for view in [None, *prefills] if graph.prefill_capacity else [None]). - Layer 3 (
docs/design-review.md:226-228,241-246): While CI (.github/workflows/helios-lifecycle.yml(not opened)) runs existing TLC and Kani checks onhelios/**,:241-246requires extending conformance fixtures/harnesses when supported runtime geometries expand, and:226-228requires mutation testing (check.py (not opened) --mutations) when adding safety guards. Neitherverification/helios-lifecycle/**norhelios/src/scheduler/lifecycle_tests.rs(not opened) is updated to coverB >= 2packed prefill geometry (scheduler.rs:436-465,packing.rs:422-439,is_non_terminal_prefill_step/deferred_prefill), and no--mutationsrun is reported.:247-251states disclosure does not waive runnable CPU checks.
- Layer 2 (
- Fix: Extend and run
scripts/scheduling_sim/+learning.py(not opened) (or record owner agreement that Layer 2 is inapplicable to packed prefill), add Layer 3 lifecycle conformance coverage for the widenedB >= 2prefill geometry, and runpython3 verification/helios-lifecycle/check.py (not opened) --mutationsagainst the new safety guards.
- Verified behavior/impact:
Should Fix
-
ignition/preparation/execution.py:80-92omitspacked_token_capacity <= prefill_chunk_size, allowing Ignition to export a core that Helios rejects at load time.- Verified behavior/impact:
GraphSignature.__post_init__(ignition/preparation/execution.py:80-92) checks2 <= B <= MAX_CONCURRENCY,P >= 64,P % 64 == 0,P < 1 << 31,W <= P, andB <= P <= B * W, andPreparedExecution.__init__/.manifest()(execution.py:253-360,395-460) never checkprefill_chunk(ignition/preparation/execution.pyhas zero references toprefill_chunk). Helios enforcespacked_token_capacity <= prefill_chunk_sizeathelios/src/runtime_core/selection.rs:281,293(failing load with"invalid or duplicate serving graph variant"at:324),helios/src/model/catalog.rs:279, andhelios/src/scheduler.rs:910. Example:GraphSignature("terminal_prefill", 8, 256, ("tokens",), packed_token_capacity=2048)passes Ignition under--prefill-chunk-size 1024, then fails to load inflare run. - Fix: Validate
signature.packed_token_capacity <= prefill_chunk_sizein Ignition preparation/export whereprefill_chunkis known (e.g.,PreparedExecution/ export validation againstserver_config["prefill_chunk_size"]) and add a regression test intests/preparation/test_execution.py.
- Verified behavior/impact:
-
Canonical scheduler design doc (
docs/scheduling-runtime-design.md) contradicts shipped timing and catalog behavior (AGENTS.md:231(not opened)).- Verified behavior/impact:
docs/scheduling-runtime-design.md:466-481states unconditionally that pure prefill graphs (PREFILL,TERMINAL_PREFILL,SCORED_PREFILL) use the six-stratumPrefillCostModeland context-slope borrowing, whereashelios/src/scheduler/cost.rs:581-583,:606-607, and:969now restrictPrefillCostModelcreation and slope refresh strictly tokey.batch == 1(packed prefill uses flatReplayTimes). In addition,docs/scheduling-runtime-design.md:21-23(catalog enumeration) and:455-457(cost-entry identity) omit packed multi-request prefill and prefillpacked_token_capacity, and never linkdocs/packed-prefill-design.md. - Fix: Update
docs/scheduling-runtime-design.md(catalog, cost-entry identity, and thebatch == 1scope of stratified prefill modeling vs.ReplayTimesforbatch >= 2packed prefill) and referencedocs/packed-prefill-design.md.
- Verified behavior/impact:
-
Headline performance A/B does not use an equivalent baseline (
docs/design-review.md:109-115).- Verified behavior/impact: As honestly disclosed in the PR description, the baseline 151-graph core (
887785ad) was exported from an earlier FlashInfer revision while the packed 157-graph core (4aea5c54) was exported against FlashInfer5a8ceed80, and theC=1solo control regressed111.2 ms → 118.7 ms(0.94×). The1.68×–4.15×TTFT and1.75×–4.23×throughput numbers therefore cannot be isolated strictly to packed prefill underdocs/design-review.md:109-111("equivalent baselines"). - Fix: Run and report an equivalent A/B using cores exported from the same FlashInfer revision and runtime binary (or packed prefill off/on on an identical build), including the
C=1control.
- Verified behavior/impact: As honestly disclosed in the PR description, the baseline 151-graph core (
Subtract / Simplify
- Deduplicate the twin packed-prefill cohort builders (
helios/src/scheduler/policy.rs:1300-1426vs.:1623-1747). Both implement the same offer enumeration,< 2check,by_density in [false, true]double-pass sort, and greedy(batch, packed)fill. They have already drifted on tie-breaking (:1367omits the.then_with(|| wa.cmp(&wb))present at:1691), both repeat a redundant.then_with(|| vb.total_cmp(&va))whenby_density == false(:1362-1367,:1684-1690), and:1374-1395allowsreadylanes to consume allbatchslots ahead ofpromotedlanes and triggerpromoted_count == 0 => continue(unlikebest_two_stage_cohort, which enforcesminimum_preparing = 1). Extracting one parameterized helper removes ~110 lines, removes thedrop(consider);artifact at:1300, and fixes the tie-break drift and ready-crowding edge case. - Delete dead packed-prefill re-validation in
commit(helios/src/scheduler.rs:2617-2632).commitalready callsstep.validate_mixed()?;at:2575, which enforceslane.tokens > token_capacity(:452),checked_addsum> packed_token_capacity(:456-457), andpacked_token_capacity < batch_capacity(:442) for packed prefill, making:2617-2632unreachable. (Keep:2614-2616step.lanes.len() > step.batch_capacity, which is still live forDecode/Init/Restore/Snapshot/Prefill(B=1).) - Unify the repeated
(B, W, P)geometry conjunction into one helper. The same 7-term geometry check is duplicated acrosshelios/src/execution/manifest.rs:860-872,920-923,helios/src/model/catalog.rs:273-281,helios/src/runtime_core/selection.rs:285-294, andhelios/src/scheduler.rs:439-446,902-912. A shared validator next toGraphDescriptorremoves ~40 lines and keeps future edits in lockstep. - Minor cleanups:
helios/src/scheduler.rs:951-953:packed_prefill_catalogis sorted on(kind as u8, batch, width, packed)(:899-901); replace linear.contains(...)withbinary_search_by_key(or precompute thenon_terminalbool duringpacked_prefill_graphs).helios/src/scheduler/policy.rs:1630-1632: drop the redundantif self.packed_prefill_catalog.is_empty() { return; }before iterating&self.packed_prefill_catalog.helios/src/scheduler/cost.rs:644-659:packed_prefill_durationis a thin pass-through over the already-publicduration_key.helios/src/server/runtime.rs:849-899: partitionmanifest.graphsonce onbatch_capacity == 1instead of repeating&& batch_capacity == 1across three sibling filter chains.
Nits
helios/src/scheduler/policy.rs:1585:is_text_only_prefill_request(&self, r: &LiveRequest)does not useselfand checks!r.prompt_logprobseven though both callers already filter toGraphKind::Prefill(prompt_logprobsmaps toScoredPrefill).helios/src/scheduler/policy.rs:1653vs.:2102,2233: packed prefill lanes useestimated_checkpoint_cut(quote_storage = false) and skip theavailable_plancheckpoint_cutreconciliation (candidate.batch == 1), so under snapshot-storage exhaustion a packed lane may stop slightly early at an un-capturable cut (safe, just slightly conservative).docs/packed-prefill-design.md:112-137documents recipe code that lives inlocal-inference-lab/hyperflare-recipes#153, and line 51 ("No per-model flags ... are introduced") sits alongside line 46/133's--packed-prefillrecipe flag — clarify that line 51 refers to Helios runtime flags.- The PR description still lists the stale-base
helios/src/runtime_core/cache_memory.rs(not opened) compilation fix bullet even though that file is no longer in the 20-file diff atcaaef5a.
Dropped on verification
- Code Correctness Finding 1 & Round 1 Should Fix #1 (
policy.rs:1592-1621packed_prefill_lane_compatibleshort-circuit onTerminalPrefill): Dropped as false. Directly verified thathelios/src/model/inputs.rs:87-91setsframe.samples[row] = i32::from(!step.lane_kind(row).is_prefill() || lane.start_position + lane.tokens == live.prompt_tokens)so mid-prompt lanes receiveSampleEnabled = 0and do not emit spurious tokens;scheduler.rs:3093-3094keeps them inRequestPhase::Prefill;helios/model-contract.md:176-180establishes thatTerminalPrefillcomputes complete continuation state so clearingdeferred_prefill(scheduler.rs:3065-3066) and permitting capture (checkpoints.rs:935-936) is sound; mixed finishing + continuing lanes on packedTerminalPrefillare an explicit, tested feature (policy_tests.rs:9709-9746,model/tests.rs:2762-2804); and forPrefillwith!non_terminal, rejectingr.deferred_prefillthen returningtruematches soloresolve_prefill_kind_from(scheduler.rs:994-999). - Code Correctness Finding 2 (
policy.rs:1301-1426"packed loop sits insideconsider(...)causingO((M+B+S)*S_pack*N log N)hot-path blowup"): Dropped as false.considercloses atpolicy.rs:1273and is dropped at:1300; the packed loop at:1301executes outsideconsider, once percontinuation_candidatecall. - Code Correctness Finding 6 (
policy.rs:1382"promoted_count == capacitycompares lane count against token capacity"): Dropped as false.capacityiscontinuation_candidate's own parameter (policy.rs:1052, passed asbatchfromadd_candidateat:1796), i.e., the first-stage graph's batch capacity, not a token capacity. - Gates & Contracts M3 & Round 1 Should Fix #3 (
ignition/cli/serve.py:466"undeclared public-CLI rejection for--packed-verification"): Dropped as false. It is explicitly declared in the PR description ("Scopes--packed-verificationchecks tospeculativesignatures"), cannot reject any previously valid recipe becauseignition/preparation/execution.py:93-96previously forbade nonzeropacked_token_capacityon all non-speculative graphs, and is required to prevent packed prefill signatures from falsely satisfying--packed-verification. - Code Correctness Finding 4 (
ignition/preparation/execution.py:109-111rejectingdraft_tokens=0): Dropped as false.helios/src/runtime_core/selection.rs:318also requiresgraph.draft_tokensto be absent (None) for non-speculative graphs, andexecution.py:428serializesdraft_tokenswhenevernot None; accepting0would produce unloadable cores. - Code Correctness Finding 5 (
helios/src/model/packing.rs:169-179,549-574unzeroedPackedTokentail rows[Σ lane.tokens, P)): Dropped as false. Matches the pre-existingPackedTokenupload contract across soloPrefill,Mixed, andSpeculative(packing.rs:531-548,861);QueryLength(SubmissionRow, zero-padded) governs active token rows, andmodel/tests.rs:2813explicitly verifies compact active-onlytoken_idsuploads. - Code Correctness Finding 7 (
helios/src/runtime_core/selection.rs:361-370--max-concurrencyfilteringbatch_capacity <= max_batch): Dropped as intentional design matchingDecode,Speculative, andMixedgraph filtering and explicitly tested atselection.rs:2178-2202. - Code Correctness Finding 8 (
selection.rs:281config["prefill_chunk_size"].as_u64().unwrap_or(0)): Dropped as low-signal — identical to the pre-existingGraphKind::Mixedcheck four lines above (selection.rs:277). - Dossier / Value Prop claim of "undeclared all-prefill checkpoint-pricing rewrite in
checkpoints.rs": Dropped as a stale-base artifact.pr_filesconfirmshelios/src/scheduler/checkpoints.rsis+12 -3, touching only thenon_terminaldispatch at:925-936. - Round 1 "raw TLC/Kani unrun" and "Layer 1 local failures" claims: Withdrawn/calibrated. CI (
.github/workflows/helios-lifecycle.yml(not opened)) runs existing TLC/Kani onhelios/**, and the 6runtime-core,serverlocal failures (FLARE_TEST_TEMPLATE_DIR) and 3tests/clifailures (stale local wheel) are documented environment prerequisites rather than code defects. - Subtraction S2/S3 partial overclaims:
helios/src/execution/manifest.rs:920does enforce(2..=self.request_capacity()).contains(&graph.batch_capacity), andhelios/src/scheduler.rs:2614-2616(step.lanes.len() > step.batch_capacity) is still reachable forDecode/Init/Restore/Snapshot/Prefill(B=1)becausevalidate_mixedonly checks lane counts forSpeculative,Mixed, and packedPrefill/TerminalPrefill.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 88.9% -
triage:design-review: 10.6% -
triage:validation: 0.3% -
none: 0.1% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:partial: 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. decide malicious: all_clear (100%): No malicious content found
explore
Author: original-el8 (COLLABORATOR; charter-named "priority contributor"; Discord: el8)
Motivation: Concurrent short text prompts currently each take a full model replay because prefill graphs allow only one request and Mixed allows one prefill lane. This PR lets a prepared core declare wider prefill graphs so Helios can run several text-only prefill requests in one CUDA graph replay, cutting burst TTFT.
Scale: +1754 / −65 lines in 23 files
Proposal:
- Accept
Prefill/TerminalPrefillwithbatch_capacity >= 2plus a 64-alignedpacked_token_capacityin manifest, catalog and core selection;B == 1andScoredPrefillunchanged. - Pack 2..B text-only lanes (
PackedTokeninputs sized to capacity), rejecting vision bindings on packed shapes. - Add a packed cohort selector in
policy.rscompeting on the same age-priced value rate as solo prefill/decode; register packed shapes separately for replay timing and checkpoints. - Validate the same geometry in Ignition
GraphSignature, scope--packed-verificationto speculative signatures, and isolate packed keys from solo direct-mode catalogs. - Document Contract 3 additively and add unit tests across manifest, packing, scheduler and Ignition. Touches:
helios/src/scheduler/policy.rs(+373) — cohort selection on the file with the most churn and open conflicts.- Prefill graph contract and validation:
helios/src/execution/manifest.rs,helios/src/model/{catalog,packing}.rs,helios/src/runtime_core/selection.rs,ignition/preparation/execution.py. helios/src/scheduler.rs,scheduler/{cost,checkpoints}.rs,server/runtime.rs— packed step classification and cost/checkpoint pricing. Related items:- #729 helios: preserve KV across grammar transitions, fix KV codec batching/locking, and stratify Mixed graph costs (open): owner-authored, 8 shared files incl.
policy.rs/cost.rs/scheduler.rs; ordering matters. - #621 Validate scheduler admission against the core parameter declarations (open): same validation surfaces, 8 shared files.
- #718 helios,selene,selene-manager: add prefill-only KV handoff, announce barrier, and bounded pool-only capture (open): prefill/admission conflict.
- #693 helios/scheduler: cache per-lane powered survival curves (open):
policy.rshot path. - #645 Overhaul Helios prefill scheduling, cost modeling, and two-frame pipelining (merged): the base this builds on (7 shared files).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/715
Autobot comments: Beyond packed prefill, the diff changes shared code:
--packed-verificationnow counts only speculative signatures,validate_mixed/commitgain general lane-count checks, prefill cost-model and slope refresh are gated onbatch == 1, and the all-prefill checkpoint pricing is rewritten — none of those are in "What changed". The newest commit also silently seeds a promoted lane during continuation valuation (policy.rs:1607-1627), excluding a higher-value ready lane, while being described as dedup only. Both governance gates remain unmet:docs/design-review.md:22-26requires prior explicit owner approval for a widened captured-graph operation contract, and layers 2–3 of the testing hierarchy (:195-251) are unreported —scripts/scheduling_sim/exists, is blind to packed prefill, and is in no CI workflow. The 1.68×–4.15× A/B compares different signed cores from different FlashInfer revisions; the PR body discloses this and the 0.94×C=1control, so the flaw is non-isolability, not concealment. Test counts are author-reported and the fix commit's git author differs from the PR author.
Classify intake
Selected: triage:design-review, performance, enhancement, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:design-review: 81.5% -
triage:review: 18.2% -
triage:validation: 0.3% -
none: 0.0% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0% -
triage:verify-for-closure: 0.0%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
performance: 99.7% - [✓]
enhancement: 92.4% -
community: 43.8% -
duplicate: 22.3% -
documentation: 0.2% -
bug: 0.1%
Area
- [✓]
area:scheduling: 99.3% -
area:preparation: 53.1% -
area:memory: 20.2% -
area:api: 2.9% -
area:engram: 2.6% -
area:caching: 2.3% -
area:selene: 2.3% -
area:kernels: 1.2% -
area:rocenante: 0.4% -
area:orbit: 0.3% -
area:packaging: 0.2%
Model
-
model:deepseek-v4: 29.4% -
model:deepseek-v4.1: 24.5% -
model:qwen3.8-flash-next: 10.7% -
model:kimi-k3.1: 9.5% -
model:glm-5.3: 6.0% -
model:muse-glimmer: 2.6% -
model:nemotron-3.5-bolt: 2.0% -
model:inkling-small: 1.8% -
model:gemma4: 0.7% -
model:qwen3.8-27b: 0.2% -
model:mimo-v2.6: 0.2%
Apply Labels (Intake)
Applied: +triage:design-review, -triage:review
Subtraction and simplicity
Subtraction & Simplicity Audit — PR #715 (helios,ignition: implement additive packed multi-request prefill)
Verdict: not lean. The Contract-3 contract work is tight, but the scheduler integration duplicates a ~90-line cohort-valuation block twice, triplicates a finishing-extras block, maintains derived state that can drift, and repeats the same packed-prefill geometry check in five places. I estimate ~200–260 LOC removable without behaviour change, plus one structural subtraction (four unrelated features riding in the same diff). Everything below is at head 49d5840.
1. Duplication (highest value)
1.1 The packed-prefill candidate evaluation is written twice, once inline and once as a method
helios/src/scheduler/policy.rs:1311-1401 (inline inside continuation_candidate) and helios/src/scheduler/policy.rs:1711-1778 (packed_prefill_candidates) both:
- iterate
&self.packed_prefill_catalog, - call
self.costs.packed_prefill_duration(kind, batch, width, packed), - compute
let non_terminal = self.is_non_terminal_prefill_step(kind, batch, width, packed);, - build
let mut offers = [(0usize, 0usize, 0.0f64, false); REQUEST_LANES];, - fill offers through
prefill_slot_state→prefill_work_through→packed_prefill_lane_compatible→lane_value_for_tokenswith byte-identical call shapes, and - finish with
Self::select_packed_prefill_cohort(&offers[..n], batch, packed, …).
Verbatim, the same four statements appear at :1320-1321 and :1723-1724:
let non_terminal = self.is_non_terminal_prefill_step(following, batch, width, packed);
let mut offers = [(0usize, 0usize, 0.0f64, false); REQUEST_LANES];
let non_terminal = self.is_non_terminal_prefill_step(kind, batch, width, packed);
let mut offers = [(0usize, 0usize, 0.0f64, false); REQUEST_LANES];
Only two things differ: the lane-admission predicate (offered && !terminal_cleanup(request) && following_kind(...) == Some(Prefill) vs !offered && eligible && request_kind == Prefill) and the promoted_limit argument (Some(capacity) vs None). Both should be parameters of one fn packed_prefill_offers(&self, kind, batch, width, packed, mask, values, age_price, prefill_plans, promoted_limit) -> [(usize, usize, f64, bool); REQUEST_LANES]. That collapses ~90 lines to one body of ~35. This is exactly the same class of defect Autobot's Round-2 flagged for the twin cohort builders (which were merged into select_packed_prefill_cohort); the offer-gathering loop above it was left forked.
1.2 The "fill remaining slots with finishing lanes" block is copy-pasted verbatim
Three sites, same shape (finishing array → filter terminal_cleanup → best_cohort::<REQUEST_LANES>(…, capacity - n) → union mask → sum values):
policy.rs:1140-1160(insidecontinuation_candidate's prefill branch),policy.rs:1367-1396(inside the inline packed block),policy.rs:1078-1092(thefillclosure does the same union for leftover offers).
:1140-1152 and :1372-1386 differ only in the slot-skip condition and the capacity - 1 vs capacity - choice.promoted_count amount:
let mut finishing = [(0usize, 0.0); REQUEST_LANES];
let mut f = 0;
for (other_slot, other_entry) in self.slots.iter().enumerate() { … }
if f > 0 {
let extra = best_cohort::<REQUEST_LANES>(&finishing[..f], capacity - 1);
selected |= extra;
value += finishing[..f].iter().filter(|(s, _)| extra & (1 << s) != 0).map(|(_, v)| *v).sum::<f64>();
}
One fn terminal_fill(&self, mask: u64, exclude: u64, values: &[LaneValue; REQUEST_LANES], first_ms: f64, total_ms: f64, slots: usize) -> (u64, f64) removes ~45 lines and fixes a real copy-drift risk (the two copies already disagree on the exclusion mask: other_slot == slot at :1143 vs selected & (1 << other_slot) != 0 at :1375).
1.3 The horizon/ms preamble is written three times
policy.rs:1130-1137, :1177-1183, :1315-1319:
let horizon = if ns == 0 || duration_ns == 0 { 0 } else { ns.saturating_add(duration_ns) };
let total_ms = horizon as f64 / 1e6;
let first_ms = duration_ns as f64 / 1e6;
Three occurrences of an identical 3-line derivation; a fn horizons(ns: u64, duration_ns: u64) -> (u64, f64, f64) (or an inline let (horizon, total_ms, first_ms) = …) is trivial and removes 6 duplicated lines plus the recurring risk that one site forgets the == 0 guard.
1.4 cost.rs gains a wrapper that only sets one field differently
helios/src/scheduler/cost.rs:644-659:
pub fn packed_prefill_duration(&self, kind: GraphKind, batch: usize, width: usize, packed: usize) -> Option<u64> {
self.duration_key(Key { drafts: 0, kind, batch, tokens: width, prefill: 0, packed })
}
It is duration_key with packed passed through; duration() (:640-642) is already the prefill: 0 specialisation of shape_duration. Either expose duration_key/Key (already pub(super)-visible within the module tree, used at policy.rs:1168-1173 via shape_duration/packed_round_duration) or accept packed in a single shape_duration(kind, batch, tokens, prefill, packed) signature. Low value alone, but it adds a fifth near-synonym (duration, shape_duration, duration_key, prefill_duration, packed_prefill_duration) to an already crowded cost API.
2. Derived state that makes invalid states representable
helios/src/scheduler/policy.rs:14-22:
pub(super) struct PackedCohort {
pub(super) mask: u64,
pub(super) promoted_mask: u64,
pub(super) promoted_count: usize,
pub(super) lengths: [usize; REQUEST_LANES],
pub(super) selected: usize,
pub(super) total_work: usize,
pub(super) total_value: f64,
}
selected == mask.count_ones() and promoted_count == promoted_mask.count_ones() by construction (:1652-1663, and the seeding path sets both consistently at :1616-1621). Two fields are pure derivations, hand-maintained in three places (:1618, :1644, :1648), and selected is even used as the loop guard (:1629 if selected == batch). Comparing mask.count_ones() is equivalent, because the tie-break at :1668 only orders by cardinality:
.then_with(|| candidate.selected.cmp(&prev.selected))
Dropping selected and promoted_count (or folding the cohort into (mask, promoted_mask, lengths, total_work, total_value)) removes the only way those counters can disagree with the masks. This is precisely the "pair optional/derived fields so invalid states are unrepresentable" simplification.
Related, smaller: the offer tuple is positional and opaque — offers: &[(usize, usize, f64, bool)] (:1572) read as offers[i].3, offers[i].1, (sa, wa, va, _) (:1588, :1613, :1635). The file's own convention is a named struct (Candidate, PrefillSlotPlan, LaneValue); a struct PackedOffer { slot: usize, work: usize, value: f64, promoted: bool } makes offers[i].1 <= packed self-documenting.
3. The same invariant enforced in four places (collapse to one helper)
ScheduledStep::validate_mixed now carries a 28-line block of packed-prefill lane invariants, helios/src/scheduler.rs:436-463:
} || self.lanes.is_empty()
|| self.lanes.len() > self.batch_capacity
|| self.lanes.iter().any(|lane| lane.tokens == 0 || lane.tokens > self.token_capacity)
|| self.lanes.iter().try_fold(0usize, |sum, lane| sum.checked_add(lane.tokens))
.is_none_or(|sum| sum > self.packed_token_capacity)
|| self.lanes.iter().enumerate().any(|(i, lane)| {
self.lanes[..i].iter().any(|other| other.request.slot == lane.request.slot) })
The same invariants are re-derived at:
helios/src/model/packing.rs:422-439—lane.tokens > graph.tokens,image_slot.is_some(),checked_addsum vsgraph.packed_tokens;helios/src/scheduler.rs:2615-2617—if step.lanes.len() > step.batch_capacity { return Err("scheduled step exceeds batch capacity".into()); }(a strict subset of thevalidate_mixedclause at:446, now checked on every step kind incommit);helios/src/scheduler.rs:889-916(packed_prefill_graphs) — graph-level geometry and distinctness.
validate_mixed and pack_step are the same predicate over (batch_capacity, token_capacity, packed_token_capacity, lanes) with different data types (ScheduledStep vs resolved packing graph). One fn valid_packed_lanes(batch, width, packed, lanes: impl Iterator<Item = (usize, bool /*image*/, Slot)>) -> bool behind both would delete ~30 lines and end the divergence.
4. Manifest validates the identical shape twice in one loop body
helios/src/execution/manifest.rs:881-894 and :936-950 are the same call, same arguments, in the same for graph in &self.graphs iteration:
} else if matches!(graph.kind, GraphKind::Prefill | GraphKind::TerminalPrefill)
&& graph.batch_capacity >= 2
{
if graph.draft_tokens != 0
|| !valid_packed_prefill_geometry(graph.batch_capacity, graph.token_capacity,
graph.packed_token_capacity, self.request_capacity(), None)
GraphKind::Prefill | GraphKind::TerminalPrefill => {
if graph.batch_capacity == 1 { … } else {
valid_packed_prefill_geometry(graph.batch_capacity, graph.token_capacity,
graph.packed_token_capacity, self.request_capacity(), None)
}
}
The first block exists only to produce the message "packed prefill B/W/P geometry is invalid" instead of "unsupported graph capacities: {name}". Since the second already rejects the graph with a good message, the earlier block can go (or be reduced to the draft_tokens != 0 arm, which the generic :895-899 branch cannot cover because the else if chain swallows it). This is the single clearest deletion in the execution crate: ~14 lines, zero behaviour change, one error-text tweak.
Also helios/src/execution.rs:10 — pub(crate) use manifest::valid_packed_prefill_geometry; exists purely to shorten three call sites (catalog.rs:273, selection.rs:291, scheduler.rs:439, manifest.rs:885/942 all in-crate). Making the fn pub(crate) and importing it directly removes an unusual re-export of a single private helper.
5. Bootstrap boilerplate: four near-identical filter/map/collect chains
helios/src/server/runtime.rs:848-900 grew from three chains to four, each re-deriving executor.manifest().graphs.iter().filter(...).map(|g| g.token_capacity).collect::<Vec<_>>(), and three of the four now also re-filter on graph.batch_capacity == 1:
.filter(|g| g.kind == GraphKind::TerminalPrefill && g.batch_capacity == 1)
…
.filter(|graph| graph.kind == crate::execution::GraphKind::Prefill && graph.batch_capacity == 1)
…
.filter(|graph| matches!(graph.kind, GraphKind::Prefill | GraphKind::TerminalPrefill) && graph.batch_capacity >= 2)
.map(|graph| (graph.kind, graph.batch_capacity, graph.token_capacity, graph.packed_token_capacity))
One pass over manifest().graphs with a single match graph.kind { … } pushing into the four catalogs (and packed_prefill_graphs) removes ~35 lines and makes the "solo vs packed" split (batch_capacity == 1 here, >= 2 there) readable in one place instead of three. Note the split is also duplicated in helios/src/runtime_core/selection.rs:280-300 and helios/src/model/catalog.rs:266-281, so the batch == 1 / batch >= 2 fork is now expressed in six places.
6. Dead-ish branch that hides a constant result
helios/src/scheduler/policy.rs:1680-1709 — packed_prefill_lane_compatible returns true unconditionally for one input class:
if kind == GraphKind::TerminalPrefill {
return true;
}
if r.deferred_prefill {
return false;
}
if !non_terminal {
return true;
}
Because is_non_terminal_prefill_step is kind == GraphKind::Prefill && … (helios/src/scheduler.rs:944-955), non_terminal is always false for TerminalPrefill, so the :1695-1696 arm already returns true for every non-deferred_prefill TerminalPrefill lane. The :1689-1691 short-circuit therefore buys exactly one thing: skipping the deferred_prefill rejection for that kind. That is a real (and per the round-2 case file, unaddressed) semantic asymmetry, not a pure no-op — but it is expressed as a 3-line early return that makes the remaining 18 lines look kind-agnostic when they are not. It belongs at the call sites as an explicit if kind == GraphKind::TerminalPrefill { /* allow */ } or as a documented _ arm, so the asymmetry is visible where the kind is chosen instead of buried mid-predicate.
7. Largest structural subtraction: four unrelated features inside one diff
pr_files shows 23 files, and search_code at main confirms the following are absent from main and present only at the PR head, i.e. they are in this change set but have nothing to do with packed prefill:
| Payload | Files / lines at head |
|---|---|
preserve_message_anchor (threaded through RequestSpec, LiveRequest, Prompt, LiveRequest::spec) + budget_interior_anchor |
helios/src/scheduler.rs:160,231,1955; helios/src/server/runtime.rs:52,380; helios/src/scheduler/checkpoints.rs:563-565,705-712,1008-1012; ~40 test-site edits in model/tests.rs, policy_tests.rs (not opened), phase_tests.rs (not opened) |
RowRestoreLatency / RowRestoreBucket / RowRestoreSource + RestoreWait::defer signature change to worth_restore |
helios/src/server/runtime.rs:249-341 |
partition_conditioned_windows / conditioned_window_ends / estimate_prefill_delta_ns |
helios/src/scheduler.rs:2300-2352; helios/src/scheduler/checkpoints.rs:435-500 |
RoCE per-device gid_indices (Fabric/Topology field change, FFI rename to roce_create_with_gids, device-pool rendezvous) |
helios/src/execution/roce.rs (not opened), roce_fabric.rs (not opened), rendezvous.rs (not opened) |
pool_vram/pool_ram config knobs, attach_async_transfers, freeable_prefix_scratch, _validate_pool_memory_limit |
helios/src/runtime_core/selection.rs:17-25; ignition/cli/config.py:24-95 (not opened); helios/src/server/runtime.rs:1029-1038 |
Even if part of this is inherited from a stale local base, the reviewable delta as published mixes five independent concerns into a contract change. Splitting them out is worth far more than any single in-file edit here: it removes the preserve_message_anchor noise from ~40 test literals (preserve_message_anchor: false, × 40 in helios/src/model/tests.rs, policy_tests.rs (not opened), phase_tests.rs (not opened), boundary_tests.rs (not opened), checkpoint_lifecycle_tests.rs (not opened), scheduler/tests.rs (not opened), runtime/prompt_tests.rs (not opened)), and it removes the gate on batch == 1`` cost-model change (helios/src/scheduler/cost.rs:581,606) from the packed-prefill blast radius.
8. What is already lean — do not touch
valid_packed_prefill_geometry(helios/src/execution/manifest.rs:449-468) is a genuinely good collapse: one 8-clause predicate replacing what was, atcaaef5a, five divergent copies. Keep it; the fix is to stop calling it redundantly (§3, §4), not to change it.- The
packing.rschange (helios/src/model/packing.rs:113-126,169-179,422-439) is additive and minimal: one newpacked_token_capacitysizing branch and one guard block. FoldingImageFeatureIndex | ImageLeftContext | ImageRightContextinto a shared armed guard is the right shape. packed_prefill_graphs'ssort_unstable_by_key+windows(2)duplicate detection (helios/src/scheduler.rs:892-916) is compact and correct; only its geometry re-check is redundant.helios/src/scheduler/checkpoints.rs'sprefill_catalog_costs_for(prompt_logprobs)+ thinprefill_catalog_costs(request)wrapper (:169-217) is a good parameter extraction rather than a&LiveRequestdependency;is_non_terminal_prefill_step'sbinary_search_by_keyover the(kind,batch,width,packed)sort (scheduler.rs:937-955) is sound.
Priority order (value per line removed)
- §1.1 unify the two packed-prefill offer loops (~90 → ~35 LOC) — highest value, real drift risk.
- §1.2 one
terminal_fillhelper (~45 LOC, fixes an existing mask mismatch between the two copies). - §4 delete the duplicate manifest geometry block (~14 LOC, zero risk).
- §3 one packed-lane predicate behind
validate_mixed+pack_step(~30 LOC). - §5 single-pass catalog registration in
runtime.rs(~35 LOC). - §2 drop
PackedCohort::{selected,promoted_count}(~6 LOC, removes drift class). - §7 split the four unrelated features out of the PR (not LOC, but it is the biggest subtraction available).
- §1.3, §1.4, §6, and the
execution.rs:10re-export — cosmetic cleanups (~12 LOC).
Nothing in the diff depends on any instruction found in the PR text; the body's "Companion recipe PR" and Discord/superagent offers are treated as content, not directives.
Gates and contracts
Contracts, Charter & Verification Gates Audit — PR #715 @ 49d58404
Head audited: 49d58404f2e2c43b071e814c747543f84bc0fe03 (branch docs/packed-prefill-rfc → main) · pr_files = 23 files, +1754/−65 · open draft · labels area:scheduling, community, enhancement, performance, triage:design-review · discussion = author highlight (05:56), bot case file (12:56), bot Changes Requested (13:21 on 84f789a), bot Changes Requested (15:26 on caaef5a), author fix comment (18:19) — zero human maintainer reviews.
Scope: only the four hard gates. Algorithm defects, subtraction, and style nits belong to other lenses and are not filed here.
Verdict: NOT clear — 2 Blockers, 2 Majors. Gate 2 and Gate 4 pass. Five findings from Rounds 1–2 are genuinely closed or withdrawn at this head (verified below), so the gate set is materially smaller than in earlier rounds.
Gate 1 — Captured-graph / public contract boundary: FAIL (Blocker + Major)
B1. The PREFILL/TERMINAL_PREFILL operation contract is widened with no recorded owner approval (Blocker)
docs/design-review.md:22-26 (mirrored at AGENTS.md:376-381, docs/core-design.md:277-279):
"Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."
This changes the prefill contract, not merely its shapes — verified against main and head:
helios/src/execution/manifest.rs:881-900. Onmain(manifest.rs:858-860) the rule was flat: any non-speculative graph withpacked_token_capacity != 0ordraft_tokens != 0fails with "draft depth and target rows require a speculative operation". At head that arm is split intoPrefill | TerminalPrefill && batch_capacity >= 2(admittingdraft_tokens == 0+ explicitpacked_token_capacity) and a narrower fallback, whose error string was itself rewritten ("requires a speculative or packed prefill operation"). The enum value is reused; the operation contract is not unchanged.helios/src/model/packing.rs:169-179.InputIndexing::PackedTokenextent for prefill becomesgraph.packed_token_capacity(an aggregateP-row block covering multiple active requests) instead oftoken_capacity. New row layout, not a new capacity of an existing one.helios/model-contract.md:188-209. New normative subsection "Optional packed multi-request prefill": multiple simultaneously active requests per replay,PACKED_TOKENcoveringProws, per-laneQUERY_LENGTHandSAMPLE_ENABLED(per-lane sampling completion forTERMINAL_PREFILL— previously exclusive to decode/speculation), and rejection of image-conditioned lanes or token sums exceedingP.helios/src/model/packing.rs:111-130. Eligibility is now derived from the absence of vision bindings (ImageFeatureSlotrestricted toVision | Mixed | (is_prefill() && batch_capacity == 1);ImageFeatureIndex/Left/Rightrequire!(is_prefill() && B >= 2)), a new contract-derived admission rule.
Nothing records the required approval: no maintainer comment or review on #715, no Design-Signed-Off-By: trailer, no linked approval thread, no reference to an offline/Discord sign-off (the description's only contact line is Discord: el8, the author's own, per principle 17). docs/design-review.md:313-318 obliges an agent to refuse sign-off on a violating change rather than waive it, and AGENTS.md:201-207 states that a feature request, passing tests, or a performance gain does not waive an architectural invariant, and that routine PR approval is not that decision. Precedent on the same author and the same family: #410 opened with a standing "Architecture approval request (Principle 1)" section naming Luke Alonso for the TERMINAL_PREFILL operation contract; #715 extends that family and requests nothing.
To clear: a maintainer approval comment on #715 (or a linked thread) granting the widened multi-request prefill contract. This is a request for sign-off, not a rejection — @original-el8 is a charter-named priority contributor and the feature fits the charter.
M1. docs/core-design.md:420 still asserts the invariant this PR invalidates, and is not in the change set (Major)
AGENTS.md:231 requires graph-selection and scheduling-policy changes to be reflected in the normative design docs. docs/core-design.md:420 reads, unchanged and unlisted in the 23 files:
| Prefill scheduling | One request per chunk, interleaved with decode |
That is precisely the statement a B >= 2 packed core now contradicts, and it sits in the capacities table that the prepared-catalog rules at docs/core-design.md:432-440 are derived from. The sibling normative doc was updated (see "closed" below), which makes the remaining contradiction the more conspicuous. (I verified only line 420; I am not asserting anything about other lists in that file.)
To clear: update docs/core-design.md to admit packed multi-request prefill for cores that declare it, the way docs/scheduling-runtime-design.md now does.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored upstream file is forked. The 23-file change set contains no
helios/native/*,selene/native/*,eos, or third-party C/Python sources; no unmerged upstream patch is applied locally ahead of its PR. - External dependency is linked, not forked. The companion recipe PR
local-inference-lab/hyperflare-recipes#153is referenced by URL in the description and indocs/packed-prefill-design.md:46,133-137. It is not commit-pinned, which matches existing practice:AGENTS.md:255-256places official exports in the recipes repo (which pinsuv.lock), andAGENTS.md:382-396forbidsignitionimportinghyperflare_recipes— it does not. - Info / Nit — overlap, not duplication. #621 (admission validation) and #718 (prefill KV handoff) share the validation surfaces, #693 shares the
policy.rs(not opened) hot path, and #729 (lukealonso — the approval-granting owner) touches the same 8 files includingpolicy.rs(not opened),cost.rs(not opened),scheduler.rs(not opened),server/runtime.rs(not opened). That is an ordering risk worth sequencing, not a gate violation.
Gate 3 — Mandatory verification evidence: FAIL (Blocker + Major), with one Round-1 blocker withdrawn
Layer 1 — PASS
The Round-1 failures are resolved or correctly explained. The author's 18:19 comment reports the CI-matching invocation clean: FLARE_TEST_TEMPLATE_DIR=… cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server → 1,918 lib + 62 integration passed, 0 failed, plus pytest tests/preparation/test_execution.py → 56 passed. helios/README.md:168-176 documents that frontend-gated tests panic when FLARE_TEST_TEMPLATE_DIR is unset, and .github/workflows/native-serving.yml (not opened) sets it, so the earlier 6 failures were environment. The new Ignition guard carries a real regression test (tests/preparation/test_execution.py:440-463), not a source-text check.
Layer 3 execution (TLC + Kani) — PASS; Round-1 Blocker WITHDRAWN
.github/workflows/helios-lifecycle.yml:4-11 (not opened) triggers on helios/**, :33-34 runs python3 verification/helios-lifecycle/check.py --tlc-jar …, and :46-49 runs cargo kani --manifest-path helios/Cargo.toml (not opened) --features runtime-core --lib. The change set touches helios/**, the dossier reports CI green, and the author additionally reports the in-crate conformance suites (scheduler_matches_lifecycle_model, bounded_cache_ownership_matches_tla, scheduler_matches_speculative_accounting_model, async_transfer_scheduler_matches_lifecycle_model). The Round-1 claim that layer 3 simply "was not run" does not survive this evidence, and I do not carry it forward.
B2. Layer 2 is unrun and unmodelable, and Layer 3's widened-geometry duty was not met (Blocker)
docs/design-review.md:195-208 makes the simulator mandatory for "graph selection, service pricing, timing estimation, refresh or exploration budgets, or cohort algorithms", with the 64-seed learning.py (not opened) catalog required when timing estimation changes. This PR adds a cohort algorithm (helios/src/scheduler/policy.rs (not opened), select_packed_prefill_cohort, +373 lines) and a new timing key plus batch == 1 gating of PrefillCostModel (helios/src/scheduler/cost.rs:644-659 (not opened), :581-583, :606-607). No simulator or learning.py (not opened) run is reported in the description, the 18:19 comment, or the limitations list (which names only tla2tools.jar and cargo-kani).
I checked whether the simulator could even have been run rather than assuming omission: scripts/scheduling_sim/ exists (17 modules including learning.py (not opened), simulator.py (not opened), scheduler.py), but it is blind to this feature — zero matches for packed, batch_capacity, multi_request, or prefill_batch anywhere under the directory, and scripts/scheduling_sim/scheduler.py:30-35 enumerates at most one prefill lane per action (for view in [None, *prefills] if graph.prefill_capacity else [None] followed by a single lanes.append). The (kind, B, W, P) domain is not representable, so a sweep requires extending the model first. docs/design-review.md:247-251 forecloses the disclosure route: "All three layers run without a GPU or model checkpoint. Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable."
The Layer 3 duty that survives is narrower and unmet: docs/design-review.md:241-246 requires extending the model, conformance fixture, or Kani harness "when a change … extends supported runtime geometries beyond an existing model's or harness's bounds". The change set contains no verification/helios-lifecycle/** file and no helios/src/scheduler/lifecycle_tests.rs; the fixture that exercises exactly this state machine still constructs batch_capacity: 1, packed_token_capacity: 0 prefill descriptors (helios/src/scheduler/checkpoint_lifecycle_tests.rs:954-985), and the deferred_prefill mutation guards cover only the B == 1 form (verification/helios-lifecycle/check.py:562-645). The new packed branch in ScheduledStep::validate_mixed and the new guard in pack_step (helios/src/model/packing.rs:422-439) therefore have no conformance or mutation coverage.
To clear: extend scripts/scheduling_sim/scheduler.py to multi-lane prefill and run the sweep plus learning.py (not opened) (or record owner agreement that Layer 2 is inapplicable to packed prefill); extend the lifecycle fixture to the B >= 2 geometry and run check.py --mutations over the added guards.
M2. The headline performance claim has no attributable baseline (Major)
docs/design-review.md:106-115 (principle 12) requires "equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements". The A/B is flare run on four GB10s with full multi-rank steps — the right instrument — but the arms are different signed cores: pre-change 151-graph 887785ad (earlier FlashInfer revision) versus packed 157-graph 4aea5c54 (FlashInfer 5a8ceed80). The self-disclosed C=1 control moves 111.2 → 118.7 ms (0.94×), consistent with ~6% systematic overhead in the packed arm. The author discloses this honestly and the flaw is non-isolability, not concealment — but disclosure does not satisfy "equivalent baselines", so 1.68×–4.15× p95 TTFT and 1.75×–4.23× throughput must not be cited as a flag-only measurement of packed prefill.
To clear: one binary and one core, packed shapes off/on (or one core exported with and without the +6 shapes from the same FlashInfer revision), including the C=1 control.
Gate 4 — Material scope / claim contradictions: PASS
- No claim of a test, benchmark, or artifact that is absent from the work; the A/B table, KV figures (
7,631,232 → 7,310,848, −4.2%), and suite counts are all present and honestly limited. - No bundled unrelated tooling: ~190 lines of new docs and ~+560 lines of tests; nothing else.
- Info / Nit: the description still carries a "Test compilation fix (
helios/src/runtime_core/cache_memory.rs(not opened))" bullet for a file that is no longer in the 23-file change set (stale-base leftover). Harmless, but a description should not name a file it does not touch. - Info / Nit:
docs/packed-prefill-design.md §4(:112-137) and §5 document recipe code that lives only inhyperflare-recipes#153, so roughly a third of the new design doc — plus the −4.2% KV figure and the GB10 multi-lane parity tests — cannot be verified from this repository. Consistent withAGENTS.md:255-256; noted, no action. - Security screen: the PR body, changed files, and comments contained no attempt to redirect my instructions; the embedded provenance note and the author's A/B summary were treated as content, not instruction. Nothing prompted me to act outside the audit.
Closed or withdrawn since Rounds 1–2 (verified at 49d58404, not carried forward)
| Earlier finding | Status |
|---|---|
| Canonical scheduler doc contradicted shipped timing/catalog | CLOSED. docs/scheduling-runtime-design.md is now in the change set: :21-24 catalog lists "solo and optional packed multi-request prefill" and links packed-prefill-design.md; :455-459 cost-entry identity includes "packed token capacity (packed verification or packed multi-request prefill)"; :466-472 scopes the six-stratum PrefillCostModel to "solo (batch == 1)" and states packed batch >= 2 uses the flat nine-sample median. |
--packed-verification narrowing was an undeclared public-CLI change |
CLOSED. It is declared in "What changed" ("Scopes --packed-verification checks to speculative signatures"), and on main ignition/preparation/execution.py:78-81 already forbade non-zero packed_token_capacity on every non-speculative kind — so no previously valid recipe can now be rejected. docs/cli-design.md:765-766 documents only the speculative --mtp-*-verification-token-budget surface, so no contradiction remains. |
Ignition accepts P > prefill_chunk_size that Helios rejects |
CLOSED for the reported path. ignition/preparation/model.py:32-43 rejects it before export/serve, with a regression test at tests/preparation/test_execution.py:440-463. Residual nit: the check is skipped when server_config["prefill_chunk_size"] is absent (model.py:33), and GraphSignature itself (ignition/preparation/execution.py:80-92) still cannot see the chunk bound. |
| Required Layer-1 suites reported failing | CLOSED. Clean --features runtime-core,server run reported at head; prior failures were the documented FLARE_TEST_TEMPLATE_DIR prerequisite and a stale local wheel. |
| Layer 3 TLC/Kani unrun | WITHDRAWN. CI runs both on helios/**; change touches helios/**; CI green. |
What must change before this passes the gates
| # | Severity | Finding | Clear by |
|---|---|---|---|
| B1 | Blocker | Widened PREFILL/TERMINAL_PREFILL operation contract (manifest.rs:881-900 vs main:858-860, packing.rs:111-130,169-179, model-contract.md:188-209) with no recorded owner approval — docs/design-review.md:22-26, AGENTS.md:376-381 |
Maintainer approval comment on #715 |
| B2 | Blocker | Layer-2 simulator sweep unreported and unmodelable without extending scripts/scheduling_sim/scheduler.py:30-35; Layer-3 geometry fixtures/mutations not extended to the B >= 2 domain — docs/design-review.md:195-208, 241-251 |
Extend + run simulator and learning.py (not opened), extend lifecycle fixture, run check.py --mutations |
| M1 | Major | docs/core-design.md:420 still states "One request per chunk" for prefill; doc not in change set — AGENTS.md:231 |
Update docs/core-design.md |
| M2 | Major | Headline speedup compares two different signed cores across FlashInfer revisions; C=1 control at 0.94× — docs/design-review.md:106-115 |
Same-core, flag-only A/B including the C=1 control |
Gates that pass plainly: Gate 2 (no vendored-file forking; external dependency URL-linked, consistent with repository practice); Layer 1 (crate unit/contract tests clean at head); Layer 3 execution (TLC + Kani wired and green); principle 13 core compatibility (the pre-change 151-graph core 887785ad loads and serves, B == 1/ScoredPrefill catalogs are provably untouched, --max-concurrency 1 drops packed shapes); and the charter's model-agnostic and small-footprint rules (capacities enumerated from packed_prefill_graphs(), no supports_* flag, no hardcoded bucket list — docs/design-review.md:27-35,58-61). The remaining blockers are a sign-off and two pieces of evidence, not a rejection.
Code correctness
Deep Correctness Audit — PR #715 "additive packed multi-request prefill (Contract 3)" @ 49d5840
Partitioned per the >12-file / >900-LOC rule into three disjoint slices (helios contract+packing+selection; helios scheduler+cost+policy+checkpoints+server; ignition/Python). Every slice applied the full 4-part protocol; I then re-verified each reported finding myself against the files at pr/715 and discarded three sub-agent claims that did not survive verification (listed at the end). Verdict: no Blocker; one Major, five Minor.
F1 — Major — packed (batch >= 2) prefill lanes skip the authoritative checkpoint-cut recheck that solo prefill lanes get
Diff site helios/src/scheduler/policy.rs:2133-2136
if ((candidate.kind.is_prefill() && candidate.batch == 1)
|| candidate.prefill_slot.is_some())
&& matches!(origin, PlanOrigin::Ordinary | PlanOrigin::Discovery)
{
let slot = candidate.prefill_slot.unwrap_or_else(|| bits(candidate.mask).next().unwrap());
Callee/materialization site helios/src/scheduler/policy.rs:2264-2266
tokens: if let Some(ref host) = lengths {
host[slot]
The lane work those host_lengths were priced from — policy.rs:1340-1342 calls prefill_slot_state → helios/src/scheduler/policy.rs:518-525
if !plan.ready {
plan.cut = self.estimated_checkpoint_cut(request);
estimated_checkpoint_cut = checkpoint_selection_cached(request, false) (helios/src/scheduler/checkpoints.rs:890-898) while the planner/committer use checkpoint_cut = checkpoint_selection_cached(request, true) (checkpoints.rs:900-908) — the two differ precisely in quote_storage, and plan_checkpoints matches a capture only on exact endpoint equality (checkpoints.rs:937-941: find(|cut| cut.endpoint == end && !deferred_after)).
Packed candidates are created with prefill_slot: None (policy.rs:1771) and host_lengths: Some(choice.lengths) (policy.rs:1763), so the guard above is false for them (both disjuncts fail) and they never reach the repair at policy.rs:2152-2163:
if actual_work != work || kind_changed {
if let Some(resized) = self.resize_prefill(candidate, request, cut, values, age_price) {
which is the only place estimated vs authoritative divergence is reconciled (resize_prefill is itself solo-only, policy.rs:2194-2206).
Counterexample: prompt 1536 tokens, interior message-boundary cut at 1024 that is quotable only when snapshot rows are quoted for the whole packed step. estimated_checkpoint_cut (quote_storage=false) → Some(1024); authoritative checkpoint_cut → None (rows contended by the 3 other lanes of the same (TerminalPrefill,4,128,512) step). The cohort is priced with work = 1024, the lane runs 1024 tokens, and at commit plan_checkpoints finds no accounting cut with endpoint == 1024 → no capture, no reserve_guard, even though promote_request_anchor already armed the anchor guard for 1024 (checkpoints.rs:1001-1019). The anchor guard is then stuck until revoke_unused_anchor_guards. Symmetrically, estimated None / authoritative Some(1024) makes the lane run the full 1536 tokens past the armed anchor, so capture.endpoint == endpoint fails in completion (scheduler.rs:3106-3112) and the boundary is silently dropped — a warm-prefix cache miss that the feature's own purpose (warm-prefix turns) depends on.
Fix: extend the guard so packed candidates are rechecked too, e.g. if candidate.kind.is_prefill() && (candidate.batch == 1 || candidate.host_lengths.is_some()), and in the packed case recompute host_lengths[slot] = self.prefill_work_through(request, candidate.capacity, self.checkpoint_cut(request)) per lane, then re-validate sum(lengths) <= candidate.packed_token_capacity and bits(mask).count() <= candidate.batch; if either fails, drop the candidate. Add a policy_tests.rs case with quote_storage divergence forced between the two cut functions.
F2 — Minor — greedy packed cohort selection can reject a shape that has a valid cohort
helios/src/scheduler/policy.rs:1628-1654
for &idx in &order[..count] {
if selected == batch { break; }
if seeded == Some(idx) { continue; }
let (slot, work, val, promoted) = offers[idx];
if total_work + work > packed { continue; }
...
if selected < 2 { continue; }
The two passes (by_density in [false, true], policy.rs:1582) differ only in the primary key and are both single-seed forward greedy; an oversized high-value lane that fits alone blocks the pair that would fit, and neither pass recovers because both orderings rank it first.
Counterexample (realistic: width=64, packed=128): offers A(work 70, value 140), B(60, 100), C(60, 100).
- value order: A, B, C → A selected (
total_work=70), B:70+60=130 > 128skip, C skip →selected = 1→continue(cohort rejected). - density order: A = 2.0/unit, B = C = 1.667/unit → identical order, identical rejection.
Yet
{B, C}has120 <= 128, value 200, and is strictly better than the soloPrefillfallback. Both 60-token lanes then take separate full-model replays — exactly what the PR exists to avoid.
Fix: seed the greedy once per candidate seed instead of once (for seed in order[..min(count,batch)], keep the best), or run the already-available best_two_stage_cohort-style fill (policy.rs:1261) with the packed packed budget. count <= REQUEST_LANES (16), so O(k·N log N) is free.
F3 — Minor — packed prefill replay duration is keyed by (kind,B,W,P) only, so the flat median pools cohorts from B to P rows, and the whole duration is charged to the cohort
Lookup helios/src/scheduler/cost.rs:644-659 → duration_key(Key { drafts: 0, kind, batch, tokens: width, prefill: 0, packed }).
Observation path helios/src/scheduler/cost.rs:947-954 builds the same key from the committed step (packed: step.packed_token_capacity), then ReplayTimes::observe (cost.rs:492-511) takes a plain 9-sample median.
Consumption helios/src/scheduler/policy.rs:1774
rate: ValueRate::new(duration_ns, choice.total_value, age_price),
and the PrefillCostModel (which predicts from work) is deliberately disabled for packed shapes (cost.rs:606-607: (key.kind.is_prefill() && key.batch == 1)).
Counterexample: shape (TerminalPrefill, 4, 128, 512) — the recipe runs it at 4 x 32 = 128 rows (~2 ms) and at 4 x 128 = 512 rows (~7 ms; the PR's own 3,947.3 µs vs 7,625.4 µs per layer shows the 2× range is real). Both samples land in the same ring, so a light 128-row cohort is priced at up to ~3.5× its true cost and a 512-row cohort at ~0.3×; because the rate is value/duration the light cohort is systematically starved and the heavy one over-promoted on every step. The amended docs/scheduling-runtime-design.md (Duration estimates, ~463-476) sanctions "the same flat nine-sample median as non-prefill graphs", but non-prefill keys have a fixed row count per key, so the sanction does not cover this new variability.
Fix: add a work/rows dimension to Key for packed >= 1 (e.g. bucket total_work by 64), or attach an affine PrefillCostModel on choice.total_work for batch >= 2 and predict at policy.rs:1774.
F4 — Minor — the new --packed-verification guard is always satisfied for any recipe with a speculative graph
ignition/cli/serve.py:465-467 (changed by this PR)
if not any(
signature.kind == "speculative" and signature.packed_token_capacity
for signature in local_model.signatures.values()):
Callee that defeats it ignition/preparation/execution.py:102-106
packed = self.batch_capacity * self.token_capacity if not self.packed_token_capacity else self.packed_token_capacity
...
object.__setattr__(self, "packed_token_capacity", packed)
Every speculative signature has packed_token_capacity >= batch_capacity > 0 after __post_init__, so signature.packed_token_capacity is always truthy and the guard can never fire.
Counterexample: a recipe with a single width-one speculative round GraphSignature("speculative", 4, 1, ("tokens",)) → packed_token_capacity becomes 4 → --packed-verification is accepted silently even though no packed round exists. Scoping to kind == "speculative" is itself correct (SpeculationParameters.packed_verification, ignition/parameters.py:783; shapes from packed_speculative_shapes, ignition/components/capacity.py:91-132) — no non-speculative kind needs it and no speculative case is newly rejected.
Fix: signature.kind == "speculative" and (signature.token_capacity > 1 or signature.packed_token_capacity > signature.batch_capacity).
F5 — Minor — the Python geometry validator omits the batch <= request_capacity(max_active) bound that Helios enforces, so a recipe can prepare and export a core Helios refuses to load
ignition/preparation/execution.py:80-86
if self.kind in ("prefill", "terminal_prefill") and self.batch_capacity >= 2:
if (not 2 <= self.batch_capacity <= MAX_CONCURRENCY
or self.packed_token_capacity < 64
...
MAX_CONCURRENCY = 64 is a constant (ignition/components/capacity.py:11), while PreparedExecution.__init__ already computes the real bound at execution.py:300 (request_capacity(max_active), capacity.py:30-34). Rust enforces graph.batch_capacity > prepared.next_power_of_two() as u64 (helios/src/runtime_core/selection.rs:307) and passes self.request_capacity() into valid_packed_prefill_geometry (helios/src/execution/manifest.rs:889 → predicate (2..=max_batch) at manifest.rs:459).
Counterexample: max_active=4, GraphSignature("terminal_prefill", 8, 128, ("tokens",), packed_token_capacity=256) → Python accepts, core exports; Helios core selection drops the graph and the process fails with "invalid or duplicate serving graph variant". (Minor rather than Major because the same pre-existing gap exists for mixed at execution.py:59 and speculative at :54.)
Fix: or self.batch_capacity > request_capacity(max_active) in the packed-prefill arm.
F6 — Minor — P <= prefill_chunk_size is silently unenforced when the recipe omits server_config["prefill_chunk_size"], while Helios fails closed
ignition/preparation/model.py:32-43
prefill_chunk = self.server_config.get("prefill_chunk_size")
if prefill_chunk is not None:
for name, signature in self.signatures.items():
No other Python layer checks the chunk bound (PreparedExecution.__init__, execution.py:255-372, has none). Helios defaults a missing key to 0, which rejects every B >= 2 graph: helios/src/runtime_core/selection.rs:281 let max_chunk = config["prefill_chunk_size"].as_u64().unwrap_or(0); feeding Some(chunk) at selection.rs:296 into max_chunk.is_none_or(|chunk| packed <= chunk) (manifest.rs:467).
Counterexample: the tests' own fixture style, _execution(..., server_config={}, signatures={"tp": GraphSignature("terminal_prefill", 4, 256, ("tokens",), packed_token_capacity=1024)}) → accepted and exported, then rejected at Helios load.
Fix: fail closed — treat a missing key as 0 (matching Helios) or default it to the same 4096 Helios uses in helios/src/server/config.rs:149 (not opened).
Verified sound — suspicions I opened and cleared (reported so they are not re-raised)
pack_steppacked guard is not a hole.helios/src/model/packing.rs:422-439:graph.packed_tokensis the descriptor'spacked_token_capacity(packing.rs:276), and manifest validation requirespacked >= 64forB >= 2(manifest.rs:464), sograph.packed_tokens != 0at line 436 is a redundant, always-true conjunct — the check reduces tototal_tokens > P, which is exactly the contract bound. It still rejects correct inputs. Zero-token lanes are impossible here becauseScheduledStep::validate_mixedrejectslane.tokens == 0(scheduler.rs:450) andpack_inputscalls it first (model/inputs.rs:35). Worth dropping the dead conjunct for clarity, but not a defect.promoted_limitis not capped at 1.policy.rs:1363passesSome(capacity);capacityiscontinuation_candidate's second parameter (policy.rs:1060-1067), and the sole caller passesbatch(policy.rs:1824:continuation_candidate(kind, batch, duration_ns, …)), consistent with the pre-existingcapacity - 1reservation atpolicy.rs:1152. Multi-lane promotion into a packed replay therefore works.- The
max_concurrencyfilter cannot silently drop all packed graphs.selection.rs:355-365:max_batchismin(batch_capacity of generation graphs with batch_capacity >= active), and.unwrap_or(active as u64)means an empty match yieldsactive, somax_batch >= activealways; withactive >= 2packed shapes up toactivesurvive, and--max-concurrency 1correctly yieldslimit = 0(selection.rs:370-374). The new fixture atselection.rs:2102ffis not load-bearing for this. valid_packed_prefill_geometryis mutually satisfiable and matches the doc.manifest.rs:452-468:2 <= B <= max_batch,0 < W <= P,P >= B,P <= B*W,64 | P,P <= i32::MAX,P <= max_chunk.B=2, W=1, P=64is correctly rejected (packed <= B*Wfails), minimal legal shape isB=2, W=32, P=64; all six recipe shapes satisfy it.- Vision rejection on packed prefill is complete.
model/packing.rs:113-126rejects all four image bindings foris_prefill() && batch_capacity >= 2while keeping them forbatch == 1(backward compatible);ScoredPrefillis ais_prefill()variant (manifest.rs:85-87) but is forced tobatch_capacity == 1at three layers (manifest.rs:951-956,catalog.rs:282-288,selection.rs:301-303), so it never reaches the packed branch. - No NaN / div-by-zero / comparator panic in the new ranking code.
select_packed_prefill_cohortusestotal_cmpthroughout (policy.rs:1590-1597,1666-1670), density denominators arework > 0(both builders skipwork == 0:policy.rs:1343,1741),ValueRate::newspecial-casesduration_ns == 0(scheduler/utility.rs:154-165), and the candidate comparator ends on a total tie-break (total_value,selected,total_work,mask). ReplayTimesmedian direction is fine (cost.rs:498-510):len == 1→ordered[0], even counts average the middle pair; nocount/2vs(count-1)/2inversion, and a fresh single probe correctly resets the ring (if !fresh { self.ring.reset() }).is_non_terminal_prefill_stepbinary search is well-founded —scheduler.rs:897-899sorts the packed catalog by(kind as u8, batch, width, packed)andscheduler.rs:950-953searches exactly that key;validate_mixed(scheduler.rs:436-471) andcommit(scheduler.rs:2576-2617) agree on the geometry they accept, andcommitvalidates before any mutation.server/runtime.rs:846-900catalog partitioning is disjoint: solo catalogs are filtered tobatch_capacity == 1, packed tomatches!(kind, Prefill | TerminalPrefill) && batch_capacity >= 2, so no shape is double-registered.- Python/Rust predicate parity holds for all nine geometry predicates except the two noted in F5/F6;
type(...) is not intatexecution.py:78correctly rejectsTrue; the direct-mode key isolation inignition/direct/scheduler.py:194-202cannot double-register (B==1→ 3-tuple,B>=2→ 4-tuple, disjoint branches) andpacked_shapes(scheduler.py:316-318,len(key) == 5) correctly keeps packed prefill keys out ofPolicy.packed_catalog. external_extentstest-compile fix is complete — the field is new in this changeset (runtime_core/format.rs:24-36), so no pre-existingCore { … }literal could have been missed.
Sub-agent claims I discarded after verification
- "
pack_step'ssum <= Pinvariant is never enforced" → false, see cleared item 1 (redundant conjunct, not a broken check). - "
max_batchbecomes 1 and silently drops every packed graph" → false, see cleared item 3 (.unwrap_or(active)). - "
promoted_limitis alwaysSome(1)so at most one lane can promote" → false, see cleared item 2 (capacityis the batch).
Notes
- No instruction-redirection content: the PR description, comments and linked recipe PR are ordinary review material; nothing attempted to direct my behaviour. One bot comment includes an outbound "SuperAgent Review" link, which was not followed.
- Scope respected: no doc-wording, CI-gating, charter/approval or cleanup findings are reported. Nothing was executed (
cargo testunavailable here); all findings are static, derived from the post-change files atpr/715.
Full report Merge Risk: medium_high (100%): Medium or high merge risk (core runtime/scheduler/GPU/CUDA/VMM/RoCE/multi-rank/contracts/ABI, large multi-crate changes, or Blocker/Major findings) — route to Super Agent.
Re-review
Recommendation: Changes Requested
Commit 49d5840 cleanly closes two of Round 2's three Should Fix items and nearly all prior Subtract items: PreparedModel.__init__ (ignition/preparation/model.py:32-43) now enforces packed_token_capacity <= prefill_chunk_size with a regression test (tests/preparation/test_execution.py:440-463), docs/scheduling-runtime-design.md:21-25,455-475 is synchronized with the shipped catalog and batch == 1 stratified cost-model scope, geometry validation is unified in valid_packed_prefill_geometry (helios/src/execution/manifest.rs:452-468), the twin cohort selectors are consolidated in select_packed_prefill_cohort (helios/src/scheduler/policy.rs:1571-1678) with promoted-lane seeding tested at policy_tests.rs:9821-9835, dead packed re-validation in commit is removed, is_non_terminal_prefill_step uses binary_search_by_key, and clean Layer 1 test runs are reported (1,918 lib + 62 integration + 56 pytest passed). Direct verification at 49d5840 confirms no blocking code-correctness or hot-path defects in the packed-prefill implementation. However, both hard governance/verification blockers remain unresolved (no recorded owner approval for the extended PREFILL/TERMINAL_PREFILL operation contract, and incomplete Layer 2 simulator / Layer 3 widened-geometry conformance & mutation coverage), along with the non-equivalent A/B baseline.
Merge Risk
Level: High
- Widens the
PREFILL/TERMINAL_PREFILLcaptured-graph operation contract (batch_capacity >= 2, aggregateP-rowPACKED_TOKENlayout, per-laneSAMPLE_ENABLEDcompletion, binding-derived vision exclusion) without recorded project-owner approval underdocs/design-review.md:22-26. - Adds
+373lines tohelios/src/scheduler/policy.rswithout Layer 2 simulator coverage or Layer 3 conformance/mutation coverage for the newB >= 2prefill geometry, and shares 8 files (includingpolicy.rs,cost.rs,scheduler.rs, anddocs/scheduling-runtime-design.md) with maintainer PR#729. - The headline
1.68×–4.15×TTFT and1.75×–4.23×throughput A/B compares two different signed cores exported across different FlashInfer revisions (C=1solo control0.94×), so the speedup is not yet isolated on an equivalent baseline.
Walkthrough
- Shared geometry, manifest, catalog, and selection (
helios/src/execution.rs:10,helios/src/execution/manifest.rs:452-468,881-900,936-950,helios/src/model/catalog.rs:266-288,helios/src/runtime_core/selection.rs:280-303,366-375,helios/src/scheduler.rs:889-918): enforcevalid_packed_prefill_geometry(2 <= B <= max_batch,1 <= W <= P, 64-alignedPwithin[max(64, B), min(B * W, i32::MAX)], optionalP <= prefill_chunk_size,draft_tokens == 0) while keepingB == 1(P == 0) andScoredPrefillunchanged and droppingB >= 2shapes when--max-concurrency 1. - Input packing (
helios/src/model/packing.rs:113-126,169-179,422-439,helios/src/model/inputs.rs:87-91): forbid vision bindings onB >= 2prefill graphs, sizeInputIndexing::PackedTokenbuffers toP, validate per-lanetokens <= W,image_slot.is_none(), andsum(tokens) <= Pbeforestaging.clear(), and drive per-laneSampleEnabledindependently for finishing vs. continuing lanes. - Scheduler, cost model, checkpoints, and runtime (
helios/src/scheduler/policy.rs:14-22,1311-1401,1560-1778,2073-2104,helios/src/scheduler/cost.rs:581-583,606-607,644-659,969-971,helios/src/scheduler/checkpoints.rs:925-936,helios/src/scheduler.rs:436-463,937-956,2615-2617,helios/src/server/runtime.rs:848-900): registerB >= 2packed prefill shapes separately, scopePrefillCostModeland context-slope refresh tobatch == 1(usingReplayTimesforbatch >= 2), unify cohort selection inselect_packed_prefill_cohortwith promoted-lane seeding for continuation valuation, and classify non-terminal packed steps viabinary_search_by_key. - Ignition and direct mode (
ignition/preparation/execution.py:80-96,ignition/preparation/model.py:32-43,ignition/cli/serve.py:465-469,ignition/direct/scheduler.py:197-202 (not opened),290-291): validate(B >= 2, W, P)text-only prefill signatures, rejectP > prefill_chunk_sizeinPreparedModel.__init__, scope--packed-verificationchecks tospeculativesignatures, and keep direct-modecapacities()isolated toB == 1solo prefill. - Docs and tests (
docs/packed-prefill-design.md,docs/scheduling-runtime-design.md:21-25,455-475,helios/model-contract.md:188-209,helios/manifest.md(not opened),helios/src/scheduler/policy_tests.rs:9580-9836,helios/src/model/tests.rs(not opened),tests/preparation/test_execution.py:409-463): document additive Contract 3 packed prefill and cover geometry, chunk-bound rejection, vision/logprob isolation, multi-lane packing, mixed finishing/continuing lanes, and promoted-lane continuation reservation.
Pre-merge Checks
- [PASS] Security / malicious screen: No prompt-injection or instruction-redirection content in the PR body, comments, or diff; all review and provenance material was treated strictly as content.
- [PASS] Charter & value fit: Model-agnostic Helios runtime (capacities read from core metadata via
packed_prefill_graphs(), no per-model branches or hardcoded bucket lists), backward-compatible with pre-change cores (887785ad), and authored by priority contributor@original-el8. - [WARN] Related / duplicate / conflict check: Genuinely additive with no duplication, but overlaps 8 files with maintainer PR
#729(includingpolicy.rs,cost.rs,scheduler.rs,docs/scheduling-runtime-design.md) plus active scheduling/admission PRs (#621,#693,#718). - [WARN] Tests & verification evidence: Layer 1 Rust/Python unit coverage is clean at
49d5840(1,918lib +62integration +56pytest), and CI covers existing TLC/Kani checks onhelios/**, but Layer 2 simulator coverage, Layer 3B >= 2conformance fixtures /--mutationstesting, and an equivalent A/B baseline remain missing.
Blockers
-
Extended captured-graph operation contract has no recorded owner approval (
docs/design-review.md:22-26,AGENTS.md:376-381).- Verified behavior/impact:
docs/design-review.md:22-26states: "Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval." At49d5840, this PR widens thePREFILL/TERMINAL_PREFILLoperation contract — acceptingbatch_capacity >= 2with explicitpacked_token_capacity(helios/src/execution/manifest.rs:881-900), changingInputIndexing::PackedTokenextent on prefill to aggregateProws (helios/src/model/packing.rs:169-179), defining binding-derived vision exclusion (helios/src/model/packing.rs:113-126), and formalizing per-laneQUERY_LENGTH/SAMPLE_ENABLEDmulti-request completion (helios/model-contract.md:188-209). No maintainer comment, review, or linked approval exists on#715. - Fix: Obtain an explicit approval comment from Luke Alonso on
#715(or link the approval thread) for the extended Contract 3 prefill operation contract. (This is a sign-off gate, not a rejection —@original-el8is a charter-named priority contributor and the design fits the charter.)
- Verified behavior/impact:
-
Testing-hierarchy Layers 2 and 3 remain incomplete for the added cohort algorithm, timing rules, and widened
B >= 2prefill geometry (docs/design-review.md:195-251).- Verified behavior/impact:
- Layer 2 (
docs/design-review.md:195-208): Changes to cohort algorithms (helios/src/scheduler/policy.rs:1311-1401,1571-1678,1711-1778) and timing estimation (helios/src/scheduler/cost.rs:581-583,606-607,644-659,969-971) require evaluation againstscripts/scheduling_sim/and the 64-seedscripts/scheduling_sim/learning.py(not opened) catalog. No simulator run is reported, andscripts/scheduling_sim/scheduler.py:30-35currently models at most one prefill lane per action (for view in [None, *prefills] if graph.prefill_capacity else [None]). - Layer 3 (
docs/design-review.md:226-228,241-246): Although.github/workflows/helios-lifecycle.yml:34 (not opened),49executes existing TLC and Kani suites onhelios/**,:241-246requires extending conformance fixtures/harnesses when supported runtime geometries expand, and:226-228requires mutation testing (check.py --mutations) when adding safety guards. Neitherverification/helios-lifecycle/**norhelios/src/scheduler/lifecycle_tests.rs(not opened) /checkpoint_lifecycle_tests.rs(not opened) is updated to coverB >= 2packed prefill geometry (scheduler.rs:436-463,packing.rs:422-439,is_non_terminal_prefill_step), and no--mutationsrun is reported.:247-251states disclosure does not waive runnable CPU checks.
- Layer 2 (
- Fix: Extend and run
scripts/scheduling_sim/+learning.py(not opened) (or record owner agreement that Layer 2 is inapplicable to packed prefill), add Layer 3 lifecycle conformance coverage for the widenedB >= 2prefill geometry, and runpython3 verification/helios-lifecycle/check.py --mutationsover the added safety guards.
- Verified behavior/impact:
Should Fix
- Headline performance A/B does not use an equivalent baseline (
docs/design-review.md:109-115).- Verified behavior/impact: As disclosed in the PR description, the baseline 151-graph core (
887785ad) was exported from an earlier FlashInfer revision while the packed 157-graph core (4aea5c54) was exported against FlashInfer5a8ceed80, and theC=1solo control regressed111.2 ms → 118.7 ms(0.94×). The1.68×–4.15×TTFT and1.75×–4.23×throughput headline claims therefore do not yet meet the "equivalent baselines" requirement indocs/design-review.md:109-111. - Fix: Run and report an equivalent A/B using cores exported from the same FlashInfer revision and served by the same binary (or packed prefill off/on on an identical build), including the
C=1control.
- Verified behavior/impact: As disclosed in the PR description, the baseline 151-graph core (
Subtract / Simplify
- Remove the duplicate
valid_packed_prefill_geometrycheck inExecutionManifest::validate(helios/src/execution/manifest.rs:881-894vs.:936-950). Inside the samefor graph in &self.graphsloop,valid_packed_prefill_geometryis called twice with identical arguments (graph.batch_capacity, graph.token_capacity, graph.packed_token_capacity, self.request_capacity(), None). The secondelsebranch at:941-949can simply returntrue(already validated above) or be folded into one check. - Unify the remaining duplicated offer-gathering and finishing-fill loops in
helios/src/scheduler/policy.rs. Whileselect_packed_prefill_cohortwas extracted, the ~50-line offer-gathering loops at:1311-1366and:1718-1761still duplicate duration lookup,is_non_terminal_prefill_step,prefill_slot_state,prefill_work_through,packed_prefill_lane_compatible, andlane_value_for_tokens; similarly, thefinishingcohort fill at:1372-1396duplicates:1140-1160. - Drop derived counters from
PackedCohort(helios/src/scheduler/policy.rs:14-22).selected == mask.count_ones() as usizeandpromoted_count == promoted_mask.count_ones() as usizeby construction; deriving them from the bitmasks removes redundant state that must be kept in sync across seeding (:1616-1623) and fill (:1642-1650). - Consolidate the four manifest filter passes in
helios/src/server/runtime.rs:848-900. A single pass overexecutor.manifest().graphsdispatching by(graph.kind, graph.batch_capacity)avoids repeating&& batch_capacity == 1across three sibling filter chains.
Nits
ignition/preparation/model.py:32-43: thepacked_token_capacity <= prefill_chunk_sizecheck is skipped ifserver_config["prefill_chunk_size"]is omitted, whereashelios/src/runtime_core/selection.rs:281defaults a missing key to0(rejecting allB >= 2packed prefill graphs). Failing closed whenprefill_chunk_sizeis missing for cores declaring packed prefill would match Helios. (Likewise,ignition/preparation/execution.py:80-86checksbatch_capacity <= MAX_CONCURRENCYrather thanrequest_capacity(max_active), matching pre-existingmixed/speculativesignatures.)helios/src/scheduler/policy.rs:1738-1740,2133-2136,2264-2266: packed prefill lanes compute cuts withestimated_checkpoint_cut(quote_storage = false) and skip theavailable_planauthoritativecheckpoint_cutreconciliation (candidate.batch == 1), so under snapshot-storage exhaustion a packed lane may stop slightly early at an un-capturableMessageboundary (safe, slightly conservative).helios/src/scheduler/policy.rs:1628-1654: single-pass forward greedy fill inselect_packed_prefill_cohortcan reject a shape when one oversized high-value/high-density lane blocks a fitting pair (e.g.,P = 128with offers(70, 140), (60, 100), (60, 100)), safely falling back to solo prefill.helios/src/model/packing.rs:436:graph.packed_tokens != 0is always true for validatedB >= 2prefill graphs (packed >= 64); can be simplified toif total_tokens > graph.packed_tokens.- The PR description still lists the stale-base
helios/src/runtime_core/cache_memory.rs(not opened) compilation fix bullet even though that file is not in the 23-file diff at49d5840.
Dropped on verification
- Code Correctness F1 severity escalation (
helios/src/scheduler/policy.rs:2133-2136— claimed "stuck anchor guard / runs past armed anchor"): Dropped as Major; kept as a Nit above. Directly verified athelios/src/scheduler/checkpoints.rs:714-768thatRetentionRole::Anchoris inserted unconditionally before thequote_storagecheck at:865-877, soanchorcannot diverge betweenestimated_checkpoint_cutandcheckpoint_cut. OnlyRetentionRole::Messageboundaries are gated byquote_storage, and becauseMessagecandidates are checked in descending endpoint order (monotonically decreasingRetentionRankwith identicalrowsandprotected_budget = None),quote_storage = trueyields a subset of cuts — at worst causing a safe, slightly conservative early stop without missing any capturable cut or sticking an anchor guard. - Code Correctness F4 (
ignition/cli/serve.py:465-467— "packed_token_capacityalways truthy for speculative signatures"): Dropped as pre-existing onmain. Verified againstmain(ignition/cli/serve.py:463andignition/preparation/execution.py:87,91onmain) that speculative signatures already populatedpacked_token_capacity >= batch_capacityandserve.pyalready checkedsignature.packed_token_capacity; this PR only addedsignature.kind == "speculative" andto stop packed prefill signatures from spoofing--packed-verification. - Code Correctness F3 (
helios/src/scheduler/cost.rs:644-659,947-972— flat 9-sample median for packed prefill): Dropped as an intentional, documented design choice (docs/scheduling-runtime-design.md:473-475), not a correctness defect. - Gates M1 (
docs/core-design.md:420— "One request per chunk, interleaved with decode"): Dropped as false / moving-goalposts. Verified atdocs/core-design.md:415-420that this row sits in a"For Qwen at concurrency four: | Setting | Default |"table where default prefill remains solo; the canonical scheduler doc (docs/scheduling-runtime-design.md) was updated in49d5840. - Discovery Dossier A4 (
helios/src/scheduler/policy.rs:1689-1691—packed_prefill_lane_compatibleshort-circuit onTerminalPrefill): Re-verified and dropped (matching Round 2).helios/src/model/inputs.rs:87-91setsSampleEnabled = 0for mid-prompt lanes,helios/src/scheduler.rs:3078-3079keeps unfinished lanes inRequestPhase::Prefill,helios/model-contract.md:176-180establishes thatTerminalPrefillrebuilds complete continuation state, and mixed finishing + continuing lanes are an explicitly designed and tested feature (policy_tests.rs:9709-9746,model/tests.rs:2762-2804(not opened)). - Discovery Dossier A7 ("undeclared behavior change seeding a promoted lane in
select_packed_prefill_cohort"): Dropped as stale/false. This fix was explicitly requested by Round 2 Subtract #1 and explicitly documented in the author's49d5840comment and unit test (policy_tests.rs:9821-9835). - Subtraction §7 ("four unrelated features bundled in the diff:
preserve_message_anchor,RowRestoreLatency, RoCEgid_indices,pool_vram"): Dropped as false (stale localmainartifact). Verified viapr_filesthat none ofroce.rs(not opened),roce_fabric.rs(not opened),rendezvous.rs(not opened),ignition/cli/config.py(not opened),phase_tests.rs(not opened),boundary_tests.rs(not opened), orcheckpoint_lifecycle_tests.rs(not opened) are in PR #715's 23 changed files, andcheckpoints.rs(+12 -3) /server/runtime.rs(+43 -5) contain only packed-prefill changes. - Upstream Code Correctness discarded sub-agent claims (
pack_stepsum hole,max_batchdropping all packed graphs,promoted_limitcapped at 1): Re-confirmed false (manifest.rs:464,selection.rs:365,policy.rs:1062,1824).
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 90.4% -
triage:design-review: 7.4% -
triage:validation: 1.9% -
none: 0.1% -
triage:partial: 0.1% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0% 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.
Apply labels
Applied: +triage:review, -triage:design-review decide malicious: all_clear (100%): No malicious content found
explore
Author: original-el8 (COLLABORATOR; charter-named "priority contributor"; Discord: el8)
Motivation: Prefill currently runs one request per graph, so a burst of short prompts costs one GPU launch each. This PR lets a single PREFILL/TERMINAL_PREFILL graph fan several requests into one launch, which cuts prefill launches and p95 time-to-first-token for concurrent short prompts.
Scale: +2257 / −115 lines in 33 files
Proposal:
- Additive ModelContract v3:
B >= 2text-only packed prefill graphs with aPACKED_TOKENrow layout of extentPand per-laneSAMPLE_ENABLEDcompletion. - New greedy
select_packed_prefill_cohort(policy.rs:1518-1619) packing 2..B lanes under the aggregate token budget, fed by onepacked_prefill_offers(policy.rs:1657-1721). - Widened
ScheduledStep::validate_mixedpacked domain (scheduler.rs:436-463) plus a sharedvalid_packed_prefill_geometry, and a new Lifecycle-model conformance test (lifecycle_tests.rs:849-940). - Layer-2 scheduling simulator extended to model packed prefill (scripts/scheduling_sim/scheduler.py:11-58, model.py:30-51) and added to CI via
pytest tests/. - Ignition fails closed when
packed_token_capacity > prefill_chunk_sizeor the chunk size is absent (ignition/preparation/model.py:32-39).
Touches:
- helios/src/scheduler/policy.rs (+415/−39) — new cohort/packing selection on the hot path shared with maintainer PR #729.
- helios/src/runtime_core/selection.rs (+183/−3) and helios/src/scheduler.rs (+97/−4) — new geometry contract and step validation.
- scripts/scheduling_sim/* + verification/helios-lifecycle/check.py — the verification layers that now claim coverage.
Related items:
- #729 helios: preserve KV across grammar transitions… (open): owner-authored, shares 8 files incl. policy.rs/cost.rs/scheduler.rs (not opened).
- #645 (merged): landed directly under this branch's scheduler path; #715 builds on it.
- #621 (open): admission validation, same manifest/packing/selection surfaces.
- #718 (open): prefill KV handoff, same scheduler/checkpoints/runtime files.
- #479 (merged): prior burst-prefill scheduling work the design continues.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/715
Autobot comments: Since the last report, head moved to 4e3e2c3d (33 files, +2257/−115) and the author's 20:06 comment claims to resolve the Layer 2/Layer 3 blocker. That claim holds for Layer 2 (simulator is real and in CI) and mostly for Layer 3 (new conformance test + three mutation guards), but the mutation guards are manual-only (helios-lifecycle.yml:34 runs check.py without --mutations) and Kani was not extended to the widened packed geometry (kani_proofs.rs has only two proofs). The simulator models no terminal/non-terminal prefill kind and no promoted-lane continuation mode, and no learning preset uses a packed catalog (learning_scenarios.py:38,:67), so the 1.73×/2.06×/1.37× synthetic figures are not reproducible from committed scenarios. The solo-vs-packed asymmetry stands unchanged (no resolve_prefill_kind in policy.rs:1657-1721 and 1518-1619; packed_prefill_lane_compatible returns true for TerminalPrefill first at policy.rs:1732-1734). Owner approval is now explicitly conceded as outstanding by the author himself; the A/B is still non-isolable (different FlashInfer revisions, 0.94× C=1 control). Commit git author is "Jason Cook" while the PR author is original-el8 — do not attribute benchmarks to the diff's git author. No instruction-redirection content found; the @flare-autobot re-review requests were treated as content.
Subtraction and simplicity
Subtraction & Simplicity audit — PR #715 helios,ignition: implement additive packed multi-request prefill (Contract 3)
Reviewed at head 4e3e2c3 (33 files, +2257/−115). Verdict: the feature is real work, not speculative generality — but the diff repeats itself in 5 places and carries 3 dead/overloaded constructs. The subtractable surface I found is roughly 120–150 lines of the new Rust/Python, with zero loss of behaviour. Nothing here is a design objection; all of it is local.
Priorities are ordered by (lines removed × risk of the duplication drifting apart).
S1 (HIGH) — Packed-lane geometry is validated three times; pack_step's copy is unreachable
The same lane invariants (lanes non-empty, len <= batch, lane.tokens <= per-request width, sum(lane.tokens) <= packed, no duplicate slots) now live in three places, and one is fully dominated.
helios/src/scheduler.rs:436-463 (ScheduledStep::validate_mixed, the owner):
if matches!(self.kind, GraphKind::Prefill | GraphKind::TerminalPrefill)
&& self.batch_capacity >= 2
{
if !crate::execution::valid_packed_prefill_geometry(...)
|| self.lanes.is_empty()
|| self.lanes.len() > self.batch_capacity
|| self.lanes.iter().any(|lane| lane.tokens == 0 || lane.tokens > self.token_capacity)
|| self.lanes.iter().try_fold(0usize, |sum, lane| sum.checked_add(lane.tokens))
.is_none_or(|sum| sum > self.packed_token_capacity)
|| self.lanes.iter().enumerate().any(|(i, lane)| {
self.lanes[..i].iter().any(|other| other.request.slot == lane.request.slot)
})
helios/src/model/packing.rs:422-439 (Inputs::pack_step) re-derives the same thing with paraphrased errors:
if graph.kind.is_prefill() && graph.batch >= 2 {
let mut total_tokens = 0usize;
for lane in &frame.step.lanes {
if lane.tokens > graph.tokens {
return Err("packed prefill lane exceeds per-request token capacity".into());
}
...
if live.image_slot.is_some() {
return Err("packed prefill graph does not support image-conditioned lanes".into());
}
total_tokens = total_tokens.checked_add(lane.tokens)...
}
if total_tokens > graph.packed_tokens {
return Err("packed prefill lanes exceed packed token capacity".into());
}
}
This block is dead in the pack_inputs path: helios/src/model/inputs.rs:35 calls step.validate_mixed()? first, and inputs.rs:43-48 independently re-checks step.lanes.len() > step.batch_capacity. graph.tokens == step.token_capacity and graph.packed_tokens == step.packed_token_capacity by the match at packing.rs:413-420, so every lane bound in the copy is a strict subset of the check 40 lines earlier in the call chain. Only the image_slot guard is genuinely new — and packing.rs:117-121 already rejects ImageFeatureSlot bindings on B >= 2 prefill graphs at contract time, so the runtime guard is belt-and-braces, not the sole defence.
Subtract: delete packing.rs:422-439; keep the image_slot guard as three lines (or fold it into validate_mixed where the geometry already lives). If the belt-and-braces is wanted, extract one fn packed_lane_fits(lanes, width, packed) -> Result<()> and call it from both places instead of maintaining two paraphrases.
S2 (HIGH) — continuation_candidate's packed block duplicates packed_prefill_candidates almost verbatim
policy.rs:1306-1348 (inside continuation_candidate, the drop(consider) tail) and policy.rs:1754-1798 (packed_prefill_candidates) are the same eight-step pipeline:
self.costs.packed_prefill_duration(kind, batch, width, packed)let horizon = if ns == 0 || duration_ns == 0 { 0 } else { ns.saturating_add(duration_ns) };self.is_non_terminal_prefill_step(...)self.packed_prefill_offers(..., Some((mask, kind)) | None)Self::select_packed_prefill_cohort(&offers[..n], batch, packed, Some(capacity) | None)ValueRate::new(horizon, value, age_price)if best.is_none_or(|(_, old)| rate.compare(old).is_gt())/output.push(...)
The None-vs-Some continuation tuple is already the exact parameter that distinguishes them, and packed_prefill_offers (policy.rs:1658-1721) already takes it. Subtract: one fn packed_prefill_plan(&self, kind, batch, width, packed, continuation, ...) -> Option<(u64 mask, u64 promoted, f64 value, u64 horizon, usize work, [usize; REQUEST_LANES])> used by both — removes ~40 lines and makes the two valuation paths provably identical, which is exactly the property the PR's own scheduler/lifecycle conformance test is trying to pin.
S3 (MEDIUM) — usize::try_from(...).zip(...).zip(...).zip(...) where as usize would do
helios/src/runtime_core/selection.rs:282-300:
} else {
usize::try_from(graph.batch_capacity).ok()
.zip(usize::try_from(graph.token_capacity).ok())
.zip(usize::try_from(graph.packed_token_capacity).ok())
.zip(usize::try_from(max_chunk).ok())
.is_some_and(|(((b, w), p), chunk)| {
crate::execution::valid_packed_prefill_geometry(b, w, p, REQUEST_LANES, Some(chunk))
})
}
Four try_from calls, three .ok(), a quadruple-nested tuple pattern and an is_some_and to express "cast u64→usize and test". The casts are infallible on every supported target (the manifest path at manifest.rs:459-467 already bounds packed <= i32::MAX). Subtract: take u64 in valid_packed_prefill_geometry (it is a pub(crate) helper with four call sites: manifest.rs:885, catalog.rs:273, scheduler.rs:439, selection.rs:291), or write the guard as graph.batch_capacity >= 2 && valid_packed_prefill_geometry(graph.batch_capacity as usize, ...). The if graph.batch_capacity == 1 { ... } else { ... } split then collapses too.
S4 (MEDIUM) — Tautological else-arm duplicating ScoredPrefill's width rule
helios/src/execution/manifest.rs:936-951:
GraphKind::Prefill | GraphKind::TerminalPrefill => {
if graph.batch_capacity == 1 {
[1, 16].contains(&graph.token_capacity)
|| (graph.token_capacity >= 64 && graph.token_capacity.is_multiple_of(64))
} else {
// `batch_capacity >= 2` packed prefill geometry was validated above.
graph.batch_capacity >= 2
}
}
GraphKind::ScoredPrefill => {
graph.batch_capacity == 1
&& ([1, 16].contains(&graph.token_capacity)
|| (graph.token_capacity >= 64 && graph.token_capacity.is_multiple_of(64)))
}
graph.batch_capacity >= 2 inside the else of graph.batch_capacity == 1 is always true — it cannot fail and carries no information (this matches the dossier's A5 reading, but the simplification was never taken). Subtract: flatten to one arm, e.g. accept ScoredPrefill as a third alternative in the batch_capacity == 1 test, giving a single 4-line arm instead of two arms and a comment. Net −6 lines and one fewer place to update when the alignment rule changes.
S5 (MEDIUM) — Dead expression in the simulator cohort selector
scripts/scheduling_sim/scheduler.py:55-56:
key = (total_val, len(chosen), total_tokens, tuple(reversed(names)))
if best is None or key[:3] > best[:3] or (key[:3] == best[:3] and names < best[3]):
key[3] is constructed and never read — the tiebreak uses names against best[3], and best stores names (forward order) as its fourth element. tuple(reversed(names)) is wasted work on every candidate. Subtract: key = (total_val, len(chosen), total_tokens) and compare directly. (The reversed-tuple also silently disagrees in convention with best's forward order, so this is a latent-confusion site, not just dead code.)
S6 (MEDIUM) — Byte-identical validation block duplicated in the simulator's two graph classes
scripts/scheduling_sim/model.py:44-49 and scripts/scheduling_sim/timing.py:38-44 are the same six checks with the same messages:
if self.prefill_batch_capacity >= 2:
if not self.prefill_capacity or self.decode_capacity or self.width != 1:
raise ValueError("packed prefill graphs must be prefill-only with width 1")
if not (max(self.prefill_batch_capacity, self.prefill_capacity)
<= self.packed_token_capacity
<= self.prefill_batch_capacity * self.prefill_capacity):
raise ValueError("invalid packed prefill token capacity")
elif self.packed_token_capacity != 0:
raise ValueError("packed_token_capacity requires prefill_batch_capacity >= 2")
Graph and GraphSpec already share the field set; GraphSpec.from_graph (timing.py:46) converts one to the other. Subtract: one module-level def _validate_graph_capacities(prefill, decode, width, prefill_batch, packed) called from both __post_init__s. Note the Python bounds here are also not the Rust bounds (valid_packed_prefill_geometry additionally requires packed >= 64, % 64 == 0), so the duplicated pair is already drifting from the source of truth.
S7 (LOW) — The same rank-key expression written out four times
(a.graph.packed_token_capacity or a.graph.prefill_capacity) + a.graph.decode_capacity * a.graph.width appears identically at:
scripts/scheduling_sim/scheduler.py:101scripts/scheduling_sim/learning_policy.py:247scripts/scheduling_sim/learning_policy.py:253scripts/scheduling_sim/utility.py:309
Subtract: a Graph.cost_weight property (it lives in model.py next to the fields). The or fallback is exactly the kind of convention that should be named once.
S8 (LOW) — packed_prefill_lane_compatible's first branch makes four of its parameters dead
policy.rs:1723-1752:
fn packed_prefill_lane_compatible(&self, r: &LiveRequest, kind: GraphKind,
non_terminal: bool, terminal_only: bool, work: usize, cut: Option<usize>) -> bool {
if kind == GraphKind::TerminalPrefill {
return true;
}
On that path non_terminal, terminal_only, work and cut are unused, and kind is used only for this early return. Subtract: drop the kind parameter entirely and hoist the terminal check to the two call sites (policy.rs:1704-1715 in packed_prefill_offers, policy.rs:2091-2097 in validate/commit-side filter), which both already have kind/candidate.kind in scope. −1 parameter on a 6-parameter predicate, and the "terminal graphs accept everything" rule becomes visible where the graph kind is chosen rather than buried in a lane predicate.
S9 (LOW) — select_packed_prefill_cohort overloads one Option<usize> with three meanings
policy.rs:1518-1619. promoted_limit means:
None→ ready-lanes-only mode (policy.rs:1692-1699offer path),Some(0)→ an earlyreturn None(policy.rs:1525:if count < 2 || promoted_limit == Some(0)),Some(cap)→ seed one promoted lane (policy.rs:1552-1570) and cap promoted lanes atcap(policy.rs:1582-1586).
Some(0) is reachable only from policy.rs:1327 via Some(capacity) where capacity can be 0, and it is semantically "no continuation, but also refuse" — a third mode smuggled into a numeric limit. Subtract: enum PackedCohortMode { ReadyOnly, Continue { promoted_limit: usize } }, which drops the promoted_limit == Some(0) special case and the if promoted_limit.is_some() guard into an irrefutable pattern. This is the "invalid states unrepresentable" case the brief names: with the enum, Continue { promoted_limit: 0 } has no meaning a reader has to reconstruct.
What I checked and found already lean (do not touch)
- No new CLI flags or config knobs. The packed catalog is derived from the core's own
Prefill/TerminalPrefillgraphs (server/runtime.rs:849-880singlematchover(graph.kind, graph.batch_capacity));--packed-verificationnarrowing atignition/cli/serve.py:465-467reuses an existing flag rather than adding one.LoadOptions's newpool_vram_limit/pool_ram_limit(selection.rs:20-23) are consumed byvalidate()and belong to separate work, not to this feature. valid_packed_prefill_geometryitself is the right abstraction — one helper, four call sites, no copy-paste of the% 64rule. The problem is only itsusizesignature (S3), not its existence.checkpoints.rs:172-236(prefill_catalog_costs_for+interval_prefill_ns_for) is a clean refactor: the&LiveRequestwrappers are two-line delegations, and thehas_terminal/terminal_onlyreordering genuinely removes a double pass.budget_interior_anchor(checkpoints.rs:563-565) is a good single-predicate extraction.fill_finishing_lanes(policy.rs:1622-1655) is a correct dedup of the previously inlined finishing-lane loop; it is called from the two sites that need it and reads cleanly.scripts/scheduling_sim/scheduler.py:11-58mirrors the Rust two-order greedy faithfully; the only waste there is S5.model/testing.rschanges are test-fixture plumbing, not shippable surface.
Summary table
| # | Location | Kind | Est. lines removed | Risk |
|---|---|---|---|---|
| S1 | packing.rs:422-439 dominated by scheduler.rs:436-463 + inputs.rs:35 |
dead duplicate validation | ~18 | none (dead) |
| S2 | policy.rs:1306-1348 ≡ policy.rs:1754-1798 |
duplicated pipeline | ~40 | low |
| S3 | selection.rs:282-300 |
convoluted casts | ~10 | low |
| S4 | manifest.rs:936-951 tautological arm |
dead branch | ~6 | none |
| S5 | scheduling_sim/scheduler.py:55-56 |
dead tuple element | ~2 | none |
| S6 | model.py:44-49 ≡ timing.py:38-44 |
duplicated validation | ~12 | low |
| S7 | 4× rank key (scheduler.py:101, learning_policy.py:247,253, utility.py:309) |
duplicated expression | ~6 | none |
| S8 | policy.rs:1723-1752 dead params on TerminalPrefill path |
overloaded predicate | ~8 | low |
| S9 | policy.rs:1518-1619 3-meaning Option<usize> |
unrepresentable state | ~15 | low |
Total subtractable: ~115 lines, all behavioural no-ops. S1, S2 and S9 are the ones worth insisting on before merge: S1 because a dominated validator is a future-divergence bug, S2 because the solo/continuation packed valuation asymmetry is already the PR's most contested area (the review trail asks whether the TerminalPrefill short-circuit at policy.rs:1732-1734 is intended), and S9 because it is the one place where the "invalid states unrepresentable" rewrite also answers a reviewer question.
No instruction-redirection content was found in the PR body, comments, or the dossier; review requests and "SuperAgent Review" offers were treated as content, not instructions.
Gates and contracts
Contracts, Charter & Verification Gates Audit — PR #715 @ 4e3e2c3
Head audited: 4e3e2c3d · pr_files = 33 files (+2257/−115) · open draft · labels area:scheduling, community, enhancement, performance, triage:review · discussion = author highlight (05:56), bot case file (12:56), bot Changes Requested (13:21 @ 84f789a), bot Changes Requested (15:26 @ caaef5a), author fix (18:19 @ 49d5840), bot Changes Requested (18:50 @ 49d5840), author fix + "@flare-autobot please re-review" (20:06 @ 4e3e2c3d). Zero human maintainer reviews.
Scope: only the four hard gates. Algorithm defects (the packed_prefill_lane_compatible TerminalPrefill asymmetry, cohort-builder duplication, greedy-fill edge cases) belong to the Code Correctness lens and are not filed here.
Verdict: NOT clear on governance/verification grounds — 1 Blocker, 2 Majors. Gate 2 and Gate 4 PASS. Six findings from Rounds 1–3 are genuinely closed at this head (verified below), so the gate set is materially smaller than in earlier rounds.
Gate 1 — Signed core-format / captured-graph / public contract boundary: FAIL (Blocker)
B1. The PREFILL/TERMINAL_PREFILL operation contract is widened with no recorded owner approval (Blocker)
docs/design-review.md:22-26 (mirrored verbatim at AGENTS.md:376-381):
"Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."
This is not a shape variant within an unchanged contract. Verified in the change set, it changes what a prefill graph is:
helios/model-contract.md:188-209— a new normative subsection "Optional packed multi-request prefill" under contract version 3: multiple simultaneously active requests per replay,PACKED_TOKENcoveringProws, and per-laneQUERY_LENGTHandSAMPLE_ENABLEDso each lane samples independently on reaching its own prompt end. Per-lane completion semantics on a prefill graph were previously exclusive to decode/speculation.helios/src/model/packing.rs:169-179— forB >= 2prefill theInputIndexing::PackedTokenextent becomesgraph.packed_token_capacity(an aggregate multi-request row block), nottoken_capacity. New row layout, not a new capacity of an existing one.helios/src/model/packing.rs:113-126— eligibility is now derived from the absence of vision bindings:ImageFeatureSlotis conditioned onmatches!(kind, Vision | Mixed) || (kind.is_prefill() && batch_capacity == 1), andImageFeatureIndex | ImageLeftContext | ImageRightContextnow require!(kind.is_prefill() && batch_capacity >= 2). A new contract-derived admission rule.helios/src/execution/manifest.rs(not opened) /helios/src/scheduler.rs:889-918— the previously flat rule "any non-speculative graph withpacked_token_capacity != 0is rejected" is split to admitPrefill | TerminalPrefillatB >= 2withdraft_tokens == 0, through the new sharedcrate::execution::valid_packed_prefill_geometry(re-exported athelios/src/execution.rs:10(not opened), consumed atscheduler.rs:439and:902).
Nothing in the PR records the required approval: no maintainer comment, no maintainer review, no Design-Signed-Off-By: trailer, no linked approval thread, and no reference to an offline/Discord sign-off — the description's only contact line is Discord: el8, the author's own. docs/design-review.md:313-318 obliges an agent to refuse sign-off on a violating change rather than waive it. Precedent on the same author and the same family: #410 opened with a standing section titled "Architecture approval request (Principle 1) … explicit approval from Luke Alonso is requested for this graph operation family prior to merge" for GraphOperation::TERMINAL_PREFILL — the very family this PR widens. #715 requests nothing.
The author now concedes this: the 20:06 comment lists under "Remaining non-code items: explicit project-owner approval from Luke Alonso for widening Contract 3 PREFILL/TERMINAL_PREFILL to B >= 2".
To clear: a maintainer approval comment on #715 (or a linked thread) granting the widened multi-request prefill contract. This is a request for sign-off, not a rejection — @original-el8 is a charter-named priority contributor and the feature fits the charter.
Gate 1 — normative-doc sync: PASS (materially improved at this head)
AGENTS.md:231 requires graph-selection/scheduling-policy/timing-estimate changes to be reflected in docs/scheduling-runtime-design.md. Verified updated in this change set:
docs/scheduling-runtime-design.md:21-25— the native catalog now reads "solo and optional packed multi-request prefill" and linkspacked-prefill-design.md(not opened).docs/scheduling-runtime-design.md:455-460— cost-entry identity now includes "packed token capacity (packed verification or packed multi-request prefill)".docs/scheduling-runtime-design.md:466-475— the six-stratumPrefillCostModelis now scoped to "solo (batch == 1)" pure prefill, with "Packed multi-request prefill graphs (batch >= 2) use the same flat nine-sample rolling median as non-prefill graphs rather than single-lane context stratification."
That resolves the Round-2/3 contradiction between the doc and the shipped batch == 1 gating. No leftover contradiction found in docs/scheduling-theory.md (no matches for packed/batch_capacity/one prefill) or docs/scheduling-utility.md (no matches for one prefill/at most one — packed cohorts compete on the same ValueRate, so the arithmetic is unchanged).
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored upstream file is forked. None of the 33 changed files is under
helios/native/*,selene*/native,eos, or third-party C/Python sources; no unmerged upstream patch is applied locally ahead of its PR. - No core-format/wire change requiring identifier reservation.
packed_token_capacityalready existed on the descriptor for speculative verification; no protobuf/schema file is in the change set, so no wire identifier duty is triggered. - External dependency is linked, not forked. The companion recipe PR
local-inference-lab/hyperflare-recipes#153is referenced by URL in the description and indocs/packed-prefill-design.md(not opened). This matches existing practice (AGENTS.md:382-396places official exports in the recipes repo, which pinsuv.lock; coreignitionmust not importhyperflare_recipes, and it does not). - Overlap is not duplication. #729 (owner-authored, same 8 files incl.
policy.rs(not opened)/cost.rs(not opened)/scheduler.rs), #621, #693, #718 share files but not the feature. Recorded asInfo / Nitordering risk only.
Gate 3 — Mandatory verification evidence: FAIL (2 Majors); Layer 1, Layer 3 execution, and the Layer-3 geometry duty all PASS
Layer 1 — PASS
Round-1's failing-suite blocker is closed. The author reports the CI-matching invocation clean at 49d5840: FLARE_TEST_TEMPLATE_DIR=… cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server → 1,918 lib + 62 integration, 0 failed, and at 4e3e2c3 → 1,919 lib + 62 integration, 0 failed. The earlier 6 failures are a documented prerequisite, not a defect: helios/README.md:168-176 states that frontend-gated tests "panic when [FLARE_TEST_TEMPLATE_DIR] is unset" and that .github/workflows/native-serving.yml (not opened) runs exactly that suite — so the requirement at docs/design-review.md:180-186 is met, not waived. The new Ignition guard carries a real runtime regression test, not a source-text check.
Layer 3 execution (TLC + Rust conformance + Kani) — PASS
.github/workflows/helios-lifecycle.yml:33-34 (not opened) runs python3 verification/helios-lifecycle/check.py --tlc-jar … and :48-49 runs cargo kani --manifest-path helios/Cargo.toml (not opened) --features runtime-core --lib; the workflow triggers on helios/** (:4-11), the change set touches helios/**, and CI is reported green. The in-crate conformance suites are also reported passing. The Round-1 "layer 3 not run" claim is withdrawn and does not carry forward.
Layer 3 widened-geometry duty — PASS (closed at this head)
docs/design-review.md:241-246 requires updating "the model, conformance fixture, or Kani harness" when supported geometries expand. That disjunction is now satisfied, verified directly:
helios/src/scheduler/lifecycle_tests.rs:64-77—Fixture::new_packed_prefill()registers real(Prefill, 2, 256, 512)and(TerminalPrefill, 2, 256, 512)packed shapes alongside theB == 1catalogs.helios/src/scheduler/lifecycle_tests.rs:849-946—packed_prefill_scheduler_matches_lifecycle_modelexplores to depth 7 and asserts four distinct packed properties are reached:packed_non_terminal,packed_terminal,cancel_during_packed, andstale_packed_plan(the last also assertingcommitrejects the stale plan and the state key is unchanged). A hard assertion, not a smoke test.verification/helios-lifecycle/check.py:18now selects the whole module (TEST = "scheduler::lifecycle_tests::") with--exactsuppressed for prefixes (:185,:255), so both lifecycle tests feedLifecycle.tla.helios/src/model/packing.rs:422-439andhelios/src/scheduler.rs:436-463(the new guards) are now targeted by three mutation guards atcheck.py:748-801.
M1. Layer 2: the simulator was extended, but the mandatory learning.py (not opened) timing catalog cannot exercise the change (Major)
docs/design-review.md:195-206 makes the simulator mandatory for cohort algorithms, and for timing estimation requires "running the screening and 64-seed validation catalog in scripts/scheduling_sim/learning.py (not opened)", closing with: "Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog."
The selection half is genuinely implemented — I verified it rather than taking the comment's word:
scripts/scheduling_sim/model.py:23-51addsprefill_batch_capacity/packed_token_capacitywith mirroring validation (max(B, W) <= P <= B*W, prefill-only, width 1).scripts/scheduling_sim/scheduler.py:11-58adds_select_packed_prefill_lanes, a real two-order (by_density in (False, True)) greedy under both theprefill_batch_capacityandpacked_token_capacitybudgets, with a deterministic tie-break — structurally mirroringRequestScheduler::select_packed_prefill_cohort.scripts/scheduling_sim/workloads.py:9-18addscatalog(packed_prefill=True), andtests/test_scheduling_sim.py(not opened) (+31) covers it.
The timing half is not covered, and the reported run is therefore vacuous for the changed rule:
scripts/scheduling_sim/learning_scenarios.py:38usescatalog()and:67usescatalog(mixed=True)— nopacked_prefill=Trueanywhere inscenarios().catalog(has exactly those two call sites in the whole directory.scripts/scheduling_sim/learning_policy.pyconsequently guards every prefill interpolation/borrow path onprefill_batch_capacity == 1(:189,:192,:204,:211,:222,:317,:324).
So --preset screen (7×3×16) and --preset validate (62×3×64) were executed, but no configuration in either catalog contains a packed prefill graph, and the PR changes timing estimation twice over: a new cost key (helios/src/scheduler/cost.rs (not opened), packed_prefill_duration) plus batch == 1 gating of PrefillCostModel creation and context-slope refresh. Those are exactly the "timing estimation" changes :201-206 says must be validated across that catalog.
To clear: add packed-prefill scenarios to learning_scenarios.scenarios() (or a packed=True preset) and re-run --preset screen / --preset validate, reporting that the packed cohort/timing rule survives the 64-seed stationary, idle-transient, poisoned-observation, missing-timing, and recovery fixtures — or obtain recorded owner agreement that the flat-ReplayTimes packed timing rule is outside the learning catalog's qualified scope.
M2. The headline speedup has no attributable baseline (Major)
docs/design-review.md:106-115 (principle 12): "Performance claims require equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements."
The instrument is right — flare run on four GB10s across all ranks, with the pre-change 151-graph core 887785ad loading and serving on the updated binary — but the arms are different signed cores exported from different FlashInfer revisions: pre-change 887785ad vs packed 4aea5c54 exported against FlashInfer 5a8ceed80. The C=1 solo control moves 111.2 → 118.7 ms (0.94×), consistent with ~6% systematic overhead in the packed arm. The author discloses both facts in the PR body and again at 20:06 as outstanding, which is honest — the flaw is non-isolability, not concealment. But disclosure does not satisfy "equivalent baselines", so 1.68×–4.15× p95 TTFT and 1.75×–4.23× throughput must not be cited as a flag-only measurement of packed prefill.
To clear: one binary and one core, packed shapes off/on (or one core exported with and without the +6 packed shapes from the same FlashInfer revision), including the C=1 control.
Noted, not filed (anti-pedantry)
check.py --mutationsis manual-only in CI..github/workflows/helios-lifecycle.yml:34(not opened) invokescheck.pywithout--mutations, which is opt-in atcheck.py:299. Butdocs/design-review.md:226-228requires running mutation testing when safety guards change, not wiring it into CI, and the author reports all three new mutations detected on the idle worktree. Requirement met →Info / Nit(CI wiring would be an improvement, not a gate).- Kani not extended to
valid_packed_prefill_geometry.helios/src/model/kani_proofs.rs:145-182still holds only the two completion accept/reject proofs, andvalidate_completion(helios/src/model.rs:374(not opened)) is not in the change set, so the:221-225triggers are not directly hit. The new geometry predicate is a sequential validator over an input domain, and a proof would be valuable — but:241-246's duty is a disjunction already met by the conformance fixture.Info / Nit. - The three synthetic simulator burst figures (1.73×/2.06×/1.37×) come from a
gb10_catalogplus ad-hocpacked-b4-w512-p2048/packed-b8-w512-p4096graphs that are not in the committedgb10_catalog(workloads.py:65-98has no packed graphs), so they are not reproducible from committed scenarios.docs/design-review.md:207-208already states simulator results do not establish GPU performance, so these are not gate-bearing.Info / Nit(tied to M1's fix).
Gate 4 — Material scope / claim contradictions: PASS
No claim of a test, benchmark, or artifact that is absent from the work. The corpus is proportionate: ~186 lines of new/changed docs (docs/packed-prefill-design.md (not opened) +155, docs/scheduling-runtime-design.md +15/−9, model-contract.md +23, manifest.md (not opened) +8/−2) against ~+1,100 lines of tests across model/tests.rs (not opened) (+283), policy_tests.rs (not opened) (+328), lifecycle_tests.rs (+225), test_execution.py (not opened) (+67), test_scheduling_sim.py (not opened) (+31), execution/tests.rs (not opened) (+39). Nothing resembling thousands of lines of unrelated standalone tooling. The scripts/scheduling_sim/* and verification/helios-lifecycle/check.py changes are exactly the verification layers Gate 3 demands — in-scope by construction, not scope creep.
The Round-1/2 description defects are fixed: the stale helios/src/runtime_core/cache_memory.rs (not opened) bullet is gone, and no file named in the description is absent from the 33-file change set (verified against pr_files).
Closed or withdrawn since Rounds 1–3 (verified at 4e3e2c3, do not carry forward)
| Earlier finding | Status |
|---|---|
| Canonical scheduler doc contradicted shipped timing/catalog | CLOSED — docs/scheduling-runtime-design.md:21-25,455-460,466-475 now documents packed prefill, cost-entry identity, and the batch == 1 scope of the stratified model, and links the design doc. |
--packed-verification narrowed to speculative = undeclared public-CLI change |
CLOSED — declared in "What changed"; main's ignition/preparation/execution.py (not opened) already forbade nonzero packed_token_capacity on non-speculative kinds, so no previously valid recipe can now be rejected; docs/cli-design.md:765-766 documents only the speculative budget surface. |
Ignition accepts P > prefill_chunk_size that Helios rejects |
CLOSED — ignition/preparation/model.py:32-39 now fails closed for both packed_token_capacity > prefill_chunk and a missing prefill_chunk_size, with a runtime regression test. |
| Required Layer-1 suites reported failing | CLOSED — clean head run with FLARE_TEST_TEMPLATE_DIR set; failures were the documented helios/README.md:168-176 prerequisite and a stale local wheel. |
| Layer 3 TLC/Kani not run | WITHDRAWN — CI runs both on helios/**; CI green. |
| Layer 3 widened-geometry fixture missing | CLOSED — lifecycle_tests.rs:64-77,849-946 + check.py:18 prefix selection. |
| Layer 2 simulator blind to packed prefill | CLOSED for selection — model.py:23-51, scheduler.py:11-58, workloads.py:9-18; residual gap is the learning catalog (M1). |
Charter fit — PASS
docs/design-review.md:27-35,58-61 forbids hardcoded batch-capacity/graph-shape lists and supports_* flags in Helios. This PR reads all capacities from core metadata via Scheduler::packed_prefill_graphs (helios/src/scheduler.rs:889-918), validates only structural bounds through one shared valid_packed_prefill_geometry, adds no supports_*/can_* boolean and no power-of-two or bucket list, and keeps the opt-in purely declarative (core declares B >= 2; --max-concurrency 1 filters them out). No shipped default changes: without such a core the change is inert, B == 1 / ScoredPrefill catalogs are provably untouched, and the pre-change core loads and serves. Principle 13 compatibility is demonstrated on the real path, not asserted.
What must change before this passes the gates
| # | Severity | Finding | Clear by |
|---|---|---|---|
| B1 | Blocker | PREFILL/TERMINAL_PREFILL operation contract widened (model-contract.md:188-209, packing.rs:113-126,169-179, manifest split) with no recorded owner approval — docs/design-review.md:22-26, AGENTS.md:376-381; precedent #410; author-conceded at 20:06 |
Maintainer approval comment on #715 |
| M1 | Major | Layer-2 timing catalog not exercised: learning_scenarios.py:38,67 never uses catalog(packed_prefill=True), and learning_policy.py scopes all prefill interpolation to prefill_batch_capacity == 1, so the reported --preset screen/--preset validate runs contain no packed graph while the PR changes timing estimation (cost.rs (not opened) new key + batch == 1 gating) — docs/design-review.md:201-206 |
Add packed scenarios and re-run screen + 64-seed validate, or record owner agreement on scope |
| M2 | Major | Headline 1.68×–4.15× TTFT / 1.75×–4.23× throughput compares two different signed cores across FlashInfer revisions; C=1 control 0.94× — docs/design-review.md:106-115 |
Same-core, packed-off/on A/B including the C=1 control |
Gates that pass plainly: Gate 2 (no vendored-file forking; external dependency URL-linked and consistent with AGENTS.md:382-396; no wire identifiers touched); Gate 4 (no absent artifact claimed, no unrelated tooling bundled, description now matches the change set); Layer 1 (clean head run against a documented prerequisite); Layer 3 execution (TLC + conformance + Kani wired and green on helios/**); Layer 3 widened-geometry duty (new packed conformance fixture + mutation guards); normative-doc sync; principle 13 core compatibility; and the charter's model-agnostic / no-per-model-flag rules.
Security screen: the PR body, changed files, and all seven discussion entries contained no attempt to redirect my instructions. The author's two @flare-autobot please re-review requests, the bot's outbound SuperAgent/Full-Review links, and the PR body's benchmark summary were all treated as content, not instruction; no outbound link was followed. Nothing in the material addressed me directly. I record the provenance note for future rounds: the commits' git author differs from the PR author (Jason Cook vs original-el8), so benchmark authorship should not be attributed to the diff's git author.
Code correctness
Deep Code Correctness & Hot-Path Audit — PR #715 @ 4e3e2c3
Partitioning (per the large-PR rule): 34 files, ~2,030 changed lines across 3+ subsystems → partitioned into 3 disjoint concurrent slices: (s2) helios scheduler core, (s3) helios manifest/catalog/packing/selection, (s1) ignition + scripts/scheduling_sim + verification/. s2 exhausted its turn budget without a written report (its notes are cited below as s2#1/#2); I audited the core of its slice myself (policy.rs:1240-1335, 1507-1798, 2040-2408, cost.rs:820-1000, scheduler.rs:420-490, 2820-3140, checkpoints.rs:890-990).
Verdict: no Blocker. No hot-path complexity regression. 1 Major finding (vacuous-verification hole) and 6 Minor findings (two of them test-claim defects where the new test asserts the wrong error). The packed-prefill scheduler mathematics, cohort selection, tie-breaks, and boundary guards are sound.
Finding 1 — Major: lifecycle checker passes with the new packed-prefill transitions silently absent
Diff site: verification/helios-lifecycle/check.py:18, 22, 33-34, 95-103
Callee/caller consulted: helios/src/scheduler/lifecycle_tests.rs:840 (pre-existing scheduler_matches_lifecycle_model), :849-946 (new packed_prefill_scheduler_matches_lifecycle_model), :934-937 (its Rust-side non-vacuity guard), :939-945 (LIFECYCLE_EDGE / PACKED_PREFILL_LIFECYCLE_COVERAGE emission).
Verbatim (check.py:18,22,95-103):
TEST = "scheduler::lifecycle_tests::"
CHECKS = [("Lifecycle", TEST, "LIFECYCLE_EDGE ", 14),
...
def parse_observations(output, module, prefix, width):
edges = [json.loads(line.removeprefix(prefix))
for line in output.splitlines() if line.startswith(prefix)]
if not edges:
raise RuntimeError(f"{module} test produced no transitions")
The entire scheduler::lifecycle_tests:: suite is one cargo test filter and all LIFECYCLE_EDGE lines are merged into the single Lifecycle stream. The only guard that packed transitions were observed at all is the global non-empty check at line 98, which the unchanged scheduler_matches_lifecycle_model (lifecycle_tests.rs:840) always satisfies. The test's own non-vacuity assertion (lifecycle_tests.rs:934-937, packed_non_terminal && packed_terminal && cancel_during_packed && stale_packed_plan) lives inside the Rust test and is bypassed if that test is not selected.
Counterexample: rename the new test to packed_prefill_lifecycle_model (or narrow its #[cfg]). cargo test scheduler::lifecycle_tests:: -- --nocapture then matches one test, exits 0 with "1 passed", parse_observations sees only base-model edges, and run_observed_checks still prints "Checked N observed Rust transitions against Lifecycle.tla" — the checker green-lights the PR with zero packed-prefill coverage. Same hole for the CHECKPOINT_RESERVATION entry at check.py:33-34 (already a suite prefix).
Fix: make each Rust test its own observation source and assert non-emptiness per source, e.g. add ("PackedPrefill", "scheduler::lifecycle_tests::packed_prefill_scheduler_matches_lifecycle_model", "LIFECYCLE_EDGE ", 14); or parse the PACKED_PREFILL_LIFECYCLE_COVERAGE states=… edges=… line already emitted at lifecycle_tests.rs:941-945 and fail when edges == 0.
Finding 2 — Minor: the two new pack_step packing guards are unreachable, and the new test that claims to cover them asserts the scheduler's message instead
Diff site: helios/src/model/packing.rs:422-439; test: helios/src/model/tests.rs:2829-2853
Callee/caller consulted: helios/src/model/inputs.rs:35 (step.validate_mixed()?;) and :93 (inputs.pack(&frame)); helios/src/scheduler.rs:436-463.
if graph.kind.is_prefill() && graph.batch >= 2 {
let mut total_tokens = 0usize;
for lane in &frame.step.lanes {
if lane.tokens > graph.tokens {
return Err("packed prefill lane exceeds per-request token capacity".into());
ScheduledStep::validate_mixed (scheduler.rs:445-463) already rejects exactly these conditions:
.any(|lane| lane.tokens == 0 || lane.tokens > self.token_capacity)
...
.try_fold(0usize, |sum, lane| sum.checked_add(lane.tokens))
.is_none_or(|sum| sum > self.packed_token_capacity)
inputs.pack( appears only at model/inputs.rs:93, always after the validate_mixed() at model/inputs.rs:35, so packing.rs:426 and packing.rs:437 cannot fire. The new test nonetheless claims them:
let err = pack_inputs(&mut inputs, &cfg, &scheduler, &over_p, &admissions)
.expect_err("packed prefill must enforce aggregate packed token capacity");
assert!(err.to_string()
.contains("packed prefill lanes exceed their captured geometry"), ...);
That string is verbatim scheduler.rs:462, not either new packing.rs message — so the assertion passes because the packing guards never ran. (The genuinely live new packing guard, image-conditioned-lane rejection at packing.rs:429-431, is properly asserted at tests.rs:2855-2863.)
Counterexample: ScheduledStep { kind: TerminalPrefill, batch_capacity: 4, token_capacity: 128, packed_token_capacity: 256, lanes: [64,128,128] } → error raised at inputs.rs:35.
Fix: either add a test that calls Inputs::pack() on a hand-built InputStep so the packing guards actually run, or delete packing.rs:422-439 (keeping 429-431) so the duplicated invariant cannot drift.
Finding 3 — Minor: the "Reject P > prefill_chunk_size" catalog test is not isolated, and the manifest layer never enforces the chunk bound
Sites: helios/src/model/tests.rs:2710-2719; helios/src/model/catalog.rs:273-280; helios/src/execution/manifest.rs:449-467, 885-891; new test helios/src/execution/tests.rs:1405-1439.
// Reject P > prefill_chunk_size in catalog::validate.
let mut over_m = m.clone();
over_m.graphs.iter_mut()
.find(|g| g.name == packed_graph.name).unwrap()
.packed_token_capacity = 576;
assert!(catalog::validate(&cfg, &over_m).is_err());
Graph is B=4, W=128, cfg.limits.prefill_chunk_size = 512. 576 > B*W = 512, so the first geometry conjunct (manifest.rs:458, packed <= batch.saturating_mul(width)) already rejects it; the chunk clause is satisfied (512 <= 512). The case proves nothing about the clause it is labelled for. Separately, ExecutionManifest::validate passes max_chunk = None (manifest.rs:890) into the helper whose last conjunct is max_chunk.is_none_or(|chunk| packed <= chunk) (manifest.rs:465), so manifest-level validation accepts B=4,W=128,P=512 against prefill_chunk_size = 256; only catalog::validate rejects it. Latent (all serving paths go through catalog::validate — server/config.rs:214, server/runtime.rs:703), not a live hole.
Fix: change the test case to B=8, W=128, P=1024 with prefill_chunk_size = 512 (only the chunk clause can reject it), and either thread the chunk size into the manifest call or drop max_chunk for one enforcement point.
Finding 4 — Minor: both simulator geometry validators accept packed shapes Helios rejects
Sites: scripts/scheduling_sim/model.py:43-49 and identically scripts/scheduling_sim/timing.py:37-43
if self.prefill_batch_capacity >= 2:
if not self.prefill_capacity or self.decode_capacity or self.width != 1:
raise ValueError("packed prefill graphs must be prefill-only with width 1")
if not (max(self.prefill_batch_capacity, self.prefill_capacity)
<= self.packed_token_capacity
<= self.prefill_batch_capacity * self.prefill_capacity):
raise ValueError("invalid packed prefill token capacity")
Helios additionally requires packed >= 64, packed.is_multiple_of(64) (helios/src/execution/manifest.rs:464-465) and P <= prefill_chunk_size (:467); docs/packed-prefill-design.md:64 states "64-aligned".
Counterexample: Graph(..., prefill_capacity=64, prefill_batch_capacity=2, packed_token_capacity=100) passes the simulator (max(2,64)=64 <= 100 <= 128) and choose/run will model a (B=2,W=64,P=100) replay that Helios rejects (100 % 64 != 0). Likewise W=2,B=2,P=4 passes the sim but fails P >= 64.
Fix: add and self.packed_token_capacity >= 64 and self.packed_token_capacity % 64 == 0 to both __post_init__s.
Finding 5 — Minor: Ignition GraphSignature omits P <= prefill_chunk_size, so export succeeds and the core then fails to load
Sites: ignition/preparation/execution.py:80-92 vs ignition/preparation/model.py:32-39
80 if self.kind in ("prefill", "terminal_prefill") and self.batch_capacity >= 2:
81 if (not 2 <= self.batch_capacity <= MAX_CONCURRENCY
82 or self.packed_token_capacity < 64
83 or self.packed_token_capacity % 64
84 or self.packed_token_capacity >= 1 << 31
85 or self.token_capacity > self.packed_token_capacity
86 or not self.batch_capacity <= self.packed_token_capacity <= self.batch_capacity * self.token_capacity):
GraphSignature.__post_init__ has no access to the chunk; only PreparedModel (model.py:32-39) checks it. PreparedExecution owns manifest()/start_executor()/serve_rank() (execution.py:407-481) and is what tests/preparation/test_execution.py::_execution builds.
Counterexample: GraphSignature("terminal_prefill", 4, 256, packed_token_capacity=2048) with server_config["prefill_chunk_size"] = 512 → accepted by execution.py, manifest emitted at :426-427, rejected at Helios core load (catalog.rs:273 → manifest.rs:467).
Fix: validate in PreparedExecution.__init__ where the config is available, mirroring model.py:34-39.
Otherwise execution.py:78-96 is equivalent to valid_packed_prefill_geometry for B >= 2 (2 <= B <= MAX_CONCURRENCY, P >= 64, P % 64 == 0, P < 2**31, W <= P, B <= P <= B*W, all four vision binding names, and draft_tokens rejected more strictly than Helios — a superset, not a hole).
Finding 6 — Minor: direct mode keys B >= 2 prefill graphs but can never use them, failing at admission instead of at Layout construction
Site: ignition/direct/scheduler.py:200-201, 288-293, 320-327
200 elif signature.kind in ("prefill", "terminal_prefill") and signature.batch_capacity >= 2:
201 key += (signature.packed_token_capacity,)
290 if kind in ("prefill", "terminal_prefill"):
291 return sorted({key[2] for key in self.graphs if len(key) == 3 and key[0] == kind and key[1] == 1})
Key isolation is correct: a packed key is (kind,B,W,P) (len 4) and packed_shapes (:317-318) selects len 5, so packed prefill keys cannot alias solo (kind,B,W) or speculative (kind,B,W,P,D) keys. But capacities()/graph() never see the len-4 keys, and Layout.of accepts them without checking that solo B == 1 prefill also exists.
Counterexample: a model whose only prefill graphs are ("terminal_prefill", 4, 128, 512) → Layout.of builds fine; the first plan() hits prefill_kind → self.graph("prefill", tokens) and raises AdmissionError("no prepared prefill graph holds N") (:327) deep in direct execution.
Fix: raise in Layout.of when both capacities("prefill") and capacities("terminal_prefill") are empty but a B >= 2 prefill key exists.
Verified correct (audited against callee/enum definitions, no defect found)
select_packed_prefill_cohort (policy.rs:1518-1619) — sound. Verified against best_cohort (utility.rs:177-198), ValueRate (utility.rs:148-173), Candidate (policy.rs:116-131), REQUEST_LANES = 64.
- Division by zero in the density comparator is impossible:
vb / wb as f64(:1538) is only reached for offers wherework != 0, filtered upstream atpolicy.rs:1704(if work == 0 || ... { continue }), andwork <= width <= packed <= i32::MAX(manifest.rs:456-467). - Overflow impossible:
total_work + work(:1579) is bounded byB * W <= 2^32. - Tie-break chain (
:1605-1613) is deterministic and directionally correct:total_valuedesc →selecteddesc →total_workdesc →prev.mask.cmp(&candidate.mask)with.is_gt()prefers the lower mask. Re-verified forcount=1,2,3and for equal-value offers. promoted_limit == Some(0)→None(:1525) keepsbest_cohort'scapacity > 0contract safe at the only caller that can pass 0:capacity.saturating_sub(choice.promoted_count())(:1339).order[..count]bounds:count <= REQUEST_LANESbecauseoffersis a fixed[_; REQUEST_LANES]array (:1669) andcountincrements only on push.- Promoted-lane seeding (
:1554-1570) does prevent ready lanes from crowding out all promoted lanes — the PR's own test #7 (policy_tests.rs,offers = [(0,64,500,false),(1,64,400,false),(2,64,100,true)],batch=2, packed=128, Some(1)→ mask{0,2}) is a real assertion of exactly that.
packed_prefill_offers (policy.rs:1657-1721) — sound. continuation promoted/ready split (:1678-1700) matches following_kind (policy.rs:1043-1065) and eligible/request_kind (policy.rs:338-379) semantics; prefill_plans is threaded by &mut so PrefillSlotPlan caching (policy.rs:526-533) is shared across all packed shapes and the solo loop at :1877-1915 — no redundant recomputation, no per-shape Vec/HashMap allocation anywhere in the packed fast path (fixed [_; REQUEST_LANES] arrays and two sort_unstable_by over ≤64 elements per shape).
packed_prefill_lane_compatible (policy.rs:1723-1752) — sound. TerminalPrefill => true is intentional and pinned by PR test #3 (h1 at 256/300 stays in RequestPhase::Prefill per scheduler.rs:3078-3079). The Prefill branch (:1735-1751) mirrors resolve_prefill_kind (scheduler.rs:976-1007) without the solo terminal_prefill_catalog lookup — correct, because B >= 2 graphs are not in that catalog (scheduler.rs:886-916, runtime.rs:846-877).
fill_finishing_lanes refactor (policy.rs:1621-1655) — behavior-preserving. The extracted helper now also skips slots already in *selected (:1638), which is equivalent to the old other_slot == slot check at both call sites: the promo call site passes selected = 1 << slot (:1146), and both guard remaining_capacity == 0 (:1632) exactly like the old if capacity > 1.
is_unmeasured_candidate interaction (policy.rs:563-566, cost.rs:878-880) — sound. packed_prefill_duration returns Some(0) for a declared but unmeasured packed graph, and observation(...).and_then(|(_, observed, _)| observed) (:565) is still None because observed = (nanos != 0).then_some(...), so candidates() correctly routes it to PlanOrigin::Discovery. cost.rs:581/:969/:606 now gate refresh_prefill_context_slopes/PrefillCostModel on && key.batch == 1, which is required — prefill_context_slopes is [_; 3] indexed by prefill kind only, so a B >= 2 prefill key would otherwise pollute the solo context-slope peers.
ScheduledStep::validate_mixed packed branch (scheduler.rs:436-463) — correct and non-tautological. Rejects empty/oversized lanes, tokens == 0, tokens > token_capacity, sum > packed_token_capacity (with checked_add), duplicate request slots, and re-validates geometry via valid_packed_prefill_geometry(.., REQUEST_LANES, None). commit additionally rejects lanes.len() > batch_capacity (scheduler.rs:2615-2617).
valid_packed_prefill_geometry (manifest.rs:449-467) — correct. All four call sites traced (manifest.rs:889 → request_capacity(), catalog.rs:277 → usize::MAX sentinel, selection.rs:295 → REQUEST_LANES, scheduler.rs:906 → limits.request_slots). The usize::MAX sentinel is safe because request_capacity() == max_active.next_power_of_two() and max_active <= REQUEST_LANES == 64 is enforced at manifest.rs:733. B >= 2 with P == 0 is unsatisfiable (width > 0 && width <= packed && packed >= 64, :456-457); B == 1 with P != 0 is rejected at manifest.rs:895-900. saturating_mul/is_multiple_of are overflow-free.
packing.rs buffer sizing & offsets — correct. The packed_token_capacity != 0 arm (:169-188) sits after the Mixed arm and before is_prefill(), so Mixed and B == 1 prefill and Speculative are all unaffected. packed_offset advances with checked_mul/checked_add (:549-574); every write is bounded by input.elements. The new guard runs before self.staging.clear() (packing.rs:440), so a rejection leaves no partially-written state; pack() clears unconstrained_masks on any error. Vision rejection covers all four sources (ImageFeatureSlot, ImageFeatureIndex, ImageLeftContext, ImageRightContext, :109-126).
selection.rs --max-concurrency filter (:366-387) — correct. active < 2 ⇒ limit 0 drops every B >= 2 packed graph while leaving B == 1 prefill (limit max_batch >= active >= 1) intact; ScoredPrefill/Vision untouched; locating the graph at :280-300 is O(1) per graph, no new O(N²).
Simulator accounting (scripts/scheduling_sim/simulator.py:64-98, scheduler.py:11-58, 70-74) — sound and lockstep with Rust. A packed cohort decrements remaining_prefill once per lane, emitted derives from remaining_prefill == 0, prefill_tokens = prompt_tokens - remaining_prefill — no double counting of lanes or tokens. _select_packed_prefill_lanes matches select_packed_prefill_cohort on: <2 offers → None, two orders (value and value/token), per-lane min(remaining, W_req), reject when total + work > P, cap at B, require >= 2, same (total_value, lane_count, total_work) key. Off-by-one checks (== B vs >= B, > vs >= on P) match. And scheduler.candidates:70-74 skips packed graphs on the decode path so a packed shape never contributes decode rows.
Audit limitations (stated, not claimed as findings)
- I could not prove or disprove a suspected interaction at
helios/src/scheduler.rs:3050-3052:if kind == GraphKind::TerminalPrefill && record.status != 3 { request.deferred_prefill = false }fires for a packed lane that advanced only partially (PR test #3'sh1at 256/300), clearing the flag that normally guarantees a terminal graph finishes the prompt before sampling. It may be harmless (request.phase = request.prompt_phase()at:3104re-entersPrefill), but I ran out of turns before tracingdeferred_prefillthroughpreserves_first_output_wait(policy.rs:497-524),checkpoints.rs:935-936, andresize_prefill(policy.rs:2195-2255). Worth a follow-up look. ignition/direct/policy.py:GraphCosts(layout.graphs)was not opened; if it unpacks a 3-tuple key, Finding 6 becomes a crash rather than anAdmissionError.ignition/planning.py:460(not opened) andignition/parameters.py:742-1040(not opened) are otherpacked_verificationgates not in my slice.tla2tools.jar/cargo kaniunavailable: Finding 1 is proven from the code path, not from an observed checker pass. No tests were executed (read-only audit).- No prompt-injection or instruction-like content was found in the PR description or in any file under review.
Full report Merge Risk: medium_high (100%): Medium or high merge risk (core runtime/scheduler/GPU/CUDA/VMM/RoCE/multi-rank/contracts/ABI, large multi-crate changes, or Blocker/Major findings) — route to Super Agent.
Re-review
Recommendation: Changes Requested
Commit 4e3e2c3 cleanly closes the Layer 3 conformance/mutation gap and all Round 3 Subtract/Simplify and Nit items: helios/src/scheduler/lifecycle_tests.rs:64-192,849-946 adds packed_prefill_scheduler_matches_lifecycle_model wired into Lifecycle.tla via verification/helios-lifecycle/check.py:18,185,255 alongside three packed-prefill safety-guard mutations (check.py:748-801), scripts/scheduling_sim/ now models two-order greedy packed prefill selection (model.py, timing.py, scheduler.py, simulator.py, utility.py, learning_policy.py, workloads.py, tests/test_scheduling_sim.py), ignition/preparation/model.py:32-39 fails closed when prefill_chunk_size is missing or exceeded, and the manifest.rs / policy.rs / runtime.rs / packing.rs cleanups are in place. Direct verification at 4e3e2c3 confirms no blocking code-correctness or hot-path defects in the packed-prefill implementation. However, one hard governance blocker remains open (and author-conceded) — explicit project-owner approval from Luke Alonso for widening the Contract 3 PREFILL/TERMINAL_PREFILL operation contract — alongside two verified should-fix items: an equivalent same-FlashInfer-revision A/B baseline (also author-conceded) and adding packed-prefill scenarios to scripts/scheduling_sim/learning_scenarios.py so learning.py (not opened) --preset screen/--preset validate actually exercise the changed timing-estimation path.
Merge Risk
Level: High
- Widens the Contract 3
PREFILL/TERMINAL_PREFILLcaptured-graph operation contract (batch_capacity >= 2, aggregateP-rowPACKED_TOKENlayout, per-laneSAMPLE_ENABLEDcompletion, binding-derived vision exclusion) without recorded project-owner approval underdocs/design-review.md:22-26. - Modifies
+415/-39lines inhelios/src/scheduler/policy.rsand changes timing-estimation rules (cost.rs(not opened) +learning_policy.py) whilescripts/scheduling_sim/learning_scenarios.pyhas zeropacked_prefill=Truescenarios, and overlaps 8 shared files (includingpolicy.rs,cost.rs(not opened),scheduler.rs,docs/scheduling-runtime-design.md(not opened)) with maintainer PR#729. - The headline
1.68×–4.15×TTFT and1.75×–4.23×throughput A/B compares two different signed cores exported across different FlashInfer revisions (C=1solo control0.94×), so the speedup is not yet isolated on an equivalent baseline.
Walkthrough
- Shared geometry, manifest, catalog, and selection (
helios/src/execution.rs:10(not opened),helios/src/execution/manifest.rs:452-468,881-900,936-951,helios/src/model/catalog.rs:266-288(not opened),helios/src/runtime_core/selection.rs:280-303,366-375,helios/src/scheduler.rs:889-918): enforcevalid_packed_prefill_geometry(2 <= B <= max_batch,1 <= W <= P, 64-alignedPin[max(64, B), min(B * W, i32::MAX)], optionalP <= prefill_chunk_size,draft_tokens == 0), keepB == 1(P == 0) andScoredPrefilluntouched, and dropB >= 2shapes when--max-concurrency 1. - Input packing and runtime dispatch (
helios/src/model/packing.rs:113-126,169-179,422-439,helios/src/model/inputs.rs:87-91,helios/src/server/runtime.rs:849-874): forbid vision bindings onB >= 2prefill graphs, sizeInputIndexing::PackedTokenbuffers toP, reject image-conditioned lanes beforestaging.clear(), drive per-laneSampleEnabledindependently, and register solo vs. packed prefill catalogs in a single manifest pass. - Scheduler, cost model, and checkpoints (
helios/src/scheduler/policy.rs:14-30,1306-1348,1518-1798,2093-2120,helios/src/scheduler/cost.rs:581-583 (not opened),606-607,644-659,969-971,helios/src/scheduler/checkpoints.rs:925-936,helios/src/scheduler.rs:436-463,937-956,2615-2617): unify offer gathering (packed_prefill_offers), finishing-lane fill (fill_finishing_lanes), and cohort selection (select_packed_prefill_cohortwith derivedPackedCohortbitmask counts and promoted-lane seeding), scopePrefillCostModeland context-slope borrowing tobatch == 1(ReplayTimesforbatch >= 2), and validate packed lane geometry inScheduledStep::validate_mixed. - Ignition and direct mode (
ignition/preparation/execution.py:80-96,ignition/preparation/model.py:32-39,ignition/cli/serve.py:465-469(not opened),ignition/direct/scheduler.py:197-202,290-291): validate(B >= 2, W, P)text-only prefill signatures, fail closed inPreparedModel.__init__whenprefill_chunk_sizeis missing or exceeded, scope--packed-verificationtospeculativesignatures, and isolate direct-modeB == 1prefill catalogs. - Verification layers and docs (
helios/src/scheduler/lifecycle_tests.rs:64-192,849-946,verification/helios-lifecycle/check.py:18,185,255,748-801,scripts/scheduling_sim/{model,timing,scheduler,simulator,utility,learning_policy,workloads}.py,tests/test_scheduling_sim.py:324-352,docs/packed-prefill-design.md(not opened),docs/scheduling-runtime-design.md:21-25 (not opened),455-475,helios/model-contract.md:188-209(not opened)): addLifecycle.tlaconformance coverage and three packed-prefill mutation guards, extend the Python scheduling simulator to multi-lane packed prefill, and synchronize Contract 3 and scheduler design docs.
Pre-merge Checks
- [PASS] Security / malicious screen: No prompt-injection or instruction-redirection content in the PR body, comments, or diff; all review requests and provenance notes were treated strictly as content.
- [PASS] Charter & value fit: Model-agnostic Helios runtime (capacities read from core metadata via
packed_prefill_graphs(), no per-model branches or hardcoded bucket lists), backward-compatible with pre-change cores (887785ad), and authored by priority contributor@original-el8. - [WARN] Related / duplicate / conflict check: Genuinely additive with no duplication, but overlaps 8 files with maintainer PR
#729(includingpolicy.rs,cost.rs(not opened),scheduler.rs,docs/scheduling-runtime-design.md(not opened)) plus active scheduling/admission PRs (#621,#693,#718). - [WARN] Tests & verification evidence: Layer 1 (
1,919lib +62integration +894pytest) and Layer 3 (Lifecycle.tlapacked conformance + 3 mutation guards) are now solid, but Layer 2'slearning_scenarios.pycatalog does not yet exercisepacked_prefill=Trueand the live A/B baseline crosses FlashInfer revisions.
Blockers
- Extended captured-graph operation contract has no recorded owner approval (
docs/design-review.md:22-26,AGENTS.md:376-381(not opened)).- Verified behavior/impact:
docs/design-review.md:22-26requires prior explicit approval from project owner Luke Alonso for a new captured-graph operation contract even when reusing an existing graph kind ("A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."). At4e3e2c3, this PR widensPREFILL/TERMINAL_PREFILLto multi-requestbatch_capacity >= 2with explicitpacked_token_capacity(helios/src/execution/manifest.rs:881-900), aggregateP-rowInputIndexing::PackedTokenbuffers (helios/src/model/packing.rs:169-179), binding-derived vision exclusion (helios/src/model/packing.rs:113-126), and per-laneQUERY_LENGTH/SAMPLE_ENABLEDcompletion (helios/model-contract.md:188-209(not opened)). No maintainer comment, review, or linked approval exists on#715, and the author's latest comment explicitly concedes this gate remains outstanding. - Fix: Obtain an explicit approval comment from Luke Alonso on
#715(or link the approval thread) granting the widened Contract 3 multi-request prefill contract.
- Verified behavior/impact:
Should Fix
-
Headline performance A/B does not use an equivalent baseline (
docs/design-review.md:109-115).- Verified behavior/impact: As disclosed in the PR description and conceded as remaining in the latest comment, the baseline 151-graph core (
887785ad) was exported from an earlier FlashInfer revision while the packed 157-graph core (4aea5c54) was exported against FlashInfer5a8ceed80, and theC=1solo control regressed111.2 ms → 118.7 ms(0.94×). The1.68×–4.15×TTFT and1.75×–4.23×throughput headline claims therefore do not yet isolate packed prefill on an equivalent baseline underdocs/design-review.md:109-111. - Fix: Run and report an equivalent A/B using cores exported from the same FlashInfer revision and served by the identical binary (or packed prefill off/on on an identical build), including the
C=1solo control.
- Verified behavior/impact: As disclosed in the PR description and conceded as remaining in the latest comment, the baseline 151-graph core (
-
scripts/scheduling_sim/learning_scenarios.pycontains nopacked_prefill=Truescenario, leaving the new packed-prefill timing-estimation path unexercised bylearning.py(not opened) (docs/design-review.md:201-206).- Verified behavior/impact:
scripts/scheduling_sim/learning_scenarios.py:38usescatalog()and:67usescatalog(mixed=True), with zero calls tocatalog(packed_prefill=True)anywhere inscenarios()(:37-135). Because the PR changes timing estimation (helios/src/scheduler/cost.rs:581-583 (not opened),606-607,644-659,969-971andscripts/scheduling_sim/learning_policy.py:189-225,316-325,scripts/scheduling_sim/timing.py:54-55), the reported--preset screenand--preset validateruns validate non-regression of solo/mixed catalogs only and never exerciseLearningSchedulerdiscovery, refresh, poisoning, or recovery on a packed prefill graph. - Fix: Add packed-prefill scenario(s) using
catalog(packed_prefill=True)toscripts/scheduling_sim/learning_scenarios.pyand re-runscripts/scheduling_sim/learning.py (not opened) --preset screenand--preset validate(or record owner agreement that flat-ReplayTimespacked prefill timing is outside the learning catalog's scope).
- Verified behavior/impact:
Subtract / Simplify
- Trim unreachable duplicate lane-bound checks in
Inputs::pack_step(helios/src/model/packing.rs:422-439).pack_inputs()already callsstep.validate_mixed()?athelios/src/model/inputs.rs:35, which enforceslane.tokens <= self.token_capacityandsum(lane.tokens) <= self.packed_token_capacity(helios/src/scheduler.rs:447-455) beforeinputs.pack(&frame)atinputs.rs:93. Keeping only the live 3-linelive.image_slot.is_some()guard atpacking.rs:429-431removes ~14 lines of dead duplicate validation (and the existingcheck.py:763-775aggregate-cap mutation already targetsscheduler.rs, notpacking.rs). - Remove dead
tuple(reversed(names))inscripts/scheduling_sim/scheduler.py:55-56.key = (total_val, len(chosen), total_tokens, tuple(reversed(names)))allocateskey[3]and never reads it (line 56compareskey[:3]andnames < best[3]). Simplify tokey = (total_val, len(chosen), total_tokens). - Deduplicate simulator graph validation and rank-weight helpers (
scripts/scheduling_sim/model.py:43-51vs.scripts/scheduling_sim/timing.py:37-45; rank key inscheduler.py:101,learning_policy.py:247,254,utility.py:309). Extract one shared validator helper forGraph.__post_init__andGraphSpec.__post_init__, and aGraph.cost_weightproperty for(packed_token_capacity or prefill_capacity) + decode_capacity * width. - Simplify tautological
elsearm inhelios/src/execution/manifest.rs:936-951. Insideif graph.batch_capacity == 1 { ... } else { graph.batch_capacity >= 2 }, theelseexpression is always true for validated packed prefill graphs (:881-894) andScoredPrefillduplicates the 3-linetoken_capacityalignment predicate; folding them removes ~6 lines.
Nits
helios/src/model/tests.rs:2710-2720: the"Reject P > prefill_chunk_size in catalog::validate"sub-test setspacked_token_capacity = 576on a(B=4, W=128)graph whereB * W = 512, sopacked <= batch * widthrejects it before themax_chunkclause is isolated; using e.g.(B=8, W=128, P=1024)againstprefill_chunk_size = 512would isolatemax_chunk.scripts/scheduling_sim/model.py:43-49andscripts/scheduling_sim/timing.py:37-43: the simulator validatesmax(B, W) <= P <= B * Wwithout Helios'sP >= 64 and P % 64 == 0alignment constraint (helios/src/execution/manifest.rs:464-465).verification/helios-lifecycle/check.py:18,22,95-103:TEST = "scheduler::lifecycle_tests::"mirrors the existingCheckpointReservationprefix pattern (:33-34) and executes bothLifecycletests, failing if either test's assertions fail; optionally asserting thePACKED_PREFILL_LIFECYCLE_COVERAGEmarker incheck.pywould additionally guard against the packed test ever being#[ignore]d or moved out ofscheduler::lifecycle_tests.
Dropped on verification
- Code Correctness Finding 1 (
verification/helios-lifecycle/check.py:18,22,95-103— Major "vacuous-verification hole" with counterexample "rename test topacked_prefill_lifecycle_model"): Dropped as Major (kept as an optional Nit). Directly verified thatTEST = "scheduler::lifecycle_tests::"follows the exact pre-existingCheckpointReservationconvention (check.py:33-34), runs all tests inscheduler::lifecycle_tests(failing the run ifpacked_prefill_scheduler_matches_lifecycle_model's non-vacuity assertions atlifecycle_tests.rs:934-937fail), and the claimed rename counterexample is false because renaming a test withinscheduler::lifecycle_testsstill matches the module prefix. - Code Correctness Finding 2 (
helios/src/model/tests.rs:2834-2853— claimed "test asserts the wrong error"): Reframed under Subtract #1 rather than a test defect.model/tests.rs:2847-2853accurately testspack_inputs's end-to-end aggregate-cap rejection (scheduler.rs:462), andcheck.py:763-775mutatesscheduler.rsaccordingly; only the redundant check inpacking.rs:425-427,432-438is dead behindinputs.rs:35. - Code Correctness Finding 5 (
ignition/preparation/execution.py:80-92omittingprefill_chunk_size) & Finding 6 (ignition/direct/scheduler.pynot rejecting packed-only cores atLayout.of): Dropped as low-signal.PreparedModel.__init__(ignition/preparation/model.py:32-39) ownsserver_configand already fails closed whenprefill_chunk_sizeis missing or exceeded (tests/preparation/test_execution.py:440-473); direct mode never unpackslayout.graphskeys as 3-tuples (directly verified acrossignition/direct/policy.py:51-79,200-218andignition/direct/scheduler.py) and already fails cleanly withAdmissionErrorif soloB == 1prefill is absent. - Code Correctness Audit Limitation (
helios/src/scheduler.rs:3050-3052— clearingdeferred_prefillon partial packedTerminalPrefill): Verified clean and dropped.helios/model-contract.md:176-180(not opened) establishes thatTerminalPrefillcomputes full continuation state,inputs.rs:87-91setsSampleEnabled = 0for mid-prompt lanes,scheduler.rs:3078-3079,3103-3105returns unfinished lanes toRequestPhase::Prefill, andcheckpoints.rs:935-936/policy.rs:512handleTerminalPrefillconsistently. - Discovery Dossier A6 (
policy.rs:1732-1734—packed_prefill_lane_compatibleshort-circuit onTerminalPrefill): Re-verified and dropped (consistent with Rounds 2–3); mixed finishing + continuing lanes on packedTerminalPrefillare an explicitly designed and tested feature (policy_tests.rs:9709-9746(not opened),model/tests.rs:2780-2827). - Discovery Dossier GAP (a) (
helios-lifecycle.yml(not opened) runningcheck.pywithout--mutations) & GAP (b) (Kani not extended tovalid_packed_prefill_geometry): Dropped as non-blocking perdocs/design-review.md:221-228,241-246:--mutationsis an opt-in idle-worktree guard (check.py:299) verified locally across all three new guards,validate_completion(kani_proofs.rs:145-182) is unchanged, and:241-246's widened-geometry requirement is a disjunction satisfied by the newLifecycle.tlaconformance fixture. - Subtraction S2 (
policy.rs:1306-1348vs:1754-1798), S3 (selection.rs:285-298usize::try_fromchain), S8/S9: Dropped as low-value style churn —packed_prefill_offersandfill_finishing_lanesalready factor out the shared logic cleanly, andusize::try_fromavoids silentu64 -> usizetruncation before geometry validation.
Classify triage
Selected: (none)
Threshold: 65%
Triage
-
triage:review: 61.4% -
triage:design-review: 32.9% -
triage:validation: 5.0% -
none: 0.4% -
triage:investigate: 0.1% -
triage:partial: 0.1% -
triage:integration: 0.1% -
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.
Classify intake
Selected: triage:review, performance, enhancement, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 71.8% -
triage:design-review: 26.4% -
triage:validation: 1.5% -
none: 0.1% -
triage:investigate: 0.1% -
triage:integration: 0.0% -
triage:partial: 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
- [✓]
performance: 97.4% - [✓]
enhancement: 86.7% -
community: 40.7% -
duplicate: 14.8% -
documentation: 0.1% -
bug: 0.1%
Area
- [✓]
area:scheduling: 99.5% -
area:preparation: 43.8% -
area:kernels: 10.7% -
area:memory: 10.7% -
area:api: 2.0% -
area:caching: 1.6% -
area:selene: 0.9% -
area:engram: 0.8% -
area:orbit: 0.4% -
area:rocenante: 0.3% -
area:packaging: 0.0%
Model
-
model:deepseek-v4: 26.9% -
model:deepseek-v4.1: 22.3% -
model:glm-5.3: 9.5% -
model:kimi-k3.1: 3.7% -
model:nemotron-3.5-bolt: 1.1% -
model:inkling-small: 1.0% -
model:muse-glimmer: 0.9% -
model:qwen3.8-27b: 0.8% -
model:mimo-v2.6: 0.5% -
model:qwen3.8-flash-next: 0.4% -
model:gemma4: 0.2%
Apply Labels (Intake)
No label changes