Key findings
The funded-refresh recovery commit (a85be397) is a clean, well-scoped defect fix that belongs in the repository. The rest of the bundle is where my lens has trouble: it is four independent outcomes in one 25-file, +3965/−119 PR (against AGENTS.md:198-199), the largest of them adds a second proposal-source dimension to prepared metadata that duplicates the existing speculative_proposal_source config and forces copy-specific bypasses inside shared scheduler/selection code (docs/design-review.md:16-26, 31-52), and the supporting documentation and pinning of the new calibrated constants are not kept up. Nothing here is blocking in the sense of "must not merge at all" — the individual mechanisms are internally consistent and the compatibility story is argued — but the scope and the duplicated source of truth are exactly what the charter asks reviewers to reject, and the evidence does not separate the four contributions.
Rules I judged against: read_charter (solve the right problem in the right place / smallest footprint in shared code; keep the runtime small and model-agnostic; bring real evidence; be explicit and pin everything; a benchmark does not waive an architectural rule), AGENTS.md:155-205 (contribution scope and rejection criteria, AGENTS.md:431-444 model core compatibility, AGENTS.md:446-465 configuration), docs/design-review.md:14-52 (principles 1 and 3 in particular).
Should fix
1. The PR bundles four unrelated outcomes; attribution and bisection are impossible
Severity: should fix (scope). Rule: AGENTS.md:194-199 — "Keep each PR focused on one coherent outcome and describe its problem, resulting behavior, validation, and material limitations." docs/design-review.md principle 15 (reject scope expansion); charter "solve the right problem in the right place … smallest footprint in shared code".
The description itself lists four commits with four separate motivations and risk surfaces:
a85be397refresh-ledger recovery (helios/src/scheduler/{cost,refresh,policy,rounds}.rs,docs/scheduling-runtime-design.md),83ff9ed6a new per-request prompt+output suffix automaton (helios/src/scheduler/sam.rs, ~1600 lines),35ab143awide copy-verify graph metadata + selection + packing (heliopause/src/python.rs,ignition/preparation/execution.py,helios/src/{execution/manifest,runtime_core/{serving,selection},model/{catalog,packing},scheduler/{speculation,rounds,cost}}.rs),7ca5430cpadding dominance +DEFAULT_MIN_MATCH_LEN3→6 (helios/src/scheduler/{policy,sam}.rs).
Why it matters concretely:
- Commit 4 changes behaviour for all speculation users (
dominates_padding_with/prune_padding, and the default minimum copy match length), while commits 2–3 only affect cores carrying copy inputs. The headline live result — "eliminated over-padded B16/B32 …C = 4617.7 vs 587.6 tok/s (+5.1%)" — is explicitly labelled "combined-stack", and the description states "end-to-end throughput reflects the combined runtime, recipe, and kernel stack". The padding-dominance change's live effect is therefore not isolated by anything in the PR; only the CPU tests pin it. - Similarly, "3.078 → 3.650 emitted tokens/round, 408.0 → 460.8 tok/s" (
+12.9%) requires commits 2, 3 and 4 together (SAM proposals, wide copy graphs, and the raised threshold). A regression in any one of them cannot be bisected from this history without reverting the others. - The refresh fix is a defect fix with self-contained CPU tests and a documented invariant; it needs none of the rest.
Fix: split into (a) the funded-refresh recovery fix, (b) the padding-dominance + min-match-len change (shared policy, own live evidence), (c) the SAM/wide copy-verify feature stack (new capability + new metadata). If the maintainers prefer to keep it as one branch, at minimum the description should report per-commit live measurements for (b) and (c).
2. A second proposal-source dimension in prepared metadata, with copy-specific branches through shared policy
Severity: should fix (architecture). Rule: docs/design-review.md:16-26 ("Keep Helios as simple as possible … Limit native specialization to concrete cache storage requirements and graph cache bindings … Introduce differences through prepared layout metadata reusable across models") and :31-52 ("Native transport, scheduling, cache ownership, input packing … stay shared … Differences must follow concrete cache storage or execution constraints consumed by shared policy … Reject per-model boolean policy flags"). AGENTS.md:188-193 ("Reject unsupported abstractions and churn … Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement") and AGENTS.md:180-181 ("Flags, enums, callbacks, optional paths, and temporary implementations cannot be used to bypass them").
The core already declares a proposal source: speculative_proposal_source is parsed into ProposalSource (helios/src/scheduler/speculation.rs:23-38) and drives selection at helios/src/runtime_core/selection.rs:167-199. This PR adds a second, per-graph notion:
heliopause/src/python.rs:225-233derivesGraphDescriptor::draft_sourcefrom the Python binding, defaulting toMtpfor every speculative graph when the field is absent — i.e. the manifest now asserts something the config already asserts, and the two can disagree.helios/src/runtime_core/selection.rs:184computesretain_wide_copy = source == 1 && history_enabled && fixed.is_none(), then:277-298letscopy_widegraphs bypass thegraph.draft_source == source,draft_tokens <= drafts, fixed-width andmtp_verification_token_budgetfilters that every other speculative graph must pass. The compatibility-critical filters are now conditional on a manifest field.helios/src/runtime_core/selection.rs:382-391then rewrites the config'sspeculative_widthsto keep widths that the MTP source does not implement, so the exported configuration no longer means what it says.helios/src/scheduler/cost.rs:190-208(has_mtp) excludes copy-only packed shapes frompacked_round_durationswhenever any MTP packed shape exists: the same(batch, width)cost entry means different things depending on what else the core contains.helios/src/scheduler/rounds.rs:752-790carries an entire copy-only branch insidepacked_round_candidates, guarded byproposal_source == Mtp && shape.draft_source == Copy && width > 1, with its ownmin_copy_len = base_mtp_drafts + 3threshold and its own per-lane admission loop.helios/src/scheduler/cost.rs:223-232keysis_copy_only_stepoff theActionCostsentry for the scheduled step, so the sameScheduledStepis "copy" or "MTP" depending on which graph the manifest happened to bind under that key.
Each of these is individually defensible; together they are the pattern the design review asks to reject: a new metadata field that exists only to enable an alternative execution path, then a dozen conditionals in shared scheduling code to keep it consistent with the pre-existing flag. The result is that speculative scheduling behaviour is a function of (config, manifest field, and which other graphs were exported) — hard to reason about, hard to test in isolation, and easy to regress on cores that never use copy graphs.
Fix: keep one authority. Either express copy-only wide shapes as ordinary catalog entries whose proposal source is derived from the existing speculative_proposal_source plus their captured inputs (no new manifest field), or if per-graph source is genuinely needed, make it the only source and delete speculative_proposal_source-driven duplication rather than supporting both. Whichever is chosen, "may this shape be scheduled" should be answered in one place (a scheduler-level predicate over the captured shape list), not in selection.rs (twice), cost.rs (twice) and rounds.rs.
3. Cost and scheduling semantics depend on which other graphs the core contains
Severity: should fix (architecture / testability). Rule: docs/design-review.md:31-46 (shared mechanisms, no model/capability-conditional behaviour in shared policy); AGENTS.md:182-187 (do not silently substitute execution paths).
helios/src/scheduler/cost.rs:192-201: refresh_packed_durations first scans for any non-copy packed speculative entry and, if one exists, skips all copy entries. So adding one MTP packed shape to a core changes the meaning of every copy shape's measured duration, and packed_round_duration (:210-213) returns None for a shape that was measured. is_copy_only_step (:223-232) inherits the same ambiguity, and it is what downstream code uses to isolate copy completions from MTP acceptance profiles and from baseline cost refresh. A behaviour that flips on the composition of the rest of the catalog is not a local property and cannot be covered by a shape-level unit test; the current tests exercise it only through whole-catalog fixtures (helios/src/model/tests.rs::wide_copy_verify_catalog_packs_23_sam_tokens_and_preserves_legacy_w8_cores).
Fix: key the distinction on the shape itself (the key plus its declared source), not on a global "does any MTP packed shape exist" scan — i.e. keep separate, explicitly named tables (or an explicit enum on the row) for MTP-verify and copy-verify packed durations. Then is_copy_only_step reads the step's source directly instead of looking it up in the cost table.
4. docs/mtp-design.md now describes a mechanism that no longer exists
Severity: should fix (documentation accuracy). Rule: AGENTS.md:165-166 ("Every contribution must address … inaccurate documentation"); docs/design-review.md:12 ("Validate the real path and report evidence honestly"); charter "write without hidden context".
docs/mtp-design.md:22-40 (not touched by this PR) still says:
- "
flare run CORE --history-draftsaugments Qwen's learned MTP proposals with continuations from shared decoded history … It requires speculative graphs that declare copy-token inputs, which only theqwen3.8-flashMTP graphs do" (:22-27); - "each loaded model retains the most recent 65,536 committed generated tokens across requests in a host-memory ring. Exact eight-token and four-token indexes match the active request's suffix … They return up to seven observed continuation tokens" (
:31-34).
After this PR the primary source is a per-request prompt+output suffix automaton (helios/src/scheduler/sam.rs:1-37; wired at admission and queried by RequestScheduler::request_history_proposal, helios/src/scheduler.rs:1099-1159), with the shared ring used only when it has a strictly longer match (scheduler.rs:1143-1148). The defaults are now min_match_len = 6 (sam.rs:22), a 131,072-token prompt cap (sam.rs:24-25), and a 512-token prompt/output boundary overlap (sam.rs:30-32) — none of which appear in the design doc. Only docs/scheduling-runtime-design.md was updated (and that diff is confined to the funded-refresh and acceptance-learning sections; it does not document the SAM, draft_source, or wide copy-verify path at all).
Fix: update docs/mtp-design.md's history-drafting section to describe the SAM-first mechanism, the fallback rule, the caps and the new threshold, and add a section to docs/scheduling-runtime-design.md for draft_source / wide copy-verify shapes (what the field means, when such shapes are retained, how they compete with MTP rounds).
5. Calibrated constants are magic numbers without a stated derivation
Severity: should fix (rules compliance). Rule: charter "Be explicit and pin everything. No magic defaults"; AGENTS.md:187 ("Numerical bounds must follow the required arithmetic and measured repeatability"); AGENTS.md:188-193 (no configuration knobs without a concrete requirement).
helios/src/scheduler/speculation.rs:15WIDE_COPY_PRIOR_RATE = 0.88("Conservative per-step acceptance prior for uncalibrated wide copy-verify rounds"),:18WIDE_COPY_MIN_MATCH_LEN = 6,:20-21COPY_STEP_PRIOR_WEIGHT = 4.0,COPY_DEPTH_SHRINK_WEIGHT = 2.0.helios/src/scheduler/rounds.rs:766let min_copy_len = base_mtp_drafts.saturating_add(3)…— the+3is the gate that decides whether a copy shape competes at all.helios/src/scheduler/sam.rs:22DEFAULT_MIN_MATCH_LEN = 6(3→6 in this PR).
The description justifies 6 for the match length with one 512-token repetitive code-edit prompt and gives no derivation at all for 0.88, 4.0, 2.0 or +3. These are shared-policy numbers that decide when a graph is scheduled; per the charter they need either a derivation in the design doc or to be explicit, named policy fields with their measured basis.
Fix: document the derivation (offline measurement / conservative bound) next to each constant, or promote the ones that are policy decisions into declared policy fields. If +3 is a safety margin over the MTP depth, say so and say why three.
Nits
helios/src/scheduler/refresh.rs:99—pub fn idle(&mut self) {}. An empty method with a doc comment explaining that it now does nothing, still called fromhelios/src/scheduler.rs:1281. Delete the method and the call site so that "idle changes nothing" is a property of the code, not of a no-op function. (docs/scheduling-runtime-design.mdalready states "Idle retains earned credit and negative debt".)- Evidence coverage for the new path. The PR's own Limitations say copy-only wide graphs (
W=16/W=24) were never exported or replayed on a GPU and that cost-refresh was not exercised under live power-limit transitions. The wide-copy scheduling path (rounds.rs:752-790,catalog.rs,selection.rs:277-298,382-391,cost.rs:190-208) therefore has CPU-test-only coverage, and the "existing W=8-only cores load" compatibility claim rests on one unit test rather than a load-and-serve of a previously exported core (docs/design-review.md:22-26approval applies to new captured-graph operation families;AGENTS.md:194-199"Do not present scaffolding or partially wired features as supported"). The text is honest about this, so this is a nit rather than a finding — but a load-and-serve check of an already-exported W=8 core would materially strengthen the compatibility claim thatAGENTS.md:431-444requires. - Positive note (no action): the refresh change itself is well scoped.
cost::observed_compute_duration_ns/timing_refresh_duration_ns(cost.rs:31-38) exclude measured readiness wait whileobserved_duration_nskeeps raw physical time for acceptance learning (refresh.rs:71-93),idlepreserves earned credit and debt,abort(refresh.rs:101-105) still discards positive credit, and the documented aggregate bounds hold because idle adds neither credit nor ordinary duration.ActionCosts::refresh_order(cost.rs:284-293) replacing the nanosecond timestamp with a two-tier key fixes the real "probe the older, smaller shape first" defect. This commit could merge on its own today.
Open questions
- Q1. Was the wide copy-verify path (
draft_source = 2, a new operation contract for the speculative graphs) approved in advance by the project owner asdocs/design-review.md:22-26requires? Nothing in the description says so, and a new manifest field plus a new buffer set on speculative graphs plausibly falls under "a new operation contract … requires approval even if it reuses a graph kind or enum value". A maintainer comment on the PR is what would settle this; the code alone cannot. - Q2. Is
has_mtp(cost.rs:192-196) intended as "copy shapes only compete when no MTP packed shape exists", or as a temporary workaround for mixed catalogs? The code has no comment; the description describes the behaviour but not the invariant. Settling it needs a maintainer statement or a test that asserts a mixed catalog's cost semantics. - Q3. Can commits 2–4's live numbers be reproduced without commit 1? Only the author's rig can answer; the description does not separate them (see finding 1).
What I could not verify
- No CI runs exist on the head commit, so I could not independently confirm the reported test counts (
615 passed,1,625 passed) or the SAM microbenchmark figures; I read the test code paths but did not execute them. - The live GPU claims (4× RTX PRO 6000, DeepSeek-V4.1 Flash TP4,
max_b == C,+12.9%tok/s) cannot be checked from the repository; I only verified that they depend on multiple commits simultaneously. - I did not review the Python-side catalog generation in
helios/src/model/catalog.rsfor per-model branches (principle 3's allowlist concern) beyond confirming the newdraft_sourceplumbing; another lens may want to followcatalog.rsandmodel/packing.rsin detail.