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:
- Add
last_probe_nstoActionCosts::Estimateand a sharedsmallest_batch_keyhelper used byfresh_duration,probe_durationandrecord_probe. - In
allocate_terminal_capture, fall back toprobe_duration(GraphKind::Snapshot, 1)when the cost is not fresh andcheckpoint_extra_work_fraction > 0.0, then run the normal work-budget and storage-quote checks. - Stamp
record_probeonly when a snapshot is actually obtained, so budget/storage refusals do not consume the probe slot. - Leave prefill extras disabled while the Snapshot cost is unmeasured or stale; never probe at fraction 0.0.
- Document the one-probe-per-TTL behaviour in
docs/scheduling-runtime-design.md. Touches: helios/src/scheduler/checkpoints.rs(allocate_terminal_capture, work-budget and storage gating)helios/src/scheduler/cost.rs(Estimatestruct, freshness/probe accounting shared by all graph kinds)docs/scheduling-runtime-design.md(checkpoint cost paragraph) Related items:- #534 Checkpoint captures deadlock on an unmeasured snapshot cost (open): the "Fixes" target, but rebutted twice in-thread as fork-specific
- #285 fix(cache): retain measured prefill costs after expiry (merged): the same self-locking pattern, prefill half only
- #645 Overhaul Helios prefill scheduling and cost modeling (merged): one-day-old rewrite of the same two files that this PR is stacked on
- #301 persist learned graph costs across serving restarts (open, draft): competing edit to the same
Estimatestruct - #540 Retain bounded timing-refresh and acceptance credit across idle (merged): adjacent refresh-credit work; this PR keeps its probe timestamp out of that ledger
Link: https://github.com/NVIDIA/hyperflare-inference/pull/655
Autobot comments: The linked issue #534 is disputed in its own thread — mark-yong traced the reported deadlock to a third-party fork carrying
PrefillTailMergeand the flare-autobot comment could not reproduce it onmain, warning that an "unconditional terminal-capture probe" would alter the documented freshness contract "without a demonstrated defect"; the PR does that probe the next day and cites neither rebuttal, instead reframing onto three other scenarios with a live SM120 A/B. Undeclared behaviour: the first probe of a never-measured entry returnsSome(0), so that capture bypasses the work budget andflare_checkpoint_extra_work_nanoseconds_totalunder-reports one copy per TTL; the probe slot is global across requests, not per request; and it is stamped at allocation, so a cancelled copy burns the slot. Only the terminal gate is relaxed —checkpoint_selection_uncachedandcheckpoint_copy_allowedstill skip on unmeasured/stale Snapshot, so the description's "both prefill extras and terminal capture skip" is half fixed, anddocs/core-design.md,helios/README.mdanddocs/cli-design.mdstill state the old rule. Two validation layers thatdocs/design-review.mdcalls mandatory for timing-estimation changes (thescripts/scheduling_sim/learning.py(not opened) catalog andverification/helios-lifecycle/check.py(not opened) / TLA, as #568 did for this very function) are absent and not disclosed as skipped.
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:
- "Fixes #534" is overclaimed: #534's cold-boot deadlock was rebutted twice as fork-specific (
PrefillTailMerge), and the PR supplies no upstream cold-boot reproduction and no rebuttal to either comment. - Verification that
docs/design-review.mdtreats as mandatory for timing-estimation and snapshot-allocation changes (learning.pyscreening,helios-lifecycle/check.py --mutations) is absent and not disclosed as skipped — #568, which touched the same function, did both. - The description's scenario 2 promises prefill-extras relief the diff does not deliver, and
docs/core-design.md,helios/README.md,docs/cli-design.mdstill describe the old rule. - Undisclosed side effects: the first probe returns
Some(0), under-countingcheckpoint_extra_work_nanoseconds_total; the probe slot is global perEstimate, not per request; and it is stamped at allocation, so a cancelled dispatch burns the TTL.
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
- [✓]
triage:review: 97.3% -
triage:design-review: 1.4% -
triage:validation: 0.7% -
triage:investigate: 0.5% -
none: 0.1% -
triage:partial: 0.1% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 62.5% -
priority:P2: 33.5% -
priority:P1: 4.0%
Type
- [✓]
performance: 94.7% -
bug: 59.3% -
community: 56.2% -
duplicate: 20.2% -
enhancement: 20.2% -
documentation: 0.0%
Area
- [✓]
area:scheduling: 86.7% - [✓]
area:caching: 81.8% -
area:selene: 50.0% -
area:preparation: 43.8% -
area:memory: 2.3% -
area:api: 2.0% -
area:orbit: 1.4% -
area:engram: 1.0% -
area:kernels: 0.4% -
area:packaging: 0.2% -
area:rocenante: 0.2%
Model
-
model:kimi-k3.1: 1.6% -
model:deepseek-v4: 1.1% -
model:glm-5.3: 0.9% -
model:deepseek-v4.1: 0.8% -
model:qwen3.8-27b: 0.8% -
model:qwen3.8-flash-next: 0.4% -
model:gemma4: 0.2% -
model:inkling-small: 0.2% -
model:nemotron-3.5-bolt: 0.2% -
model:muse-glimmer: 0.1% -
model:mimo-v2.6: 0.0%
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:
- (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 onelet ... elsewith a two-arm cost match: 18 lines → 11, one skip site. - (Low)
helios/src/scheduler/cost.rs:797-799— theif estimate.fresh(...) { return None; }guard inprobe_durationis unreachable from its only production caller (checkpoints.rs:1032-1033already required not-fresh on the same key); only the unit test atcost.rs:1058exercises it. Keep it with a doc-comment precondition, or drop both — not half. - (Low-medium)
helios/src/scheduler/cost.rs:1016-1030and1046-1055re-type, byte for byte, the 15-lineGraphDescriptorand 10-lineScheduledStepliterals already infresh_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. - (Medium, convention) The rule now lives in four documents; the PR updated one.
docs/scheduling-runtime-design.md:622-626is new, whiledocs/core-design.md:1452-1453("Unknown prefill costs or unknown or stale snapshot-copy costs exclude extras") andhelios/README.md:378-379("Unknown costs exclude extras") now contradict it;docs/cli-design.md:699-704is arguably still fine.AGENTS.md:52-60requires 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.
Correctness and contracts
Correctness/system-level review of PR #655 (2d9454f), verified in the three changed files and their callers.
Major
- 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 toflare_checkpoint_extra_work_nanoseconds_totalfor a real copy, contradicting its documented "sums charged predicted … copy work" (docs/api.md:355). The new test encodes the zero (checkpoints.rs:4161). - 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) andAnchorcaptures bypass the gate (checkpoints.rs:962-963), so a coalesced batch>1 Snapshot step burns the TTL slot. Tests hardcodebatch_capacity: 1(checkpoints.rs:1113-1127). record_probestamps 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.- No simulator-catalog or lifecycle
check.py(not opened)/TLA coverage for a changed admission decision, whichdocs/design-review.md:234-240calls "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.
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
- Production footprint is tightly localized to
ActionCosts(Estimate::last_probe_ns,smallest_batch_key,probe_duration,record_probe) andRequestScheduler::allocate_terminal_capture, with no wire/Protobuf, CLI, config-default, or metric-schema changes. - Extra work is strictly bounded to at most one
Snapshotcopy perestimate_ttl_ns(30 s default), prefill extras remain gated on fresh costs,checkpoint_extra_work_fraction == 0.0is preserved byte-identically,deferred_prefillreturns early before probing, andlast_probe_nsis isolated fromlast_attempt_ns/refresh_orderso funded timing refresh (#540) is unaffected. - Worst-case failure mode is transient loss of a single 30 s probe window (falling back to the pre-PR
unknown_costskip behavior until the next TTL), with no cache-ownership, fencing, or data-corruption hazard.
Walkthrough
helios/src/scheduler/cost.rs: Addedlast_probe_ns: Option<u64>toEstimate(initializedNoneinActionCosts::prepared), extractedsmallest_batch_key(kind, tokens)(shared byfresh_duration,probe_duration, andrecord_probe), addedprobe_duration(returningSome(estimate.nanos)when not fresh and outside the TTL cooldown—0when unmeasured, retained duration when stale), and addedrecord_probeplus a unit test (probe_duration_uses_smallest_declared_batch_and_bounds_by_ttl).helios/src/scheduler/checkpoints.rs: UpdatedRequestScheduler::allocate_terminal_captureso that whenfresh_duration(GraphKind::Snapshot, 1)returnsNoneandcheckpoint_extra_work_fraction > 0.0, it falls back toprobe_duration(GraphKind::Snapshot, 1), runs the existing work-budget and marginal-gain storage-quote checks against that duration, and callsrecord_probe(GraphKind::Snapshot, 1)only when a snapshot row is actually allocated (snapshot.is_some()). Added two unit tests covering unmeasured and stale/zero-budget terminal capture probing.docs/scheduling-runtime-design.md: Updated the checkpoint extra-work specification (lines 617-629) to distinguish prefill extras (still disabled when snapshot cost is unmeasured or stale) from the bounded one-probe-per-estimate_ttl_nsterminal capture whenscheduler_checkpoint_extra_work_fraction > 0.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure scheduler arithmetic and documentation; no I/O, FFI, parsing, privilege, or untrusted-input surface introduced.
- [PASS] Charter & value fit: Model- and core-agnostic (
smallest_batch_keyuses declared core metadata, no per-model branch or magic default), minimal footprint in the right runtime layer, directly supports host/Selene prefix-cache retention. - [WARN] Related / duplicate / conflict check:
Fixes #534auto-closes an issue whose cold-boot deadlock was rebutted twice as fork-specific (PrefillTailMerge) without addressing the rebuttal; open draft #301 edits the sameEstimatestruct incost.rs(complementary for warm restarts, expected small rebase). - [WARN] Tests & verification evidence: CI (including
helios-lifecycleTLA+ conformance and Kani) is green on2d9454fand live SM120 A/B covers the three claimed scenarios; however, new tests callmeasure(...)manually rather than exercising an end-to-endplan -> commit -> completeSnapshot refresh cycle, and the Validation section omits noting whyscripts/scheduling_simis N/A (no checkpoint model).
Blockers
None.
Should Fix
- Do not auto-close #534 without addressing its fork-specific premise (PR description): Issue #534 reported a cold-boot
captures == 0deadlock that bothmark-yong(2026-11-28) andflare-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. ChangeFixes #534toRelated to #534(or explicitly document the upstream vs. fork distinction on #534) so merging does not silently close the issue under a disputed premise. - 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 atdocs/scheduling-runtime-design.md:620-626. PerAGENTS.md:52-60(and merged precedents #285 and #568), add a one-clause update to both files so the specification stays consistent across documents. - Handle probe-slot loss under concurrent
batch > 1Snapshot coalescing and pre-execution cancellation (helios/src/scheduler/checkpoints.rs:1071-1074,helios/src/scheduler/cost.rs:783-786, 865-890):probe_duration/fresh_durationtarget onlyself.batches(GraphKind::Snapshot).first()(typicallybatch = 1), whileActionCosts::observe(cost.rs:865-890) updates onlystep.batch_capacity. On cores exporting multipleSnapshotbatch sizes (ignition/components/capacity.py:66-68), if a probed terminal capture shares aselect_plantick with anotherRequestPhase::Snapshotrequest (e.g., an unconditionalAnchorcapture atcheckpoints.rs:962-963, aConditionedWindowcapture atscheduler.rs:2864-2866, or afinish_early/preempt_newestcapture atscheduler.rs:1447-1450),policy.rs:1147-1156, 1424-1426selects the widerbatch >= 2cohort whenever both batches are unmeasured or both are stale.observethen recordsbatch >= 2, leavingfresh_duration(GraphKind::Snapshot, 1) == Nonewhilelast_probe_nsis already burned for 30 s.- Similarly, if a client cancels (
scheduler.cancel,scheduler.rs:3022-3024, 3116) in the window betweenallocate_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_probeto completion—if multiple requests finish in the samecomplete_innerloop (scheduler.rs:2854-2903) or before the first Snapshot step finishes, leavinglast_probe_nsunstamped at allocation would admit multiple concurrent probes at once (violating the 1-per-TTL bound and immediately forcingbatch > 1coalescing). Instead, keep allocation-time gating, clear/restorelast_probe_nsif a probing request retires without its probed Snapshot key being observed (or allowfresh_duration/ probe refresh to be satisfied or retried when a coalesced batch runs), and add an end-to-endplan -> commit -> completetest verifying that a probed terminal capture closes the loop throughobserve_execution.
Subtract / Simplify
- Collapse the triplicated
unknown_costskip inallocate_terminal_capture(helios/src/scheduler/checkpoints.rs:1032-1049): Three separate branches incrementself.stats.checkpoint_skip_unknown_cost += 1andreturn Ok(None). Computingfresh,probed, andcostonce 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); }; - De-duplicate the verbatim test fixtures in
helios/src/scheduler/cost.rs:1016-1055:probe_duration_uses_smallest_declared_batch_and_bounds_by_ttlrepeats the exact 15-lineGraphDescriptorand 10-lineScheduledStepliterals fromfresh_duration_uses_smallest_declared_batch_when_batch_one_is_absentdirectly 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
docs/scheduling-runtime-design.md:622-626: Consider noting explicitly that an unmeasured probe is priced at0until observed (whereas a stale probe uses the retained duration), and optionally add a brief clause todocs/cli-design.md:699-709for operators reading the--scheduler-checkpoint-extra-work-fractionflag docs.- PR Validation section: Briefly note that
scripts/scheduling_simhas no checkpoint/probe model (consistent with #568) and thatverification/helios-lifecycle/check.pyran via CI (helios-lifecycle.yml) with no row-ownership state transitions added toCheckpointReservation.tla.
Dropped on verification
- Upstream F1 (Blocker/Major: "zero-priced first probe bypasses work budget and under-reports
flare_checkpoint_extra_work_nanoseconds_total; fix with a non-zero fallback"): Dropped as Major/Blocker. On a warm restart allSnapshotentries initialize tonanos == 0(cost.rs:605), and inventing an arbitrary non-zero fallback duration would violate the charter's "no magic defaults" rule. Ordinary dispatch (policy.rs:1309-1311,utility.rs:146-158) andAnchorcaptures (checkpoints.rs:615) already price unmeasured/anchor copies at0, the zero-priced probe happens at most once until measured (stale probes return the retained non-zeroestimate.nanos), anddocs/api.md:355-356documents the counter as charged predicted work. Retained only as a doc-clarity Nit. - Upstream F3 partial claims ("preempted" and "
record.status == 3error" paths burn the probe slot): Dropped as inaccurate.preempt_newest(scheduler.rs:1405-1423) strictly filtersrequest.phase == RequestPhase::Decode, so a request inRequestPhase::Snapshotcannot be preempted. On a completed Snapshot step withrecord.status == 3,self.observe_execution(&submission.step, timing)runs atscheduler.rs:2656before the per-lanerecord.status == 3branch (2684-2688), so any step with positivetiming.gpu_nsstill records a measurement. Only pre-executioncancel()(narrow EOS-to-Snapshot window) and zero/missing GPU timing burn the slot; also rejected the upstream suggestion to naively moverecord_probeto completion because it would allow concurrent probes in a singlecomplete_innerbatch. - Upstream F4 (Major: "missing
scripts/scheduling_sim/learning.pyandCheckpointReservation.tla/check.py --mutationsis a blocking design failure"): Dropped as Major. Verified thatscripts/scheduling_sim/has no checkpoint/unknown_costmodel (same N/A precedent as merged #568 and #285),.github/workflows/helios-lifecycle.ymlalready rancheck.pyandcargo kanion2d9454f(passing), andCheckpointReservation.tla:50-60models row-phase/eviction/deferred-prefill invariants—none of which PR #655 alters. Retained only as a Validation-note Nit. - Upstream F6 (Minor: "stale retained duration exceeding budget causes indefinite
work_budgetself-lock"): Dropped as working-as-designed. Refusing a tiny request whose work allowance is smaller than the retainedSnapshotduration—without burning the probe slot (checkpoints.rs:1056, 1071-1074)—is the exact intended budget guard; any request whose allowance covers the retained cost can still use the unburned probe slot to refresh the estimate. - Upstream F7 (Minor: "
docs/api.md:348-354needs a metric-migration note"): Dropped as low-signal.docs/api.md:348-356defines the skip reason categories (unknown_cost,work_budget,storage) without documenting internal TTL-probing mechanics and remains accurate. - Upstream Scenario 2 overclaim critique ("PR claims scenario 2 fixes prefill extras"): Dropped as false. The PR's Problem section accurately describes the pre-PR symptom (both prefill extras and terminal capture skip), while the Solution section explicitly states "Keep prefill extra cuts disabled while
Snapshotis unmeasured or stale" and the Validation section explicitly attributes the follow-up's+0prefill skips to the terminal probe having measuredSnapshot. - Upstream S4 (Low: "remove
if estimate.fresh(...)guard inprobe_durationatcost.rs:797-799"): Dropped.probe_durationis apub fnonActionCosts; keeping a 3-line self-contained freshness check is safer and clearer than turning it into a caller-enforced precondition.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.8% -
triage:design-review: 0.1% -
triage:partial: 0.0% -
triage:validation: 0.0% -
none: 0.0% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
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:
- Replace the
fresh_durationTTL test withActionCosts::measured_duration(first declared batch withnanos != 0, no expiry) at all three gate sites. - Add a server-global
snapshot_discovery: Option<RequestHandle>slot for the never-measured case, priced at 0, claimed only after a row is obtained, released on error/finish/cancel. - Keep the work-budget and marginal-gain storage-quote checks in front of the discovery capture.
- Synchronise all four design docs and drop the 30 s probe machinery entirely.
- Change
Fixes #534toRelated to #534; add an end-to-end plan→commit→complete test. Touches: - helios/src/scheduler/checkpoints.rs — the capture gate, discovery slot, charge accounting
- helios/src/scheduler/cost.rs —
measured_durationreplacesfresh_duration - helios/src/scheduler.rs — new scheduler field, three release paths Related items:
- #534 checkpoint captures deadlock on an unmeasured snapshot cost (open): now "Related to", no longer auto-closed; its fork-vs-upstream rebuttals still uncited.
- #285 retain measured prefill costs after expiry (merged): the pattern this revision now copies for
Snapshot. - #301 persist learned graph costs across restarts (open draft): same
Estimatestruct, rebase expected. - #568 bound optional Endpoint checkpoint eviction (merged): storage quote the probe reaches; TLA precedent not followed.
- #645 prefill scheduling/cost modeling overhaul (merged): the base this sits on, one day older.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/655
Autobot comments: Previous findings 2, 3, 4, 5 are withdrawn or narrowed: the TTL probe is gone, both gates are fixed, docs are synced, and the force-update answered the one automated review (still no human maintainer review). New head under-reports
flare_checkpoint_extra_work_nanoseconds_totalby one copy per discovery event while docs/api.md:355 still promises charged work; the discovery copy can never be refused by the work budget; and the new in-flight cap contradicts the adjacent "no concurrency-based snapshot share" sentence in two docs. Nothing models the new guard in CheckpointReservation.tla, which design-review.md:226-228 asks for when adding a guard.
Classify intake
Selected: triage:review, performance, area:caching, area:scheduling
Threshold: 65%
Triage
- [✓]
triage:review: 99.5% -
triage:design-review: 0.2% -
triage:validation: 0.1% -
none: 0.0% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 99.8% -
priority:P1: 0.1% -
priority:P2: 0.1%
Type
- [✓]
performance: 99.6% -
bug: 59.3% -
enhancement: 50.0% -
community: 32.1% -
duplicate: 29.4% -
documentation: 1.4%
Area
- [✓]
area:scheduling: 98.2% - [✓]
area:caching: 83.5% -
area:preparation: 16.5% -
area:selene: 16.5% -
area:api: 9.5% -
area:kernels: 0.6% -
area:memory: 0.6% -
area:orbit: 0.3% -
area:engram: 0.2% -
area:rocenante: 0.1% -
area:packaging: 0.0%
Model
-
model:nemotron-3.5-bolt: 3.3% -
model:glm-5.3: 0.4% -
model:inkling-small: 0.4% -
model:kimi-k3.1: 0.3% -
model:mimo-v2.6: 0.3% -
model:deepseek-v4.1: 0.1% -
model:muse-glimmer: 0.1% -
model:qwen3.8-27b: 0.1% -
model:qwen3.8-flash-next: 0.0% -
model:deepseek-v4: 0.0% -
model:gemma4: 0.0%
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.
- Delete the three explicit
snapshot_discoveryclears (9 lines):scheduler.rs:2690-2692,2700-2702,3066-3069are unreachable-by-design becausesnapshot_discovery_in_flightalready excludesFinishinghandles 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. measured_duration(cost.rs:783-790) rebuilds theKeyliteral thatexact_duration(cost.rs:761-771) already constructs; collapse to a two-linefind_mapoverexact_duration. All 12 call sites pass(GraphKind::Snapshot, 1), so narrowing tosnapshot_copy_ns()drops two constant-only parameters and names the concept once.- The new test helper
clear_snapshot_costs(checkpoints.rs:4164-4180) writes the SnapshotScheduledStepliteral for the fourth time; move it next to the existing#[cfg(test)] set_measured(cost.rs:563-584) asclear_measured(kind)and delete 17 lines. - 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.
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.
- 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 inverification/helios-lifecycle/models it;docs/design-review.md:232-240calls that a "blocking design failure, regardless of whether CPU unit tests pass". The body's checklist note covers only the simulator. - Minor (metric contract): the discovery copy is priced 0 (
checkpoints.rs:1043) and that 0 is added tostats.checkpoint_extra_work_ns(:1093-1094) whilecheckpoint_endpoint_capturesstill counts it (scheduler.rs:2699);docs/api.md:355-356still 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. - 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. - Minor (latent panic):
measured_duration(cost.rs:783-790) returnsNoneboth 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 bymodel/catalog.rs:140-148andcheckpoints.rs:1030; fix by gating on!costs.batches(Snapshot).is_empty(). - 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 atcore-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).
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
- Production changes are small and tightly scoped to
ActionCosts::measured_duration(helios/src/scheduler/cost.rs:783-790),RequestScheduler::allocate_terminal_capture/checkpoint_selection_uncached/checkpoint_copy_allowed(helios/src/scheduler/checkpoints.rs:624, 965, 1018-1079), andsnapshot_discoverylifecycle tracking (helios/src/scheduler.rs:661, 756, 2690-2692, 2700-2702, 3067-3069); no wire format, CLI default, metric schema, or row-ownership/fencing logic changes. RequestScheduleris single-threaded (&mut self),checkpoint_selectionis memoized per planning pass (helios/src/scheduler/checkpoints.rs:410-428),checkpoint_extra_work_fraction == 0.0anddeferred_prefillbehavior are preserved unchanged, andsnapshot_discoveryis claimed only after a snapshot row is obtained.- Worst-case failure mode of the cold-discovery gate is benign degradation to pre-PR
unknown_costskips;ActionCosts::observe(helios/src/scheduler/cost.rs:852-861,498-510) still resets the rolling window on the next execution after TTL expiry.
Walkthrough
helios/src/scheduler/cost.rs: ReplacedActionCosts::fresh_durationwithActionCosts::measured_duration(:783-790), which scansself.batches(kind)in ascending order and returns the smallest declared batch withnanos != 0regardless of TTL expiry (whileobserve()still resetsReplayTimeswhen stale). Updated unit test coverage inmeasured_duration_uses_smallest_measured_batch_and_retains_after_ttl(:994-1045).helios/src/scheduler/checkpoints.rs: Switched all three snapshot-cost gates (checkpoint_selection_uncached:624,checkpoint_copy_allowed:965,allocate_terminal_capture:1039) fromfresh_durationtomeasured_duration. Addedsnapshot_discovery_in_flight(:1018-1023) and single-in-flight zero-priced terminal discovery inallocate_terminal_capture(:1039-1079) whenmeasured.is_none(),checkpoint_extra_work_fraction > 0.0, and storage is actually obtained. Updated two existing tests (:1646-1687) and added three new tests covering post-TTL terminal retention, single-in-flight discovery with storage-refusal/cancel/zero-fraction invariants, and end-to-endplan -> commit -> completediscovery (:4125-4306).helios/src/scheduler.rs: Addedsnapshot_discovery: Option<RequestHandle>(:661, initializedNoneat:756) and cleared it incomplete_inner(status-3 fallback:2690-2692and terminal snapshot completion:2700-2702) andretire(:3067-3069).docs/scheduling-runtime-design.md,docs/core-design.md,docs/cli-design.md,helios/README.md: Synchronized the checkpoint extra-work specification across all four documents to describe retained snapshot-copy estimates after expiry and the single in-flight zero-priced terminal discovery copy.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure scheduler cost lookup and request-handle tracking; no I/O, parsing, FFI, privilege, or untrusted-input surface introduced.
- [PASS] Charter & value fit: Model- and core-agnostic (
self.batches(kind)uses declared core metadata; no new flags, magic defaults, or per-model branches), minimal footprint in Helios, directly supports persistent host/Selene prefix-cache retention. - [PASS] Related / duplicate / conflict check: PR body updated from
Fixes #534toRelated to #534(avoiding premature auto-close of #534); cleanly extends PR #285 and #568; complementary to open draft #301 (cost.rspersistence across restarts). - [PASS] Tests & verification evidence: All six new/updated CPU tests are isolated (no global state mutation) and exercise real production entry points—including end-to-end
plan -> commit -> complete;scripts/scheduling_simN/A rationale is disclosed;.github/workflows/helios-lifecycle.yml(not opened) runs TLA+ conformance (check.py) andcargo kanionhelios/**; 4-scenario live SM120 verification covers >30 s decode, >33 s idle pauses, and warm disk restart.
Blockers
None.
Should Fix
None.
Subtract / Simplify
- Drop the three redundant explicit
snapshot_discoveryclears (helios/src/scheduler.rs:2690-2692,:2700-2702,:3067-3069).snapshot_discovery_in_flight(helios/src/scheduler/checkpoints.rs:1018-1023) already treatsRequestPhase::Finishingand retired/stale handles (self.request(handle)checks slot occupancy and generation equality athelios/src/scheduler.rs:1233-1239) as free. Bothcomplete_innerbranches setrequest.phase = RequestPhase::Finishingimmediately above the clear (:2689,:2698), andretireremovesslot.requestat:3124. Removing all three clears deletes 9 lines acrossscheduler.rs, keeps a single source of truth, and avoids mutatingself.snapshot_discoveryat:3068before the fallible?operations inretire. - Reuse
exact_durationinActionCosts::measured_duration(helios/src/scheduler/cost.rs:783-790). The inlineKey { drafts: 0, kind, batch, tokens, prefill: 0, packed: 0 }lookup duplicatesexact_duration(kind, batch, tokens, 0, 0)(:761-771), which also handlesGraphKind::Speculativekeys if ever called with one:
(Optionally, since all call sites passpub 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)) }(GraphKind::Snapshot, 1), this could be narrowed further to a dedicated snapshot-copy helper.)
Nits
docs/api.md:355-356: Optionally note that the single cold-discovery terminal copy is priced at zero inflare_checkpoint_extra_work_nanoseconds_total(and that concurrent terminal captures skipped while discovery is in flight incrementunknown_cost), matching the disclosure added to the four design docs.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
- TLA+ /
CheckpointReservation.tlamodeling &--mutationsblocker (Correctness F1): Dropped. Verified inverification/helios-lifecycle/CheckpointReservation.tla:1-140andverification/helios-lifecycle/README.md:1-120thatCheckpointReservation.tlamodels snapshot row ownership, GPU fences, guard revocation, andTerminalDestinationeviction safety—not cost-pricing gates (checkpoint_extra_work_fraction,allowance,unknown_cost).snapshot_discoveryonly toggles whether an optional capture is priced at0vs skipped; it cannot bypassdeferred_prefill(checkpoints.rs:1033-1035) or storage/eviction quoting (:1063-1068), and.github/workflows/helios-lifecycle.yml:3-48(not opened) already runscheck.pyandcargo kanionhelios/**. - Latent panic when
batches(GraphKind::Snapshot)is empty (Correctness F4): Dropped. Verified inhelios/src/model/catalog.rs:138-148that manifest validation requiresGraphKind::Snapshotfor every required batch, and even before this PR bothAnchorcaptures (checkpoints.rs:610-617,:962-964) andfinish_early(scheduler.rs:1449-1452) already enterRequestPhase::Snapshotwithout checkingbatches(GraphKind::Snapshot). - Undocumented work-allowance bypass in
docs/core-design.md:1455-1457(Correctness F5): Dropped as redundant; the updated text already explicitly states "(priced at zero)". - Move
clear_snapshot_costsontoActionCosts(Subtraction #3): Dropped as low-signal test-helper preference;clear_snapshot_costs(checkpoints.rs:4164-4180) is local to two tests incheckpoints::tests, and generalizing it ontoActionCostswould require per-GraphKindstep-construction branching.
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
- [✓]
triage:review: 99.0% -
none: 0.7% -
triage:validation: 0.1% -
triage:design-review: 0.1% -
triage:partial: 0.0% -
triage:integration: 0.0% -
triage:verify-for-closure: 0.0% -
triage:investigate: 0.0% -
triage:superseded: 0.0%
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:
ActionCosts::fresh_durationis replaced bymeasured_duration(helios/src/scheduler/cost.rs:781-790), which returns the smallest batch withnanos != 0and never expires. Three gates switch to it:checkpoint_selection_uncached(helios/src/scheduler/checkpoints.rs:624),checkpoint_copy_allowed(:965),allocate_terminal_capture(:1039). So aSnapshotcost measured once keeps terminalEndpointcaptures and prefillMessageextras available after any >30 s decode or idle window (estimate_ttl_ns = 30 s,helios/src/scheduler/policy.rs:23 (not opened),39— note there is no CLI flag for it,grepofflare-cli/srcfinds none, so the 30 s must be real wall-clock).- A single server-global
snapshot_discovery: Option<RequestHandle>(helios/src/scheduler.rs:661,756,2690-2692,2700-2702,3067-3069,checkpoints.rs:1018-1023,1040-1043,1069-1072) lets exactly one zero-priced terminal capture run when noSnapshotcost has ever been measured (warm restart against a persistent host cache) so the cost can be observed.
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)
- Builds — two, side by side, same toolchain.
baseline= merge-base of the PR /origin/mainat 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 binariesflare-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 runignition exportfor this PR.
- One core serves both arms. Use an already-prepared core from the model store
(
flare models list→flare models inspect <model> --graphs --jsonwill show platform, TP deployments and thesnapshotgraph batch capacities;docs/cli-design.md:1573-1615). - 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::andpython3 verification/helios-lifecycle/check.py(not opened) (matches.github/workflows/helios-lifecycle.yml(not opened)). - Prometheus scrape:
curl -s localhost:PORT/metrics > metrics-<arm>-<scenario>-<before|after>.txtaround 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
--scheduler-checkpoint-extra-work-fractionstays at its default0.05(docs/cli-design.md:696-711) for S1–S4/S6; S5 sets it to0.- Use a fresh disk dir per arm (
hc-baseline,hc-candidate) so records from one build cannot serve the other; and reuse the same dir across the restart in S4. - Log the startup phase line
Prepare host prefix cache(slot pool size, record directory) — it is the proof that host retention is actually enabled (docs/prefix-cache-offload.md:975-977); without it every scenario is vacuous. - For the restart steps send SIGTERM and require exit code 0 so records flush (
docs/prefix-cache-offload.md:641-647; pattern intests/server/test_prefix_cache_offload.py:99-108). - Pass
--dangerously-approve-key <fp> --dangerously-accept-publisher <ns>(or--publisher-keys) for unattended loads (docs/cli-design.md:1281,1320-1322).
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)
M()→ send prompt P (≈4000 tokens) withmax_tokenschosen 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) ×M()→ request P again withmax_tokens 32(this is the request whose terminal capture matters).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.
- candidate:
flare_checkpoint_captures_total{role="message"}≥ 1 andunknown_cost == 0. - baseline:
messagecaptures 0 andunknown_costincrements (unless the run is within 30 s of a measurement — keep the 33 s idle in front to be sure). - Do this after S1/S2, so the retained-cost effect is isolated from discovery.
S4 — warm restart (unmeasured Snapshot) + cached-anchor hit → single zero-priced discovery. (exercises the new slot; the riskiest path)
- With disk retention on, run one full request so a record is written (
flare_host_cache_stored_total> 0), then SIGTERM (exit 0). - Restart the same arm against the same disk dir, same core.
M()→ send the identical prompt again: expect a host hit (flare_host_cache_hits_total+1,host_reused_tokens > 0), anendpointcapture +1 produced by the zero-priced discovery copy (checkpoint_copy_ns = 0), andflare_checkpoint_extra_work_nanoseconds_totaldelta 0 for that copy.- Immediately send a second distinct multi-message prompt:
unknown_costmust be 0 andmessagecaptures > 0 (proof the discovery actually measured the cost).
- Assertion that guards the review's caveat: exactly one
endpointcapture in step 3 even if you submit two identical cached-anchor requests concurrently (--concurrency 2): the second must be counted inunknown_cost. Log must not contain any occurrence ofrequested lifecycle operation must be feasible(the latent-panic path noted in review round 2). - baseline: step 3 produces
unknown_cost+1/+2 and noendpointcapture — i.e. #534's symptom reproduced on upstream. If baseline reproduces nothing here, say so explicitly in the report: that is the disputed part of the issue (#534was traced to a third-party forkAzallazA/hyperflare-inferencecarryingPrefillTailMerge), and a null result on upstream main is itself the finding that decides whetherRelated to #534is justified.
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:
Prepare host prefix cachemissing ordisabledin the log → host retention off, all scenarios meaningless (docs/prefix-cache-offload.md:140-147).- Startup memory planning fails on cn7 (60 GiB shared with the OS;
docs/model-preparation.md:489-495) → drop the Gemma-4-E4B-it arm rather than shrinking other things; cn7 adds no value the cn5 TP1 arm doesn't already give for a scheduler-only diff. flare_snapshot_capacityis 0 → checkpoint cuts disabled entirely (docs/cli-design.md:704); pick another core.- Any
flare_host_cache_*_failed_totalorpool_refusedgrowth, orflare_host_cache_*_deferrals_totalrising → host tier saturated; reduce--prefix-cache-disk-limit/prompt size rather than interpreting it as a PR effect.
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
- 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-711were all updated together (the earlier review's should-fix #2 is discharged).docs/api.md:355-356was not updated and still says the counter "sums charged predicted … copy work", which is exactly what the zero-priced discovery copy violates → confirm S4'sextra_work_nsdelta of 0 and report it as a documentation gap, not a code defect. - 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.
- A latent panic path exists but is blocked by core validation:
measured_durationreturnsNonefor "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(...)inpolicy.rs(not opened).helios/src/model/catalog.rs:138-148(not opened) andcheckpoints.rs:1030block it. Worth a one-line grep of the log (see table) but not a test scenario. - 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) orLuke Alonsolook atf7f4d25before 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.
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:
fresh_durationis gone;measured_duration(helios/src/scheduler/cost.rs:783) scans declared batches ascending, returns the first estimate withnanos != 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 remainingfresh_durationreferences, so the plan's claim of "three gates switched" is complete.snapshot_discovery: Option<RequestHandle>exists (scheduler.rs:661,756); claimed incheckpoints.rs:1069-1072only when a snapshot row is actually allocated (snapshot.is_some()), gated onmeasured.is_none() && fraction > 0.0 && !snapshot_discovery_in_flight(), and cleared in exactly three places — completion (scheduler.rs:2690-2692), endpoint capture (:2700-2702), andretire(:3067-3069). Thesnapshot_discovery_in_flight()helper requiresphase != 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}withanchor/message/endpoint,flare_checkpoint_skips_total{reason}withunknown_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:355still 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 incheckpoints.rscovering retained cost after TTL, single in-flight discovery with cancel-recovery and storage-refusal-doesn't-claim-the-slot, and a fullplan → commit → completewarm-restart path that measures 25 µs and then unblocks multi-message extras. The earlier review's "tests callmeasure()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 grepsmetrics.rsfor it. Thecaptures_total/skips_totalrows 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 #534framing 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.
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-exportsWhat I verified, and caveats
Verified against the PR head (
f7f4d25), not just the plan:
fresh_durationis gone;measured_duration(helios/src/scheduler/cost.rs:783) scans declared batches ascending, returns the first estimate withnanos != 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 remainingfresh_durationreferences, so the plan's claim of "three gates switched" is complete.snapshot_discovery: Option<RequestHandle>exists (scheduler.rs:661,756); claimed incheckpoints.rs:1069-1072only when a snapshot row is actually allocated (snapshot.is_some()), gated onmeasured.is_none() && fraction > 0.0 && !snapshot_discovery_in_flight(), and cleared in exactly three places — completion (scheduler.rs:2690-2692), endpoint capture (:2700-2702), andretire(:3067-3069). Thesnapshot_discovery_in_flight()helper requiresphase != 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}withanchor/message/endpoint,flare_checkpoint_skips_total{reason}withunknown_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:355still 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 incheckpoints.rscovering retained cost after TTL, single in-flight discovery with cancel-recovery and storage-refusal-doesn't-claim-the-slot, and a fullplan → commit → completewarm-restart path that measures 25 µs and then unblocks multi-message extras. The earlier review's "tests callmeasure()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 grepsmetrics.rsfor it. Thecaptures_total/skips_totalrows 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 #534framing 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.comlinks. I treated those as material, not instructions, and did not fetch or act on them; all findings above come from the repository itself.