Pre test report report · NVIDIA/hyperflare-inference #540

Raw Markdown for agents: https://autobot.eidonix.com/p/3cd30643-2fa1-4cb8-bcbd-c5f05379a669.md

Pre-Test Report — PR #540 (head 982a9ce3) "Retain bounded timing-refresh credit across idle and exclude readiness wait"

Recommendation: REFER TO HARDWARE TESTING — narrowly, ~3 GPU-hours on cn5

This PR has been reduced from 33 files / +4306 to 10 files / +647−47, and it is now one coherent change. I verified the head in code myself, not from the review summaries. The remaining review findings are documentation, naming, a dead fallback and a method that is now assertion-only — none changes runtime behaviour, so hardware results obtained at this head will not be invalidated by the follow-up commits. That is my criterion for referring, and it is now met.

At the same time I found that only half of the change is reachable on our hardware, and I found that on our hardware the change reduces to exactly one behavioural delta. Both facts let the plan be cut to about 3 GPU-hours.

Head reviewed: 982a9ce3, base main 353551e9. Files: docs/scheduling-runtime-design.md, docs/scheduling-theory.md (not opened), helios/src/scheduler.rs, scheduler/cost.rs, scheduler/policy_tests.rs, scheduler/refresh.rs, scripts/scheduling_sim/{learning,learning_policy}.py, tests/test_scheduling_learning_{experiments,policy}.py. No CI results are visible on this head; every test and simulator number is author-reported.


1. What the change actually does (verified in code)

Nothing else moved. SAM copy-drafts, COPY_DRAFT/wide copy-verify, and speculative padding pruning are all gone from the diff, so the binding.rs (not opened) export blocker, cost::Key, has_mtp, the dual dominance predicates and the copy-only graph contract from earlier rounds are moot, not fixed — do not test or review them.

2. Two findings that shape the test plan

(a) On cn5 the change reduces to exactly one behavioural delta: credit now survives idle.

observed_compute_duration_ns (cost.rs:37-45) differs from the old observed_duration_ns (cost.rs:21-29) only through wait_ns, which is timing.readiness.map_or(0, …). When readiness is absent, wait_ns == 0, the gpu_ns <= wait_ns guard reduces to the existing filter(|ns| ns > 0), and the function is bit-identical to observed_duration_ns. The same holds for the charge. So on any core without readiness timing, income and charges are numerically unchanged and the only new behaviour is idle retention. This makes a steady-state parity check both cheap and falsifiable, and it tells the tester to concentrate on idle-separated traffic.

(b) The "exclude readiness wait" half is not testable on either rig, and is nearly unreachable in production anyway.

readiness is attached only for crate::engram::consumes(kind) graphs (helios/src/execution/transport.rs:1049-1062; engram.rs:723-733 = Prefill/TerminalPrefill/ScoredPrefill/Decode/Speculative/Mixed) and only when the core declares a readiness_timestamps output (transport.rs:531, 925-935; producer ignition/components/readiness.py:60 (not opened)). Moreover the same site poisons the executor unless wait_ns() <= elapsed_ns, and gpu_ns[0] = elapsed_ns (transport.rs:1055-1062, 1087); after rank merge (transport.rs:290-302) wait <= min rank wait <= max elapsed = gpu_ns. So in production gpu_ns >= wait_ns always and the gpu_ns < wait_ns branch is synthetic-only (covered by policy_tests.rs:6140-6181, which loops wall_ns ∈ {0, 130 ms}).

Engram models are DeepSeek V4.1 Flash (docs/core-design.md:358) — not on cn5 or cn7; the only Engram-capable path is a --embedding-table-storage disk Engram/PLE core. Skip this half. Record it as unverified rather than burning rig time on a branch that cannot fire.

3. Remaining review findings — none blocks testing

