PR #655: helios: probe unmeasured or stale snapshot cost once per TTL on terminal capture

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/4f5ebb08-e5a6-460f-8408-a0514f01996d

Opened by a workflow run, Dec 1, 2026 10:34 AM EST. decide malicious: all_clear (100%): No malicious content found

explore

Author: yatesdr (COLLABORATOR, owns the checkpoint-cost path; Discord "D-Rock") Motivation: Helios refuses to allocate a terminal Endpoint prefix checkpoint unless it has a recently measured Snapshot duration, but the only thing that can measure that duration is a Snapshot step, which only runs when a checkpoint was already allocated — so the estimate can expire or start unmeasured and never refresh, and host/disk prefix cache stops receiving checkpoints. The PR adds a bounded once-per-30 s-TTL "probe" that lets one terminal capture proceed on an unmeasured or stale cost. Scale: +253 / −9 lines in 3 files Proposal:

Full report · Notes

Value Proposition

Value Proposition — PR #655 (helios: probe unmeasured/stale snapshot cost once per TTL)

Charter alignment — yes. The change sits in the layer the charter reserves for the runtime (Helios scheduling/caches), not in recipes, and stays model-agnostic: smallest_batch_key uses the core's declared smallest Snapshot batch rather than hardcoding batch 1, and the only new conditions are the pre-existing scheduler_checkpoint_extra_work_fraction and core metadata — no per-model branch, no new default, flag, metric, or wire change. It serves the stated goal of storing prefix-cache checkpoints in host memory and sharing them via Selene, since skipped terminal checkpoints are precisely what never reaches the host/disk tier. The author (yatesdr, collaborator) owns this path (#459, prior checkpoints.rs commits), so this is a fix in the right place by the right owner. No non-goal is touched.

Novelty & status — genuinely additive. No default-branch commit since the branch point touches its three files; it extends rather than reverses #645/#568/#285. It is not superseded: open draft #301 would cure only the unmeasured warm-restart case and leaves #655's stale branch load-bearing (a textual rebase on Estimate is expected). Not obsolete.

Value vs maintenance cost. ~20 production lines in two shared scheduler files, a ceiling of one extra Snapshot copy per 30 s TTL, and byte-identical behaviour at fraction 0.0. Evidence is a well-formed live A/B on upstream main (3801ff1d vs 2d9454fe) across the three claimed scenarios, with new tests exercising real entry points and green CI — stronger than the analogous #285 precedent.

Gaps making it conditional, not clean:

Verdict: Worth it with changes — reframe the claim away from #534, run or explicitly waive the simulator/lifecycle verification, update the three stale docs, and document the zero-priced first probe and TTL-slot semantics.

Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.

Classify intake

Selected: triage:review, performance, area:caching, area:scheduling

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +triage:review, +performance, +area:caching, +area:scheduling

Subtraction and simplicity

Verdict: the diff is already lean. No new config knob, flag, metric or fallback layer; ~20 net production lines; last_probe_ns kept off last_attempt_ns is deliberate and correct (folding it in would move refresh_order and double-count funded refresh credit), and the fraction > 0.0 gate is required to keep zero-fraction behaviour identical. Four suggestions, none blocking:

  1. (Medium) helios/src/scheduler/checkpoints.rs:1032-1049 — checkpoint_skip_unknown_cost += 1; return Ok(None); is repeated three times (1036-1037, 1042-1043, 1047-1048). Collapse to one let ... else with a two-arm cost match: 18 lines → 11, one skip site.
  2. (Low) helios/src/scheduler/cost.rs:797-799 — the if estimate.fresh(...) { return None; } guard in probe_duration is unreachable from its only production caller (checkpoints.rs:1032-1033 already required not-fresh on the same key); only the unit test at cost.rs:1058 exercises it. Keep it with a doc-comment precondition, or drop both — not half.
  3. (Low-medium) helios/src/scheduler/cost.rs:1016-1030 and 1046-1055 re-type, byte for byte, the 15-line GraphDescriptor and 10-line ScheduledStep literals already in fresh_duration_uses_smallest_declared_batch_when_batch_one_is_absent (983-1008). ~40 duplicated test lines; fold the assertions into the existing test or hoist one fixture fn.
  4. (Medium, convention) The rule now lives in four documents; the PR updated one. docs/scheduling-runtime-design.md:622-626 is new, while docs/core-design.md:1452-1453 ("Unknown prefill costs or unknown or stale snapshot-copy costs exclude extras") and helios/README.md:378-379 ("Unknown costs exclude extras") now contradict it; docs/cli-design.md:699-704 is arguably still fine. AGENTS.md:52-60 requires documents to state designed behaviour, and #285 updated the copies together.

Open questions: should the terminal probe stay Snapshot-only when the prefill gates (checkpoints.rs:624-626, 965-967) keep the strict rule — one predicate would remove the asymmetry; and is the zero-priced first probe (checkpoint_copy_ns == 0 at checkpoints.rs:4161) worth documenting given checkpoint_extra_work_ns under-reports.

