#1 [high] Project rules (charter, AGENTS.md, design-review) key clauses
Sources: read_charter, AGENTS.md (main), docs/design-review.md (main).
Charter: "Solve the right problem in the right place... smallest footprint in shared code"; "Stay focused... not interested in piling on extra model aliases, random switches"; "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload"; "Keep the runtime small and model-agnostic. Helios handles scheduling, caches, requests, and shouldn't accumulate per-model branches"; "Be explicit and pin everything. No magic defaults... Benchmarks, tests, or feature flags don't override architectural rules." Charter code review: "Supported matrix & compatibility: ... Check state and CUDA-graph transitions, and verify that existing data, artifacts, and exported cores still load." "No per-model special cases or flags."
AGENTS.md:
- L155-213 "Contribution scope and rejection criteria": every contribution must address maintainer request, demonstrated defect, measured perf/memory problem, or inaccurate docs. "Reject unsupported abstractions and churn. Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement." "Reject weakened guarantees. Preserve complete cache and speculative state ... Do not remove validation..." "Require focused, meaningful validation."
- L431-444 "Model core compatibility": every engine version must load models from previous versions without re-export; Protobuf additions must use defaults that preserve existing core behavior.
- L446-465 Configuration: never read env var for behavior; setting lives in recipe declaration, config file, or CLI flag.
- L484+ Validation and performance: "Compare other runtimes against an exported core running through flare run"; "performance claims require equivalent baselines".
- AGENTS.md L72-140 Required PR descriptions: why / what changed / claimed benefit / evidence, in order.
design-review.md principles: 1 "Keep Helios as simple as possible ... Introducing a captured-graph operation family requires prior explicit approval"; 3 "Preserve canonical model semantics and shared mechanisms ... Admission, page reservation and growth, eviction, preemption, readmission, and offload must not branch on model or recipe identity or capability flags"; 7 "Preserve complete committed state"; 8 "Budget physical memory across the lifecycle. Bound loading, tuning, compilation, capture, and serving storage"; 12 "Validate the real path and report evidence honestly ... keep raw measurements and disclose unrun checks"; 13 "Preserve model core compatibility"; 15 "Reject scope expansion and weakened constraints"; 16 "Write without hidden context".
#2 [high] Should fix: PR bundles four unrelated outcomes (~4k lines, 25 files)
Severity: should fix (scope).
Files: whole PR (25 files, +3965/−119) — helios/src/scheduler/{cost,refresh,policy,rounds,sam}.rs, runtime_core/selection.rs, model/catalog.rs, heliopause/src/python.rs, ignition/preparation/execution.py, docs/scheduling-runtime-design.md.
The description itself lists four independent commits (a85be397 cost-refresh recovery; 83ff9ed6 SAM copy drafts; 35ab143a wide copy-verify graph scheduling; 7ca5430c padding dominance + DEFAULT_MIN_MATCH_LEN 3→6). Each has its own motivation, risk surface and evidence, and each touches a different subsystem (refresh ledger; new 1600-line SAM module; graph catalog/selection/manifest metadata; batch padding policy).
Rule: AGENTS.md L196-199 "Keep each PR focused on one coherent outcome and describe its problem, resulting behavior, validation, and material limitations." design-review.md principle 15 (reject scope expansion / weakened constraints) and charter "Solve the right problem in the right place ... smallest footprint in shared code".
Why it matters: (a) the padding-dominance change and the match-length change alter behaviour for all existing speculation users (policy.rs dominates_padding_with / prune_padding, sam DEFAULT_MIN_MATCH_LEN), while the SAM and wide-copy work only affects cores that carry copy inputs; mixing them makes it impossible to attribute the measured improvement or to bisect a regression. The headline figure ("3.078 -> 3.650 emitted tokens/round") is a combined-stack number for three of the four commits. (b) Nothing in the description isolates the padding-dominance change's live effect from the wide-copy graph change, so the "max_b == C" table cannot be attributed.
Fix: split into (1) the funded-refresh recovery fix (a self-contained defect fix with CPU tests), (2) the padding-dominance + min-match-len change (shared policy, live evidence), (3) the SAM/wide copy-verify feature stack (new capability, new metadata).
#3 [high] Should fix: second proposal-source dimension in manifest + load-time special cases
Severity: should fix (architecture).
Where the duplication appears:
helios/src/runtime_core/selection.rs:182-183—retain_wide_copy = source == 1 && history_enabled && fixed.is_none().selection.rs:277-299(diff hunk at 275) —copy_wideinsideexecution.graphs.retain, bypassing thedraft_source == source,draft_tokens <= draftsandmtp_verification_token_budgetfilters for copy graphs.selection.rs:382-396—retained_widths, rewriting the config'sspeculative_widthsto include widths that no MTP graph implements.helios/src/scheduler/cost.rs:192-201—has_mtpspecial case: copy shapes are excluded frompacked_round_durationswhenever any MTP packed shape exists, so the same (batch,width) cost table means different things depending on what else is in the core.helios/src/scheduler/rounds.rs:745-760+— the whole copy-shape branch inpacked_round_candidates, guarded byproposal_source == Mtp && shape.draft_source == Copy && width > 1.helios/src/scheduler.rs:2792andcost.rs:223—is_copy_only_stepkeyed offActionCostsentries rather than the step, so the sameScheduledStepshape is "copy" or "MTP" depending on which graph the manifest happened to bind.
Why it matters: a graph's proposal source is already an expression of the core's speculative_proposal_source config (selection.rs:161-165, model.rs), and the scheduler already has proposal_source. This change adds a second source of truth (GraphDescriptor::draft_source, defaulted from kind == Speculative in heliopause/src/python.rs:231-232) and then needs a dozen conditionals to keep the two consistent. Rules: design-review.md principle 1 ("Keep Helios as simple as possible ... Express differences through cache schemes and prepared layout metadata reusable across models") and principle 3 ("Do not add ... capability flags"); AGENTS.md L188-193 "Reject unsupported abstractions and churn. Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement"; L176-181 "Flags, enums, callbacks, optional paths, and temporary implementations cannot be used to bypass them."
Also note has_mtp/copy_wide make behaviour depend on which other graphs a core contains — a non-local dependency that is hard to test and easy to break.
Fix: derive per-shape source from the key alone (e.g. keep one CostKey-level notion driven by a single declared catalog field), and keep one place that answers "may a copy-only shape be scheduled" instead of four. If wide copy-only graphs are wanted, the smallest footprint is a scheduler-level check on the captured shape list, not new manifest metadata threaded through selection, catalog, cost, rounds and runtime.
#4 [high] Nit/medium: docs stale after SAM change; unpinned constants; evidence gaps; no-op idle()
Severity: nit / should-fix (documentation accuracy).
-
docs/mtp-design.md(unchanged by this PR) still states that history drafting works from a "host-memory ring" of "exact eight-token and four-token indexes" and "return[s] up to seven observed continuation tokens" (lines 31-34), and that it "requires speculative graphs that declare copy-token inputs, which only the qwen3.8-flash MTP graphs do" (lines 25-27). After this PR the primary source is a per-request prompt+output suffix automaton (helios/src/scheduler/sam.rs,RequestScheduler::request_history_proposalat helios/src/scheduler.rs:1102), with the shared ring only as fallback when it has a strictly longer match (scheduler.rs:1128-1147). The PR only updatesdocs/scheduling-runtime-design.md. AGENTS.md requires design docs to describe implemented mechanism and present qualification. Fix: update mtp-design.md's history-drafting section (mechanism, min match length 6, 131,072-token caps, 512-token boundary overlap). -
helios/src/scheduler/sam.rs:22DEFAULT_MIN_MATCH_LEN: usize = 6and the wide-copy constantsWIDE_COPY_PRIOR_RATE = 0.88/WIDE_COPY_MIN_MATCH_LEN = 6(helios/src/scheduler/speculation.rs:15,18) plusbase_mtp_drafts + 3(rounds.rs copy branch) are unpinned magic numbers in shared policy. Charter: "Be explicit and pin everything. No magic defaults". The PR calls them calibrated but the evidence offered is one repetitive 512-token prompt; no derivation of 0.88 or of "+3" is given. Fix: state the derivation in the design doc or make them explicit policy fields. -
Evidence gap: live results are DeepSeek-V4.1 Flash TP4 on SM120 only with
--history-drafts; copy-only wide graphs (W=16/24) were never exported or replayed on a GPU (the PR's own Limitations say so). So the wide-copy scheduling path (rounds.rscopy branch at ~745,catalog.rs:93-131,selection.rs:275-299,382-396) has CPU-test-only coverage — AGENTS.md L194-199 "Do not present scaffolding or partially wired features as supported". The compatibility claim ("existing W=8-only cores load") rests on the unit testhelios/src/model/tests.rs::wide_copy_verify_catalog_packs_23_sam_tokens_and_preserves_legacy_w8_cores, not a load-and-serve of a previously exported core (design-review.md principle 13). -
helios/src/scheduler/refresh.rs:99pub fn idle(&mut self) {}— an empty method that silently no longer does anything; call sitehelios/src/scheduler.rs:1281. Suggest deleting the method and the call so "idle does nothing" is visible. Nit. -
Positive note to record (no finding): the refresh change itself (
refresh.rs:71-105,cost.rs:31-38) is a clean, well-scoped defect fix — compute duration excludes measured readiness wait, idle preserves earned credit and debt,abortstill discards positive credit, and the aggregate bound indocs/scheduling-runtime-design.md(P <= 0.002/0.998 * O + D) still holds because idle adds neither credit nor ordinary duration.refresh_order(cost.rs:284-293) now returns a tiered key instead of a timestamp, which fixes the "probe older/smaller shapes first" defect.