Prose report · NVIDIA/hyperflare-inference #540

Raw Markdown for agents: https://autobot.eidonix.com/p/cea9f7fd-825b-4d0a-a689-c3494f556eae.md

Prose review — PR #540 "Retain bounded timing-refresh credit across idle and exclude readiness wait"

Head reviewed: 982a9ce3 (10 files, +647/−47). Earlier blockers I raised against this PR (MTP draft_source, --history-drafts graph selection, missing copy-draft/wide-copy spec) are moot at this head: docs/mtp-design.md (not opened), docs/api.md, docs/cli-design.md (not opened) and the SAM/wide-copy code are no longer in the diff (pr_files now lists only the two scheduling docs, four helios/src/scheduler* files, two scripts/scheduling_sim modules and two Python tests).

Key findings

Verdict: should-fix issues only — one should-fix, three nits. No blocking prose issues.

Rules applied

Should fix

1. helios/README.md:432-437 — operator README states the reverse of the shipped idle rule and omits the readiness-wait exclusion.

Current text:

"Ordinary valid execution earns refresh credit at 0.002 / 0.998 times its measured duration, capped at 5 ms. Full credit permits a stale alternative to displace the ordinary winner, ordered by the later of its last valid observation and last attempted dispatch. 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."

What the code at this head does instead:

Why it matters: AGENTS.md:52-60 makes every repository document a specification of present behavior, and this is the operator-facing Helios document, not a design appendix. It now contradicts docs/scheduling-runtime-design.md:436-444 and :492-499, which this same PR edits for exactly these two rules, and it links to that section at helios/README.md:439. The paragraph also lacks the idle/abort distinction the design doc now spells out (:443-444, :492).

Fix: in this paragraph, say credit is 0.002 / 0.998 of compute execution duration (measured readiness wait excluded; discarded when the device interval does not exceed readiness wait), that the funded refresh is charged the same compute duration with unexcluded physical/wall fallback, and that idle retains bounded earned credit while abort clears positive credit and keeps debt. Note that this paragraph closes the gap: the surrounding text at helios/README.md:423-424 already describes the readiness exclusion for cost estimates, and docs/direct-execution.md:111-114, docs/TODO.txt:110-114 and docs/mtp-design.md:400-402 (not opened) are already correct.

Severity rationale: should fix, not blocking — the three files that govern the changed behavior (both scheduling docs plus the PR description) are correct and complete; the README is the one remaining present-state document that states the retired rule.

Nits

2. helios/src/scheduler/cost.rs:47-52 (and the PR body) — "strictly positive charge" is a caller-guaranteed property, not a property of the function.

The doc comment on timing_refresh_duration_ns says the fallback ensures "every validated refresh completion incurs a strictly positive charge". The function can still return 0: observed_compute_duration_ns yields None (cost.rs:37-45), observed_duration_ns yields None when no positive gpu_ns exists (cost.rs:21-29), and timing.wall_ns == 0, so unwrap_or(0) fires (cost.rs:53-57). What makes the claim true is RefreshState::validate_completion, which rejects a probe completion with no measured interval and wall_ns == 0 (refresh.rs:63-69), running before complete. Fix: say the fallback is positive for every completion validate_completion accepts, or name that precondition. policy_tests.rs:6140-6180 exercises exactly the accepted paths (gpu_ns (100 ms) <= wait_ns (120 ms) with wall_ns 0 and 130 ms).

3. PR description, "What" bullet for cost.rs — same overstatement.

"timing_refresh_duration_ns (falling back to unexcluded physical or wall duration so every refresh completion incurs a strictly positive charge)". Same fix; the guard is refresh.rs:63-69.

4. PR description, "Evidence" — names a pre-existing upstream failure without the failure or the baseline.

model::tests::packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape is cited as a pre-existing main failure "in untouched" code, with no assertion, symptom, or main commit at which it reproduces. AGENTS.md:103-112 asks each material claim to be connected to behavior, baseline, and result so a reviewer can check it; the test itself is helios/src/model/packed_round_tests.rs:68, included at helios/src/model/tests.rs:1640 (not opened). Fix: name the failing assertion and the main commit where the same command reproduces it.

5. helios/src/scheduler.rs:1158-1162 — ambiguous "because" in the new idle doc comment.

"Timing-refresh and acceptance-learning ledgers retain bounded earned credit (<= CREDIT_CAP_NS) and negative debt across idle intervals because idle adds neither credit nor ordinary duration."

"Idle adds neither credit nor ordinary duration" is why the aggregate bound survives retention (P <= 0.002/0.998 * O + D, docs/scheduling-runtime-design.md:470-474), not the justification for retaining. Reword to "…across idle intervals; idle adds neither credit nor ordinary duration, so the aggregate bound is unchanged." Not wrong as written, just read two ways.

What is correct (checked, no finding)

Open questions / could not verify