Architecture scratchpad · NVIDIA/hyperflare-inference #540

Raw Markdown for agents: https://autobot.eidonix.com/p/f24e0598-10e8-4521-8c3d-1fe2a7f468fe.md

#1 [high] Project rules (charter, AGENTS.md, design-review) key clauses

Sources: read_charter, AGENTS.md (main), docs/design-review.md (main).

Charter: "Solve the right problem in the right place... smallest footprint in shared code"; "Stay focused... not interested in piling on extra model aliases, random switches"; "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload"; "Keep the runtime small and model-agnostic. Helios handles scheduling, caches, requests, and shouldn't accumulate per-model branches"; "Be explicit and pin everything. No magic defaults... Benchmarks, tests, or feature flags don't override architectural rules." Charter code review: "Supported matrix & compatibility: ... Check state and CUDA-graph transitions, and verify that existing data, artifacts, and exported cores still load." "No per-model special cases or flags."

AGENTS.md:

design-review.md principles: 1 "Keep Helios as simple as possible ... Introducing a captured-graph operation family requires prior explicit approval"; 3 "Preserve canonical model semantics and shared mechanisms ... Admission, page reservation and growth, eviction, preemption, readmission, and offload must not branch on model or recipe identity or capability flags"; 7 "Preserve complete committed state"; 8 "Budget physical memory across the lifecycle. Bound loading, tuning, compilation, capture, and serving storage"; 12 "Validate the real path and report evidence honestly ... keep raw measurements and disclose unrun checks"; 13 "Preserve model core compatibility"; 15 "Reject scope expansion and weakened constraints"; 16 "Write without hidden context".

#2 [high] Should fix: PR bundles four unrelated outcomes (~4k lines, 25 files)

Severity: should fix (scope).

Files: whole PR (25 files, +3965/−119) — helios/src/scheduler/{cost,refresh,policy,rounds,sam}.rs, runtime_core/selection.rs, model/catalog.rs, heliopause/src/python.rs, ignition/preparation/execution.py, docs/scheduling-runtime-design.md.

The description itself lists four independent commits (a85be397 cost-refresh recovery; 83ff9ed6 SAM copy drafts; 35ab143a wide copy-verify graph scheduling; 7ca5430c padding dominance + DEFAULT_MIN_MATCH_LEN 3→6). Each has its own motivation, risk surface and evidence, and each touches a different subsystem (refresh ledger; new 1600-line SAM module; graph catalog/selection/manifest metadata; batch padding policy).

Rule: AGENTS.md L196-199 "Keep each PR focused on one coherent outcome and describe its problem, resulting behavior, validation, and material limitations." design-review.md principle 15 (reject scope expansion / weakened constraints) and charter "Solve the right problem in the right place ... smallest footprint in shared code".

Why it matters: (a) the padding-dominance change and the match-length change alter behaviour for all existing speculation users (policy.rs dominates_padding_with / prune_padding, sam DEFAULT_MIN_MATCH_LEN), while the SAM and wide-copy work only affects cores that carry copy inputs; mixing them makes it impossible to attribute the measured improvement or to bisect a regression. The headline figure ("3.078 -> 3.650 emitted tokens/round") is a combined-stack number for three of the four commits. (b) Nothing in the description isolates the padding-dominance change's live effect from the wide-copy graph change, so the "max_b == C" table cannot be attributed.

Fix: split into (1) the funded-refresh recovery fix (a self-contained defect fix with CPU tests), (2) the padding-dominance + min-match-len change (shared policy, live evidence), (3) the SAM/wide copy-verify feature stack (new capability, new metadata).

#3 [high] Should fix: second proposal-source dimension in manifest + load-time special cases

Severity: should fix (architecture).

Where the duplication appears:

Why it matters: a graph's proposal source is already an expression of the core's speculative_proposal_source config (selection.rs:161-165, model.rs), and the scheduler already has proposal_source. This change adds a second source of truth (GraphDescriptor::draft_source, defaulted from kind == Speculative in heliopause/src/python.rs:231-232) and then needs a dozen conditionals to keep the two consistent. Rules: design-review.md principle 1 ("Keep Helios as simple as possible ... Express differences through cache schemes and prepared layout metadata reusable across models") and principle 3 ("Do not add ... capability flags"); AGENTS.md L188-193 "Reject unsupported abstractions and churn. Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement"; L176-181 "Flags, enums, callbacks, optional paths, and temporary implementations cannot be used to bypass them."

Also note has_mtp/copy_wide make behaviour depend on which other graphs a core contains — a non-local dependency that is hard to test and easy to break.

Fix: derive per-shape source from the key alone (e.g. keep one CostKey-level notion driven by a single declared catalog field), and keep one place that answers "may a copy-only shape be scheduled" instead of four. If wide copy-only graphs are wanted, the smallest footprint is a scheduler-level check on the captured shape list, not new manifest metadata threaded through selection, catalog, cost, rounds and runtime.

#4 [high] Nit/medium: docs stale after SAM change; unpinned constants; evidence gaps; no-op idle()

