Pre test report scratchpad · NVIDIA/hyperflare-inference #582

Raw Markdown for agents: https://autobot.eidonix.com/p/f501cffb-f1c7-4af6-9430-0478ead095b4.md

#1 [high] PR #582 core facts: scope, size, verdict

PR #582 "helios: avoid splitting prefill on zero-budget checkpoint anchors", author FujitsuPolycom, head a3c6483, base main, +931/−16 in 7 files. Files: helios/src/scheduler/checkpoints.rs (+746/−4), helios/src/scheduler/checkpoint_lifecycle_tests.rs (+136), helios/src/scheduler.rs (+11/−3), verification/helios-lifecycle/check.py (+19), docs/cli-design.md (+6/−3), docs/core-design.md (+8/−4), docs/scheduling-runtime-design.md (+5/−2). Reviewer voipmonitor: CHANGES_REQUESTED on 2026-11-28 (2 blockers, 3 majors, minors). Live 4×SM120 evidence reported by reviewer (not author): prefill_steps 2→1 short 242-tok chat; 3→2 on ~12.2k-tok; spurious checkpoint_skips{reason=work_budget} at fraction 0.0. Author's own description: "Live signed-core serving and isolated GPU latency measurements remain unverified for this candidate." No maintainer engagement, no CI checks on head, branch behind main. Lens verdicts: Architecture BLOCKING, Simplicity BLOCKING (4), Correctness should-fix (2), Conventions should-fix only, Prose should-fix only, Subtractive "make it smaller first" (~410/931 lines removable), Value: worth pursuing but not mergeable as-is. Source: PR #582 body + review; pr_files.

#2 [high] Verified code defects in PR #582 (5 substantive)

  1. Stale known_whole (checkpoints.rs:364-388, 471-473, 498-500): anchor_split_is_zero_cost compares freshly priced before/after against a cached accounting.initial_prefill_ns EWMA value. Upward EWMA drift makes before+after-whole != 0 => flips anchor to prompt end => SECOND Anchor capture after the first was already published. Reproducer from reviewer: prompt 1024, boundary [512], catalog [512]=512_000ns, fraction 0.0.
  2. Dual interval origins for one decision (checkpoints.rs:467-511): branch A prices (start=consumed_tokens .. prompt); branch B else if (line 489) prices (baseline_start .. prompt) OR trusts latch. Once prefill passes raw_anchor, branch A is not taken; branch B re-prices a longer interval => can flip verdict => duplicate Anchor. Reviewer reproducer B: catalog [128,512], mixed (2,1,256), prompt 1024, raw_anchor 768.
  3. Latch destroyed: clear_reservations() (checkpoints.rs:48-52) sets anchor_fallback_from = None; called from scheduler.rs:1726 on the carried-over accounting at admission (readmission after preemption, runtime.rs park/restore paths). Only page/space reservations should be cleared; the decision field is not a reservation.
  4. is_request_anchor_endpoint (checkpoints.rs:390-420) is a THIRD pricing of the same question, from hardcoded start=0 (line 415), no memoisation. Called from scheduler.rs:1794 (inbound admit) and checkpoints.rs:763 (promote_request_anchor) which scheduler.rs:2411 runs per lane on EVERY commit. It bypasses checkpoint_selection_cached / SelectionCache. Also checks raw_anchor before snapshots==0 at 395.
  5. O(N) waste at fraction 0: anchor falls back to prompt_tokens, so candidates (529-539) collects all message boundaries; each is priced (542-605) with available == 0 (line 528), so every one sets budget=true (line 603) => stats.checkpoint_skip_work_budget increments (782-783 -> metrics.rs:501 flare_checkpoint_skips_total{reason="work_budget"}). Reviewer observed this live at fraction 0.0. Metric becomes permanently misleading.
  6. Unpriced anchor cut: Cut pushed at 512-519 with split_ns 0, copy_ns 0, bypassing allowance(); architecture lens says the zero-fraction regime is a magic == 0.0 branch (467-468) instead of a natural limit of the general policy.
  7. plan_checkpoints (671-685) re-derives the anchor a 4th way: scan cuts for Anchor role, else latch test. All verified against head a3c6483 by reading source.

#4 [high] Hardware + observability facts for conditional test plan

HARDWARE: cn5 (4× RTX PRO 6000 Blackwell Max-Q, SM120, amd64; 48 CPUs/125GiB; models incl. nvidia/GLM-5.3-Flash-NVFP4, local-inference-lab/GLM-5.3-Flash-NVFP4). cn7 = 1× GB10 arm64, models incl. nvidia/Qwen3.8-27B-NVFP4, nvidia/GLM-5.3-Flash-FP4-Local. NOTE: message_boundaries come from the native frontend rendered prompt (helios/src/server/request.rs:300, from rendered.message_boundaries; chat-template/routed). A plain-text prompt likely has empty message_boundaries => raw_anchor == prompt_tokens == new code path INERT. Any live test MUST use multi-turn chat-template requests. OBSERVABLE METRICS (verified helios/src/server/metrics.rs):