Full report · Notes

Correctness and contracts

Correctness/system-level review of PR #655 (2d9454f), verified in the three changed files and their callers.

Major

  1. First probe of an unmeasured entry is priced at Some(0) (cost.rs:803), so it can never fail the work-budget gate (checkpoints.rs:1050-1057) and charges 0 to flare_checkpoint_extra_work_nanoseconds_total for a real copy, contradicting its documented "sums charged predicted … copy work" (docs/api.md:355). The new test encodes the zero (checkpoints.rs:4161).
  2. The probe can be spent without measuring the key it priced: observations key on step.batch_capacity (cost.rs:865-872) while the probe prices the smallest declared batch (783-786); unmeasured candidates sort first (utility.rs:154-158) and Anchor captures bypass the gate (checkpoints.rs:962-963), so a coalesced batch>1 Snapshot step burns the TTL slot. Tests hardcode batch_capacity: 1 (checkpoints.rs:1113-1127).
  3. record_probe stamps at allocation (checkpoints.rs:1071-1074) and is never reverted on cancel/error (scheduler.rs:3116, 2684-2688), letting one aborted request suppress terminal captures for every request for 30 s.
  4. No simulator-catalog or lifecycle check.py (not opened)/TLA coverage for a changed admission decision, which docs/design-review.md:234-240 calls "a blocking design failure"; #568 extended this exact TLA model.

Minor — description's scenario 2 overclaims (prefill gates still strict at checkpoints.rs:624, 965; three docs left stale); zero-probes-per-TTL reachable under a tight allowance (checkpoints.rs:4214-4216); undocumented unknown_cost→work_budget metric migration.

Sound — no proto/CLI/metric-schema/config change; last_probe_ns kept out of refresh_order/last_attempt_ns; deferred_prefill precedes the probe; fraction 0.0 unchanged; smallest_batch_key is model-agnostic.

Open — whether #534 is upstream at all (rebutted twice as fork-specific; no cold-boot upstream repro); whether zero-pricing is intentional; simulator has no probe model; overlap with draft #301.

Full report · Notes

Final review

Recommendation: Changes Requested

