Explore scratchpad · NVIDIA/hyperflare-inference #540

Raw Markdown for agents: https://autobot.eidonix.com/p/0cd1db03-808f-41d0-9cb0-c94057907b05.md

#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:

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)

  1. 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 into abort() (refresh.rs:96-105 in the diff). helios/src/scheduler/cost.rs adds observed_compute_duration_ns (observed duration minus ReadinessIntervals::wait_ns()) and timing_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_order changed 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.
  2. 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, keeps max_endpos exact 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:1852 sam: Option<sam::PromptOutputSAM> created at admission only when self.decoded_history.is_some() (i.e. history drafts enabled); push_token on 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 from history_proposal(live.tokens(), ..) to request_history_proposal(handle, ..) (model/packing.rs:399-405, server/runtime.rs:2145).
  3. 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 via GraphSignature.draft_source (ignition/preparation/execution.py:32, 102-108, 315-319). selection.rs retains optional draft_source=2 graphs only when proposal source is mtp + history drafts + adaptive (retain_wide_copy, selection.rs:182-184, 277-298) and narrows speculative_widths back to source widths otherwise (selection.rs:379-393). New speculation::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 inside packed_round_candidates (rounds.rs:749-900) that is gated on decoded_history present, 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_step in scheduler.rs:2795-2801, 2860-2875) and from the MTP packed duration table (cost.rs:189-202).
  4. Padding dominance + threshold (7ca5430c). policy.rs dominates_padding_with gains a branch for strict batch-width domination with equal (capacity, draft_tokens) and smaller.packed_token_capacity >= min(sum lane ceilings, larger.packed); prune_padding adds 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 least min(lane ceilings, own packed) (policy.rs:221-254). Candidate gains an expected field (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:

#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):

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

#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

#9 [high] Project fit: charter requirements and doc obligations, where met and where not

Charter (read_charter) lines relevant as facts:

#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):

  1. "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.
  2. "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).
  3. "120 randomized brute-force SAM oracle trials" — backed by a real test: sam.rs exact_oracle_equivalence_randomized_streams_and_repetitions loops trial in 0..120 against a brute-force oracle with several min_match_len and prompt lengths (sam.rs:1401-1469). This is the strongest evidence in the bundle.
  4. "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.
  5. 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.
  6. "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 assertion ordinary_ns * 0.002/0.998 - refresh_ns), and power_cap_restore_recovers_largest_prefill_chunk_across_idle_requests asserts refresh_ns <= ordinary_ns*0.002/0.998 + last_refresh_ns. The acceptance bound is only implicitly covered (unchanged code path except the readiness split).
  7. "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.
  8. 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.

#15 [high] Rebase: base moved to f377dc85 (#538 + #543 merged); event diff mixes base-side hunks

#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.

B. Potential cohort-mismatch in the new pruning pass (open question, not a proven bug).

C. Dead/duplicated surface (independently matches the review's subtract list).

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

  1. Commit hashes in my earlier notes are stale. Current head chain: 14019718 (padding dominance + min_match_len 6), 9caba2c7 (wide copy-verify), 450012d1 (SAM), 1b0db227/review's a85be397 (cost-refresh recovery). The PR was rebased onto f377dc85.
  2. 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_capacity exists at main policy.rs:357/523/784/968); (b) the policy.rs natural-fit hunks and the docs/cli-design.md --joint-tuning / docs/preparation-development.md hunks visible in the "what changed" diff are base-side, not this PR's; (c) pr_files at head is 25 files, +~3,965/−119 — unchanged in scale, sam.rs still +1,606.
  3. "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.
  4. My stale-docs claim gets sharper: pr_files contains no docs/cli-design.md, so docs/cli-design.md:200-202 ("--history-drafts … does not change the graphs") and :741 are untouched at the head while selection.rs:277-298 now retains/prunes graph families and :375-396 drops kernels/rewrites speculative_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.

  1. 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 with request_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_len truncates the proposal at capabilities.vocabulary to survive multimodal placeholder IDs (scheduler.rs:1128-1140, mirrored in request_copy_match_stats:1179-1188), while history_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.

  2. Admission-time work (confirmed): sam::PromptOutputSAM::new(&spec.prompt) at scheduler.rs:1849-1852 runs inside admit whenever decoded_history.is_some(), i.e. synchronously on the admitting thread, before the request is scheduled. Together with CopyCalibration::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.

  3. Docs line numbers cited by the review are correct at the head: docs/scheduling-runtime-design.md:6-12 module list has no sam.rs; :249-258 still describes only the capacity-wise domination; :396-399 still 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-53 graph schema has no draft_source; docs/cli-design.md:200-202 and :741 unchanged; docs/mtp-design.md:22-40 unchanged.

  4. Validators confirmed at head: ignition/preparation/execution.py:102-108 accepts draft_source 1|2 and permits 2 on mixed with speculation_enabled; selection.rs:278-283 requires kind == "speculative" for copy_wide, so a mixed copy graph is accepted by the producer and silently never retained. Also python.rs:225-233 defaults an absent draft_source to 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.

  5. Test coverage that would catch the pruning cohort question does not exist: prune_padding tests at policy_tests.rs:31, 52 (equal_counts_from_different_cohorts… — pre-existing, exercises dominates_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.

  6. Refresh-ranking detail confirmed: compare_refresh (policy.rs:1330-1338) builds ValueRate::new(0, expected, age_price); since ValueRate::compare orders duration_ns == 0 above 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.

  7. 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:

  1. Corrections. Commit ids are stale (head chain now 14019718, 9caba2c7, 450012d1, 1b0db227/a85be397); the PR was rebased onto f377dc85, which already contains merged #538 and #543, so the "same-day conflict with #538" is resolved and the natural-fit policy.rs hunks plus the docs/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.

  2. Escalation. The autobot review's single blocker is the same export defect I had flagged: heliopause/src/export/binding.rs:201 hardcodes draft_source="MTP" on the sole export route, so copy-only graphs never reach a core; the wire enum already has COPY_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.

  3. New verified findings. cost::Key omits draft_source while prepared() rejects duplicate shapes, and has_mtp counts 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 in policy.rs:221-254 ignores 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.py accepts draft_source=2 on mixed but selection.rs requires speculative. 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 old history_proposal path 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).

  4. 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:

  1. Corrections to facts in #13 — stale commit ids (14019718, 9caba2c7, 450012d1, 1b0db227/review's a85be397); rebase onto f377dc85 absorbing merged #538 + #543, which (a) resolves the same-day #538 conflict, (b) makes the natural-fit policy.rs hunks and the docs/cli-design.md --joint-tuning / docs/preparation-development.md hunks 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_files has no docs/cli-design.md).
  2. 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.
  3. New verified findings — cost::Key has no draft_source and prepared() rejects duplicate shapes so MTP/copy twins cannot coexist; has_mtp is an existence scan that counts unmeasured entries, suppressing measured copy shapes from packed_round_duration (feeds service.rs:109,156, policy.rs:775, policy.rs:619); the new whole-list pruning pass policy.rs:221-254 ignores masks while the pairwise rule at :133-140 requires smaller.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-108 vs selection.rs:278-283 mixed/copy mismatch; python.rs:225-233 defaults absent draft_source to MTP; five underived constants (0.88, 4.0, 2.0, +3, 6); test-only SAM API (propose_for_context sam.rs:1070-1110, propose_conditional_continuations 1118-1189, push_slice 1023, from_shared_prompt 935, 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_curve prior-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).
  4. 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)

  1. EXPORT BLOCKER FIXED. heliopause/src/export/binding.rs:201-216 now derives instead of overwriting: None => "MTP", Some(0|1) => "MTP", Some(2) => "COPY_DRAFT", string forms accepted, anything else Err(super::invalid("unsupported graph draft_source")); plus if draft_source == "COPY_DRAFT" && kind != "speculative" { Err(...) } (binding.rs:213-215). Round-trip test execution_preserves_mtp_and_copy_draft_source_and_rejects_unknown at 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).
  2. cost::Key SOURCE AUTHORITY FIXED. cost.rs:66-84 Key now has draft_source: Option<ProposalSource>; canonical_draft_source (cost.rs:50-59) canonicalizes non-speculative to None; Estimate.draft_source and has_mtp deleted; packed_round_durations is [[Vec<Option<u64>>; 7]; 2] indexed by ProposalSource as usize (cost.rs:139, 204-221); packed_round_duration_for(source,batch,width) (223-235) added; test unmeasured_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.
  3. RefreshState::idle REMOVED (refresh.rs diff: -6 lines); RequestScheduler::idle() (scheduler.rs:~1267-1272) now only validates no submission in flight and documents retained credit; test ordinary_income_excludes_queued_wall_wait_and_idle_retains_credit_while_abort_discards_positive (policy_tests.rs:2616-2647) drops the state.idle() no-op assertions. My "empty method with ten call sites" finding is closed.
  4. 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 (no Arc) — 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.
  5. Python producer validator FIXED: ignition/preparation/execution.py:102-108 now if self.kind != "speculative": raise ValueError("copy draft source requires a speculative graph") (was accepting mixed+speculation_enabled). Test test_copy_draft_source_requires_speculative_graph_without_gpu_confidence (tests/preparation/test_execution.py:373-393).
  6. Three-ladder wire mapping UNIFIED: ProposalSource::{from_wire,to_wire} (speculation.rs:54-69); used by heliopause/src/python.rs:225-231, helios/src/runtime_core/serving.rs:~58, helios/src/runtime_core/selection.rs:144-148.
  7. 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-15 module index (now lists sam.rs, decoded_history.rs, checkpoints.rs), :68-88 new "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-580 and 717-744 (simulator vs Helios idle credit, two-tier order, readiness-wait exclusion); helios/manifest.md:38 draft_source: int documented.
  8. 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-29 WIDE_COPY_MIN_EXTRA_DRAFTS = 3 with rationale. (0.88's "expected value ~7.95" claim is the author's arithmetic, not measured.)
  9. shieldstar's duplicate-powered_curve finding folded verbatim: zero_duration[slot] reuse in policy.rs:1052-1059 (add_candidate) and :1258-1266 + :1289-1293 (mixed_candidates), #[cfg(test)] CURVE_EVALUATIONS counter (rounds.rs:22-27 area, incremented in powered_curve rounds.rs:565-566), tests mixed_refresh_value_reuses_each_decoding_lanes_forecast and decode_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.0 powf shortcut) are NOT addressed here.
  10. Wide-copy / ordinary candidate loops unified via select_host_allocated_candidate + build_host_prefix_ranking (rounds.rs:505-535, 764-862, 920-972), and wide_copy_curve's unreachable else was 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 whose decoded_history was somehow absent now panics instead of falling back.
  11. resolve_copy_match factored (scheduler.rs:1112-1149) sharing the SAM/ring decision between request_history_proposal_with_match_len and request_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.
  12. 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.
  13. 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.

#11 [medium] Process and community: no engagement, no CI, no upstream issue asking for it

#12 [medium] Reach: precise gating, no operator-visible configuration, admission cost