#1 [high] BLOCKING: export path overwrites draft_source (verified in code)
VERIFIED by reading code, not just trusting the review.
heliopause/src/export/binding.rsis ABSENT frompr_files— the PR does not touch it. Good independent confirmation.binding.rs:196-202: for every speculative graph it doesgraph.insert("draft_source".into(), "MTP".into())unconditionally. Comment in code has no conditional on incoming value.binding.rs:395:message("Execution", &value)transcode via prost_reflect DynamicMessage.helios/proto/runtime_core.proto:842,854:DraftSource draft_source = 9;enumNO_DRAFT=0; MTP=1; COPY_DRAFT=2. So the protobuf type DOES support COPY_DRAFT — only the writer is hard-coded.- Export path is live:
binding.rs:17export_capture->capture.rs:3158super::binding::execution(execution, &allocations)?->output.index.ranks[0].execution = Some(execution)(capture.rs:3160). - Contrast: in-process reader
heliopause/src/python.rs:225-233DOES read 0/1/2 and maps 2->ProposalSource::Copy, erroring on other values. So the two consumers disagree. - Load side prunes:
helios/src/runtime_core/selection.rs:277-298:copy_widerequiresgraph.draft_source == 2ANDdraft_tokens > drafts. A COPY graph relabelled MTP=1 fails copy_wide, then must satisfygraph.draft_source == source(=1, so passes that) BUTdraft_tokens <= drafts— true only if depth <= drafts, which is false by construction for wide shapes (selection.rs:283depth as usize > drafts). So pruned/skipped. Nuance to state carefully: an over-depth graph arriving as MTP may instead be DROPPED by the retain closure (line 292) rather than tripping the stricter MTP filter at 296-297 — but either way it does not run. I did not run CI to observe which. - Serving decode is correct (
serving.rs:58-63maps 1->Mtp, 2->Copy), so loss is on the write side only, silently.
CONCLUSION: commit 35ab143a's headline capability (wide copy-verify W=16/W=24 graphs) cannot reach the runtime through the export path. PR Limitations concede W=16/W=24 GPU export/replay was never benchmarked, consistent with the defect.
#2 [high] Docs contradiction: --history-drafts "does not change the graphs"
VERIFIED by reading both docs and selection.rs.
docs/cli-design.md:200-201(NOT in PR file list): "--history-draftsenables host history tracking and feeds continuations into the captured graphs' history inputs; it does not change the graphs." After this PR:helios/src/runtime_core/selection.rs:184retain_wide_copy = source == 1 && history_enabled && fixed.is_none();:277-298retains draft_source==2 copy graphs only when copy_wide;:365-380prunes kernels of unselected graphs;:382-396rewrites speculative_widths. So the flag now changes which graphs/kernels load and rewrites exported config.docs/mtp-design.md:22-40(NOT in PR file list): still says history drafting "requires speculative graphs that declare copy-token inputs, which only the qwen3.8-flash MTP graphs do. Both settings use the same captured MTP graphs and buffers." and describes only the shared 65,536-token 4/8-gram ring returning "up to seven" continuation tokens. After PR the primary source is the per-request prompt+output SAM (scheduler.rs:1099-1159), ring is fallback only on strictly-longer match, DEFAULT_MIN_MATCH_LEN 3->6, 131,072 prompt cap.docs/scheduling-runtime-design.mdmodule index (~:7-12) omitssam.rs.helios/manifest.md:29-53graph dictionary spec omitsdraft_source.
Project rule: AGENTS.md treats inaccurate documentation as a mergeable defect. Only docs/scheduling-runtime-design.md was updated (and only for refresh ordering/idle/readiness-wait — verified in its diff, which is accurate).
#4 [high] Hardware/test-plan facts: rigs, models, preconditions, metrics
Key facts for the test plan.
Hardware:
- cn5: 4x RTX PRO 6000 Blackwell Max-Q, 96GiB, amd64, 48 CPU/125GiB. Models: dinov2-base, GLM-5.3-Flash-NVFP4 (local + nvidia), timm vit. NO Qwen3.8-Flash.
- cn7: 1x GB10, arm64, 10 CPU/60GiB. Models: Qwen3.8-27B-DFlash2, Qwen3.8-27B-NVFP4, Qwen3.8-Flash-Next-FP4-Local.
- PR's own measurements used 4x RTX PRO 6000, DeepSeek-V4.1-Flash TP4 — a model/hardware combination NOT on either rig. So headline numbers are not reproducible here.
Copy-draft precondition chain (heavy):
- Copy drafts need
--history-drafts, which selection.rs:179-180 requires enabled learned speculation AND source==1. enable_history_drafts(scheduler.rs:1086-1092) must be called before admission.- Proposals only exist if
self.decoded_history.is_some()(scheduler.rs:1120). copy_allowed()(scheduler.rs:373-375) false for grammar-constrained / host-stop requests.- Graphs must declare copy-token inputs (
copy_token_ids,copy_token_count— ignition/preparation/contract.py:46). - NO recipe in the repo sets
draft_source=2(search of recipes/ for draft_source|copy_token_ids: no matches).GraphSignature.draft_sourcedefaults to 1 (execution.py:32). => Testing commit 2/3 on hardware means first authoring a recipe and running Ignition capture/export. That is hours of rig time, not a smoke test.
Observability available for a hardware test (helios/src/server/metrics.rs):
flare_scheduler_execution_nanoseconds_total{reason=ordinary|discovery|timing_refresh|acceptance_learning}andflare_scheduler_executions_total{...}(:932-939) -> directly validates the refresh-recovery commit.flare_speculative_rounds_total{batch,width},flare_speculative_gpu_nanoseconds_total{batch,width},emitted_tokens_total,offered_drafts_total,accepted_drafts_total(:987-1032) -> validates padding dominance (max_b == C) and copy acceptance.flare_speculative_drafts_total{depth,source=mtp|copy,outcome=offered|accepted}(:1033-1045) -> direct evidence whether the SAM/copy path ever fires at all.flare_history_drafts_enabled(:949-951).flare_replay_readiness_wait_nanoseconds_total,flare_replay_readiness_samples_total(:941-948) -> readiness-wait exclusion in timing refresh.
#6 [high] Re-verification at head 14019718 (second review round) — blocker + rig gating unchanged
Head is still 14019718 (same as prior report; the "new commits" list is the same four commits already reviewed). Code re-read this session:
- BLOCKER confirmed: heliopause/src/export/binding.rs:196-202 —
if kind == "speculative" || kind == "mixed" && speculative { ... graph.insert("draft_source".into(), "MTP".into()); }at line 201, unconditional overwrite. File is NOT in pr_files (25 files listed; export/binding.rs absent). Producer ignition/preparation/execution.py:32 (default 1), :102-104 (validates 1|2), :319 emits it. Wire enum exists: helios/proto/runtime_core.proto:854 DraftSource{NO_DRAFT=0,MTP=1,COPY_DRAFT=2}. Load prunes: selection.rs:277-298 — copy_wide requires draft_source==2 (line 280) and draft_tokens > drafts (283); MTP branch (291-293) requires draft_source==source and draft_tokens <= drafts. So wide copy graphs die silently. Second effect: copy-only contract checks (manifest.rs 845-846; catalog.rs:94-131) keyed on draft_source==Copy never fire. - No in-tree producer of draft_source=2: ignition/ has no recipes dir; search of ignition/ for copy_token/draft_source returns only execution.py + contract.py:45-49 (binding table, kind-agnostic) — recipes live in external local-inference-lab/hyperflare-recipes (#48/#49 per PR body).
- Docs contradiction re-verified verbatim: docs/cli-design.md:199-201 "--history-drafts enables host history tracking and feeds continuations into the captured graphs' history inputs; it does not change the graphs." docs/mtp-design.md:22-29 "Both settings use the same captured MTP graphs and buffers"; :31-40 describes only the 65,536-token ring. Neither file in pr_files.
- cost authority: helios/src/scheduler/cost.rs:50-58 Key {drafts,kind,batch,tokens,prefill,packed} — no draft_source; source stored per-Estimate (:166-169) and re-inferred (is_copy_only_step). has_mtp at :190-208 is an existence scan including unmeasured entries.
- Dominance: policy.rs:133-174 pairwise (requires same mask via :132-140 checks) vs policy.rs:221-254 second pass over ALL candidates with
other.batch >= lanes, equal capacity/draft_tokens, packed >= needed — mask-agnostic; two predicates that must agree but are written separately. - Constants unpinned: speculation.rs:15 WIDE_COPY_PRIOR_RATE=0.88, :18 WIDE_COPY_MIN_MATCH_LEN=6, :20-21 4.0/2.0 (private); sam.rs DEFAULT_MIN_MATCH_LEN=6 (duplicate); rounds.rs +3.
- Rig gating: cn5 = 4x RTX PRO 6000 (SM120, matches PR's measured hardware class) but models are GLM-5.3-Flash-NVFP4/dinov2 only — GLM has MTP but does NOT declare copy-token inputs (docs/mtp-design.md:26 says only qwen3.8-flash MTP graphs do), and catalog.rs:99-101 hard-errors when history_drafts is set without the 4 copy inputs → --history-drafts on a GLM core fails at load (seconds to confirm). cn7 = 1x GB10 = SM121/arm64, explicitly unqualified per docs/mtp-design.md:580-581 and the PR's own limitations; it is the only rig holding Qwen3.8-Flash-Next-FP4-Local (the copy-capable checkpoint), listed at 0 GiB.
- Metrics for post-fix validation: metrics.rs:937 flare_scheduler_executions_total / _execution_nanoseconds_total {reason=ordinary|discovery|timing_refresh|acceptance_learning}; :941-948 flare_replay_readiness_wait_nanoseconds_total; :1033-1045 flare_speculative_drafts_total{depth,source=mtp|copy,outcome}; flare_speculative_rounds_total{batch,width}.
#7 [high] Report of 2026-11-26 round 2 — final pre-test report (no referral)
Verdict unchanged and strengthened: DO NOT REFER TO HARDWARE TESTING. Head still 14019718 (no new commits since prior review round; "new commits" list in context is the same four). Blocker unfixed. Post-fix plan trimmed to commits 1 (refresh) + 4 (padding dominance), ~4 GPU-h on cn5. Commit 3 (wide copy-verify) blocked by export defect AND no in-tree recipe AND needs a freshly prepared core. Commit 2 (SAM) additionally unqualified on cn7 GB10/SM121.
New angle this round: every model on both rigs is listed at 0 GiB, so any test requires a full Ignition prepare+export (hours) before serving — this makes premature testing especially wasteful. Also: the PR's own measured model (DeepSeek-V4.1-Flash TP4) exists on neither rig, so no headline number is reproducible.
Also new: commit 4's prune_padding second pass (policy.rs:221-254) is mask-agnostic while the pairwise rule (policy.rs:133-174) requires equal masks — a possible over-pruning defect inside the very change I would test; the lane-starvation guard is therefore load-bearing, and fixing the duplication before testing is preferable.
Efficiency recommendation: commits 1 and 4 are independent of the blocker and of each other's prerequisites; if maintainers merge them early, the ~4 h test run can proceed without waiting for the whole PR.
#9 [high] Head e5a69669 verified state (3rd round): blockers fixed, should-fix remain
Verified by direct read at head e5a69669 (33 files, +4306/−310). Supersedes notes #1, #2, #6 for the blocking items.
FIXED (verified in code, this round):
- EXPORT BLOCKER GONE. heliopause/src/export/binding.rs:201-216 now DERIVES draft_source: None=>"MTP", Some(0|1)=>"MTP", Some(2)=>"COPY_DRAFT", as_str "MTP"/"COPY_DRAFT" ok, else Err("unsupported graph draft_source"). Line 213-215 rejects COPY_DRAFT on kind != "speculative". binding.rs IS now in pr_files (+64). Round-trip test at binding.rs:1461-1514
execution_preserves_mtp_and_copy_draft_source_and_rejects_unknownasserts Mtp/Mtp/CopyDraft and rejects 3/-1/"UNKNOWN"/mixed+copy. - DOCS FIXED. docs/cli-design.md:200-210 now states --history-drafts retains copy-only graphs wider than MTP depth, keeps widths in speculative_widths, else prunes graphs/kernels/widths. docs/mtp-design.md:22-66 rewritten SAM-first + ring fallback, 131072 caps, min_match_len=6. docs/scheduling-runtime-design.md:6-15 adds sam.rs to module index; :71-91 new "Proposal sources and calibrated wide copy-verify"; :271-285 tighter-batch rule; :409-433 per-source packed tables. docs/scheduling-theory.md:574-582,714-747 splits simulator vs Helios idle-credit + two-tier order. helios/manifest.md:38 documents draft_source. All in pr_files.
- COST AUTHORITY FIXED. helios/src/scheduler/cost.rs:50-59 canonical_draft_source; Key gains draft_source (:63-79); packed_round_durations is [[Vec<Option>;7];2] per source; has_mtp scan and Estimate.draft_source deleted; is_copy_only_step moved to scheduler.rs:1196-1199 reading step.draft_source. Test cost.rs:533-586
unmeasured_mtp_and_measured_copy_coexist_at_identical_shape_and_preserve_packed_duration. - PRODUCER FIXED. ignition/preparation/execution.py:104 now
if self.kind != "speculative": raise ValueError("copy draft source requires a speculative graph")— mixed rejected. Test tests/preparation/test_execution.py:374-392. - Cleanups landed: RefreshState::idle deleted (refresh.rs ends ~99, abort is only discard); SamConfig/with_config/from_shared_prompt/propose_for_context/propose_conditional_continuations/MatchSource/PromptSAM::build/push_slice deleted; PromptSAM now private non-Arc; ProposalSource::from_wire/to_wire unified (speculation.rs:55-70) used by python.rs:225-231, serving.rs:58-62, selection.rs:144-148; resolve_copy_match (scheduler.rs:1119-1146) replaces the duplicated algorithm; duplicated copy-cohort loop collapsed into select_host_allocated_candidate (rounds.rs:764-862) called at :930 and :966; shieldstar's zero_duration fix folded (policy.rs:1020-1117,1226-1302).
STILL OPEN (should-fix, verified):
A. helios/src/model.rs:358-371 — scheduler_capabilities_with_manifest builds completion_inputs as 6-tuple (kind,batch,draft_tokens,token_capacity,packed,prefill) and speculative_allocations as 5-tuple (batch,drafts,width,packed,allocation) — NEITHER carries draft_source. gpu_prefix_allocation (rounds.rs:443-446) matches on (b,d,w,p) only. Since PR now allows MTP+copy at identical B/D/W/P (cost.rs:170-174, test :533-586), a copy graph can inherit MTP's GPU allocation: prefix_lengths_with_values (rounds.rs:479-491) then uses speculative_curve (MTP) instead of the copy curve, and complete_with_survival (scheduler.rs:2595-2597) errors "speculative round completion requires its terminal confidence sidecar" because copy-only graphs must have confidence_width==0 (catalog.rs:123-131, selection.rs:282). Latent: requires a recipe exporting MTP(GPU prefix limits) + copy at same geometry.
B. policy.rs:203-264 — TWO dominance predicates. Pairwise dominates_padding_with (:122-201) requires same kind/draft_source/mask/prefill_slot. The second pass (:230-264) is mask-AGNOSTIC: other.batch >= lanes && other.batch < candidate.batch && other.capacity == candidate.capacity && other.draft_tokens == candidate.draft_tokens && other.packed_token_capacity >= needed — no mask equality and no mask-subset check. Tests policy_tests.rs:66-153 (tight_batch_prunes...) and :155 (wider_speculative_batch_is_retained...) both use a single cohort, so differing masks are untested.
C. No in-tree producer of draft_source=2 / copy-token inputs. ignition/preparation/recipes not in repo (list_files ignition/* shows no recipes/ dir); ignition/recipes/qwen38 search returns nothing; repo-wide copy_token_ids hits are only helios Rust tests + contract.py binding table + ignition/direct/packing.py. GraphSignature.draft_source defaults to 1 (execution.py:32). Recipes live externally (local-inference-lab/hyperflare-recipes #48/#49 per PR body).
D. Min match len duplicated: speculation.rs:25 WIDE_COPY_MIN_MATCH_LEN=6 vs sam.rs:23 DEFAULT_MIN_MATCH_LEN=6 (related only by prose).
E. history_proposal (scheduler.rs:1101-1104) is now test-only and inlines the clamp that clamp_copy_capacity (:1106-1110) owns, with divergent zero-capacity behaviour (min(-1) panic vs saturating_sub).
F. constant derivations now stated (speculation.rs:14-37, rounds.rs:22-33) but 0.88 is analytic and min_match_len=6 rests on one 512-token repetitive prompt.
#10 [high] Test-plan feasibility gates and observability at e5a69669
Facts that gate the proposed minimal plan at head e5a69669.
FEASIBILITY GATES
- cn5 (4× RTX PRO 6000 = SM120, the PR's measured hardware class) has nvidia/GLM-5.3-Flash-NVFP4 + local variant, which has learned MTP (docs/core-design.md:357, docs/mtp-design.md:5). So commits 1 (refresh) and 4 (padding dominance) are testable on cn5 after one prepare.
- SAM/copy path (commit 2) needs a core whose speculative graphs declare copy-token inputs. catalog.rs:97-122 HARD-ERRORS at load when history_drafts is set and CopyTokenIds/CopyTokenCount/CopyConsumedTokens/CopyGeneration are missing → a 1-minute
flare run CORE --history-draftsattempt is itself the test of whether a rig's model supports it. No in-tree producer: ignition/recipes/ does not exist in this repo (list_files confirms; recipes external). docs/mtp-design.md:26-27 at this head says only "speculative graphs that declare copy-token inputs" (no longer names only qwen3.8-flash). So GLM support is UNKNOWN and must be probed cheaply, not assumed. - cn7 is the only rig with Qwen3.8-Flash-Next-FP4-Local (the documented copy-capable checkpoint, docs/mtp-design.md:4) but is 1× GB10 / arm64 / SM121, 60 GiB RAM, 16 GiB scratch — the PR's own limitations name SM121/GB10 as unbenchmarked, and a prepare there is expensive. Only worth it for functional (not perf) SAM validation.
- Commit 3 wide copy-verify W=16/24 CANNOT be exercised: nothing available emits draft_source=2 (GraphSignature.draft_source defaults to 1, execution.py:32; no recipe in repo). Out of scope for any rig.
- PADDING TEST PRECONDITION (critical, else the test is vacuous): the new whole-list pruning pass only fires for GPU-allocated ragged speculative candidates — policy.rs:234-246 gates on
self.gpu_prefix_allocation(batch, drafts, capacity, packed), which is true only when the graph's contract declares a SpeculativePrefixLimit input (model.rs:362-368 → PrefixAllocation::Gpu). If the prepared GLM speculative graphs are Host-allocated, commit 4's second pass never runs and a C-sweep measures nothing. Must confirmspeculative_prefix_limitsinputs on speculative graphs in the prepared core manifest at Stage 0.
OBSERVABILITY (verify claims by metric, not by wall clock alone)
- helios/src/server/metrics.rs:932-940 flare_scheduler_executions_total / flare_scheduler_execution_nanoseconds_total {reason=ordinary|discovery|timing_refresh|acceptance_learning}
- metrics.rs:941-948 flare_replay_gpu_nanoseconds_total, flare_replay_readiness_wait_nanoseconds_total, flare_replay_readiness_samples_total
- metrics.rs:949-951 flare_history_drafts_enabled
- metrics.rs:1033-1041 flare_speculative_drafts_total{depth,source=mtp|copy,outcome=offered|accepted}
- flare_speculative_rounds_total{batch,width}, flare_speculative_gpu_nanoseconds_total{batch,width} (metrics.rs:1658,1974)
EVIDENCE GAP THAT JUSTIFIES RE-TESTING AT THIS HEAD All of the PR's live numbers (max_b==C across C=4..16; 9.19 vs 9.55 ms/rd at C=4; +12.9% tok/s; 3.078->3.650 tokens/round) were measured at prior head 14019718. e5a69669 then refactored exactly the code path those numbers traverse: rounds.rs:937-972 now hoists gpu_alloc and routes the non-GPU host-allocated MTP path through the new select_host_allocated_candidate (rounds.rs:764-862), and policy.rs:1020-1117 / 1226-1302 changed lane pricing. So the headline tables belong to superseded code.
RISK IN CHANGED CODE WORTH A LIVE SWEEP policy.rs:230-264 second pruning pass is mask-agnostic (no mask equality/subset check, unlike the pairwise dominates_padding_with at policy.rs:122-201 which requires smaller.mask == larger.mask). Tests policy_tests.rs:66-153 and :155 both use ONE cohort, so cross-cohort masks are untested. Over-pruning would show as a silent throughput cliff at specific C — only a live sweep finds it.
#11 [high] FINAL DECISION: refer narrowly (commits 1+4), reasons and must-say points
FINAL VERDICT for head e5a69669 — referral CHANGED from "no" to "yes, narrowly".
Rationale for reversal: the sole blocker I previously used to justify non-referral (export path clobbering draft_source) is FIXED at binding.rs:201-218 with a real round-trip test, and all four stale documents are corrected. That removes the "code will definitely change under the test" objection for commits 1 and 4.
What still argues against a blanket referral: commit 3 (wide copy-verify, ~450 lines) remains untestable anywhere (no producer of draft_source=2), and commit 2 (SAM) needs a copy-input-capable core whose availability here is unknown. So referral must be NARROW.
Decision: REFER, conditional on Stage-0 probes, scoped to commit 1 (refresh recovery) + commit 4 (padding dominance) only, ~4.5 GPU-hours on cn5.
Three things that must be said plainly in the report:
- The PR's entire live evidence base (max_b==C table, +12.9% tok/s, 9.19 vs 9.55 ms/rd) was measured at SUPERSEDED head 14019718. e5a69669 refactored precisely the paths those numbers traverse (rounds.rs:937-972 hoisting gpu_alloc + routing host-allocated MTP through select_host_allocated_candidate at rounds.rs:764-862; policy.rs lane pricing at :1020-1117 and :1226-1302). So no headline number currently describes this head. This is the single strongest reason to test.
- Test B is VACUOUS unless the prepared speculative graphs are GPU-allocated (policy.rs:234-246 gates the whole-list pass on gpu_prefix_allocation, which needs a SpeculativePrefixLimit input per model.rs:362-368). Must be confirmed in Stage 0 before booking the sweep.
- If the PR is split before the rig is booked (which every reviewer recommends), test the split-off refresh+padding PR with this identical plan — nothing is lost.
Also state: no CI on head; the 1,712/620/207/71 counts are self-reported; the only independent live run (@voipmonitor) used --no-history-drafts with default copy_verify_shapes=(), so it validated absence of regressions, not the new features.
#3 [medium] Padding dominance: two independent predicates
VERIFIED.
helios/src/scheduler/policy.rs:139-174dominates_padding_with: for speculative candidates adds a GPU-ragged path (needed = long().sum().min(larger.packed_token_capacity), requires smaller.batch < larger.batch, equal capacity & draft_tokens, both packed nonzero).helios/src/scheduler/policy.rs:221-254prune_paddingsecond pass: re-implements a DIFFERENT predicate inline -other.batch >= lanes && other.batch < candidate.batch && other.capacity == candidate.capacity && other.draft_tokens == candidate.draft_tokens && other.packed_token_capacity >= needed. Does NOT require other.packed_token_capacity equality/nonzero and does not requireother.mask/prefill_slotmatching (it iterates ALL candidates, not same-group peers).- In the second pass
lanes = candidate.mask.count_ones(), andother.batch >= lanes- but no check thatother.maskis the same cohort. So the second pass can prune on a candidate from a different mask/cohort. This is a genuine "two dominance predicates that must agree but are written independently" risk, as Value Proposition lens flagged. - Padding-dominance result is measured (max_b == C, +5.1% at C=4) but bundled.
Constants verified unpinned: speculation.rs:15 WIDE_COPY_PRIOR_RATE=0.88, :18 WIDE_COPY_MIN_MATCH_LEN=6, :20-21 COPY_STEP_PRIOR_WEIGHT=4.0 / COPY_DEPTH_SHRINK_WEIGHT=2.0 (private), sam.rs:22 DEFAULT_MIN_MATCH_LEN=6 (duplicate of the above with no cross-check), rounds.rs:766 min_copy_len = base_mtp_drafts + 3.