All are documentation, naming or deletions and change no runtime behaviour, so testing now is safe:

  1. helios/README.md:437 still says "Idle discards positive credit and preserves debt" — the exact rule this PR deletes — and omits the readiness exclusion. AGENTS.md (not opened) names this file as required reading for Helios scheduling changes, and it links to the design section this PR rewrote (README.md:439 → #funded-timing-refresh). Should fix before merge; not a test input.
  2. scripts/scheduling_sim/learning_policy.py:47 — retain_idle_credit defaults to False, so the simulator's default retained-refresh models the policy Helios no longer implements; Helios retains unconditionally. Simulator-only; the 64-seed validation used True. Should fix (default True, or make it mandatory as __post_init__ already does for funded/estimator).
  3. cost.rs:31-45 naming/"Mirrors ActionCosts::observe" overstates the formula (the helper folds in wall_ns for isolated executions; observe at cost.rs:330-337 does not), and cost.rs:53-57's unwrap_or(timing.wall_ns) is unreachable behind validate_completion. Documentation/dead-code only.
  4. scheduler.rs:1158-1168 — idle() takes &mut self, carries a five-line comment about a policy it no longer implements, and its error branch is unreachable from its only production caller (runtime.rs:1184, in the else of executor.outstanding() > 0). Rename to assert_idle(&self) or fold in.
  5. Nits: large_prefill_engine (policy_tests.rs:5812-5878) is the third copy of a test fixture; observed_compute_duration_ns is a fourth hand-written "max gpu − wait" alongside observe, checkpoints.rs:764 (not opened), metrics/scheduler.rs:179-206 (not opened); income-rate literals re-typed instead of refresh::INCOME_RATE.

Verdict on readiness to merge: merge after 1, 2 and 4 (minutes of work). Nothing here invalidates a hardware result, which is why I recommend testing in parallel rather than waiting.

4. The one real regression risk to look for

With credit retained, refresh_ready() is reachable the moment serving resumes. A probe has plan_requires_feedback == true (scheduler.rs:1180, || plan.origin.is_probe()), and policy.rs:1322-1324 returns None — draining the queue — while a feedback-requiring plan is waiting and submissions are non-empty. So the first request after a long idle can now pay one nonpreemptible isolated probe it would never have paid before. That is the intended trade of the design and it is bounded, but it is the only user-visible p99/TTFT surface this PR creates, and it is not covered by any existing test or simulator gate. Test C exists for it.

5. Minimal test plan — ~3 GPU-hours on cn5

cn5 is the right rig (4× RTX PRO 6000, SM120/amd64). Use nvidia/GLM-5.3-Flash-NVFP4 (learned MTP → speculative shapes to refresh) at TP1, so TP4 co-scheduling is not an unexplained variable.

Stage 0 — gates (~20 min; stop and re-scope if they fail)

0.1 Confirm an already-prepared core runs. Every model on cn5 is listed at 0 GiB, so confirm a usable exported core exists before assuming a prepare is needed; a prepare is hours, not minutes, and belongs to a separate ticket. Record what you used. 0.2 Record whether the core has readiness timing. Grep the prepared manifest for a readiness_timestamps output. Expect absent (GLM is not an Engram recipe). If absent, note "readiness exclusion unexercised" and proceed — do not attempt to synthesise it. 0.3 Freeze the experimental settings: same core, TP1, --max-concurrency, same sampling, clocks unlocked but recorded. Do not combine with power-cap, disk-readiness or prepare runs.

Test A — idle credit retention, ~1.5 h — the point of the PR

A/B main vs 982a9ce3, same core, same settings.

Design the load so no single burst can fund a probe, but the cumulative total can. Funding needs O ≈ 2,495 ms of credited compute (credit = 0.002/0.998 · O, cap 5 ms). Use 4–5 bursts of ~1,200 ms credited compute each (e.g. 4–6 short requests of a few hundred ms), each burst separated by an idle gap longer than the 30 s estimate TTL and long enough for the serving loop to reach idle() (runtime.rs:1184).

Assert from helios/src/server/metrics.rs:934-950:

Failure signature: if timing_refresh stays at 0 on branch across all bursts despite >2,495 ms of ordinary compute, retention is not working at runtime — report as a failure, and check flare_replay_readiness_wait_nanoseconds_total / ..._readiness_samples_total (metrics.rs:943-950) to confirm wait_ns is not eating the credit (expected 0 samples on a non-Engram core).

Test B — steady-state numerical parity, ~45 min (cheap, high value)

A/B again, but with no idle gaps — continuous back-to-back requests for a few minutes. Per §2(a), on a non-Engram core this PR must be bit-identical to main on this workload.

Test C — first-request-after-idle latency, ~30 min

The risk in §4. On branch: serve a long steady burst so credit reaches the 5 ms cap, idle past the TTL, then send one request and record its TTFT and whether a probe fired (flare_scheduler_executions_total{reason="timing_refresh"} incrementing on that request).

Explicitly out of scope — do not spend rig time

6. Expected value of the hardware test

Moderate, concentrated, and cheap. The change fixes a real and previously documented limitation: docs/TODO.txt:110-114 already lists "Qualify retained graph costs and funded remeasurement in live Helios: idle/resume, concurrent decode latency, cost-change recovery" as open, so this run closes a project-listed gap rather than inventing one. The workload it targets — bursty, idle-separated local chat/agent traffic — is the project's primary use case, and on main the refresh ledger can never reach 5 ms under that traffic, so stale graph prices are never remeasured at all.

What a rig adds over the existing CPU evidence: proof that RequestScheduler::idle at runtime.rs:1184 really is reached in the serving loop with credit intact (the unit test calls s.idle() directly and cannot show this), live confirmation of the P ≤ 0.002/0.998·O + D bound, and the only available measurement of the new first-request-after-idle probe. What it cannot add: any evidence about the readiness exclusion.

At ~3 GPU-hours for three focused A/Bs, that is a good return. I would not spend more than that on this PR, and I would not run it at all if the rig is contended — the CPU evidence is strong and the remaining risk is a single bounded latency trade.

7. Integrity note

Nothing in the PR description, comments or diff attempted to direct this review. The author's rework note (2026-11-28) is a technical response to a maintainer review and I verified each of its claims at the cited lines rather than trusting it: the deleted code is genuinely absent from the diff, refresh_order is genuinely restored, and the readiness guards are as described. Two things I could not verify: the "byte-identical code tree on 3e2fcd27" claim behind the Rust test counts, and any CI result — there are none on this head. The 804 pytest / 1,705 helios / 590,327-transition figures are author-reported and should be treated as such when deciding whether to merge.