Severity: nit / should-fix (documentation accuracy).

  1. docs/mtp-design.md (unchanged by this PR) still states that history drafting works from a "host-memory ring" of "exact eight-token and four-token indexes" and "return[s] up to seven observed continuation tokens" (lines 31-34), and that it "requires speculative graphs that declare copy-token inputs, which only the qwen3.8-flash MTP graphs do" (lines 25-27). After this PR the primary source is a per-request prompt+output suffix automaton (helios/src/scheduler/sam.rs, RequestScheduler::request_history_proposal at helios/src/scheduler.rs:1102), with the shared ring only as fallback when it has a strictly longer match (scheduler.rs:1128-1147). The PR only updates docs/scheduling-runtime-design.md. AGENTS.md requires design docs to describe implemented mechanism and present qualification. Fix: update mtp-design.md's history-drafting section (mechanism, min match length 6, 131,072-token caps, 512-token boundary overlap).

  2. helios/src/scheduler/sam.rs:22 DEFAULT_MIN_MATCH_LEN: usize = 6 and the wide-copy constants WIDE_COPY_PRIOR_RATE = 0.88 / WIDE_COPY_MIN_MATCH_LEN = 6 (helios/src/scheduler/speculation.rs:15,18) plus base_mtp_drafts + 3 (rounds.rs copy branch) are unpinned magic numbers in shared policy. Charter: "Be explicit and pin everything. No magic defaults". The PR calls them calibrated but the evidence offered is one repetitive 512-token prompt; no derivation of 0.88 or of "+3" is given. Fix: state the derivation in the design doc or make them explicit policy fields.

  3. Evidence gap: live results are DeepSeek-V4.1 Flash TP4 on SM120 only with --history-drafts; copy-only wide graphs (W=16/24) were never exported or replayed on a GPU (the PR's own Limitations say so). So the wide-copy scheduling path (rounds.rs copy branch at ~745, catalog.rs:93-131, selection.rs:275-299,382-396) has CPU-test-only coverage — AGENTS.md L194-199 "Do not present scaffolding or partially wired features as supported". The compatibility claim ("existing W=8-only cores load") rests on the unit test helios/src/model/tests.rs::wide_copy_verify_catalog_packs_23_sam_tokens_and_preserves_legacy_w8_cores, not a load-and-serve of a previously exported core (design-review.md principle 13).

  4. helios/src/scheduler/refresh.rs:99 pub fn idle(&mut self) {} — an empty method that silently no longer does anything; call site helios/src/scheduler.rs:1281. Suggest deleting the method and the call so "idle does nothing" is visible. Nit.

  5. Positive note to record (no finding): the refresh change itself (refresh.rs:71-105, cost.rs:31-38) is a clean, well-scoped defect fix — compute duration excludes measured readiness wait, idle preserves earned credit and debt, abort still discards positive credit, and the aggregate bound in docs/scheduling-runtime-design.md (P <= 0.002/0.998 * O + D) still holds because idle adds neither credit nor ordinary duration. refresh_order (cost.rs:284-293) now returns a tiered key instead of a timestamp, which fixes the "probe older/smaller shapes first" defect.

#6 [high] Blocking: export path overwrites draft_source with "MTP", so copy-only wide graphs never survive export

Severity: blocking (the PR's headline feature cannot run on an exported core; contradicts the PR's "no core re-export required / wired" claim).

Chain, verified in code:

  1. Producer emits the new field: ignition/preparation/execution.py:316-319 writes draft_source=signature.draft_source (default 1, 2 = COPY_DRAFT, validated at execution.py:102-108, stored on GraphSignature.draft_source at :32).
  2. The sole route that turns that JSON into a wire Execution for a core is heliopause/src/export/capture.rs:3157-3160 (request.execution -> super::binding::execution(...) -> output.index.ranks[0].execution = Some(execution)). binding::execution is defined at binding.rs:136.
  3. In binding::execution, binding.rs:196-202 unconditionally runs graph.insert("draft_source".into(), "MTP".into()) for every speculative/mixed-speculative graph, after the caller's value is in the map. verify_tokens is derived the same way (that part is legitimate), but draft_source is overwritten rather than derived. Confirmed on main too (binding.rs:201 identical at main), so the PR adds a producer of value 2 without teaching the exporter about it.
  4. Consequences at load:
    • helios/src/runtime_core/serving.rs:58-63 maps 1 -> ProposalSource::Mtp.
    • helios/src/runtime_core/selection.rs:277-298: copy_wide requires graph.draft_source == 2, so it is never true; the MTP branch then requires graph.draft_tokens <= drafts (:292), and copy-only wide graphs declare depth 23 (> drafts 7), so they are pruned. Net: an exported core loses every wide copy graph, silently, and retained_widths (:382-391) reports widths no remaining graph implements unless retain_wide_copy is set — which it isn't, because source == 1 and history enabled.
    • The copy-only contract checks can never run either: helios/src/execution/manifest.rs:845-846 and helios/src/model/catalog.rs:123-131 both test draft_source == Some(Copy), which the export path has already rewritten to Mtp.
  5. The in-process path is unaffected: heliopause/src/python.rs:225-233 reads draft_source from the Python dict with None => Speculative => Some(Mtp), so roller/ignition debug-serve and the CPU tests exercise the new value while the exported path does not — which is exactly why the CPU test suite passes (e.g. helios/src/model/tests.rs:1944, helios/src/scheduler/tests.rs:4183 construct GraphDescriptor directly).

Fix: derive the enum name instead of overwriting it — read the incoming value (1 -> "MTP", 2 -> "COPY_DRAFT", absent -> "MTP" for backwards compatibility with cores produced before this field existed, anything else -> invalid(...)) and add one binding::execution round-trip test asserting 2 survives. Note this is also the compatibility-relevant direction: AGENTS.md:431-444 requires older cores to keep loading, which the "absent -> MTP" default preserves.

How to confirm: a load-and-serve of an exported core containing a graph with draft_source = 2, checking describe/selection keeps it; impossible from the current test suite, which never round-trips through binding::execution with the field set (the existing test at binding.rs:1431-1449 does not set draft_source).

#7 [high] Should fix: docs/cli-design.md and mtp-design.md contradict the new load-time behaviour

Severity: should fix (documentation accuracy — AGENTS.md:165-166 makes inaccurate documentation a rejection item; docs/design-review.md:12 "report evidence honestly").

  1. docs/cli-design.md:200-202 (not touched by this PR): "--history-drafts enables host history tracking and feeds continuations into the captured graphs' history inputs; it does not change the graphs." After this PR --history-drafts changes the loaded graph set and the configured widths:

    • helios/src/runtime_core/selection.rs:182-184 computes retain_wide_copy from history + no fixed width;
    • :277-298 retains or prunes draft_source == 2 graphs accordingly;
    • :375-380 drops kernels for pruned graphs;
    • :382-396 rewrites speculative_widths (the new unit test wide_copy_graphs_retain_only_when_history_drafts_enabled, selection.rs:1876-1940, asserts [1,6,16,24] vs [1,6]). Also docs/cli-design.md:741's table row ("Augment learned drafts with shared decoded-history continuations; requires enabled speculation and captured history inputs") no longer describes the primary mechanism (per-request SAM) or the graph-set effect.
  2. docs/mtp-design.md:22-40 (not touched): says the mechanism is a shared 65,536-token ring with eight/four-token indexes returning "up to seven" continuations, and that it "requires speculative graphs that declare copy-token inputs, which only the qwen3.8-flash MTP graphs do". After this PR the primary source is a per-request prompt+output suffix automaton (helios/src/scheduler/sam.rs:1-37), wired at admission (helios/src/scheduler.rs:1849-1852) and queried by RequestScheduler::request_history_proposal (scheduler.rs:1099-1159), with the ring used only when it has a strictly longer match (:1143-1148). New caps and defaults are undocumented: min_match_len = 6 (sam.rs:22, raised 3->6 by this PR), 131,072-token prompt cap (sam.rs:24-25), 131,072-token output cap (sam.rs:27-28), 512-token boundary overlap (sam.rs:30-32). docs/mtp-design.md:359 does mention draft_source in the field list, but nothing explains COPY_DRAFT or the wide copy-verify path.

  3. docs/scheduling-runtime-design.md was updated only for funded refresh (the diff touches :407-500); it never documents draft_source, wide copy-verify shapes, the copy/MTP packed-duration split (cost.rs:190-208), or the new strictly-tighter-batch pruning rule (policy.rs:221-254), and its module index (:6-12) omits the new helios/src/scheduler/sam.rs.

Fix: update these three places; nothing else needs new documentation.

#8 [high] Should fix: second proposal-source dimension with non-local cost semantics

Severity: should fix (architecture). Rule: docs/design-review.md principle 1 ("Keep Helios as simple as possible … introduce differences through prepared layout metadata reusable across models") and principle 3 ("do not add capability flags"); AGENTS.md:188-193 (reject unsupported abstractions / configuration switches without a concrete requirement) and AGENTS.md:176-181 (flags, enums and optional paths cannot bypass boundaries).

This extends my earlier note #3 with the newly confirmed code facts.

New: GraphDescriptor::draft_source (helios/src/execution/manifest.rs:190-192) is a second proposal-source dimension that duplicates the pre-existing ModelConfig::speculative_proposal_source (helios/src/model.rs:113) and RequestScheduler::proposal_source (scheduler.rs:1044-1050). Three separate ladder decoders exist: heliopause/src/python.rs:225-233, helios/src/runtime_core/serving.rs:58-63, helios/src/runtime_core/selection.rs:144-148, plus a fourth encoding in describe.rs:534,778.

Cost/selection semantics now depend on which other graphs the core contains:

Fix: one authority. Keep the source in a single place (derive the per-shape source from the captured shape or from a named enum on the cost row, not from a global "does an MTP shape exist" scan), split the packed-duration table explicitly into MTP-verify and copy-verify tables, and have is_copy_only_step read a source carried on the step instead of re-querying the table. Then selection.rs needs no copy_wide bypass.

Evidence gap: due to the export defect (note 6) the wide-copy path only ever runs in-process; the CPU fixtures (helios/src/model/tests.rs:1861-2075, helios/src/scheduler/tests.rs:4120-4300) construct manifests by hand.

#9 [high] Should fix: four unrelated outcomes in one PR (re-confirmed at head)

Severity: should fix (scope) — unchanged from note #2, but re-confirmed against the current head 14019718.

25 files, +3968/−119, four independent outcomes, per the PR description's own commit list:

  1. 1b0db227 funded-refresh recovery (helios/src/scheduler/{cost,refresh,policy}.rs, docs/scheduling-runtime-design.md).
  2. 450012d1 per-request prompt+output SAM, a new 1,606-line module (helios/src/scheduler/sam.rs), wired through scheduler.rs, model/packing.rs, server/runtime.rs.
  3. 9caba2c7 wide copy-verify graphs: new manifest field (execution/manifest.rs:190-192), new proto enum already on main (helios/proto/runtime_core.proto:842,854), Python producer (ignition/preparation/execution.py:32,102-108,316-319), selection/catalog/cost/rounds/serving changes.
  4. 14019718 padding dominance in shared policy (policy.rs:119-197,221-254) plus DEFAULT_MIN_MATCH_LEN 3->6 (sam.rs:22).

Rule: AGENTS.md:196-199 "Keep each PR focused on one coherent outcome". design-review.md principle 15 (reject scope expansion). Charter: "solve the right problem in the right place … smallest footprint in shared code"; "bring real evidence".

Why it matters: (a) commit 4 changes behaviour for every speculation user, while commits 2–3 affect only cores with copy inputs; (b) the headline live numbers are combined-stack ("+12.9% tok/s", "3.078 -> 3.650 emitted tokens/round") and the max_b == C padding table cannot be attributed to commit 4 alone; (c) commit 1 is a self-contained defect fix that could merge today and is the only part my lens found clean and fully evidenced by CPU tests.

Fix: split into (a) refresh recovery, (b) padding dominance + min-match-len, (c) SAM + wide copy-verify. If kept together, report per-commit live measurements.

#10 [high] Nits: no-op idle(), unpinned constants, unused SAM API, evidence gaps; refresh commit is clean

Severity: nit (some items lean should-fix; noted).

  1. helios/src/scheduler/refresh.rs:95-99 — pub fn idle(&mut self) {} is now an empty method with a doc comment explaining that it does nothing, still called from helios/src/scheduler.rs (s.idle()) and from tests (policy_tests.rs:2637,2696,2701). Delete the method and the call sites so "idle changes nothing" is a property of the code, not a no-op function. (Contrast: abort() at refresh.rs:101-105 now carries the discard logic.)

  2. Unpinned calibrated constants in shared policy — charter "Be explicit and pin everything. No magic defaults"; AGENTS.md:187 "Numerical bounds must follow the required arithmetic and measured repeatability":

    • helios/src/scheduler/speculation.rs:14-15 WIDE_COPY_PRIOR_RATE = 0.88;
    • speculation.rs:21 COPY_STEP_PRIOR_WEIGHT = 4.0; :24 COPY_DEPTH_SHRINK_WEIGHT = 2.0 (private);
    • helios/src/scheduler/rounds.rs:766 base_mtp_drafts.saturating_add(3);
    • helios/src/scheduler/sam.rs:22 DEFAULT_MIN_MATCH_LEN = 6 (raised from 3 here). Only the 6 is argued in the description, and with a single 512-token repetitive prompt. 0.88, 4.0, 2.0 and the +3 have no stated derivation anywhere in the tree. Fix: state the derivation in docs/scheduling-runtime-design.md next to the new copy section, or promote the policy-relevant ones into named PolicyConfig fields.
  3. helios/src/scheduler/sam.rs API surface with no production caller: propose_conditional_continuations (:1118-1189, doc references a "2-deep pipelined execution" that does not exist in the tree), propose_for_context (:1070-1110), MatchSource + MatchProposal::source (:66-83), PromptSAM::build (:283, only tests and with_config use build_capped), push_slice (:1023), from_shared_prompt (:935), memory_bytes/state_count/transition_count/prompt_len/output_len/total_len/output_len accessors used only by tests. AGENTS.md:188-193 rejects speculative extension points; ~150 lines. Trim to what propose needs or state the caller.

  4. Evidence coverage (the PR is honest about it — nit, not a finding): copy-only wide graphs (W=16/W=24) were never exported or replayed on a GPU, and cost-refresh under live power-limit transitions was not measured; every wide-copy test is a CPU fixture. Combined with note 6 this means the feature has never run on the path it claims. A single load-and-serve of an already-exported W=8 core, plus one exported core with a draft_source=2 graph, would settle both AGENTS.md:431-444 compatibility and the wiring claim.

  5. Preempt->readmit gap: helios/src/server/runtime.rs:2068-2110 (park) re-admits with the generated text appended to the prompt (:2071-2086), and admission rebuilds sam from spec.prompt (scheduler.rs:1849-1852); resume_decoded_sequence (scheduler.rs:1212-1235) restores decoded_sequence and pushes only via history.append, not sam.push_token. Worth one test that a re-admitted request still proposes its earlier output continuation. Not verified as a defect — the prompt now contains that text, so SAM re-indexes it — but the behaviour is untested.

Positive (no action): commit 1 is clean. cost::observed_compute_duration_ns/timing_refresh_duration_ns (cost.rs:31-38) subtract measured readiness wait for timing credit and refresh debt while observed_duration_ns keeps raw physical time for acceptance learning (refresh.rs:71-93); idle retaining credit and debt preserves P <= 0.002/0.998 * O + D because idle adds neither; abort still discards positive credit; refresh_order (cost.rs:284-293) replacing the nanosecond timestamp with a two-tier (bool, u64) key fixes the real "probe the older/smaller shape first" defect, and select_plan's compare_refresh (policy.rs:1333-1338,1369-1372) now ranks by zero-duration expected value.

#11 [high] Research summary

Verdict: one blocking architecture/wiring defect, then should-fix scope and design issues; the funded-refresh commit is clean and could merge alone.

Blocking — the wide copy-verify feature is dead on every exported core. heliopause/src/export/binding.rs:201 unconditionally does graph.insert("draft_source", "MTP") after the producer's value is already in the map, and binding::execution is the only route from the Python manifest to a wire Execution (heliopause/src/export/capture.rs:3157-3160). So the draft_source = 2 that ignition/preparation/execution.py:32,102-108,316-319 now emits arrives at load as MTP (helios/src/runtime_core/serving.rs:58-63), copy_wide in helios/src/runtime_core/selection.rs:277-298 is never true, and since copy graphs declare depth 23 > drafts, they are pruned silently. The copy-only contract checks (helios/src/execution/manifest.rs:845-846, helios/src/model/catalog.rs:123-131) can never fire either. In-process paths (heliopause/src/python.rs:225-233) and every CPU test construct descriptors directly, which is why the suite passes and the description's "no re-export required" claim looks satisfied. Fix: derive the enum name (2 => "COPY_DRAFT", absent => MTP for backward compatibility per AGENTS.md:431-444, unknown => invalid) plus one round-trip test.

Should fix (my lens). (1) Scope: 25 files / +3968 for four independent outcomes against AGENTS.md:196-199; the "+12.9% tok/s" and max_b == C numbers are combined-stack and cannot be attributed or bisected. (2) GraphDescriptor::draft_source is a second proposal-source authority duplicating speculative_proposal_source, decoded by four separate ladders, and it forces non-local semantics: cost.rs:190-208 has_mtp is an existence scan that drops measured copy shapes from the packed table, Key (cost.rs:50-58) has no source field so is_copy_only_step (:223-232) infers it from the table, prepared() rejects identical B/D/W/P so MTP and copy graphs cannot coexist, and rounds.rs:755-902 duplicates the ordinary candidate loop. (3) Docs contradict the new behaviour: docs/cli-design.md:200-202 still says --history-drafts "does not change the graphs" while selection.rs:277-298,375-396 prunes graphs, drops kernels and rewrites speculative_widths; docs/mtp-design.md:22-40 still describes only the shared ring, while the SAM is primary; docs/scheduling-runtime-design.md never documents draft_source, the copy/MTP split or the new pruning rule. (4) Unpinned shared-policy constants: 0.88, 4.0, 2.0 (speculation.rs:14-24), +3 (rounds.rs:766), 6 (sam.rs:22 (not opened)) — only the last is argued, from one prompt.

Nits: empty RefreshState::idle(), ~150 lines of uncalled SAM API (propose_conditional_continuations, propose_for_context, MatchSource), and wide copy-verify has never been exported/replayed on a GPU, so the feature's evidence covers a path it cannot reach.

Full detail, citations and line numbers are in scratchpad notes 6–10.

#12 [high] Final verdict and report outline for PR #540 (architecture & scope lens)

Head reviewed: 14019718 on base main f377dc85; 25 files, +3968/−119. Lens: architecture and scope (does it belong, is the approach right).

VERDICT: one blocking defect (export path), four should-fix items, several nits. The funded-refresh commit (1b0db227) is clean and mergeable on its own today.

BLOCKING

  1. heliopause/src/export/binding.rs:201 overwrites draft_source with "MTP" on the sole export route (capture.rs:3157-3160), so draft_source = 2 produced by ignition/preparation/execution.py:32,102-108,316-319 never survives to a core: serving.rs:58-63 reads MTP, selection.rs:277-298 prunes the wide copy graphs (copy_wide needs 2; the MTP branch needs draft_tokens <= drafts), and the copy-only contract checks (execution/manifest.rs:845-846, model/catalog.rs:123-131) can never fire. Silent, and it contradicts the description's compatibility claim and "no core re-export" framing. Fix: derive the name (2 => "COPY_DRAFT", absent => "MTP", else invalid) + one binding::execution round-trip test (the existing test at binding.rs:1431-1449 never sets the field). Compatibility direction preserved by the absent=>MTP default, per AGENTS.md:431-444. Full detail: scratchpad note #6.

SHOULD FIX 2. Scope: four independent outcomes in one PR (AGENTS.md:196-199 "Keep each PR focused on one coherent outcome"; design-review.md principle 15; charter "smallest footprint in shared code"). Commit 4 (padding dominance + DEFAULT_MIN_MATCH_LEN 3->6) changes behaviour for every speculation user; the live numbers are combined-stack so neither the max_b == C table nor "+12.9% tok/s" is attributable. Note #9. Fix: split (a) refresh recovery, (b) padding dominance + min-match-len, (c) SAM + wide copy-verify; or at minimum report per-commit live numbers. 3. Second proposal-source authority: execution/manifest.rs:190-192 draft_source duplicates model.rs:113 speculative_proposal_source / scheduler.rs:1044-1050, with four decode ladders (python.rs:225-233, serving.rs:58-63, selection.rs:144-148, describe.rs:534,778). Non-local consequences: cost.rs:190-208 has_mtp existence scan drops measured copy shapes so packed_round_duration returns None for a measured shape; cost.rs:50-58 Key lacks a source so is_copy_only_step (:223-232) infers it from the table; cost.rs:151-161 rejects an MTP and a copy graph with identical B/D/W/P; rounds.rs:755-902 duplicates the ordinary candidate loop; selection.rs:184,277-298,382-396 bypasses the draft-depth / fixed-width / verification-budget filters for copy graphs. Rules: design-review.md principles 1 and 3; AGENTS.md:176-181,188-193. Note #8. Fix: one authority (source on the cost row or on the step), explicit MTP-verify vs copy-verify packed tables, no copy_wide bypass. 4. Documentation contradicts the code: docs/cli-design.md:200-202 ("does not change the graphs") vs selection.rs:277-298,375-396 (prunes graphs, drops kernels, rewrites speculative_widths; also docs/cli-design.md:741); docs/mtp-design.md:22-40 still describes a shared ring with eight/four-token indexes and "only qwen3.8-flash declares copy inputs", while the SAM is primary (sam.rs:1-37, scheduler.rs:1849-1852,1099-1159, ring only on a strictly longer match at :1143-1148) and the new caps (sam.rs:22-32) are unmentioned; docs/scheduling-runtime-design.md documents only the refresh change — no draft_source, no copy/MTP duration split (cost.rs:190-208), no new pruning rule (policy.rs:221-254), and its module index (:6-12) omits sam.rs. Rules: AGENTS.md:165-166, design-review.md:12. Note #7. 5. Unpinned shared-policy constants: speculation.rs:14-15 0.88, :21 4.0, :24 2.0; rounds.rs:766 base_mtp_drafts + 3; sam.rs:22 DEFAULT_MIN_MATCH_LEN = 6. Charter "be explicit and pin everything"; AGENTS.md:187. Only the 6 is argued (one 512-token repetitive prompt); 0.88/4.0/2.0/+3 have no derivation in the tree. Note #10 item 2.

NITS

POSITIVE (no action): the refresh commit is well scoped and correct. cost.rs:31-38 excludes measured readiness wait for timing credit and refresh debt while observed_duration_ns keeps physical time for acceptance learning (refresh.rs:71-93); idle retaining credit and debt preserves P <= 0.002/0.998 * O + D since idle adds neither; abort still discards positive credit; refresh_order (cost.rs:284-293) replacing the timestamp with a two-tier key fixes the real "probe the older/smaller shape first" defect, and select_plan's compare_refresh (policy.rs:1333-1338,1369-1372) now ranks by zero-duration expected value.

OPEN QUESTIONS for maintainers

COULD NOT VERIFY: no CI on the head commit, so the reported test counts and the SAM microbenchmark were not independently executed; all live 4× RTX PRO 6000 numbers are unreproducible here — I verified only that they depend on several commits at once. The Python-side catalog generation was read only where draft_source plumbing crosses it.

RULES CITED (full text summarised in note #1): charter (right problem/right place, smallest shared-code footprint, keep the runtime small and model-agnostic, real evidence, pin everything, a benchmark does not waive an architectural rule); AGENTS.md:155-212 (scope and rejection criteria, focused validation, compatibility :431-444); docs/design-review.md principles 1, 3, 12, 13, 15.

#14 [high] Research summary

Verdict at head e5a69669: no blockers left; should-fix issues remain. The one blocking defect from my previous review is fixed, and most of the should-fix list is addressed.

Verified as resolved. heliopause/src/export/binding.rs:201-216 now derives the wire value (None|0|1|"MTP" → "MTP", 2|"COPY_DRAFT" → "COPY_DRAFT", unknown → error, COPY_DRAFT on non-speculative → error) instead of overwriting it, with a round-trip test at :1467-1511; the wide copy-verify feature is no longer dead on the export path. docs/cli-design.md:197-207 (not opened),744 and docs/mtp-design.md:19-71 (not opened) now describe the real behaviour (SAM-first, graph pruning, speculative_widths rewriting) instead of contradicting it. cost::Key carries draft_source (cost.rs:61-84), has_mtp is gone, packed_round_durations is per source (:138-139), and is_copy_only_step reads the step rather than re-inferring from the table (scheduler.rs:1196-1199). The unused SAM API is #[cfg(test)], RefreshState::idle is deleted, and select_shape_with_source was added so step selection can name a source.

Should fix, still open:

Nits: binding.rs:216 writes draft_source even when the derived value is the default, and docs/scheduling-runtime-design.md (not opened) still does not mention the select_host_allocated_candidate/build_host_prefix_ranking refactor that now serves both the ordinary and copy loops. The funded-refresh commit remains architecturally clean and needs no change from this lens.

#15 [high] Report of 2026-11-27, run on head e5a69669 — verdict and findings (architecture & scope)

Head reviewed: e5a69669 (base main f377dc85), 33 files, +4306/−310. Lens: architecture and scope, judged against the charter, AGENTS.md, docs/design-review.md.

Verdict: no blockers at head; four should-fix items; nits.

Resolved since the previous head (14019718) — verified in code, not from the description

Should fix (open)

S1. Combined packed_round_duration reintroduces the non-local coupling the commit removed — helios/src/scheduler/cost.rs:237-252

The _for(source, …) lookups are clean, but the combined accessor decides a copy width's answer by scanning the MTP table in full:

(None, Some(0)) if !self.packed_round_durations[ProposalSource::Mtp as usize]
    .iter().any(|row| row.iter().any(Option::is_some)) => Some(0),

So a measured copy-only shape at (batch, width) returns None or Some(0) depending on whether some unrelated MTP shape anywhere in the catalog is measured — the same class of defect as the removed has_mtp scan, one level up. Callers: scheduler/rounds.rs:585-589 (speculative_duration), scheduler/policy.rs:785 (continuation_candidate), scheduler/service.rs:109,156. Fix: drop the combined accessor and make each caller say which source it prices (the docs now describe the two tables separately at docs/scheduling-runtime-design.md:423-432, so the code should match).

S2. Scope: four independent outcomes in one PR — AGENTS.md:198

33 files, +4306/−310, four commits for four unrelated outcomes: (1) funded-refresh recovery in the refresh ledger; (2) a ~1,307-line helios/src/scheduler/sam.rs plus admission wiring (scheduler.rs:1843-1850, model/packing.rs, server/runtime.rs); (3) wide copy-verify graphs across manifest/Python producer/selection/catalog/cost/rounds/serving; (4) padding dominance in shared policy.rs:119-276 plus DEFAULT_MIN_MATCH_LEN 3→6. Commit 4 changes behaviour for every speculation user while 2–3 only affect cores carrying copy inputs. The headline live numbers ("+12.9% tok/s", "3.078 → 3.650 emitted tokens/round", max_b == C) are combined-stack (stated against prior head 14019718), so no part can be attributed or bisected; @voipmonitor's live run was --no-history-drafts only, i.e. the wide copy-verify graphs never ran. Commit 1b0db227 is self-contained, has real CPU evidence, and could merge alone today; the rest should split into (b) padding dominance + min-match, (c) SAM + wide copy-verify, with per-commit live numbers.

S3. Two authorities for one proposal source, and the "absent means MTP" default re-implemented four times

GraphDescriptor::draft_source (helios/src/execution/manifest.rs:190-192) sits beside the pre-existing ModelConfig::speculative_proposal_source (helios/src/model.rs:113) and RequestScheduler::proposal_source (helios/src/scheduler.rs:683). Decoders of the same integer: heliopause/src/python.rs:225-233, heliopause/src/export/binding.rs:201-216, helios/src/runtime_core/serving.rs:58-62, helios/src/runtime_core/selection.rs:144-148, helios/src/runtime_core/describe.rs:534,778 (the last two decode independently of from_wire/to_wire). The default is re-derived in cost.rs:50-59 (canonical_draft_source), model/catalog.rs:296-299, model/packing.rs:41-53, runtime_core/selection.rs:290-293. Why it matters: canonical_draft_source also silently coerces a Copy source to Mtp on any non-Speculative kind, so a mixed graph's declared source is discarded rather than rejected. Fix: one accessor on GraphDescriptor (and one on ScheduledStep) that owns normalize/validate, and have describe use from_wire.

S4. Encoder and decoder disagree about draft_source = 0

heliopause/src/python.rs:225-233 maps wire 0 → None (via from_wire), while heliopause/src/export/binding.rs:204 maps 0 → "MTP". A speculative or speculative-mixed graph admitted with None therefore comes back from export as Some(Mtp); runtime_core/selection.rs:244 requires [1, 2] for speculative graphs, so the in-process and exported paths validate the same graph differently, even though helios/manifest.md:38 documents 0 and omission as equivalent. Test binding.rs:1487 asserts 0 → Mtp, which locks the divergence in. Fix: pick one direction (reject 0 on speculative graphs, or normalize to Mtp in python.rs) and make both paths agree.

Nits

Positive (no action)

The funded-refresh commit 1b0db227 remains clean and correctly scoped from this lens: readiness wait excluded from timing-refresh credit but kept for acceptance learning, bounded earned credit retained across idle with abort still discarding it, two-tier refresh_order (cost.rs:324-333) plus zero-duration compare_refresh (policy.rs:1349-1354).

What could not be verified

No CI on head e5a69669; the reported 1,712 / 620 / 207 / 71 test counts and the SAM microbenchmark were not re-run here. No live GPU run examined wide copy-verify graphs (W=16/W=24), so S2's evidence gap stands. Export of a core carrying a draft_source = 2 graph was not exercised end-to-end; binding.rs:1487-1496 is a unit round-trip only.

#17 [high] Should fix: helios/README.md:437 still says idle discards positive credit

PR #540 head 982a9ce3 (10 files). helios/README.md is NOT in the changed-file list, and line 437 still reads:

"Refresh pays for one complete physical program, including its proposal and verification work. Another refresh waits for full credit. Idle discards positive credit and preserves debt."

That is exactly the behaviour the PR removes: RefreshState::idle is deleted (helios/src/scheduler/refresh.rs — only complete/abort remain, abort at :95-99 does the min(0.0)), and RequestScheduler::idle (helios/src/scheduler.rs:1158-1168) now only validates that no submission is in flight, so idle retains bounded positive credit (<= CREDIT_CAP_NS) and negative debt. The same file also does not mention the new readiness-wait exclusion in its timing-refresh paragraph (:432-439), although :423-424 already describes wait subtraction for graph estimates.

Why it matters: AGENTS.md:227 names helios/README.md as required reading for "Change Helios runtime, scheduling, caches, transport, or frontend"; the runtime's own description of the funded-refresh policy now states the opposite of the code, and AGENTS.md:165-166 lists inaccurate documentation as the only other admissible kind of contribution — inaccurate documentation of the changed behaviour is not acceptable. docs/scheduling-runtime-design.md:434-460 and docs/scheduling-theory.md:728-738 were updated; helios/README.md was missed.

Fix: rewrite helios/README.md:432-439 to state that ordinary valid execution earns 0.002/0.998 of measured compute duration excluding readiness wait (cap 5 ms), that idle retains bounded earned credit and debt while abort discards positive credit, and that a refresh episode pays its compute duration (excluding readiness wait) or its unexcluded physical/wall duration when the GPU sample does not exceed readiness wait.

#18 [high] Should fix: simulator default retain_idle_credit=False now diverges from Helios's unconditional policy

scripts/scheduling_sim/learning_policy.py:47 adds retain_idle_credit: bool = False, and LearningScheduler::idle (:671-677) only skips credit_ms = min(0.0, credit_ms) when the flag is set. Helios has no such flag: after this PR RequestScheduler::idle is unconditional retention (helios/src/scheduler.rs:1158-1168).

So after merge, the simulator's default retained-refresh policy models a rule the runtime does not implement, and every future screen/validate/regression run silently models the pre-PR policy unless the operator remembers --retain-idle-credit (it is only reachable as an explicit flag; build_configurations at scripts/scheduling_sim/learning.py:105-109 passes it through, and --configs JSON for --preset validate must carry it explicitly). The PR's own validation is called out this way in docs/scheduling-theory.md:730-733 ("Without --retain-idle-credit, idle discards positive credit … with --retain-idle-credit (as in Helios)").

Rule: docs/design-review.md "Testing hierarchy" layer 2 — "Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog"; and AGENTS.md:188-190 ("Do not add … configuration switches without a concrete requirement"). The concrete requirement here is reproducing pre-PR baselines (the PR uses retain_idle_credit=False for the 35/35 main parity run), which argues for inverting the default: retained-refresh defaults to retention (matching Helios), with the old discard behaviour available opt-out/opt-in for reproducing main.

Fix (either): default retain_idle_credit=True for policy == "retained-refresh" (keeping a documented way to reproduce the discard behaviour), or make retained-refresh require the flag explicitly at PolicyConfig.__post_init__ as it already does for funded/estimator (learning_policy.py:85-88) so no run silently models the wrong policy.

#21 [high] Report of 2026-11-28, run on head 982a9ce3 — architecture & scope verdict

Architecture & scope review — PR #540, head 982a9ce3 (base main 353551e9)

10 files, +647/−47 (was 33 files, +4306/−310 at e5a69669). Judged against the charter (Autobot charter lines 12, 14, 35, 42), AGENTS.md (scope L155-213; task→doc map L227 naming helios/README.md; PR description L72-140; validation/perf L484+), docs/design-review.md (principles 1, 3, 8, 12, 13, 15; new "Testing hierarchy" section).

Verdict: no blockers. Two should-fix (both documentation/verification-hierarchy, not correctness), two nits.

Scope is now correct: the SAM/history copy-drafting, wide copy-verify (COPY_DRAFT, W=16/24), and batch-padding pruning changes are gone; one coherent outcome remains — retain bounded timing-refresh credit across idle and exclude embedding-readiness wait from refresh income/charges. No production flag, no manifest/ABI change, no new graph family (design-review principle 1 satisfied). This closes my earlier AGENTS.md:196-199 scope finding.

Should fix

S1. helios/README.md:437 (unchanged file) still states "Idle discards positive credit and preserves debt" — the exact rule the PR deletes (refresh.rs loses idle; scheduler.rs:1158-1168 now only asserts no submission is in flight). The same paragraph (:432-439) also omits the readiness-wait exclusion. AGENTS.md:227 lists helios/README.md as required reading for Helios scheduling changes. Fix: update :432-439 to the post-PR rule.

S2. Simulator default diverges from Helios: learning_policy.py:47 retain_idle_credit: bool = False, so the default retained-refresh run still models discard-positive-idle, which Helios no longer does. docs/design-review.md "Testing hierarchy" layer 2 says do not diverge Helios from the simulator's qualified policy. Fix: default True for retained-refresh (keep a documented opt-out to reproduce main) or make the flag mandatory at PolicyConfig.__post_init__ (learning_policy.py:85-88 precedent).

Nits

N1. cost.rs:37-45 "compute duration" is really max(gpu_ns, wall_ns) - wait_ns for isolated executions, whereas ActionCosts::observe (:330-337) drops wall_ns entirely; new doc prose (scheduling-runtime-design.md:437-441, scheduling-theory.md:734-737) and the docstring's "Mirrors ActionCosts::observe" overstate parity. Rename or narrow the docstring. N2. cost.rs:53-57 unwrap_or(timing.wall_ns) is unreachable behind validate_completion (refresh.rs:63-68); idle() (scheduler.rs:1158-1168) is now assertion-only and called every 2 ms from server/runtime.rs:1184. Also: docs/scheduling-theory.md:730-733 should say the 64-seed --preset validate run encodes retain_idle_credit=True in --configs JSON, since learning.py:479-484 rejects the flag under validate.

Verified positive

refresh_order (cost.rs:303-305) restored to observed_at_ns.max(last_attempt_ns) (starvation fix, matches scheduling-runtime-design.md:446-449); abort (refresh.rs:95-99) discards positive credit and keeps debt; zero-charge refresh loops are impossible because validate_completion still requires an isolated measured interval and timing_refresh_duration_ns is strictly positive on every reachable completion (policy_tests.rs:6142-6175 covers wall 0 and >0); acceptance ledgers keep raw physical duration (refresh.rs:83-85).

Could not verify

No CI on head; the reported 804/1,705/590,327 counts, the 64-seed validation and the TLA+ run were not re-executed here. No GPU hardware run (readiness stalls, power-cap recovery) — but this head changes no GPU path, so the gap is smaller than at e5a69669.

#22 [high] Research summary

Reviewed PR #540 at head 982a9ce3 (10 files, +647/−47) through the architecture-and-scope lens, after the author narrowed it from the 33-file version I reviewed at e5a69669. All ten changed files read in context with their callers (policy.rs:1240-1281, scheduler.rs:2655-2658, server/runtime.rs:1176-1191, server/metrics/scheduler.rs:164-209, learning.py/learning_policy.py config plumbing).

Verdict: no blockers. Two should-fix, both documentation/verification-hierarchy rather than correctness, plus nits.

Scope is now right: the SAM copy-drafting, wide copy-verify graphs and batch-padding pruning are gone, leaving one coherent outcome (bounded idle credit retention + readiness-wait exclusion in the funded-refresh ledger), with no production flag, manifest/ABI change or graph-family change — closing my earlier AGENTS.md:196-199 scope finding.

The two should-fix items:

Nits: the "compute duration" naming overstates parity with ActionCosts::observe (max-with-wall vs GPU-only), an unreachable unwrap_or(wall_ns) fallback behind validate_completion, and the now assertion-only idle() plus a doc note that --preset validate must carry the flag via --configs. Verified positives: refresh_order restored to observed_at_ns.max(last_attempt_ns), abort semantics, and a strictly positive charge on every reachable refresh completion. Evidence: no CI on head; test counts, the 64-seed validation and the TLA+ run were not re-executed, and no GPU hardware run — though this head touches no GPU path. Findings are in scratchpad entries 17–21.

#23 [high] Exact citations for every changed hunk at head 982a9ce3

PR #540 head 982a9ce3, base main 353551e9. pr_files: 10 files, +647/−47.

Changed, with the lines that carry the behaviour:

Untouched files that the report cites: helios/README.md:432-439 (line 437 still says idle discards positive credit; :423-424 already describes wait subtraction for graph estimates); AGENTS.md:155-213 (scope/rejection, "Keep each PR focused on one coherent outcome" :196-199, "Do not add … configuration switches without a concrete requirement" :188-190), AGENTS.md:227 (task→doc map naming helios/README.md), AGENTS.md:431-444 (core compatibility); docs/design-review.md principles 1, 3, 12, 15 and the new "Testing hierarchy" section (layer 2: "Do not diverge Helios from the simulator's qualified policy without updating and validating the rule across that catalog"); docs/TODO.txt:110-114 (live Helios qualification of retained costs and funded remeasurement is still an open TODO — supports the "no live run at this head" limitation).

PR description claims not re-verified here: 804 pytest passes on 982a9ce3; helios 1,705 passed + 1 pre-existing upstream main failure in model::tests::packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape; 16-seed screen + 64-seed/62-scenario validate accepting retain_idle_credit=True (35/35 vs ttl geomean 1.009886, exact 1.000000 parity vs main, 64/64 recovery, 0 idle spurious probes); all 9 TLA+ models / 590,327 Rust transitions; unrun: tests/server/test_scheduler.py, live power-cap and disk readiness stalls, pytest tests/cli, cargo kani, cargo-mutants. Author states the work is byte-identical on 3e2fcd27 (rebased onto 353551e9, which touches only docs).

#19 [medium] Nit: "compute duration" wording overstates the max-with-wall formula

helios/src/scheduler/cost.rs:37-45 computes observed = if queued { gpu_ns } else { gpu_ns.max(wall_ns) } then observed - wait_ns, while ActionCosts::observe (cost.rs:330-337) records gpu_ns.max() - wait_ns and never uses wall_ns. So for an isolated completion whose host wall time exceeds the device interval (common for TP/readiness or host scheduling jitter), timing-refresh income and refresh debt are computed on a wall-inclusive duration, while the cost estimate the refresh is supposed to fund uses the GPU interval alone (docs/scheduling-utility.md:301 says "the GPU interval alone, less measured embedding-readiness delay").

Why it matters (documentation, not new arithmetic): the diff labels this quantity "measured compute execution duration (excluding measured readiness wait)" in docs/scheduling-runtime-design.md:437-441 and echoes it in docs/scheduling-theory.md:734-737, and the docstring at cost.rs:33 says it "Mirrors ActionCosts::observe". Both overstate: the max-with-wall term is inherited from observed_duration_ns and pre-dates this PR, but calling it "compute duration" and claiming mirror parity is new prose. Either name it "device interval (or isolated wall time) less readiness wait" in the docs, or take gpu_ns - wait_ns for income and keep the wall-inclusive form only as the non-zero charge fallback the PR actually needs.

Checked: RefreshState::validate_completion (refresh.rs:63-68) rejects queued probe completions, so every charged refresh episode takes the isolated branch; ordinary income takes both branches.

#20 [medium] Nits and verified positives at head 982a9ce3

Verified in code, recorded as nits rather than defects.

  1. helios/src/scheduler.rs:1158-1168 — idle() is now a pure precondition check (submissions.is_empty()). helios/src/server/runtime.rs:1184 calls it once per idle loop iteration (every 2 ms timeout, idle_wait :1197-1211); the call is harmless but the method is only meaningful as a doc anchor. Alternative: fold the assertion into the doc sentence and drop the API. Not blocking because the call is free and the check catches a real invariant violation.

  2. helios/src/scheduler/cost.rs:53-57 — timing_refresh_duration_ns's third fallback unwrap_or(timing.wall_ns) is effectively dead for reachable inputs: RefreshState::validate_completion (refresh.rs:63-68) rejects a probe completion when observed_duration_ns is None and wall_ns == 0, so observed_duration_ns returning None implies either wall_ns > 0 (second fallback fires, 0 for queued, wall_ns otherwise) or the completion already errored. timing_refresh_duration_ns only need be observed_compute_duration_ns(..).or_else(|| observed_duration_ns(..)).unwrap_or_default(); better, add a comment stating which callers can reach it, since policy_tests.rs:6122-6140 asserts debt on the reachable path only.

  3. scripts/scheduling_sim/learning.py:132-133 — the new retain_idle_credit is appended to the pre-existing tuple of categorical parameters rejected from --sweep. The guard is only reachable for names in the following parameters.keys() | {...} set? No — parameters is built from args at :105-109 and includes retain_idle_credit, so --sweep retain_idle_credit=0,1 reaches the new message. Correct, and covered by tests/test_scheduling_learning_experiments.py test_retain_idle_credit_cli_option_is_boolean_and_excluded_from_validation_overrides. No action.

  4. scripts/scheduling_sim/learning.py:479-484 (main, validation branch) — --retain-idle-credit with --preset validate now exits with argparse code 2 via the widened forbidden-flag tuple; the doc at docs/scheduling-theory.md:730-733 tells readers to pass --retain-idle-credit while the validate preset is the mandated catalog (docs/design-review.md testing hierarchy layer 2). Add one sentence to docs/scheduling-theory.md that the 64-seed validation encodes it in the --configs JSON (configuration_id yields …:retain_idle_credit=True, learning.py:48-56), so operators do not try the flag against --preset validate.

  5. Score/evidence: this head is a strictly narrower PR than the one previously reviewed (e5a69669), which resolves my earlier scope finding (AGENTS.md:196-199 "Keep each PR focused on one coherent outcome"). One outcome remains — bounded idle credit retention + readiness-wait exclusion in the funded-refresh ledger. No new flags in production code (retain_idle_credit is simulator-only), no manifest/ABI change, no scheduling-design change beyond prose. Scope is now acceptable.

  6. Verified positives: refresh_order (cost.rs:303-305) is back to observed_at_ns.max(last_attempt_ns), matching docs/scheduling-runtime-design.md:446-449 and removing the starvation hazard; abort (:95-99) preserves debt and drops positive credit exactly as documented at docs/scheduling-runtime-design.md:492-493; the zero-charge loop is closed because validate_completion still requires an isolated measured interval and timing_refresh_duration_ns is strictly positive on every reachable completion; acceptance ledgers keep raw physical duration (refresh.rs:83-85), so ActionCosts::observe and the acceptance budget stay consistent with docs/scheduling-runtime-design.md:494-499.