PR #655 is a lean, well-scoped (~20 net production lines) fix for three genuine upstream serving scenarios where ActionCosts::fresh_duration(GraphKind::Snapshot, 1) self-locks terminal Endpoint checkpoint capture behind unknown_cost skips, backed by clean live SM120 A/B evidence and green CI. There are no merge-blocking defects, but three should-fix issues remain before landing: the Fixes #534 claim auto-closes an issue whose cold-boot premise was rebutted twice as fork-specific without addressing that thread, two supporting design docs now contradict the updated rule in docs/scheduling-runtime-design.md, and under concurrent Snapshot work (or client cancel before Snapshot execution) a burned probe slot can fail to refresh smallest_batch_key.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Do not auto-close #534 without addressing its fork-specific premise (PR description): Issue #534 reported a cold-boot captures == 0 deadlock that both mark-yong (2026-11-28) and flare-autobot (2026-11-30) traced to a third-party fork (AzallazA/hyperflare-inference, PrefillTailMerge). This PR fixes three genuinely reproducible upstream scenarios (>30 s decode, >30 s idle on a cached anchor, warm disk/pool restart) rather than #534's cold-boot deadlock. Change Fixes #534 to Related to #534 (or explicitly document the upstream vs. fork distinction on #534) so merging does not silently close the issue under a disputed premise.
  2. Update the contradicting checkpoint-rule docs (docs/core-design.md:1452-1453, helios/README.md:378-379): Both files still state the pre-change rule ("Unknown prefill costs or unknown or stale snapshot-copy costs exclude extras without excluding the selected anchor" and "Unknown costs exclude extras while preserving best-effort anchor retention"), directly contradicting the new terminal-capture probe now documented at docs/scheduling-runtime-design.md:620-626. Per AGENTS.md:52-60 (and merged precedents #285 and #568), add a one-clause update to both files so the specification stays consistent across documents.
  3. Handle probe-slot loss under concurrent batch > 1 Snapshot coalescing and pre-execution cancellation (helios/src/scheduler/checkpoints.rs:1071-1074, helios/src/scheduler/cost.rs:783-786, 865-890):
    • probe_duration / fresh_duration target only self.batches(GraphKind::Snapshot).first() (typically batch = 1), while ActionCosts::observe (cost.rs:865-890) updates only step.batch_capacity. On cores exporting multiple Snapshot batch sizes (ignition/components/capacity.py:66-68), if a probed terminal capture shares a select_plan tick with another RequestPhase::Snapshot request (e.g., an unconditional Anchor capture at checkpoints.rs:962-963, a ConditionedWindow capture at scheduler.rs:2864-2866, or a finish_early/preempt_newest capture at scheduler.rs:1447-1450), policy.rs:1147-1156, 1424-1426 selects the wider batch >= 2 cohort whenever both batches are unmeasured or both are stale. observe then records batch >= 2, leaving fresh_duration(GraphKind::Snapshot, 1) == None while last_probe_ns is already burned for 30 s.
    • Similarly, if a client cancels (scheduler.cancel, scheduler.rs:3022-3024, 3116) in the window between allocate_terminal_capture (at EOS) and Snapshot execution, the global TTL slot stays burned with no observation.
    • Important constraint on the fix: Do not simply move record_probe to completion—if multiple requests finish in the same complete_inner loop (scheduler.rs:2854-2903) or before the first Snapshot step finishes, leaving last_probe_ns unstamped at allocation would admit multiple concurrent probes at once (violating the 1-per-TTL bound and immediately forcing batch > 1 coalescing). Instead, keep allocation-time gating, clear/restore last_probe_ns if a probing request retires without its probed Snapshot key being observed (or allow fresh_duration / probe refresh to be satisfied or retried when a coalesced batch runs), and add an end-to-end plan -> commit -> complete test verifying that a probed terminal capture closes the loop through observe_execution.

Subtract / Simplify

  1. Collapse the triplicated unknown_cost skip in allocate_terminal_capture (helios/src/scheduler/checkpoints.rs:1032-1049): Three separate branches increment self.stats.checkpoint_skip_unknown_cost += 1 and return Ok(None). Computing fresh, probed, and cost once and matching (cost, accounting.initial_prefill_ns) collapses 18 lines to ~11 with a single skip/return site:
    let fresh = self.costs.fresh_duration(GraphKind::Snapshot, 1);
    let probed = fresh.is_none() && self.policy.checkpoint_extra_work_fraction > 0.0;
    let cost = match fresh {
        Some(cost) => Some(cost),
        None if probed => self.costs.probe_duration(GraphKind::Snapshot, 1),
        None => None,
    };
    let (Some(cost), Some(prefill)) = (cost, accounting.initial_prefill_ns) else {
        self.stats.checkpoint_skip_unknown_cost += 1;
        return Ok(None);
    };
    
  2. De-duplicate the verbatim test fixtures in helios/src/scheduler/cost.rs:1016-1055: probe_duration_uses_smallest_declared_batch_and_bounds_by_ttl repeats the exact 15-line GraphDescriptor and 10-line ScheduledStep literals from fresh_duration_uses_smallest_declared_batch_when_batch_one_is_absent directly above it (cost.rs:983-1008). Extracting a tiny shared helper (e.g., fn snapshot_b2_fixture() -> (ActionCosts, ScheduledStep)) removes ~30 lines of boilerplate.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: no (99%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with. decide malicious: all_clear (100%): No malicious content found

explore

Author: yatesdr (COLLABORATOR; owns the checkpoint-cost path; Discord "D-Rock") Motivation: Terminal GPU checkpoints are refused whenever the snapshot-copy cost has never been measured, so host/Selene prefix caching can stay dead for a whole boot; this revision keeps any measured cost (even expired) and allows exactly one cold, zero-priced discovery capture to get the first measurement. Scale: +348 / −63 lines in 7 files (was +253/−9 in 3) Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, area:caching, area:scheduling

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Subtraction and simplicity

Subtraction/Simplicity lens on PR #655 (head f7f4d253, 7 files, +348/−63): the diff is lean — fresh_duration is fully removed with no shim, no new config knob, CLI flag, or per-model branch, and discovery reuses the existing checkpoint_extra_work_fraction and limits.snapshots. Four things still deserve deletion or collapse.

  1. Delete the three explicit snapshot_discovery clears (9 lines): scheduler.rs:2690-2692, 2700-2702, 3066-3069 are unreachable-by-design because snapshot_discovery_in_flight already excludes Finishing handles and errors on retired ones (checkpoints.rs:1018-1023), and the claim overwrites unconditionally (checkpoints.rs:1069-1072). Keep the predicate OR the clears, not both.
  2. measured_duration (cost.rs:783-790) rebuilds the Key literal that exact_duration (cost.rs:761-771) already constructs; collapse to a two-line find_map over exact_duration. All 12 call sites pass (GraphKind::Snapshot, 1), so narrowing to snapshot_copy_ns() drops two constant-only parameters and names the concept once.
  3. The new test helper clear_snapshot_costs (checkpoints.rs:4164-4180) writes the Snapshot ScheduledStep literal for the fourth time; move it next to the existing #[cfg(test)] set_measured (cost.rs:563-584) as clear_measured(kind) and delete 17 lines.
  4. Doc self-contradiction: "at most one in-flight discovery capture" (scheduling-runtime-design.md:626-628, core-design.md:1455-1457) is followed three lines later by the unchanged "no concurrency-based snapshot share" (scheduling-runtime-design.md:630-631, core-design.md:1444-1445). One clause fixes both.

Open: whether a human maintainer will ever review (only one automated review, on superseded head 2d9454f); whether the discovery guard should be modelled in CheckpointReservation.tla or declared out of scope; whether docs/api.md:355-356 (not opened) should disclose the zero-priced copy.

Full report · Notes

Correctness and contracts

PR #655 at f7f4d253 is mechanically sound — the retained-cost rule and the single-cold-discovery slot check out, and no contention, leak, or handle-aliasing hazard survives inspection. The findings are contract and edge-case ones.

  1. Major (process): the new server-global guard (checkpoints.rs:1018-1043, scheduler.rs:661, 2690-2692, 2700-2702, 3067-3069) is lifecycle-covered code, but nothing in verification/helios-lifecycle/ models it; docs/design-review.md:232-240 calls that a "blocking design failure, regardless of whether CPU unit tests pass". The body's checklist note covers only the simulator.
  2. Minor (metric contract): the discovery copy is priced 0 (checkpoints.rs:1043) and that 0 is added to stats.checkpoint_extra_work_ns (:1093-1094) while checkpoint_endpoint_captures still counts it (scheduler.rs:2699); docs/api.md:355-356 still says the counter "sums charged predicted extra prefill and copy work", with no exception — the four design docs got the caveat, the operator doc did not.
  3. Minor (doc contradiction): "allows at most one in-flight discovery capture" (scheduling-runtime-design.md:625-628, core-design.md:1455-1457) sits beside the unchanged "There is no fixed capture count or concurrency-based snapshot share" (:630-631, core-design.md:1444-1445). The slot is a concurrency cap of one.
  4. Minor (latent panic): measured_duration (cost.rs:783-790) returns None both for unmeasured and for "no Snapshot batch declared", so an empty batch list plus a positive fraction admits a zero-priced capture that would reach .expect("requested lifecycle operation must be feasible") (policy.rs:1817-1825). Blocked today by model/catalog.rs:140-148 and checkpoints.rs:1030; fix by gating on !costs.batches(Snapshot).is_empty().
  5. Minor: the zero price also makes the work-budget test (checkpoints.rs:1048-1056) unable to refuse a discovery copy, an unstated exception to the request-local allowance rule at core-design.md:1447-1450.

Sound: single-threaded scheduler (no added locking), measured_duration inside the memoized selection cache, Finishing treated as free, slot claimed only after a row is obtained, finish_early bypassing the slot without leaking.

Open: no human maintainer review; #534's status as an upstream defect still unstated; live evidence is one GPU/model/TP1 with no logs, and no served-workload A/B against main (#210).

Full report · Notes

Re-review

Recommendation: Ready To Merge

Head f7f4d25 cleanly resolves all three items from the prior review (2d9454f) and replaces the 30 s probe timer with a simpler, strictly better design: ActionCosts::measured_duration brings Snapshot pricing into parity with Prefill cost retention (PR #285) while handling coalesced batch > 1 observations, and a single in-flight snapshot_discovery slot handles cold warm-restart discovery (nanos == 0) without risking storage-refusal or cancellation lockouts. No correctness, safety, concurrency, or regression blockers remain, and the new end-to-end plan -> commit -> complete test plus 4-scenario SM120 validation cover the claimed behavior.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Drop the three redundant explicit snapshot_discovery clears (helios/src/scheduler.rs:2690-2692, :2700-2702, :3067-3069). snapshot_discovery_in_flight (helios/src/scheduler/checkpoints.rs:1018-1023) already treats RequestPhase::Finishing and retired/stale handles (self.request(handle) checks slot occupancy and generation equality at helios/src/scheduler.rs:1233-1239) as free. Both complete_inner branches set request.phase = RequestPhase::Finishing immediately above the clear (:2689, :2698), and retire removes slot.request at :3124. Removing all three clears deletes 9 lines across scheduler.rs, keeps a single source of truth, and avoids mutating self.snapshot_discovery at :3068 before the fallible ? operations in retire.
  2. Reuse exact_duration in ActionCosts::measured_duration (helios/src/scheduler/cost.rs:783-790). The inline Key { drafts: 0, kind, batch, tokens, prefill: 0, packed: 0 } lookup duplicates exact_duration(kind, batch, tokens, 0, 0) (:761-771), which also handles GraphKind::Speculative keys if ever called with one:
    pub fn measured_duration(&self, kind: GraphKind, tokens: usize) -> Option<u64> {
        self.batches(kind)
            .iter()
            .find_map(|&batch| self.exact_duration(kind, batch, tokens, 0, 0).filter(|&nanos| nanos != 0))
    }
    
    (Optionally, since all call sites pass (GraphKind::Snapshot, 1), this could be narrowed further to a dedicated snapshot-copy helper.)

Nits

  1. docs/api.md:355-356: Optionally note that the single cold-discovery terminal copy is priced at zero in flare_checkpoint_extra_work_nanoseconds_total (and that concurrent terminal captures skipped while discovery is in flight increment unknown_cost), matching the disclosure added to the four design docs.
  2. docs/scheduling-runtime-design.md:625-631, docs/core-design.md:1444-1457, helios/README.md:381-383: Optionally qualify "There is no fixed capture count or concurrency-based snapshot share" / "no capture-count limit" with "in steady state" (or "beyond the single cold-discovery capture") so it does not visually sit beside "allows at most one in-flight discovery capture".

Dropped on verification

Full report Decision to Test: yes (50%): Testing will add considerable value with the code. It is ready to merge and the tests will validate and improve confidence on hardware we have available for testing.

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes

Pre Test Report

Hardware test plan — PR #655 (helios: retain measured snapshot cost after expiry and discover unmeasured cost once, head f7f4d25)

0. What to test, and what "speedup" means here

PR #655 is not a throughput optimization. It removes a self-lock in checkpoint admission:

The measurable claims are therefore counter movements and cache outcomes, plus a secondary latency claim (fewer refused checkpoints ⇒ more host/Selene prefix reuse ⇒ less re-prefill on follow-up turns). Treat "speedup" as TTFT / prefill-token reduction on a repeated prompt, not tokens/s.

Time-box: ~90 GPU-minutes total (cn5 primary ≈ 70, cn7 conditional ≈ 20), two builds, zero re-exports.


1. Environment (do first, in this order)

  1. Builds — two, side by side, same toolchain.
    • baseline = merge-base of the PR / origin/main at test start (git merge-base origin/main f7f4d25), i.e. pre-PR.
    • candidate = f7f4d253ee06a6580b7de2850a8febf58f1660af.
    • cargo build --locked --release --manifest-path flare-cli/Cargo.toml (not opened) for each; tag the binaries flare-baseline, flare-candidate.
    • No re-export needed. This is a Helios serving-only change; docs state an existing compatible core loads unchanged (docs/model-preparation.md:520-523; docs/cli-design.md:711 "This option requires no core re-export"). Never run ignition export for this PR.
  2. One core serves both arms. Use an already-prepared core from the model store (flare models list → flare models inspect <model> --graphs --json will show platform, TP deployments and the snapshot graph batch capacities; docs/cli-design.md:1573-1615).
  3. Run the cheap CPU layers while the arm64 build runs (they are part of the PR's evidence and cost no GPU): cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server scheduler:: and python3 verification/helios-lifecycle/check.py (not opened) (matches .github/workflows/helios-lifecycle.yml (not opened)).
  4. Prometheus scrape: curl -s localhost:PORT/metrics > metrics-<arm>-<scenario>-<before|after>.txt around every scenario. All counters below are flat text; no exporter needed.

2. Machine assignment (why not both everywhere)

Machine Role Core requirement
cn5 (4 × RTX PRO 6000 Blackwell Max-Q, 96 GiB, amd64) — GB202 ⇒ SM120 (helios/src/core/naming.rs:83-87) Primary arm. All six scenarios, both builds. A gb202/SM120 TP1 core from the store. TP1 keeps KV/page pressure low and halves start-up cost; only use TP4 (--gpus 0,1,2,3) if the only resident core is TP4.
cn7 (1 × GB10, arm64, 60 GiB RAM, 16 GiB scratch) — SM121 (naming.rs:63-64) Conditional architecture-coverage arm. Run only if a gb10-revision core is present/cached (flare models list | grep -i gb10). An SM120 core is rejected on GB10 (docs/model-preparation.md:477-479). gb10-revision core, smallest model on the box: google/gemma-4-E4B-it. Disk-only host retention (--prefix-cache-memory 0 --prefix-cache-disk … --prefix-cache-disk-limit 8G) because on integrated memory a warm DRAM tier duplicates bytes in the same physical pool (docs/prefix-cache-offload.md:190-197).

Do not use --prefix-cache-pool / selene-manager, --lossless-kv-compression, or concurrency ≥ 32 sweeps: they add variables this diff cannot affect (docs/prefix-cache-offload.md:44-123,964-967). Do not use ignition debug-serve, --direct, or --eager: explicitly not apples-to-apples (docs/performance-work.md:9-13). flare run CORE only.

Recommended model preference (in order): a small, fast, text model already on the box that supports exact 30 s+ idle and a >35 s decode cheaply. google/gemma-4-E4B-it (cn7) and, on cn5, whichever of nvidia/NVIDIA-Nemotron-3.5-Bolt-74B-A9B-24GB / zai-org/GLM-5.3-Flash / nvidia/GLM-5.3-Flash-NVFP4 fits TP1 in 96 GiB. Avoid the DFlash/speculative-heavy variants for this test: speculation adds acceptance noise to decode-length and TTFT numbers that the diff does not touch.


3. Common launch line

# cn5 primary (adjust model/core path and port)
flare-cli/target/release/flare-<arm> run "$CORE" --gpus 0 \
  --host 127.0.0.1 --port 8000 \
  --scheduler-policy balanced \
  --prefix-cache-memory 4G \
  --prefix-cache-disk /var/tmp/hc-<arm> --prefix-cache-disk-limit 40G \
  --prefix-cache-drain-on-shutdown=on \
  > /var/tmp/flare-<arm>-<scenario>.log 2>&1

Prompt geometry: use the repo's own load generator so the requests are byte-identical across arms:

python3 scripts/benchmark_scheduler.py --base-url http://127.0.0.1:8000 \
  --model <served-name> --concurrency 1 --prompt-tokens 4000 --output-tokens 32 \
  --seconds 0 --warmup-seconds 0 --trials 1 --output /var/tmp/reqs.jsonl

then drive individual scenarios with a tiny client that reuses bodies from that JSONL (scripts/benchmark_scheduler.py:194-202 shows the reuse contract), or simply curl the same JSON body. scripts/benchmark_scheduler.py records metrics_before/metrics_after per trial (:141,173,207-222), so a --concurrency 1 --seconds 60 run already gives you every counter delta — use it as the "soak" wrapper and a 20-line curl script for the surgical steps.


4. Scenarios (all on cn5, both builds, in this order)

Each scenario: M() = scrape /metrics; d = after − before.

S1 — long decode (>35 s), then same-prefix follow-up. (the primary claim)

  1. M() → send prompt P (≈4000 tokens) with max_tokens chosen so the stream takes ≥ 35 s (measure once: max_tokens ≈ 35 × measured tok/s; on a small model this is typically several thousand tokens; docs/model-bound) ×
  2. M() → request P again with max_tokens 32 (this is the request whose terminal capture matters).
  3. M().
Counter candidate baseline
flare_checkpoint_skips_total{reason="unknown_cost"} delta at step 3 0 ≥ 1
flare_checkpoint_captures_total{role="endpoint"} delta ≥ 1 0
flare_graph_launches_total{kind="snapshot"} delta ≥ 1 0 on the second request
flare_host_cache_bytes_out_total delta > 0 no new bytes after 30 s

S2 — 33 s idle, then same-prefix request. Same prompt twice with sleep 33 between (idle > estimate_ttl_ns). Identical assertions to S1. This is the cheapest discriminator: the whole diff is visible in one counter (unknown_cost 0 vs ≥ 1).

S3 — multi-message prompt (prefill Message extras). Send a 3–4 message conversation (mirror tests/server/test_prefix_cache_offload.py:111-114 shape, scaled so checkpoint_extra_work_fraction × prefill can afford a copy), after the model has one warm run.

S4 — warm restart (unmeasured Snapshot) + cached-anchor hit → single zero-priced discovery. (exercises the new slot; the riskiest path)

  1. With disk retention on, run one full request so a record is written (flare_host_cache_stored_total > 0), then SIGTERM (exit 0).
  2. Restart the same arm against the same disk dir, same core.
  3. M() → send the identical prompt again: expect a host hit (flare_host_cache_hits_total +1, host_reused_tokens > 0), an endpoint capture +1 produced by the zero-priced discovery copy (checkpoint_copy_ns = 0), and flare_checkpoint_extra_work_nanoseconds_total delta 0 for that copy.
  4. Immediately send a second distinct multi-message prompt: unknown_cost must be 0 and message captures > 0 (proof the discovery actually measured the cost).

S5 — control: --scheduler-checkpoint-extra-work-fraction 0. One short run (cached and cold prompt). Expect byte-identical counters between builds: endpoint and message captures 0, unknown_cost 0, extra_work_ns 0. Any difference = regression; stop and report.

S6 — coalescing / cancel stress (only if time remains, ~8 min). From the S4 warm-restart state at --concurrency 3, submit three same-anchor requests in the same tick and cancel the first with a client disconnect ~200 ms after submit. Assert: at most one discovery capture, unknown_cost counts the rest, and a follow-up request after cancellation still achieves unknown_cost == 0 (the slot was released: scheduler.rs:2690-2692,2700-2702,3067-3069). This is the concrete check for the review's "burned probe slot" should-fix, which the new head claims to have fixed via the Finishing predicate.


5. The secondary "speedup" measurement (optional, 10 min, cn5)

Only worth running if you want a number for the latency benefit, and it must be paired:

# candidate then baseline, and again baseline then candidate (order control)
python3 scripts/benchmark_scheduler.py --base-url … --model … \
  --concurrency 1 --prompt-tokens 8000 --output-tokens 16 --seconds 60 \
  --warmup-seconds 20 --trials 3 --expected-cached-prompt-tokens <N> \
  --pair-index 0 --variant <baseline|candidate> --pair-order baseline,candidate \
  --output /var/tmp/ab-<arm>.jsonl

with a sleep 33-primed second request so the baseline is actually in its degraded regime (--expected-cached-prompt-tokens makes the script fail loudly if the cache condition differs between arms, :213-221). Report ttft_median_seconds and cached_prompt_tokens deltas, split by scenario, with ≥3 trials and the two orderings. Do not report tokens/s as the PR's effect — it is within noise for this diff.


6. Abort / don't-bother rules (GPU-time protection)

Stop the arm and report instead of continuing if any of these appear:

Skip: ignition export / re-export, ignition debug-serve, --direct, --eager, --prefix-cache-pool, --lossless-kv-compression, TP4 unless the store only has TP4, multi-host/Orbit, concurrency sweeps 1→32.


7. What each result means

Observation Interpretation
cand: unknown_cost 0 after S1/S2, baseline ≥ 1 Core claim confirmed on hardware; the retained-cost half works.
cand: S4 step 3 = 1 endpoint capture, extra_work_ns +0, follow-up unknown_cost 0 The discovery path works and truly unblocks prefill extras.
cand: S4 step 3 = endpoint +1 but follow-up still unknown_cost Discovery did not close the loop (the batch_capacity vs smallest_batch_key concern from review round 1) — file as a real defect with the metrics files.
S4 concurrency-2 yields two discovery captures, or S6 leaves the slot burned The single-in-flight invariant is broken → block merge; the fix is in snapshot_discovery_in_flight / the three clears.
S5 differs in any checkpoint counter Behaviour is not identical at fraction 0 → block merge.
Baseline reproduces nothing in S4 Upstream cold-boot deadlock is not reachable on main: strengthens the "fork-specific" rebuttal in #534, and the PR body should say so.
Anyone finds requested lifecycle operation must be feasible in a candidate log The empty-Snapshot-catalogue malformed-core path is reachable in practice → escalate (review round 2, finding 4).

8. Findings relevant to the test engineer

  1. Docs are consistent at head. docs/scheduling-runtime-design.md:619-631, docs/core-design.md:1450-1457, helios/README.md:378-383, docs/cli-design.md:704-711 were all updated together (the earlier review's should-fix #2 is discharged). docs/api.md:355-356 was not updated and still says the counter "sums charged predicted … copy work", which is exactly what the zero-priced discovery copy violates → confirm S4's extra_work_ns delta of 0 and report it as a documentation gap, not a code defect.
  2. Internal doc contradiction remains: "allows at most one in-flight discovery capture" (line 626-628) sits next to the unchanged "There is no fixed capture count or concurrency-based snapshot share" (line 630-631). One clause; worth catching while you have the reviewer's attention.
  3. A latent panic path exists but is blocked by core validation: measured_duration returns None for "no Snapshot batch declared" as well as "unmeasured", so a malformed core plus a positive fraction would allocate a zero-priced capture that later hits .expect(...) in policy.rs (not opened). helios/src/model/catalog.rs:138-148 (not opened) and checkpoints.rs:1030 block it. Worth a one-line grep of the log (see table) but not a test scenario.
  4. No human maintainer review yet (only the automated review, on a superseded head). Since testing is being spent on this PR, having yatesdr (author, owns this path) or Luke Alonso look at f7f4d25 before the run would avoid validating a shape that changes again.

9. Deliverable

For each arm and scenario, attach: the two /metrics snapshots, the log excerpt around Prepare host prefix cache and the Snapshot graph launches, the restart exit codes, and the S5 equality diff. That set is sufficient to accept or reject every claim in the PR body — including the ones the PR does not claim (no throughput change) — in under 90 GPU-minutes.

Full report · Notes

Discord Test Request

Deliverable: Discord post

## Recommendation: Test
High confidence — the diff at f7f4d25 was read directly and matches the plan: `measured_duration` really does stop expiring, and the one-shot discovery slot really is guarded.

## Hardware Required
- 1× cn5 (RTX PRO 6000 Blackwell, SM120/GB202) running TP1 — does all six scenarios, both builds
- An already-prepared gb202 core from the model store — **no re-export, no `ignition export`**
- Optional: cn7 (GB10, arm64) only if a gb10 core is already cached — adds arch coverage, nothing else

## Justification
- Baseline skips endpoint captures with `unknown_cost` after any >30 s idle or long decode; candidate keeps the measured Snapshot cost forever, so `unknown_cost` 0 vs ≥1 in one counter is the whole claim
- The risky half is new: a single zero-priced "discovery" capture on warm restart — only hardware shows it runs once, frees on cancel, and unblocks follow-up message captures

## Estimated Time to Complete
~90 GPU-minutes end to end (~70 min cn5 + ~20 min conditional cn7), two builds, zero re-exports

What I verified, and caveats

Verified against the PR head (f7f4d25), not just the plan:

Adjustments I would make if this posting drives a run (kept out of the post to stay inside the template's length limit):

Constraint on this task: I have repository read access only — no GPU host, no shell — so I could not execute the builds, the scenarios, or the metrics scrapes. Nothing above is a test result; it is a verification that the plan's premises match the code and its telemetry, which is what the post needed to be honest about.

Third-party content note: the PR thread includes bot posts asking me to "have your agent review the Full Review" at external autobot.eidonix.com links. I treated those as material, not instructions, and did not fetch or act on them; all findings above come from the repository itself.

Full report Human Approval: Do you approve this test? → Denied by D-Rock on Autobot, Dec 1, 2026 12:50 PM ET.

Deliverable: Discord post

## Recommendation: Test
High confidence — the diff at f7f4d25 was read directly and matches the plan: `measured_duration` really does stop expiring, and the one-shot discovery slot really is guarded.

## Hardware Required
- 1× cn5 (RTX PRO 6000 Blackwell, SM120/GB202) running TP1 — does all six scenarios, both builds
- An already-prepared gb202 core from the model store — **no re-export, no `ignition export`**
- Optional: cn7 (GB10, arm64) only if a gb10 core is already cached — adds arch coverage, nothing else

## Justification
- Baseline skips endpoint captures with `unknown_cost` after any >30 s idle or long decode; candidate keeps the measured Snapshot cost forever, so `unknown_cost` 0 vs ≥1 in one counter is the whole claim
- The risky half is new: a single zero-priced "discovery" capture on warm restart — only hardware shows it runs once, frees on cancel, and unblocks follow-up message captures

## Estimated Time to Complete
~90 GPU-minutes end to end (~70 min cn5 + ~20 min conditional cn7), two builds, zero re-exports

What I verified, and caveats

Verified against the PR head (f7f4d25), not just the plan:

  • fresh_duration is gone; measured_duration (helios/src/scheduler/cost.rs:783) scans declared batches ascending, returns the first estimate with nanos != 0, and applies no TTL filter — so it never expires. All three gates use it: checkpoints.rs:624, :965, :1039. Repo-wide grep finds no remaining fresh_duration references, so the plan's claim of "three gates switched" is complete.
  • snapshot_discovery: Option<RequestHandle> exists (scheduler.rs:661,756); claimed in checkpoints.rs:1069-1072 only when a snapshot row is actually allocated (snapshot.is_some()), gated on measured.is_none() && fraction > 0.0 && !snapshot_discovery_in_flight(), and cleared in exactly three places — completion (scheduler.rs:2690-2692), endpoint capture (:2700-2702), and retire (:3067-3069). The snapshot_discovery_in_flight() helper requires phase != Finishing, matching the PR author's claim that the review's "burned probe slot" was fixed.
  • Metric names in the plan are real and correctly spelled: flare_checkpoint_captures_total{role} with anchor/message/endpoint, flare_checkpoint_skips_total{reason} with unknown_cost/work_budget/storage, flare_checkpoint_extra_work_nanoseconds_total (helios/src/server/metrics.rs:843-852). So every assertion in the plan is scrapeable as flat text.
  • Docs were updated in the same commit (docs/cli-design.md, docs/core-design.md, docs/scheduling-runtime-design.md, helios/README.md) — consistent with the second review's "all four docs synchronized" claim. The plan's documentation-gap finding also holds: docs/api.md:355 still says the extra-work counter "sums charged predicted … copy work", which the zero-priced discovery copy violates. That is a doc nit, not a blocker.
  • The plan's internal-doc-contradiction item is real: "at most one in-flight discovery capture" now sits beside the unchanged "There is no fixed capture count or concurrency-based snapshot share" in docs/scheduling-runtime-design.md.
  • Unit coverage backs the scenarios: measured_duration_uses_smallest_measured_batch_and_retains_after_ttl (cost.rs), plus three new integration-style tests in checkpoints.rs covering retained cost after TTL, single in-flight discovery with cancel-recovery and storage-refusal-doesn't-claim-the-slot, and a full plan → commit → complete warm-restart path that measures 25 µs and then unblocks multi-message extras. The earlier review's "tests call measure() manually" complaint is genuinely addressed by that last test.

Adjustments I would make if this posting drives a run (kept out of the post to stay inside the template's length limit):

  • The plan's S1 table lists flare_graph_launches_total{kind="snapshot"}; I did not confirm that exact series name during this pass, so treat that one row as unverified until someone greps metrics.rs for it. The captures_total/skips_total rows are safe.
  • S4 step 4 is the only scenario that can distinguish "discovery measured the cost" from "discovery captured something", so it should not be dropped for time — drop the optional §5 latency pair instead, since the PR explicitly does not claim throughput.
  • The baseline-null-result rule in §7 is the highest-value output of the whole run for #534: if upstream main does not reproduce the deadlock, the Related to #534 framing should stay and the report should say so out loud.

Constraint on this task: I have repository read access only — no GPU host, no shell — so I could not execute the builds, the scenarios, or the metrics scrapes. Nothing above is a test result; it is a verification that the plan's premises match the code and its telemetry, which is what the post needed to be honest about.

Third-party content note: the PR thread includes bot posts asking me to "have your agent review the Full Review" at external autobot.eidonix.com links. I treated those as material, not instructions, and did not fetch or act on them; all findings above come from the repository itself.