#5 [high] Recommendation basis: no hardware test now; gating probe for later

Basis for "do not test yet": defects that must be fixed before any GPU time is spent:

  1. Duplicate RetentionRole::Anchor capture (stale known_whole vs freshly priced before/after) — will be removed by the restructure, so any measured anchor/eviction behaviour today is throwaway.
  2. Duplicate Anchor on Mixed alignment (dual interval origins).
  3. Latch destroyed by clear_reservations (preemption/readmission).
  4. Third pricing path is_request_anchor_endpoint (start=0) on the per-lane commit hot path, unmemoised — a CPU-side regression risk that a GPU test could easily mis-attribute to the model.
  5. O(N) boundary pricing + spurious flare_checkpoint_skips_total{reason="work_budget"} at fraction 0.0 — the metric a tester would use as evidence is itself wrong today. Also: author's own tests pass dur_ns=1000/1_000_000 against 512_000 ns-class costs via complete_test_step, so the EWMA clamps and the drift bug is invisible to their suite — meaning "tests green" carries no weight for the riskiest property. Attribution warning for future testing: on hardware, a duplicate-anchor or extra-launch observation could come from either the anchor bug or the CI-less base; require a main baseline on the same box. Resource efficiency: gate any run on a 15-min probe at the DEFAULT fraction 0.05 to prove checkpoint anchors fire at all on that model/core (needs Snapshot graph + captured prefill). If flare_checkpoint_captures_total{role="anchor"} stays 0, the anchor path is inert and the whole A/B is void. Arch not relevant: pure scheduler policy, no CUDA/kernel/arch code => cn5 only; cn7 (GB10 arm64) adds nothing. Reviewer already produced the benefit evidence on equivalent 4× SM120 hardware (prefill_steps 2→1, 3→2).

#7 [high] Hardware test plan facts for PR #582 (verified at head 69bf2cf2)

VERDICT BASIS: Final review = Ready To Merge at 69bf2cf2; voipmonitor APPROVED. Decision to Test = yes (78%). So plan is validation+measurement, not bug hunting.

GATING (verified): change only active when limits.snapshots == 0 (checkpoints.rs:388,482,957) or policy.checkpoint_extra_work_fraction == 0.0 (:510-511, :549-551). Default 0.05 -> inert. Test MUST pass --scheduler-checkpoint-extra-work-fraction 0 (flag flare-cli/src/cli.rs:638-639; also [server] scheduler_checkpoint_extra_work_fraction). NOTE: snapshots is NOT the --prefix-cache-memory tier. It is rows - execution from GPU cache sizing (helios/src/runtime_core/memory.rs:1026-1044, 1113, 1144; rows = execution + cached rows from row virtual extent). --prefix-cache-memory 0 disables the host offload tier (selene/src/offload.rs:105-114), not snapshot rows. So confirm capacity with flare_snapshot_capacity metric; do not assume 0.

METRICS (helios/src/server/metrics.rs, served on GET /metrics):

SCRIPTS ARE UNSUITABLE for the A/B: scripts/benchmark_scheduler.py:102 builds a single role:user message and scripts/benchmark_prefill.py:35 sends raw token strings to /v1/completions -> no interior message boundaries (helios/src/server/request.rs:300 clones rendered.message_boundaries; TML prompt.boundary() per message in helios/src/frontend/tml.rs; jinja {% mark %}). The tester needs a small multi-turn chat client. count_tokens endpoint used for exact sizing: /v1/messages/count_tokens (benchmark_scheduler.py:104). Chunk size: recipe default 4096 in every declared recipe (docs/cli-design.md:1508); --prefill-chunk-size is command-line only (:467). Multi-chunk needs prompt > chunk.

HARDWARE: cn5 4x RTX PRO 6000 Blackwell Max-Q (SM120 => gb202 revision) amd64, 48 CPU/125GiB/16GiB scratch. Only LLM present = nvidia/GLM-5.3-Flash-NVFP4 (+ local-inference-lab/GLM-5.3-Flash-NVFP4); GLM-5.3-Flash TP4 is a qualified config (docs/roce-ring.md:8, docs/multi-host.md:565). Author's evidence used DeepSeek-V4.1-Flash TP4 (NOT on cn5) -> numbers not directly comparable; must re-baseline. cn7 = 1x GB10 arm64, no TP>1, no CUDA/arch code in PR -> out of scope. CPU-only pre-gates (required by review Should Fix #1, free): cargo test scheduler:: + python3 verification/helios-lifecycle/check.py --mutations after rebase onto main f7256584 (head based on ba3afb13, predates 1a5d4d8c ObservedState/ObservedSafe).

#3 [medium] Evidence rules, simulator non-coverage, doc contradictions