#1 [high] Change: shape and size of PR #540
PR #540 "helios: cost-refresh recovery, prompt+output SAM copy-drafts, and calibrated wide copy-verify" by FujitsuPolycom. Open, ready for review, opened and updated 2026-11-26, base main, head 7ca5430c. 25 files +3965/-119. No comments at all (pr_comments returns empty), no reviews, no CI checks on head.
Four commits atop main 33ab6df5:
- a85be397 "Recover stale Helios graph costs across idle gaps and readiness stalls" (cost.rs, refresh.rs, policy.rs, rounds.rs, policy_tests.rs, docs)
- 83ff9ed6 "helios: add per-request prompt+output suffix automaton for copy drafts" (new helios/src/scheduler/sam.rs +1606, scheduler.rs, decoded_history.rs, model/packing.rs, server/runtime.rs, tests)
- 35ab143a "helios: add cost-calibrated wide copy-verify graph scheduling and packing" (ignition/preparation/execution.py, heliopause/src/python.rs, many helios files)
- 7ca5430c "helios: tighten speculative batch padding dominance and raise default SAM min_match_len to 6"
Files (pr_files): docs/scheduling-runtime-design.md +31/-23; heliopause/src/python.rs +14/-3; helios/src/execution/manifest.rs +7/-2; execution/tests.rs; model/catalog.rs +13; model/packing.rs; model/testing.rs; model/tests.rs +324; runtime_core/selection.rs +109/-12; runtime_core/serving.rs +7; scheduler.rs +180/-9; scheduler/checkpoints.rs; scheduler/cost.rs +120; scheduler/decoded_history.rs +13; scheduler/policy.rs +119/-14; scheduler/policy_tests.rs +501; scheduler/refresh.rs +17/-9; scheduler/rounds.rs +194/-12; scheduler/sam.rs added +1606; scheduler/speculation.rs +103; scheduler/speculative_lifecycle_tests.rs; scheduler/tests.rs +583; server/runtime.rs +6/-2; server/runtime/phase_tests.rs; ignition/preparation/execution.py +10/-1.
#2 [high] Change: what the four commits actually do (plain terms)
- Cost-refresh recovery (a85be397). helios/src/scheduler/refresh.rs:
RefreshState::idle()is now an empty body (previously clamped both credit ledgers to <=0) and the clamping moved intoabort()(refresh.rs:96-105 in the diff). helios/src/scheduler/cost.rs addsobserved_compute_duration_ns(observed duration minusReadinessIntervals::wait_ns()) andtiming_refresh_duration_ns(compute duration, else wall_ns fallback); ordinary income and timing-refresh episode charges use these, acceptance learning keeps raw physical duration (refresh.rs complete()).ActionCosts::refresh_orderchanged from u64 to(bool, u64): tier 0 = never attempted since becoming stale (last_attempt_ns < observed_at + ttl), tier 1 = attempted while stale, keyed by oldest attempt. - Per-request Suffix Automaton (83ff9ed6). New helios/src/scheduler/sam.rs (1607 lines):
PromptSAM(immutable, compacted flat edge table,build/build_capped, DEFAULT_MAX_PROMPT_TOKENS = 131_072),OutputSAM(dynamic, Link-Cut Tree over suffix-link tree, sam.rs:564-735, keepsmax_endposexact and gives recency tie-break),PromptOutputSAM(Arc + lazy OutputSAM seeded with DEFAULT_BOUNDARY_OVERLAP = 512 prompt tokens, 1-token lag, DEFAULT_MAX_OUTPUT_TOKENS = 131_072, DEFAULT_MIN_MATCH_LEN = 6). Wired in scheduler.rs:1852sam: Option<sam::PromptOutputSAM>created at admission only whenself.decoded_history.is_some()(i.e. history drafts enabled);push_tokenon commit paths (scheduler.rs:1231-1237 and ~3013);RequestScheduler::request_history_proposal[_with_match_len](scheduler.rs:1099-1163) prefers the SAM unless the shared DecodedHistory ring has a strictly longer match;request_copy_match_stats(pub(crate)) for the wide-copy gate. Model packing and server runtime switched fromhistory_proposal(live.tokens(), ..)torequest_history_proposal(handle, ..)(model/packing.rs:399-405, server/runtime.rs:2145). - Cost-calibrated wide copy-verify (35ab143a). Adds per-graph
draft_source: Option<ProposalSource>to GraphDescriptor (execution/manifest.rs:188-193), validated (manifest.rs:839-851), read from proto (runtime_core/serving.rs:58-63) and from the Python manifest (heliopause/src/python.rs:225-237), declared by recipes viaGraphSignature.draft_source(ignition/preparation/execution.py:32, 102-108, 315-319). selection.rs retains optionaldraft_source=2graphs only when proposal source is mtp + history drafts + adaptive (retain_wide_copy, selection.rs:182-184, 277-298) and narrowsspeculative_widthsback to source widths otherwise (selection.rs:379-393). Newspeculation::CopyCalibration(aged per-depth survival + per-step rate, prior WIDE_COPY_PRIOR_RATE = 0.88, speculation.rs:98-190),rounds.rs wide_copy_curve/expected_copy_tokens, and a wide-copy candidate builder insidepacked_round_candidates(rounds.rs:749-900) that is gated ondecoded_historypresent, adaptive width,shape.drafts > base_mtp_drafts,request.copy_allowed(),match_len >= WIDE_COPY_MIN_MATCH_LEN (6),copy_len >= base_mtp_drafts + 3. Copy-only rounds are excluded from host/gpu MTP acceptance learning (copy_only_stepin scheduler.rs:2795-2801, 2860-2875) and from the MTP packed duration table (cost.rs:189-202). - Padding dominance + threshold (7ca5430c). policy.rs
dominates_padding_withgains a branch for strict batch-width domination with equal (capacity, draft_tokens) andsmaller.packed_token_capacity >= min(sum lane ceilings, larger.packed);prune_paddingadds a whole-list pass marking any GPU-allocated ragged speculative candidate dominated when a strictly narrower batch (>= active lanes) with the same (capacity, drafts) offers at leastmin(lane ceilings, own packed)(policy.rs:221-254).Candidategains anexpectedfield (zero-duration useful value) used only for RefreshStart ranking (compare_refresh, policy.rs:1265-1332, 1413-1425). DEFAULT_MIN_MATCH_LEN 3 -> 6 (sam.rs:22).
#3 [high] Undeclared gap: heliopause export overwrites draft_source with MTP
heliopause/src/export/binding.rs:196-202 (unchanged by this PR, identical on main, confirmed by reading the file at ref main): for every graph whose kind is "speculative" (or mixed with speculation_enabled) the export path does graph.insert("draft_source".into(), "MTP".into()) unconditionally. That JSON is what becomes the wire Execution via message("Execution", &value) (binding.rs:390-395) — the JSON->protobuf transcode will not fail on the mismatch because it is a string enum, but the declared copy source is lost.
Consequence (connection): ignition/preparation/execution.py:316-319 is the only place that emits draft_source = 2 (from GraphSignature.draft_source), and heliopause/src/python.rs:225-233 is the only consumer of that dict — but the dict consumed by python.rs is the one built by PreparedExecution.manifest()/export_manifest() in ignition, whereas the dict that becomes the core's wire metadata goes through RuntimeCore.write -> export_capture -> binding::execution (ignition/preparation/runtime_core.py:108-140, capture.rs:3157-3160). Those are two different paths; only the second one is rewritten to "MTP".
So a recipe that declares copy-only wide graphs (the feature part 3 exists for) cannot get draft_source=2 into the exported core through the standard PreparedExecution/RuntimeCore export, unless it patches binding.rs (which this PR does not). This is exactly the kind of thing the PR's own "no core re-export required" / "Ignition declares draft_source" claim glosses over, and the author's Limitations do admit W=16/W=24 copy-only GPU export/replay was not benchmarked.
Importance: high — a reader has to know the declarative half of the feature is not plumbed end-to-end in this repository.
#4 [high] Change: details the description does not say
Multiple changes in the diff that the description does not mention:
- helios/src/server/metrics.rs:
Workernow passes draft_tokens 0 tometrics.speculative_completedfor copy-only steps (server/runtime.rs:1718-1724), so copy-only rounds stop counting towardflare_learned_draft_*/draft-source depth counters as learned drafts. Wire of metrics unchanged; interpretation oflearned_draft_stepschanges for cores with copy graphs. Not in the description. - helios/src/scheduler/decoded_history.rs: new
lookup_with_match_lenreturning match length (8 or 4 for the n-gram tiers), andlookupdelegates to it. Behaviour oflookupunchanged, but the old early-return usedmaximum.min(COPY_DRAFT_CAPACITY)inconsistently in the empty case; tidied. - policy.rs:
Candidategained a publicexpected: f64(zero-duration useful value) andrefresh_expectedcomputation, pluscompare_refreshused only for RefreshStart ranking (policy.rs:1265-1332, 1413-1425). So the funded-refresh probe winner is now chosen by expected tokens rather than value rate — a behaviour change to refresh targeting beyond therefresh_ordertier key that the description does mention. - rounds.rs: packed-round candidates now carry a zero-duration
expected(base_zero / ranking-based recomputation) purely for that comparison. - docs/scheduling-runtime-design.md accepts the credit-retention change, but docs/mtp-design.md and docs/cli-design.md are untouched (docs/mtp-design.md:22-40 still says --history-drafts augments "Qwen's learned MTP proposals" from a "shared decoded history" ring of 65,536 tokens, only qwen3.8-flash declares copy inputs, and docs/cli-design.md:200-201,742 says "shared decoded-history continuations"; docs/cli-design.md:201 even says "--history-drafts ... does not change the graphs", which the draft_source=2 retention rule now contradicts). docs/mtp-design.md:515-518 lists implementation status as decoded_history.rs only.
- No tests outside helios/ + heliopause were added: pr_files has no tests/ paths, so the new Python-side validation (execution.py:102-108) and heliopause/src/python.rs draft_source parsing (default-Mtp fallback, rejection of >2) have no new test; the PR's evidence line claims 'tests/preparation/{test_execution,test_packed_speculative_contract,test_runtime_core,test_capture_graph_metadata}.py (102 passed)' but those files are unmodified.
#5 [high] Recent activity / ownership: PR rewrites Luke Alonso's refresh design and reverses its idle-credit contract
The PR states Upstream main 33ab6df5. Verified from search_history at pr/540: the four commits a85be397, 83ff9ed6, 35ab143a, 7ca5430c sit directly atop 33ab6df5 (PCCessna, #508, 2026-11-26) and the PR has no merge conflicts reported (autobot packet says head 7ca5430, base main).
Code area ownership (search_history for the touched files):
- helios/src/scheduler/policy.rs: 39 commits, almost all Luke Alonso (18cb0efc "Schedule prepared graphs by expected useful value per time", b9ad16b7, fc00f1dc, d7938c98, b0077378 "Avoid exploring prefill graphs that add only padding", 8c117854). Recent neighbours: 7ca5430c/a85be397 (this PR), fd6c0f3b Luke Alonso 2026-11-24 #510 "Preserve positive measured packed round durations when sibling shapes are unmeasured", da578c5c Jason Cook #426, e091689b Martin Vit #479.
- helios/src/scheduler/cost.rs: d7938c98 "Retain measured graph costs and fund scheduler timing refresh" (the feature this PR modifies), d2036807 "Reduce decode graph overhead and isolate readiness stalls in cost estimates" (ReadinessIntervals), fd6c0f3b (#510).
- helios/src/scheduler/refresh.rs: d7938c98, 596d64cd, bce032c0, 28f0833b — all Luke Alonso. #540 is the first non-Luke change to refresh.rs since 2026-10-30.
- helios/src/scheduler/decoded_history.rs: bd7167dc Luke Alonso 2026-10-22 "Share decoded-token history across speculative requests" (origin), 7303efb1, 1909e3cc, 28f0833b. sam.rs is brand new.
- heliopause/src/python.rs: latest 716df00f yatesdr #504, 27716185 Luke Alonso.
- ignition/preparation/execution.py: last changed by 27716185 / da037284 Luke Alonso; GraphSignature geometry rules were built by Luke Alonso (#499/#508 era) and PCCessna.
So: the PR rewrites/extends the funded-refresh design by its original author (Luke Alonso, docs author, 365 commits in docs / 207 in helios/src) and replaces the oldest scheduler refresh tests' assertions (refresh_skips_infeasible_ages... renamed to refresh_skips_infeasible_shapes_and_ranks_unattempted_tier_by_expected_value; ordinary_income_excludes_queued_wall_wait_and_idle_discards_only_positive_credit renamed to ..._idle_retains_credit_while_abort_discards_positive). Two existing test names encode the previously documented contract that idle discards positive credit, and this PR changes that contract.
#6 [high] Related work: overlaps, prerequisites, and same-day conflict with #538
- #538 (open, same author, 2026-11-26) "Restrict cold pure-prefill discovery to natural-fit graph capacities" — same docs file, same policy.rs/policy_tests.rs region, same
ValueRate-zero-duration theme (its "Why" says unmeasured candidates outrank measured ones). It is a separate branch (perf/helios-natural-fit-prefill-discovery at 5a55f0bf) targeting the same files as this PR's part 4 (policy.rs padding dominance) and part 1 (policy.rs refresh ordering). Both were opened the same day; expect textual conflicts in helios/src/scheduler/policy.rs, policy_tests.rs and docs/scheduling-runtime-design.md if both land. Not marked as stacked against each other. - #510 (merged, Luke Alonso) "Prevent unmeasured packed speculative shapes from zeroing measured round durations" — last commit to cost.rs before this PR; this PR builds on it (cost.rs:189-216
refresh_packed_durationsnow additionally skips Copy rows when MTP rows exist). - #414 (merged, yatesdr) "Seed each request's host acceptance estimate from earlier requests" — created
AcceptanceProfilepopulation andobserved_prefixesused by this PR's MTP/copy isolation; alsodocs/scheduling-runtime-design.mdacceptance section that this PR edits. - #521 (closed) / #515 (merged), #522 (merged) Martin Vit — GPU confidence calibration and packed surplus; this PR's
copy_offline/collect_calibrationgating sits next to that machinery. - #534 (open issue, semireg) "Checkpoint captures deadlock on an unmeasured snapshot cost" — same subsystem (cost freshness / funded refresh in policy.rs); its proposed fix adds a probe path in cost.rs/checkpoints.rs. This PR does not address it; note checkpoints.rs is touched here only mechanically (+2
draft_source: None). - #289 (merged, shadownetX) "Bound history proposals by logical lane length" — the last bug in the copy-proposal path; this PR changes which proposal source feeds copy inputs (
request_history_proposalinstead ofhistory_proposal) but keeps thelane.tokens - 1bound at call sites (model/packing.rs:399-405, server/runtime.rs:2143-2148). - #306 (open, original-el8) "Start acceptance estimates from the acceptance of earlier requests" — overlaps #414's population and thus the acceptance-learning bounds this PR edits.
- Companion external PR: description says it is the "Prerequisite for the companion local-inference-lab/hyperflare-recipes copy-draft speculation PR (after bumping ignition in uv.lock)". So the recipe side of part 3 lives in a different repository, outside this repo's review.
#7 [high] People: author history and standing; no reviewers yet
Author FujitsuPolycom, GitHub association CONTRIBUTOR (not one of the charter's priority contributors @voipmonitor/@original-el8/@lukealonso). Last 180 days: 5 merged, 10 open. Merged: #508 (recipe-declared row-sharded attention planning + PreparationManifest metadata), #499 (row-sharded prefill planning, PCIe DMA/RoCE row-shard collectives), #498 (flush PCIe D2H tails), #386 (image input for Qwen3.8 27B), plus one more. Areas their merged PRs touched: docs (3), ignition (3), ignition/cli (3), ignition/preparation (3), tests/cli (3) — i.e. an Ignition/CLI/docs contributor, not previously a helios scheduler contributor. Open ones (same day, same thesis of "scheduler/packing gaps"): #538 (prefill discovery), #539 (engram/heliopause export blob reuse), #512, #497, #496, #284/#283/#282 (DeepSeek V4.1 row-sharded prefill, flagged by original-el8 as conflicting with main), #387. Reviewer culture in this area: yatesdr and original-el8 review with "Should fix" lists and demand per-model scope and evidence (see #414 discussion: reviewer asked the author to name untested recipes, scope single-run claims, fix stale docs). #414's reviewer review and the follow-up are a template for what a review of #540 will demand — #540 names only DeepSeek-V4.1-Flash live, and hello docs staleness is present here too. No one has engaged on #540: pr_comments returns no comments, no reviews, no CI checks on head 7ca5430c.
#8 [high] Reach: who/what is affected — SAM built at admission, per-request memory, min_match_len default change, opt-in gating
- The SAM is built synchronously inside admission:
self.decoded_history.is_some().then(|| sam::PromptOutputSAM::new(&spec.prompt))(helios/src/scheduler.rs:1846-1852), i.e.PromptSAM::build_cappedruns on the admitting thread for every request whenever--history-draftsis enabled. PR's own microbenchmark numbers are 0.80 ms (8,192 tokens), 2.72 ms (32,768), 13.05 ms (131,072) and 4.52 MiB memory at 131k. So enabling --history-drafts adds up to ~13 ms CPU per large admission plus ~1.1–4.5 MiB per request (Arc-shared only when prompts are shared, whichPromptSAM::buildnever does —from_shared_promptexists but nothing in the diff calls it with a shared prefix SAM). The description reports only the microbenchmark, not the admission-latency cost; it does report +0.25 ms/rd scheduler overhead on non-repetitive 256-token decode. - Memory is per request:
max_activeconcurrent requests at 131k tokens each could hold up to ~4.5 MiB × concurrency for prompt SAMs plus up to 131k output tokens per request in the dynamic OutputSAM (DEFAULT_MAX_OUTPUT_TOKENS = 131_072, sam.rs:28). - Defaults changed for existing users of --history-drafts: DEFAULT_MIN_MATCH_LEN 3 -> 6 (sam.rs:22). Every request with a 3–5 token echoed span stops getting a copy proposal. The description frames this as deliberate (avoid overriding learned drafts with coincidental 3-token matches).
- New configuration surface: recipes can declare
draft_sourcein GraphSignature (execution.py:32), andspeculative_proposal_sourcesemantics in LoadOptions now also decide whether copy-wide graphs are retained (selection.rs:182-184). No new CLI flag was added — wide copy graphs are opt-in only via core contents +--history-drafts+ adaptive (non-fixed) width. Users running--no-mtp-adaptive-verification(fixed width) never get wide copy graphs regardless of core (rounds.rs:755-762speculative_fixed_width.is_some()skips). - Codec/offload identity: selection.rs test
offload_identity_separates_selected_state_without_fragmenting_compatible_limits(pre-existing) uses draft_source to separate offload identities; nothing new needed. - Compatibility: proto already had
DraftSource {NO_DRAFT, MTP, COPY_DRAFT}on main (helios/proto/runtime_core.proto:842,854 — verified at ref main), so no wire change is true.draft_sourceabsent in old cores -> heliopause/src/python.rs:231-232 defaults speculative graphs to Mtp, and a core whose Execution JSON omits field 9 (proto3 default 0 = NO_DRAFT) would be rejected by serving.rs:58-62 only if it is speculative... careful: old cores written before draft_source was populated get 0 -> None, and selection.rs:244 requires[1,2]for speculative graphs, so old cores must already carry 1; the pool claims "existing W=8-only cores load" and there is a test (wide_copy_verify_catalog_packs_23_sam_tokens_and_preserves_legacy_w8_cores, model/tests.rs) that only covers the Rust descriptor path, not an old on-disk core.
#9 [high] Project fit: charter requirements and doc obligations, where met and where not
Charter (read_charter) lines relevant as facts:
- "Keep the runtime small and model-agnostic ... Helios ... shouldn't accumulate per-model branches (#267, #334)." This PR adds only model-agnostic scheduler mechanisms (no per-model branch), which lines up.
- "Captured-graph op contracts: Adding a new one—even if it reuses an existing graph kind—requires owner approval before you write it." Part 3 introduces a new op contract in practice: copy-only speculative graphs (
draft_source=2, no GPU confidence, no speculative_prefix_limits, four copy input buffers,GraphSignature.draft_source+ validation in ignition/preparation/execution.py:102-108). No evidence of owner approval is cited anywhere in the description. - "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)." Provided: 4x RTX PRO 6000, DeepSeek-V4.1 Flash TP4, temperature 0, C=1..16 tables, plus a single-stream repetition benchmark (+12.9% tok/s) and an admission-overhead number. Weak points: single trials, "combined runtime, recipe, and kernel stack" caveat, and the wide-copy path itself never ran on a GPU (Limitations).
- "PR descriptions: Expect four parts: why, what changed, claimed result, evidence." Present and extensive.
- Design docs: docs/scheduling-runtime-design.md is updated for parts 1 and 4's contract (credit retention, readiness exclusion, refresh ordering) — lines in diff. Not updated: docs/mtp-design.md (copy-draft mechanism still described as a 65,536-token shared ring from
decoded_history.rs, docs/mtp-design.md:31-40, 515-518; still claims only qwen3.8-flash declares copy inputs) and docs/cli-design.md:200-201 ("--history-drafts ... does not change the graphs", contradicted by copy-wide graph retention) — a docs-completeness gap against the same standards the reviewers enforced in #414 ("stale docs" as a Should fix). - "No per-model special cases or flags" — fine; "Be explicit and pin everything. No magic defaults" — the new defaults (min_match_len 6, prior rate 0.88, COPY_STEP_PRIOR_WEIGHT 4.0, WIDE_COPY_MIN_MATCH_LEN 6, copy_len >= base+3, 512-token boundary overlap, 131,072 caps) are hardcoded constants in sam.rs/speculation.rs/rounds.rs with no configuration surface; two of them (min_match_len, 131,072) are reachable only through the non-public
SamConfig(nothing outside sam.rs useswith_config; scheduler.rs:1852 usesPromptOutputSAM::new).
#10 [high] Claims and evidence: what is backed, what is self-reported, what is untested
Claims and what backs them (all from the PR description; nothing verified here by running tests):
- "615 passed, 0 failed, 5 ignored" (
cargo test --locked --manifest-path helios/Cargo.toml) and "1,625 passed, 44 ignored" (--lib --features runtime-core,server --skip template) on tip 7ca5430c — self-reported; no CI checks exist on the head commit ("CI on the head commit: no checks"), so nothing is independently reproduced. Note the two suites' counts differ from what #538 (same author, same base) reports for a comparable command (1,690 passed on tree 93ef9518), so the numbers are branch-local. - "cargo check heliopause ... passed", "pytest tests/preparation/test_core_boundary.py: 4 passed" — but no Python test files are modified in this PR (pr_files has no tests/ entries), so new Python validation in execution.py:102-108 and heliopause/src/python.rs:225-233 is exercised only by the existing suite the PR says it ran (test_execution.py:299 asserts decoded.draft_source == 1 for a mixed graph with default signature; nothing asserts 2 or the rejection cases).
- "120 randomized brute-force SAM oracle trials" — backed by a real test: sam.rs
exact_oracle_equivalence_randomized_streams_and_repetitionsloopstrial in 0..120against a brute-force oracle with several min_match_len and prompt lengths (sam.rs:1401-1469). This is the strongest evidence in the bundle. - "Suffix automaton latency: 0.80 ms / 2.72 ms / 13.05 ms build; 140/145/317 ns per step" — a CPU release microbenchmark; the corresponding test loop exists (sam.rs:1547 iterates [8_192, 32_768, 131_072]) but the timings are not checked in.
- Live claims — "max_b == C on every cell vs B16 at C=4 and B32 at C=6..16 before", "C=4 9.19 vs 9.55 ms/rd, +5.1%", "C=6 -7.9%", "C=8 -5.2%", "+0.57 tokens/round and +12.9% tok/s on a 512-token repetitive code-edit prompt", "+0.25 ms/rd overhead" — single machine, single model, single core, temperature 0; the description itself says "end-to-end throughput reflects the combined runtime, recipe, and kernel stack", i.e. the delta is not attributable to this parent alone. No artifacts, no per-run scatter, no repeat counts.
- "Aggregate timing-refresh (P <= 0.002/0.998O + D) and acceptance-learning (P <= 0.01/0.99O + D) bounds remain preserved" — asserted; the refresh bound is actually re-tested in the changed test
refresh_funding_requires_earned_credit_and_accounts_for_repeated_attempts_and_idle(policy_tests.rs, updated assertionordinary_ns * 0.002/0.998 - refresh_ns), andpower_cap_restore_recovers_largest_prefill_chunk_across_idle_requestsassertsrefresh_ns <= ordinary_ns*0.002/0.998 + last_refresh_ns. The acceptance bound is only implicitly covered (unchanged code path except the readiness split). - "existing W=8-only cores ... load, prune, pack, and schedule with no Protobuf wire changes and no core re-export required" — partially verified: proto already carried DraftSource on main, so no wire change is correct; but the "existing cores load" claim is only tested against a synthetic manifest built in-process (
wide_copy_verify_catalog_packs_23_sam_tokens_and_preserves_legacy_w8_cores, helios/src/model/tests.rs), not an on-disk exported core. - Claimed-but-not-shown: the description says copy-only wide graphs are declared through Ignition, but the export path rewrites draft_source to MTP (see the undeclared-gap note), and Limitations concede W=16/W=24 GPU export/replay was not benchmarked — so the ec2e feature has never been exercised end-to-end.
#14 [high] New event: Autobot review on #540 (Changes Requested) — verdict and what it confirms
New event since report #13 (run 1221): two bot comments only, no human activity.
- 2026-11-26 17:04 flare-autobot: case file opened for 540; future reviews auto-run 90 min after pushes (case c4cf2583-d300-4cd8-8fc7-566e82d46ebc).
- 2026-11-26 17:56 flare-autobot "Autobot Review": Recommendation: Changes Requested, exactly one blocker —
heliopause/src/export/binding.rs:201unconditionally writesdraft_source = "MTP"while converting manifest→wire (capture.rs:3158, sole export route), sodraft_source=2graphs fromignition/preparation/execution.py:32,316-319arrive as MTP and are pruned byhelios/src/runtime_core/selection.rs:277-298; the coercion also skips the copy-only contract checks (helios/src/execution/manifest.rs:844-846,helios/src/model/catalog.rs:123-131). Fix: derive2 => "COPY_DRAFT", unknown => invalid, plus onebinding::executionround-trip test. This is the same finding as my note #3, now independently confirmed with the sole-route citation. - Same review: "Commit
a85be397(funded-refresh recovery) is correct, self-contained and could merge on its own today" — independent support for splitting the four outcomes; note the refresh commit's SHA is now a85be397 (rebased), not 1b0db227 as in my earlier notes. - Still zero human reviewers and, as far as visible on the PR, no CI checks on the head commit. Engagement signal: #538 (same author, same files) was reviewed Changes Requested at 17:34 but had already merged at 17:21 (head 5a55f0bf), so an Autobot CR is advisory in practice.
- Review also asks for per-commit live numbers, disclosure that the 13.05 ms / 4.52 MiB SAM build is paid synchronously at admission, one load-and-serve of an already-exported W=8 core, and one preempt→readmit SAM test. Citation: PR #540 comments, 2026-11-26 17:04 and 17:56 UTC.
#15 [high] Rebase: base moved to f377dc85 (#538 + #543 merged); event diff mixes base-side hunks
search_historyat pr/540: head is still FujitsuPolycom's four commits but with new ids — 14019718 (padding dominance + min_match_len 6), 9caba2c7 (wide copy-verify), 450012d1 (SAM), 1b0db227/a85be397 (refresh recovery) — sitting directly onf377dc85Luke Alonso: "Remove joint kernel tuning and grouped AOT forward compilation (#543)" andba35da3fPCCessna: "Restrict cold pure-prefill discovery to natural-fit graph capacities (#538)". So the PR was rebased onto a main that already contains both.- Consequence 1: the event's diff shows
natural_fit_prefill_capacitybeing added inhelios/src/scheduler/policy.rs(@@ -350,6 +415,37 @@ etc.), but my freshpr_diffof policy.rs has none of those hunks, andsearch_code natural_fit_prefill_capacityat refmainalready finds it (policy.rs:357, 523, 784, 968). The natural-fit machinery is now base code inherited from merged #538, not part of #540's delta. - Consequence 2: the event's diff also shows
docs/cli-design.md(--joint-tuning row removed) anddocs/preparation-development.md(grouped-forward sentence) changes; those are #543's, base-side.pr_filesstill lists no docs/cli-design.md and no docs/preparation-development.md, so the stale "--history-drafts … does not change the graphs" text at docs/cli-design.md:200-202 is untouched by this PR (verified by reading it at the head). - Consequence 3: pr_files at the current head is 25 files, +~3,965/−119 (sum of listed add counts ≈ 3,969), same scale as reported. sam.rs is +1,606; model/tests.rs +324; scheduler/tests.rs +583; policy_tests.rs +504; speculation.rs +103; selection.rs +109; cost.rs +120; rounds.rs +194; scheduler.rs +180; policy.rs +119; docs/scheduling-runtime-design.md +31.
- Note for the report: because #538 is merged, the "same-day conflict risk with #538" from my note #6 is resolved (absorbed by the rebase), and the review of #540 no longer has to argue about prefill discovery.
#16 [high] Amendments: cost::Key/has_mtp source authority, mask-agnostic pruning, dead API, constants, validators, doc lines
Verified against the head (pr/540). New or now-confirmed substantive points not in report #13:
A. cost.rs has no single authority for the proposal source.
cost::Key(cost.rs:50-58) has nodraft_sourcefield, andActionCosts::preparedrejects duplicate shapes (cost.rs:159-161 "prepared graphs require unique shapes"), so an MTP graph and a copy graph with identical B/D/W/P cannot coexist in one core. Source is stored per entry (cost.rs:169) and every consumer infers it:is_copy_only_step(cost.rs:223-232) looks the step's Key up in the table.refresh_packed_durations(cost.rs:190-208):has_mtpis a global existence scan over entries withpacked != 0and source != Copy, including entries whosenanosis still 0 (unmeasured). When true, every Copy entry is skipped. So one unmeasured MTP shape suppresses measured copy shapes from the packed-duration table, andpacked_round_duration(batch, width)(cost.rs:210-213) returns None/0 for a copy width no MTP graph covers — which feedsspeculative_duration(rounds.rs:559-568) and therefore service-rate normalization (service.rs:109,156), continuation pricing (policy.rs:775) and next-progress (policy.rs:619). Wide copy rounds themselves are built frompacked_round_shapes()directly (rounds.rs:752-770), so they still compete; the loss is in normalization/pricing evidence.
B. Potential cohort-mismatch in the new pruning pass (open question, not a proven bug).
- Pairwise
dominates_padding_withrequiressmaller.mask == larger.mask(policy.rs:133-140). The new whole-list pass (policy.rs:221-254) does not compare masks: it prunes a GPU-allocated ragged speculative candidate when any candidate haskind == Speculative,other.batch >= lanes,other.batch < candidate.batch, same (capacity, drafts),other.packed_token_capacity >= needed, and is GPU-allocated. Candidates at this stage carry many different cohorts, so a narrower shape generated for a different, smaller cohort can prune the shape the candidate's own cohort needs. No test covers the different-mask case; the added tests use one cohort.
C. Dead/duplicated surface (independently matches the review's subtract list).
- SAM API with no production caller:
propose_for_context(sam.rs:1070-1110),propose_conditional_continuations(sam.rs:1118-1189, doc names a "2-deep pipelined execution" that exists nowhere — onlypipelined_frames_use_ordered_completion_deltas…in policy_tests.rs:972 is unrelated),push_slice(sam.rs:1023),PromptSAM::build(used only from tests/with_config),from_shared_prompt(callers only in sam tests 1523-1524, 1572),MatchSource/MatchProposal::source(built at sam.rs:1217-1219, 1263-1265, read only by tests). - Two near-duplicate proposal helpers in scheduler.rs:
request_history_proposal_with_match_len(1099-1163) andrequest_copy_match_stats(1166-1205). They have already drifted: zeromaximum/no-history returns(vec![-1; maximum], 0, 0)vs(0, 0). RefreshState::idle()is now an empty body (refresh.rs:95-99) with one production caller (scheduler.rs:1281self.refresh.idle();) and ~10 test call sites (policy_tests.rs:2610,2638,2689,2699,2730,2751,3685,6102,6108,6153).wide_copy_curve's prior-onlyelse(rounds.rs:541-548) is effectively unreachable:copy_calibrationis created iffdecoded_history.is_some()(scheduler.rs:1853-1856) and the copy candidate path already returns early whendecoded_history.is_none()(rounds.rs:759-764).rounds.rs:755-903re-implements the ordinary packed-candidate loop at 905-1060 with separatecurves/copy_curvescaches (rounds.rs:747-748).
D. Undocumented constants: WIDE_COPY_PRIOR_RATE = 0.88 (speculation.rs:15), COPY_STEP_PRIOR_WEIGHT = 4.0 and COPY_DEPTH_SHRINK_WEIGHT = 2.0 (speculation.rs:20-21, private), base_mtp_drafts.saturating_add(3) (rounds.rs:766), DEFAULT_MIN_MATCH_LEN = 6 (sam.rs:22). Only the 6 has an argument in the description.
E. Validator mismatch: ignition/preparation/execution.py:104-108 accepts draft_source = 2 on a mixed graph with speculation_enabled, but selection.rs:278-283 copy_wide requires graph.kind == "speculative", so such a graph silently never retains.
F. Docs gaps (all confirmed by reading at head): docs/mtp-design.md:22-29 ("shared decoded history", "both settings use the same captured MTP graphs and buffers", "only qwen3.8-flash" declares copy inputs) and :31-40 (65,536-token ring, up-to-seven continuations) describe the ring-only design, nothing about SAM-first or min_match_len; docs/cli-design.md:200-202 "does not change the graphs" and :741; helios/manifest.md:29-53 has no draft_source; docs/scheduling-runtime-design.md:6-12 module index omits sam.rs; :249-258 still describes only the capacity-wise domination rule, not the strictly-tighter-batch rule; :396-399 still says the packed lookup takes the minimum across all matching shapes.
#17 [high] Amendments to report #13: corrections, escalation, process
Prior report #13 corrections and additions to carry into the final text (delta only).
CORRECTIONS
- Commit hashes in my earlier notes are stale. Current head chain:
14019718(padding dominance +min_match_len6),9caba2c7(wide copy-verify),450012d1(SAM),1b0db227/review'sa85be397(cost-refresh recovery). The PR was rebased ontof377dc85. - Base now contains merged #538 (
ba35da3f) and merged #543 (f377dc85). So: (a) the "same-day conflict risk with #538" is resolved — #538 merged 2026-11-26 17:21 and this PR builds on it (natural_fit_prefill_capacityexists atmainpolicy.rs:357/523/784/968); (b) thepolicy.rsnatural-fit hunks and thedocs/cli-design.md--joint-tuning/docs/preparation-development.mdhunks visible in the "what changed" diff are base-side, not this PR's; (c)pr_filesat head is 25 files, +~3,965/−119 — unchanged in scale, sam.rs still +1,606. - "No CI checks" should be stated as: no check results are visible on the PR; the only appended content since the report is two bot comments. The PR's CPU evidence (615/1,625) and the DeepSeek-V4.1-Flash TP4 numbers were produced on the pre-rebase tree, so they are not re-established at the current head either.
- My stale-docs claim gets sharper:
pr_filescontains nodocs/cli-design.md, sodocs/cli-design.md:200-202("--history-drafts … does not change the graphs") and:741are untouched at the head whileselection.rs:277-298now retains/prunes graph families and:375-396drops kernels/rewritesspeculative_widths.
ESCALATION
5. The export coercion is no longer only my own inference: the Autobot review names it the single blocker, with the sole-route citation capture.rs:3158 → binding.rs:196-202. The wire enum already has the value (helios/proto/runtime_core.proto:854 enum DraftSource { NO_DRAFT = 0; MTP = 1; COPY_DRAFT = 2; }), so the loss is a one-line hardcode, not a schema gap. It also bypasses the copy-only validators (helios/src/execution/manifest.rs:844-846, helios/src/model/catalog.rs:123-131).
6. Second-order: the same review says the funded-refresh commit is "correct, self-contained and could merge on its own today" — independent support for splitting, and worth reporting as the one uncontested part.
PROCESS
7. Autobot CRs are advisory here: #538 got "Changes Requested" at 17:34 UTC but had already merged at 17:21 (head 5a55f0bf), same author, same day, same files. So the #540 CR does not by itself mean the PR is blocked by maintainers; there is still no human review on either PR. No new upstream issue asks for any of the four outcomes.
#18 [high] Final verification pass: submission-path asymmetry, admission cost, confirmed line numbers, untested pruning
Final verification pass on the current head (pr/540), completing the amendment set started in notes 14-17.
-
Submission path asymmetry (new).
RequestScheduler::history_proposal(scheduler.rs:1094-1097) — the ring-only helper — still exists and is used by the server's copy-proposal submission path only after this PR replaced it withrequest_history_proposal(server/runtime.rs:2143-2150). The two differ in more than the zero-count ring case I noted:request_history_proposal_with_match_lentruncates the proposal atcapabilities.vocabularyto survive multimodal placeholder IDs (scheduler.rs:1128-1140, mirrored inrequest_copy_match_stats:1179-1188), whilehistory_proposal/decoded_history::lookup_with_match_len(decoded_history.rs:162-186) does not. So the old path is retained but no longer exercised by serving, and its tests (scheduler/tests.rs:1956-1991, phase_tests.rs:583,1835) still pin ring behaviour that production no longer reads. Review's "~87 lines of duplication, already drifted" is accurate. -
Admission-time work (confirmed):
sam::PromptOutputSAM::new(&spec.prompt)at scheduler.rs:1849-1852 runs insideadmitwheneverdecoded_history.is_some(), i.e. synchronously on the admitting thread, before the request is scheduled. Together withCopyCalibration::new(scheduler.rs:1853-1856) this is unconditional per request at--history-drafts, matching the review's ask to disclose it rather than any new defect. -
Docs line numbers cited by the review are correct at the head:
docs/scheduling-runtime-design.md:6-12module list has nosam.rs;:249-258still describes only the capacity-wise domination;:396-399still says the packed lookup takes the minimum across all matching shapes (now false for copy/MTP split, cost.rs:190-208);helios/manifest.md:29-53graph schema has nodraft_source;docs/cli-design.md:200-202and:741unchanged;docs/mtp-design.md:22-40unchanged. -
Validators confirmed at head:
ignition/preparation/execution.py:102-108acceptsdraft_source1|2 and permits 2 onmixedwithspeculation_enabled;selection.rs:278-283requireskind == "speculative"forcopy_wide, so a mixed copy graph is accepted by the producer and silently never retained. Alsopython.rs:225-233defaults an absentdraft_sourceto MTP for speculative graphs, so a producer that omits the field is indistinguishable from an MTP graph — the hardcode in binding.rs:201 hides this today. -
Test coverage that would catch the pruning cohort question does not exist:
prune_paddingtests at policy_tests.rs:31, 52 (equal_counts_from_different_cohorts…— pre-existing, exercisesdominates_padding_with, not the new pass), 128, 189; the two added tests (policy_tests.rs:5599-5720 region) use a single cohort of four requests, so the mask-agnostic pass in policy.rs:221-254 is untested against differing masks. -
Refresh-ranking detail confirmed:
compare_refresh(policy.rs:1330-1338) buildsValueRate::new(0, expected, age_price); sinceValueRate::compareordersduration_ns == 0above everything (utility.rs:134-139), all refresh candidates compare equal on the first key and are ordered only by expected value — intended, and consistent with the doc text the PR adds ("indeterminate-duration expected useful value"), but it means the old duration tiebreak is gone for probes. -
The review's "Commit a85be397 could merge on its own today" and its blocker are the only verdict content; there remain no human reviews on #540 and no visible check results. #538 (same author/files) merged 41 minutes before its own Changes Requested, so the CR is advisory rather than blocking policy.
#19 [high] Research summary
The new event was an autobot review on PR #540 (2026-11-26 17:56, plus a 17:04 case-file notice); no human comments, no code push, no visible check results. It requires amendments, and they were produced (amendments only, not the full report).
Amendments delivered, in four groups:
-
Corrections. Commit ids are stale (head chain now
14019718,9caba2c7,450012d1,1b0db227/a85be397); the PR was rebased ontof377dc85, which already contains merged #538 and #543, so the "same-day conflict with #538" is resolved and the natural-fitpolicy.rshunks plus thedocs/cli-design.md/docs/preparation-development.md(not opened) hunks are base-side, not this PR's delta (scale unchanged: 25 files, +3,965/−119). The evidence was produced pre-rebase, and "no CI" means no check results are visible. -
Escalation. The autobot review's single blocker is the same export defect I had flagged:
heliopause/src/export/binding.rs:201hardcodesdraft_source="MTP"on the sole export route, so copy-only graphs never reach a core; the wire enum already hasCOPY_DRAFT = 2, so it is a one-line hardcode that also bypasses the copy-only validators. The review independently calls the funded-refresh commit self-contained and mergeable alone. -
New verified findings.
cost::Keyomitsdraft_sourcewhileprepared()rejects duplicate shapes, andhas_mtpcounts unmeasured MTP entries, so measured copy shapes drop out of the packed-duration table used for service rates, continuation pricing and next-progress. The new whole-list pruning pass inpolicy.rs:221-254ignores candidate masks (unlike the pairwise rule), so a narrower shape from a different cohort can prune the one a candidate's cohort needs, and no test covers differing masks.execution.pyacceptsdraft_source=2onmixedbutselection.rsrequiresspeculative. Five constants (0.88, 4.0, 2.0, +3, 6) lack any stated derivation. Large test-only SAM API surface (propose_for_context,propose_conditional_continuations,push_slice,from_shared_prompt,MatchSource) has no production caller; the oldhistory_proposalpath is retained, no longer used by serving, and lacks the vocabulary truncation its replacement has;RefreshState::idle()is an empty body. Docs gaps confirmed line-by-line (mtp-design.md:22-40, cli-design.md:200-202/741, manifest.md:29-53, scheduling-runtime-design.md:6-12/249-258/396-399). -
Process reading. Autobot "Changes Requested" is advisory here: #538, same author and files, merged 41 minutes before its own CR. Still no human review and no upstream issue requesting any of the four outcomes.
Net verdict is unchanged; the export defect is now independently confirmed as the blocker, the #538 conflict risk is gone, and two new caveats (mask-agnostic pruning, cost::Key/has_mtp attribution) were added. Findings are in scratchpad entries 14-18, with the earlier angles in 1-13.
#20 [high] Amendment deliverable outline for the final report
Framing for the final write-up (this run's deliverable is an AMENDMENT to report #13, not a new report).
Structure the report as amendments only, in four groups, exactly as delivered:
- Corrections to facts in #13 — stale commit ids (
14019718,9caba2c7,450012d1,1b0db227/review'sa85be397); rebase ontof377dc85absorbing merged #538 + #543, which (a) resolves the same-day #538 conflict, (b) makes the natural-fitpolicy.rshunks and thedocs/cli-design.md--joint-tuning /docs/preparation-development.mdhunks base-side rather than this PR's delta, (c) leaves scale at 25 files +3,965/−119; wording of "no CI" (no visible check results) and of the evidence (CPU/TP4 numbers produced pre-rebase); sharper stale-docs point (pr_fileshas nodocs/cli-design.md). - Escalation — the Autobot review's single blocker is the export coercion my note #3 described, now cited to the sole route (
capture.rs:3158→binding.rs:196-202), with the wire value already present (helios/proto/runtime_core.proto:854,enum DraftSource { NO_DRAFT = 0; MTP = 1; COPY_DRAFT = 2; }) and the copy-only validators bypassed (execution/manifest.rs:844-846,model/catalog.rs:123-131); plus the review's independent judgement that the funded-refresh commit is self-contained and mergeable alone. - New verified findings — cost::Key has no draft_source and
prepared()rejects duplicate shapes so MTP/copy twins cannot coexist;has_mtpis an existence scan that counts unmeasured entries, suppressing measured copy shapes frompacked_round_duration(feedsservice.rs:109,156,policy.rs:775,policy.rs:619); the new whole-list pruning passpolicy.rs:221-254ignores masks while the pairwise rule at:133-140requiressmaller.mask == larger.mask, and no test covers differing masks (added tests use one 4-request cohort; existing prune tests at policy_tests.rs:31,52,128,189);execution.py:104-108vsselection.rs:278-283mixed/copy mismatch;python.rs:225-233defaults absent draft_source to MTP; five underived constants (0.88, 4.0, 2.0, +3, 6); test-only SAM API (propose_for_contextsam.rs:1070-1110,propose_conditional_continuations1118-1189,push_slice1023,from_shared_prompt935,MatchSource);history_proposal(scheduler.rs:1094) retained but no longer used by serving and lacks the vocabulary truncation its replacement has (scheduler.rs:1128-1140, 1179-1188), with stale ring tests (tests.rs:1956-1991, phase_tests.rs:583,1835);RefreshState::idle()empty (refresh.rs:95-99) with one production and ~10 test call sites;wide_copy_curveprior-only branch unreachable (rounds.rs:541-548, gated at 759-764, calibration always present at scheduler.rs:1853-1856); admission-time SAM build (scheduler.rs:1849-1856). - Process — Autobot CR is advisory (#538 merged 17:21, CR at 17:34); no human reviewer, no upstream issue, only two bot comments; no re-establishment of evidence at the new head.
Closing line for the report: recommendation unchanged; the export defect is now independently confirmed as the blocker, the #538 conflict risk is gone, and two new caveats were added (mask-agnostic pruning; cost::Key/has_mtp mis-attribution). Do not restate the whole of #13.
#22 [high] Amendment 3: head e5a69669 fixes the blocker; residual findings and new caveats
HEAD MOVED to e5a696697eeb4517c7e9cf9c55df93a4462b20ff (e5a6966), 2026-11-27 01:23, author comment "addressing @shieldstar's finding and all @flare-autobot review items". Scale now +4306/-310 in 33 files (was 25 files +3965/-119). PR description rewritten: now "Five commits atop main (f377dc85)".
RESOLVED (my prior findings now obsolete — do not re-assert)
- EXPORT BLOCKER FIXED.
heliopause/src/export/binding.rs:201-216now derives instead of overwriting:None => "MTP",Some(0|1) => "MTP",Some(2) => "COPY_DRAFT", string forms accepted, anything elseErr(super::invalid("unsupported graph draft_source")); plusif draft_source == "COPY_DRAFT" && kind != "speculative" { Err(...) }(binding.rs:213-215). Round-trip testexecution_preserves_mtp_and_copy_draft_source_and_rejects_unknownat binding.rs:1466-1510 (encodes to protobuf and decodes; asserts Mtp for 0/1, CopyDraft for 2, rejects 3/-1/"UNKNOWN", rejects mixed+copy). Also asserts the pre-existing case now yields Mtp (binding.rs:1464). - cost::Key SOURCE AUTHORITY FIXED.
cost.rs:66-84Keynow hasdraft_source: Option<ProposalSource>;canonical_draft_source(cost.rs:50-59) canonicalizes non-speculative to None;Estimate.draft_sourceandhas_mtpdeleted;packed_round_durationsis[[Vec<Option<u64>>; 7]; 2]indexed byProposalSource as usize(cost.rs:139, 204-221);packed_round_duration_for(source,batch,width)(223-235) added; testunmeasured_mtp_and_measured_copy_coexist_at_identical_shape_and_preserve_packed_duration(cost.rs:533-586) proves MTP+copy graphs at identical B/D/W/P coexist (3 entries) and an unmeasured MTP no longer masks measured copy. RefreshState::idleREMOVED (refresh.rs diff: -6 lines);RequestScheduler::idle()(scheduler.rs:~1267-1272) now only validates no submission in flight and documents retained credit; testordinary_income_excludes_queued_wall_wait_and_idle_retains_credit_while_abort_discards_positive(policy_tests.rs:2616-2647) drops thestate.idle()no-op assertions. My "empty method with ten call sites" finding is closed.- Dead SAM API REMOVED:
SamConfig,MatchSource,MatchProposal::source,PromptSAM::build,from_shared_prompt,push_slice,walk_context,propose_for_context,propose_conditional_continuations, all unread accessors. sam.rs 1606 → 1307 lines. PromptSAM is now a plain owned struct (noArc) — so my earlier "shared zero-copy Arc across requests" claim in the reach note is obsolete; intrinsic state/memory numbers stand but there is no longer sharing at all. - Python producer validator FIXED:
ignition/preparation/execution.py:102-108nowif self.kind != "speculative": raise ValueError("copy draft source requires a speculative graph")(was acceptingmixed+speculation_enabled). Testtest_copy_draft_source_requires_speculative_graph_without_gpu_confidence(tests/preparation/test_execution.py:373-393). - Three-ladder wire mapping UNIFIED:
ProposalSource::{from_wire,to_wire}(speculation.rs:54-69); used byheliopause/src/python.rs:225-231,helios/src/runtime_core/serving.rs:~58,helios/src/runtime_core/selection.rs:144-148. - DOCS now match code:
docs/cli-design.md:200-208(history-drafts retains/prunes copy-only graphs, keeps widths; no longer "does not change the graphs") and:747;docs/mtp-design.md:22-34(graph retention/pruning),:36-66(SAM-first with the ring as fallback, caps 131,072/512, min_match_len 6, preempt→readmit re-index),:68-73;docs/scheduling-runtime-design.md:6-15module index (now lists sam.rs, decoded_history.rs, checkpoints.rs),:68-88new "Proposal sources and calibrated wide copy-verify" section (0.88/4.0/2.0/128-token aging),:273-283(proposal-source in the pruning group key + the stricter-batch rule),:409-433(draft_source in cost identity; per-source packed tables + combined-lookup order);docs/scheduling-theory.md:577-580and717-744(simulator vs Helios idle credit, two-tier order, readiness-wait exclusion);helios/manifest.md:38draft_source: intdocumented. - Constant derivations added:
speculation.rs:14-21(0.88 with expected-token arithmetic 7.95 over 23 drafts, 6.72 over 15; 6 for min match),speculation.rs:23-33(COPY_STEP_PRIOR_WEIGHT 4.0, COPY_DEPTH_SHRINK_WEIGHT 2.0 with rationale),rounds.rs:22-29WIDE_COPY_MIN_EXTRA_DRAFTS = 3with rationale. (0.88's "expected value ~7.95" claim is the author's arithmetic, not measured.) - shieldstar's duplicate-
powered_curvefinding folded verbatim:zero_duration[slot]reuse inpolicy.rs:1052-1059(add_candidate) and:1258-1266+:1289-1293(mixed_candidates),#[cfg(test)] CURVE_EVALUATIONScounter (rounds.rs:22-27 area, incremented inpowered_curverounds.rs:565-566), testsmixed_refresh_value_reuses_each_decoding_lanes_forecastanddecode_refresh_value_reuses_each_decoding_lanes_forecast(policy_tests.rs:~6290-6328). NOTE: only the zero-duration duplication is fixed; #547's other three callers (waiting-Init continuation pricing at 256 evaluations, the decode-only pass, and the alpha==1.0powfshortcut) are NOT addressed here. - Wide-copy / ordinary candidate loops unified via
select_host_allocated_candidate+build_host_prefix_ranking(rounds.rs:505-535, 764-862, 920-972), andwide_copy_curve's unreachableelsewas removed — but by turning it into.expect("wide copy requires history drafts enabled before admission")(rounds.rs:570-579), so a copy-only step on a scheduler whosedecoded_historywas somehow absent now panics instead of falling back. resolve_copy_matchfactored (scheduler.rs:1112-1149) sharing the SAM/ring decision betweenrequest_history_proposal_with_match_lenandrequest_copy_match_stats, fixing my "zero-count ring drift" observation;is_copy_only_step(scheduler.rs:1196-1198) is now purely structural (step.kind + step.draft_source), no table lookup.- Preempt→readmit test added:
preempted_request_reindexes_generated_history_into_sam_on_readmission(helios/src/server/runtime/phase_tests.rs:4036-4190), covering both checkpoint-evicted and checkpoint-retained paths, asserts match_len 6 from pre-preemption output and recency override afterwards. - Post-rebase per-commit numbers still absent but the description now discloses that live numbers in "Result" were measured at prior head
14019718, and the Limits paragraph explicitly lists per-commit A/B on e5a69669, live wide copy-verify GPU export/replay (W=16/24), live power-limit refresh transitions, non-DeepSeek models, SM121/GB10 and multi-host RoCE as not run on hardware.
NEW / STILL-OPEN FINDINGS AT HEAD
A. NEW: the per-source packed-duration split is undone at its only production callers. ActionCosts::packed_round_duration(batch,width) (cost.rs:237-252) merges both tables (MTP preferred, copy as fallback), and neither speculative_duration (rounds.rs:585-589), policy.rs:785 (continuation horizon) nor service.rs:109,156 pass a source; packed_round_duration_for is used only by tests. So a copy-only wide round of W=16/24 is still priced/normalized by an MTP measurement whenever an MTP shape covers that (batch,width) — the split fixes the "unmeasured MTP masks measured copy" bug but not the general mis-attribution. Also the (None, Some(0)) arm (cost.rs:244-249) only returns Some(0) when the entire MTP table is empty, so a copy-only core whose MTP table is populated elsewhere returns None for a width where only an unmeasured copy shape exists. docs/scheduling-runtime-design.md:425-433 describes exactly this combined order, so the documentation matches the code — the question is whether the combined order is what the feature wants.
B. STILL OPEN (unchanged): mask-agnostic whole-list pruning. policy.rs:234-264 still prunes on other.batch >= lanes && other.batch < candidate.batch plus width/depth/source/packed-rows (other.draft_source == candidate.draft_source was added at :251) but never other.mask == candidate.mask, while the pairwise rule requires it (policy.rs:137-141). No test exercises differing masks (grep for differing-mask cases in policy_tests.rs finds none; the two added pruning tests, tight_batch_prunes_wider_padded_ragged_speculative_shapes_for_active_cohort policy_tests.rs:65-152 and wider_speculative_batch_is_retained_when_tighter_batch_lacks_token_capacity :154-196, use one cohort each).
C. STILL OPEN: rounds.rs:882 gates the wide-copy branch on self.proposal_source == ProposalSource::Mtp, so a core loaded with --speculative-proposal-source copy never considers copy-only wide graphs even though selection.rs retains them; also is_copy_only_step requires kind == Speculative, which is now consistent with the producer after fix 5.
D. Estimation-basis caveat on the 0.88 prior: CopyCalibration::curve (speculation.rs:153-183) applies a running bound = bound.min(...) so the curve is forced monotone non-increasing, and expect on the optimistic path adds a sqrt(ln 20 / 2w) term to the mean before the clamp, which can put the "optimistic" curve below the pessimistic one at deep positions when the bound dominates. Not tested; flag as a question, not a defect.
E. Threshold-consistency nit: speculation::WIDE_COPY_MIN_MATCH_LEN = 6 (speculation.rs:21-24) and sam::DEFAULT_MIN_MATCH_LEN = 6 (sam.rs:19-23) are separate constants with no cross-check; the doc comment says "matches" but nothing enforces it.
F. Process: no maintainer review or approval yet; three human comments now (shieldstar, voipmonitor, author) but shieldstar and voipmonitor are both commenters on the PR, not approvers. Autobot's re-review at e5a69669 was requested at 01:23 and had not appeared by this pass (auto-runs 90 min after a push). voipmonitor's live TP4 run was --no-history-drafts with default copy_verify_shapes=() — i.e. it verified the absence of regressions, not the new feature; the author's own +12.9% tok/s history-drafts number is at 14019718, not at head. voipmonitor also flags a concrete stacking conflict with #542 in helios/src/scheduler/{cost,rounds,tests}.rs and asks #540 to keep has_mtp's copy-skip guard — which e5a69669 deleted, so that instruction is now stale and the #542 rebase needs the new per-source tables instead.
G. Description/head mismatch (minor): the description still describes commit 450012d1 as adding "an immutable Arc<PromptSAM>" and still enumerates the now-deleted propose_for_context-era design in the commit list, while head has a non-Arc owned PromptSAM and no such API.
H. Test-count claims (1,712 helios runtime-core,server / 620 helios default / 207 heliopause / 71 Python) are author-reported for e5a69669 and were not reproduced here; still no visible CI check results on the PR.
EFFECT ON THE VERDICT
The single blocker both Autobot reviews named is genuinely fixed at head, with a test, and the two caveats I added in the previous amendment (mask-agnostic pruning; cost::Key/has_mtp source authority) are respectively unchanged and fixed. Recommendation therefore changes from "fix the export before merge" to: the export and cost-source blockers are cleared; what remains before merge is (a) make the packed-duration lookups source-aware at the three production callers or state deliberately that they are not (finding A), (b) either constrain or test the mask-agnostic pruning (finding B), (c) supply the live wide copy-verify W=16/24 run and per-commit A/B that the author's own Limits paragraph concedes are missing, and (d) rebase the #542 stacking note onto the new per-source tables now that has_mtp is gone (finding F).
#23 [high] Research summary
The new event is a code push (e5a69669, 2026-11-27 01:23) plus three human comments (shieldstar's curve-duplication finding, voipmonitor's live TP4 verification, the author's point-by-point response). I re-read the PR head and produced amendments only — no re-statement of the earlier report. Findings are in scratchpad entry #22.
Core of the amendment: the export blocker that both Autobot reviews named and that my earlier evidence identified is now genuinely fixed at head (heliopause/src/export/binding.rs:201-216 derives COPY_DRAFT/MTP and rejects unknown values, with a protobuf round-trip test), and the cost::Key/has_mtp source-authority caveat I raised in the last pass is also fixed (source is now part of prepared-shape identity, packed tables are per-source, has_mtp deleted, with a coexistence test). Along with that, the empty RefreshState::idle, the ~150 lines of dead SAM API, the three ProposalSource wire ladders, the Python mixed+copy acceptance, and all the stale doc statements I had listed are resolved, and constant derivations were added.
What remains, and what changes the recommendation: (A) the per-source packed-duration split is undone at its only three production callers — speculative_duration, the continuation horizon, and service-rate normalization all still use the merged packed_round_duration, so a copy-only W=16/24 round is still priced by an MTP measurement, and a copy-only core with a populated MTP table returns None for a width where only an unmeasured copy shape exists; (B) the mask-agnostic whole-list pruning pass is unchanged and still untested for differing masks; (C) rounds.rs:882 still gates wide copy on proposal_source == Mtp, so --speculative-proposal-source copy cores never consider the wide graphs that load-time selection retains; (D) a new estimation-basis question about CopyCalibration::curve's running min clamp and optimistic sqrt term; (E) the two min_match_len = 6 constants are uncoupled. Process-wise, voipmonitor's live run used --no-history-drafts with default shapes, i.e. it verified absence of regressions rather than the feature, the author's own +12.9% number is still at the pre-fix head, Autobot's re-review at e5a69669 had not appeared, and voipmonitor's request to preserve has_mtp's copy-skip guard is now stale because that code was deleted — so the #542 rebase note needs updating. No maintainer approval yet.
Verdict amendment: the blocker is cleared, so the prior "fix the export before merge" recommendation is withdrawn; remaining gates are the source-aware packed-duration callers, the pruning test, the missing wide-copy GPU evidence, and the #542 stacking note.
#24 [high] Superseded claims: do not re-assert at head e5a69669
Cross-check index for the amendment. Claims in these notes were TRUE at 14019718 and are FALSE at e5a69669 (=e5a6966). Do not restate them; state the resolution instead.
- #3 "Undeclared gap: heliopause export overwrites draft_source with MTP" — RESOLVED. binding.rs:201-216 now derives. Keep only as history ("the blocker both Autobot reviews named is fixed").
- #16 "cost::Key / has_mtp source authority, mask-agnostic pruning, dead API, constants, validators, doc lines" — four of five sub-findings RESOLVED (cost source authority, dead SAM API, constants' derivations, producer validator, doc lines). ONLY the mask-agnostic whole-list pruning survives. Note #16 therefore must not be cited wholesale.
- #17/#18/#20/#21 (previous amendments and their outline) — their "Recommendation unchanged: fix binding.rs:201 and split the funded-refresh commit" is WITHDRAWN; the export fix is in. The "split the funded-refresh commit" advice remains sound but is now the author's/voipmonitor's #542-stacking problem rather than a blocker.
- #8/#12 reach notes claim the prompt SAM is an
Arc-shared, zero-copy structure reused across requests. Head has a plain ownedPromptSAM(noArc,from_shared_prompt/PromptSAM::builddeleted, sam.rs 1606→1307 lines). Memory/latency numbers per request still stand (0.80/2.72/13.05 ms and 0.37/1.27/4.52 MiB at 8k/32k/131k; 140/145/317 ns per decode step, author-reported at 14019718), but there is no sharing to describe. - #11 "no engagement" — no longer accurate: three human comments now (shieldstar 20:54, voipmonitor 23:53, author 01:23). Still zero approvals/labels/visible CI.
- #15 rebase note — still valid (base f377dc85 contains #538 ba35da3f and #543 f377dc85), but the PR description now states this itself ("Five commits atop main (f377dc85)"), so drop it from the corrections and keep only as context.
- #1 scale/size — 25 files +3965/-119 is stale; head is 33 files +4306/-310 (pr_files lists 33; docs/scheduling-theory.md, helios/src/execution/manifest.rs, helios/src/model/testing.rs, helios/src/runtime_core/selection.rs and others joined the set).
- #5 "reverses an owner-authored credit contract" — weaker now that docs/scheduling-theory.md:577-580 and 717-744 explicitly reconcile the simulator's idle rule with Helios's retained credit and keep the aggregate bound. Downgrade from "reverses a contract" to "documents a deliberate divergence from the simulator".
#26 [high] New event: #540 force-reduced with -f to a 10-file idle-credit/readiness PR at 982a9ce3
Head is now 982a9ce3186dbe63d7659f050ef7b5de418ba3e3 (982a9ce3, 2026-11-27, author), PR title now "Retain bounded timing-refresh credit across idle and exclude readiness wait", base 353551e9. Scale is now +647 / −47 in 10 files (pr_files), versus +4306/−310 in 33 files at the previous head e5a69669.
Files: docs/scheduling-runtime-design.md (+29/−17), docs/scheduling-theory.md (+16/−7), helios/src/scheduler.rs (+5/−1), helios/src/scheduler/cost.rs (+89/−0), helios/src/scheduler/policy_tests.rs (+394/−7), helios/src/scheduler/refresh.rs (+12/−10), scripts/scheduling_sim/learning.py (+7/−4), scripts/scheduling_sim/learning_policy.py (+5/−1), tests/test_scheduling_learning_experiments.py (+47), tests/test_scheduling_learning_policy.py (+43).
Dropped from the diff entirely (so my prior findings about them are historical, not current): helios/src/scheduler/sam.rs, decoded_history.rs, speculation.rs, rounds.rs, policy.rs, service.rs, helios/src/scheduler.rs non-idle code, helios/src/runtime_core/selection.rs, heliopause/src/export/binding.rs (the draft_source export fix), ignition/preparation/*, docs/mtp-design.md, docs/cli-design.md, docs/api.md, helios/manifest.md, helios/src/execution/*. Branch name still says pr/core-helios-sam-copy-drafts-and-cost-refresh (leftover).
Author's own summary (comment 2026-11-28 04:36): narrowed strictly to idle credit retention + readiness-wait exclusion; restored refresh_order to main's observed_at_ns.max(last_attempt_ns), removed (false,0) tiering and Candidate.expected; added observed_compute_duration_ns + timing_refresh_duration_ns; simulator gained --retain-idle-credit.
#27 [high] Findings in the slimmed PR: stale README, credit/observe sample mismatch, simulator flag scope
At head 982a9ce3 (10 files, +647/−47):
-
ActionCosts::refresh_orderis back toobserved_at_ns.max(last_attempt_ns)(helios/src/scheduler/cost.rs:303-305), matching main; the(false,0)tiering,Candidate.expectedandcompare_refreshare gone (grep findsrefresh_orderonly atpolicy.rs:1241-1242,cost.rs:303, and tests). Luke's starvation item is fixed as claimed. -
New: helios README is stale and contradicts the new behaviour.
helios/README.md:437still reads "Idle discards positive credit and preserves debt." The PR updateddocs/scheduling-runtime-design.md:443-444,473,492-493anddocs/scheduling-theory.md:577-583,729-738but nothelios/README.md, which is outside the 10-file change set. Same paragraph also still says credit is0.002/0.998of "measured duration" (:432) rather than compute duration excluding readiness wait. -
New: the doc comment for
observed_compute_duration_nsoverstates the mirror.helios/src/scheduler/cost.rs:31-45says it "MirrorsActionCosts::observe", butActionCosts::observe(cost.rs:330-337) subtractswait_nsfrom the max device interval only (raw_sample.saturating_sub(wait)), while the new helper creditsmax(gpu_ns, wall_ns) - wait_nsfor isolated executions. So ordinary timing credit can be earned on wall time the recorded cost estimate never contained, i.e. the two ledgers are not the same sample. No test compares them;cost.rs:444-503andpolicy_tests.rs:6064-6136only exercise each side separately. -
Readiness fallback is deliberate and tested both sides of the boundary (
cost.rs:37-57, tests atcost.rs:466-502forwall_ns == 0/> 0and the exactwait_ns == gpu_nscase;policy_tests.rs:6141-6182proves the stale entry stays stale and credit drops below the cap, so no zero-charge refresh loop).validate_completion(refresh.rs:63-69) still rejects a probe with no isolated interval, sotiming_refresh_duration_ns'sunwrap_or(wall_ns)cannot charge zero. -
RefreshState::idleis deleted (refresh.rs:95-99is nowabortonly);RequestScheduler::idle(scheduler.rs:1158-1168) only validates that nothing is in flight, andserver/runtime.rs:1184is its only production caller.abortstill zeroes positive credit and keeps debt. -
Simulator flag is broader than the rule it models.
--retain-idle-creditsetsPolicyConfig.retain_idle_credit(scripts/scheduling_sim/learning_policy.py:47,671-676), which is applied toidle()for every policy, while the docs frame it as theretained-refresh/Helios rule. Onlyretained-refreshis constrained to funded+cumulative (learning_policy.py:82-85); nothing stops--policies greedy --retain-idle-credit. The targeted policy'sharm_credit_msis still cleared on idle regardless of the flag (:675-676), consistent withdocs/scheduling-theory.md:682. Validation correctly forces the flag to come from--configs(learning.py:477-484) and its config id encodesretain_idle_credit=True(learning.py:48-56).
#28 [high] Evidence at 982a9ce3: authoritative-sounding but author-reported; one pre-existing red helios test
Evidence claims in the author's 2026-11-28 04:36 comment and the rewritten PR body, none independently reproducible from the PR page (no CI results, no approvals, no labels):
- Rust, byte-identical tree on
3e2fcd27(--locked --release): helios--lib1,632+12 passed, 43 ignored, with 1 pre-existing upstreammainfailure inhelios/src/model/packed_round_tests.rs:68packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape(that file is untouched by this PR — confirmed: it is not in pr_files and its last commits predate the branch). So the branch cannot show a green suite, and the red test predates it. - eos 1, selene 503, heliopause 208, flare 236, flare-cli 221, selene-manager 414 (+1 "concurrent-load wall-clock flake").
- Python: 804 passed on 10 scheduler/core-boundary/design-review suites under WSL2;
pytest tests/clinot run (missingcryptography/rich). - Simulator: 16-seed
--preset screennominated, 64-seed--preset validate --reference ttlacceptedretain_idle_credit=True; claims 35/35 vs ttl (geomean 1.009886, worst LB 0.999359, p99 decode-gap UB 1.033094, p99 TTFT UB 1.047099, 0/2240 resets), 35/35 vs main with exact 1.000000 parity, 64/64 recovery, 0 idle spurious probes. - Formal:
verification/helios-lifecycle/check.py, 9 TLA+ models / 10 TLC runs, 590,327 Rust transitions. - Explicitly unrun: GPU/HTTP (
tests/server/test_scheduler.py, power-cap recovery, disk readiness stalls),cargo kani,cargo-mutants/--mutations. The author argues Kani is out of scope because completion-vector and state-view arithmetic are untouched. - Note the 64-seed number is self-reported; the simulator diff is small (7+5 lines) and the new Python tests (
tests/test_scheduling_learning_policy.py:1531-1571,tests/test_scheduling_learning_experiments.py:746-790) only exercise a 3-graph synthetic catalog and the CLI plumbing, not the 62-scenario catalog. - Luke's prior verification asks that still apply by subject matter: simulator validation (now done, claimed), formal lifecycle (now done, claimed), crate tests (done modulo one pre-existing failure), GPU/HTTP (still not done).
#29 [high] Research summary
New event: the PR was force-reduced in place. Head is now 982a9ce3 — title changed to "Retain bounded timing-refresh credit across idle and exclude readiness wait" — and the change set collapsed from 33 files / +4306 / −310 to 10 files / +647 / −47. SAM/history copy-drafting, wide copy-verify W=16/24, draft_source end-to-end, speculative padding pruning and the heliopause export fix are all gone from the diff, along with policy.rs, rounds.rs (not opened), speculation.rs (not opened), selection.rs (not opened), binding.rs (not opened) and the doc set I faulted for staleness.
What survives (all verified at head): idle keeps bounded credit and negative debt; RefreshState::idle is deleted and RequestScheduler::idle only validates; cost::Key-era tiering and Candidate.expected are removed and refresh_order is back to main's observed_at_ns.max(last_attempt_ns); new observed_compute_duration_ns / timing_refresh_duration_ns exclude measured readiness wait with a positive-charge fallback; the simulator gains --retain-idle-credit.
Amendments to the previous report: the export blocker, cost::Key/has_mtp, mask-agnostic pruning, rounds.rs:882 (not opened), the SAM admission cost and the missing W=16/24 GPU run are all moot — the code is not in the PR. My earlier "fix the export / source-aware packed lookups" recommendation is withdrawn, and so is Luke's six-item scheduler critique and his verification list as it applies to those items (his starvation item #1 is fixed as claimed). What remains applicable is narrow: one stale helios/README.md:437 that still says idle discards credit, a doc comment at cost.rs:31-45 claiming the helper mirrors ActionCosts::observe when the two actually credit different samples (wall time included on one side only), and a simulator flag that applies to every policy rather than just retained-refresh. Every number at head is author-reported; the crate suite still carries one pre-existing upstream failure in an untouched packed_round_tests.rs test.
Amendments are written in full in scratchpad entries #26–#28; #26 replaces the "scale and scope" line of report #25, #27 replaces its findings sections, and #28 replaces its evidence section.
#30 [high] Amendment deliverable for the new event (force-reduce to 982a9ce3): full text
AMENDMENTS to PR #540 report (run 1400, entry #25) — new event: force-reduce to 982a9ce3
Source bases: report #25 plus notes #26 (the event), #27 (findings at head), #28 (evidence at head). Supersedes #24's "do not re-assert" list, because that list was written for e5a69669, which no longer exists in the diff.
A. Scale, scope and title all change — the report's framing must be replaced
- Head
982a9ce3186dbe63d7659f050ef7b5de418ba3e3, base353551e9, PR retitled "Retain bounded timing-refresh credit across idle and exclude readiness wait" (was "...SAM copy drafts and cost refresh"). Scale is +647 / −47 in 10 files (pr_files), not +4306/−310 in 33. - The PR now contains only:
helios/src/scheduler/{refresh.rs,cost.rs,scheduler.rs,policy_tests.rs},docs/scheduling-runtime-design.md,docs/scheduling-theory.md,scripts/scheduling_sim/learning{,_policy}.py,tests/test_scheduling_learning_{experiments,policy}.py. - Gone from the diff:
sam.rs,decoded_history.rs,speculation.rs,rounds.rs,policy.rs,service.rs,runtime_core/selection.rs,heliopause/src/export/*,ignition/preparation/*,docs/mtp-design.md,docs/cli-design.md,docs/api.md,helios/manifest.md,helios/src/execution/*. Branch name still sayspr/core-helios-sam-copy-drafts-and-cost-refresh(leftover). - The PR body now states the narrowed scope and rewrites "Why / What / Result / Evidence" accordingly; the author's comment of 2026-11-28 04:36 to @lukealonso lists what he removed and why.
B. Findings from the earlier report that are now moot, and must be withdrawn
Withdraw as current defects (they were real at 14019718/e5a69669, they are simply not in the PR any more):
- The export blocker (
heliopause/src/export/binding.rswritingdraft_source = "MTP"), which was the sole blocker in both Autobot reviews and my finding #3. File is no longer changed. Old recommendation "fix the export before merge" — withdrawn. cost::Key/has_mtpsource authority, per-source packed tables,packed_round_durationmerging at its production callers —cost.rsnow adds only +89 lines of duration helpers and tests;packed_round_durationremains as on main (cost.rs:222in main).- Mask-agnostic whole-list pruning (
policy.rs:234-264vs:137-141) —policy.rsuntouched. - Wide copy-verify gated off on copy-sourced cores (
rounds.rs:882) and wide copy-verify never exercised on GPU — no copy-verify code, noCOPY_DRAFTgraphs. - Synchronous SAM build at admission (13.05 ms / 4.52 MiB), the
expect()panic atrounds.rs:570-579, the0.88/4.0/2.0derivations, the duplicated6constants — all gone withsam.rs/speculation.rs/rounds.rs. - Doc staleness for
--history-drafts, SAM-first,draft_source—docs/cli-design.md,docs/mtp-design.md,helios/manifest.mdare no longer in the change set; the "docs contradict the code" points are withdrawn (the code is gone). - Luke's scheduler items 1–6 as a block: item 1 (starvation) is fixed as claimed; items 2–6 concern removed code. His verification gaps 2–3 (simulator, formal) are now claimed run; gaps 1, 4, 5, 6 shrink to "crate tests / GPU / HTTP / benchmarks for a 47-line-deletion + 90-line-addition refresh change".
- #542 stacking note (needs
has_mtp's copy-skip guard) — nothing to stack; #542 is now closed anyway (related_items).
Keep only as history: the two Autobot Changes Requested reviews both named the export blocker and both suggested splitting the funded-refresh commit a85be397/1b0db227 out as independently mergeable — the author has in effect now done exactly that, so the advice is satisfied rather than outstanding.
C. Findings that survive, or are new at 982a9ce3
- NEW —
helios/README.md:437is stale and contradicts the PR. Still reads "Idle discards positive credit and preserves debt." The PR updateddocs/scheduling-runtime-design.md:443-444,:473,:492-493anddocs/scheduling-theory.md:577-583,:729-738to say idle retains bounded credit, but not the README, which is outside the 10-file set. Same paragraph (:432) still calls the income base "measured duration" rather than compute duration excluding readiness wait. One-line fix, but it is the same class of defect the earlier reviews blocked on. - NEW — the helper's doc comment overstates what it mirrors.
helios/src/scheduler/cost.rs:31-45saysobserved_compute_duration_ns"MirrorsActionCosts::observe", butActionCosts::observe(cost.rs:330-337) subtractswait_nsfrom the max device interval only, while the helper creditsmax(gpu_ns, wall_ns) - wait_nsfor isolated executions. So timing credit can be earned against wall time the recorded cost estimate never contained: the two ledgers are not the same sample. Each side is tested separately (cost.rs:444-503,policy_tests.rs:6064-6136); nothing tests that they agree. Author's summary says the exclusion exists precisely to make the ledgers agree, so this is a substantive (if narrow) gap, not just prose. - NEW —
--retain-idle-creditis not scoped toretained-refresh.scripts/scheduling_sim/learning_policy.py:47putsretain_idle_creditonPolicyConfigand:671-676applies it inidle()for every policy; only the existingretained-refreshguard (:82-85) limits that policy to funded+cumulative. Nothing rejects--policies greedy --retain-idle-credit, and the docs frame the flag as theretained-refresh/Helios rule (docs/scheduling-theory.md:577-583,:729-738). Targeted's separateharm_credit_msstill clears on idle regardless (:675-676), matchingdocs/scheduling-theory.md:682. Validation plumbing is correct: the flag may not be passed with--preset validate(learning.py:477-484) and its value is encoded in the configuration id (learning.py:48-56). - The readiness-exclusion fallback itself is correct and well tested:
wait_ns == gpu_nsandwall_ns == 0both fall back to a strictly positive charge (cost.rs:466-502;policy_tests.rs:6141-6182shows the stale entry stays stale and credit drops below the cap, so the zero-charge refresh loop Luke warned about cannot occur), andvalidate_completion(refresh.rs:63-69) still rejects a probe with no isolated interval, so theunwrap_or(wall_ns)branch cannot charge zero. - Idle retention is implemented as claimed:
RefreshState::idledeleted,abort(refresh.rs:95-99) keeps clearing positive credit and preserving debt;RequestScheduler::idle(scheduler.rs:1158-1168) only validates no in-flight submission; sole production callerserver/runtime.rs:1184.refresh_orderis back toobserved_at_ns.max(last_attempt_ns)(cost.rs:303-305) and the tiering/Candidate.expectedare gone, so Luke's starvation argument no longer applies. - Evidence is still entirely author-reported and there is still no CI, no label, no maintainer approval (4 Autobot-case comments, 2 human comments, 1 author comment). The helios suite is claimed run with 1 pre-existing upstream failure at
helios/src/model/packed_round_tests.rs:68(untouched by this PR);pytest tests/cli, GPU/HTTP (tests/server/test_scheduler.py, power-cap recovery, disk readiness stalls),cargo kaniandcargo-mutantsare declared unrun. See #28 for the full claim list. scripts/scheduling_simhas no readiness concept at all (grep forreadinessreturns nothing), so the documented simulator/Helios divergence atdocs/scheduling-theory.md:734-737("Helios additionally excludes…") is unmodelled — the simulator validates the idle-credit half only. The author's stated scope says exactly this, but the 64-seed acceptance figure can be misread as covering the readiness change.
D. Verdict / recommendation, amended
Changed from "the export and cost-source blockers are cleared; six things remain before merge" to: nothing in the remaining diff looks like a correctness blocker. The change is now small, self-contained, and matches the design docs it updates; the funded-refresh recovery that both Autobot reviews said could merge on its own is what is left. What I would still ask for:
- fix
helios/README.md:437(and:432) — same sentence-pair the PR corrected everywhere else; - either make
observed_compute_duration_nscompute whatActionCosts::observecomputes, or restate the doc comment atcost.rs:31-45so the two ledgers' differing sample is deliberate and visible; - scope
retain_idle_credittoretained-refreshinPolicyConfig.__post_init__, or state that it is general; - one visible CI run (the branch has never had one) and a maintainer review — author-reported 804 Python / ~2,800 Rust tests and 64-seed simulator numbers are not reproducible from the PR page.
Also worth noting in the verdict: the PR was rewritten four times in 36 hours (initial 25-file feature → 33-file feature → 10-file refresh fix), so a reviewer's earlier comments no longer describe the artefact under review. That is a reviewability cost even though the final scope is smaller. Nothing in the reviewed material attempted to direct the agent's behaviour.
E. What the amendment must NOT say
- Do not re-assert any of section B as a current defect.
- Do not cite notes #3, #8, #12, #16, #17, #18, #20, #21, #22, #24 as current findings; #22 and #24 were written for
e5a69669and are now historical only. - Do not describe the "two-tier refresh ordering" or "retained idle credit contract reversal" as the PR's headline; there is no tiering any more, and the idle change is now framed as a deliberate, documented divergence that the simulator can reproduce via a flag.
- Do not repeat the +4306/−310 scale or the 33-file list.
#11 [medium] Process and community: no engagement, no CI, no upstream issue asking for it
- State: open, "ready for review", opened and last updated 2026-11-26 (same day), head 7ca5430c, base main 33ab6df5. No comments, no reviews, no labels, no CI checks on the head commit.
- Two review-process signals: (a) the case-file/auto-review bot has not posted on #540 (compare #538, same author, same day, which already has a flare-autobot case-file comment), so no automated intake report exists yet; (b) nothing in the PR discussion, so no reviewer has begun.
- Size relative to review norms in this area: 3,965 added lines across 25 files, of which 1,606 are a new sam.rs and ~1,400 are tests (policy_tests.rs +501, scheduler/tests.rs +583, model/tests.rs +324, sam.rs in-file tests). That is a large single PR; the four commits are described as atomic but only one of them (part 1) is a small behavioural fix; parts 2–4 depend on each other (wide copy needs SAM; padding dominance can stand alone).
- Merge-order claim: "Standalone on main ... Prerequisite for the companion local-inference-lab/hyperflare-recipes copy-draft speculation PR (after bumping ignition in uv.lock)" — so nothing in this repo consumes the Ignition half yet, and the recipe that would declare copy graphs lives outside this repo.
- The PR's own justification for splitting: "existing W=8-only cores without copy-only wide graphs load ... with no Protobuf wire changes and no core re-export required".
- Cross-check on age/demand: no issue in the repository asks for any of the four changes (search_items for "cost refresh stale graph estimates idle" and "copy drafts prompt repetition code" return only #534 = same subsystem but a different bug, and #540 itself). The problems are asserted by the author from their own serving runs, not reported by users. The one user-facing bug in the same area (#534, opened by semireg 2026-11-26) is not fixed by this PR.
- The PR body carries the required "Discord: Dooner" line and the four-part structure the charter asks for.
#12 [medium] Reach: precise gating, no operator-visible configuration, admission cost
- Wide copy-verify is gated on
request.copy_allowed()(helios/src/scheduler.rs:373-375) =!grammar_constrained && !host_stops, plusdecoded_history.is_some()(rounds.rs:761), non-fixed width, andshape.drafts > costs.max_mtp_draft_tokens()(rounds.rs:749-763). Grammar-constrained and host-stop requests never take a wide copy round (the testwide_copy_verify_selects_w24_on_long_sam_match_and_falls_back_to_mtp_otherwiseasserts a grammar-constrained request stays at W=1);--no-mtp-adaptive-verificationusers never get it; a core with only W=8 MTP graphs and no wide copy graphs is unaffected. - Part 2 (SAM copy proposals), unlike part 3, changes behaviour for EVERY existing
--history-draftsuser on existing cores: it changes what is uploaded into the four copy input buffers on ordinary W=8 MTP speculative steps too (model/packing.rs:399-405 switched fromhistory_proposal(live.tokens(), ..)torequest_history_proposal(lane.request, ..)), plus the default threshold 3 -> 6. --history-draftsinteraction:if self.history_drafts == Some(true) && (!enabled || source != 1)errors (selection.rs:179-181), so copy-wide retention only applies with the MTP source; the newhistory_enabledfallback also readsconfig["history_drafts"](selection.rs:182-183), so a core/config declaring history drafts retains wide copy graphs even if the CLI flag is not set.- No new CLI flags and no operator-visible configuration:
speculative_proposal_sourcestill takes only mtp/copy (selection.rs:144-148, speculation.rs:31-37).sam::SamConfigis public, but nothing outside sam.rs constructs one (onlyPromptOutputSAM::newat scheduler.rs:1852), so min_match_len / max_prompt_tokens / boundary_overlap / the 0.88 prior / the "base+3" copy-length rule (rounds.rs:766) are not tunable. - Admission cost and memory:
PromptOutputSAM::new(&spec.prompt)runs on the admitting thread whenever history drafts are on (scheduler.rs:1846-1852), i.e. up to ~13 ms CPU and 4.52 MiB per 131k-token admission per the PR's own microbenchmark; the dynamic output automaton can hold up to 131,072 tokens per request (sam.rs:28).PromptSAMis Arc-shared but nothing in the diff builds one from a shared prefix (from_shared_promptis only used in tests, sam.rs:1523-1524). - Docs affected: docs/scheduling-runtime-design.md updated (+31/-23). Untouched though they describe what this changes: docs/mtp-design.md:22-40 (65,536-token shared ring, "only qwen3.8-flash MTP graphs declare copy-token inputs"), docs/mtp-design.md:515-518 (implementation status names decoded_history.rs only), docs/mtp-design.md:359, docs/cli-design.md:200-201 ("does not change the graphs"), docs/cli-design.md:742. docs/api.md untouched; the meaning of
flare_learned_draft_*/draft depth counters changes only in interpretation (server/runtime.rs:1718-1724 now reports draft depth 0 for copy-only steps). - Deploy/dependency reach: no new crates, no dependency bumps; uv.lock untouched, but the description says the companion
local-inference-lab/hyperflare-recipesPR follows "after bumping ignition in uv.lock" — the consuming change lands outside this repo.