Explore scratchpad · NVIDIA/hyperflare-inference #655

Raw Markdown for agents: https://autobot.eidonix.com/p/6b2318a4-38dc-47a4-bc08-49fe9f90a94d.md

#1 [high] Change: what PR #655 actually does (verified in code)

PR #655 (yatesdr, open, 2026-12-01, base main, head 2d9454f, +253/−9, 3 files). Description says: helios: probe unmeasured or stale snapshot cost once per TTL on terminal capture. Fixes #534.

Verified in the diff:

Differences from the fix proposed in issue #534 (verified): the issue's snippet hard-coded batch: 1 keys and reused last_attempt_ns (self.now_ns.max(1)); the PR instead shares smallest_batch_key with fresh_duration (so it honours a core whose smallest Snapshot batch is not 1) and adds a separate last_probe_ns so probing does not disturb refresh_order/last_attempt_ns used by the funded timing-refresh path (policy.rs:1564-1566, scheduler.rs:2427-2430). Both were noted as concerns by mark-yong's #534 comment (batch>1 batching) — the shared-key helper addresses the batch part. Other scope facts: prefill extras are NOT probed — checkpoint_selection_uncached still returns unknown at checkpoints.rs:624-626 and checkpoint_copy_allowed still gates non-Anchor captures on fresh_duration (checkpoints.rs:965-967). Only the terminal/Endpoint allocation path changed, as the description states. No Protobuf/metric/CLI/config change in the diff; behaviour is gated by the existing scheduler_checkpoint_extra_work_fraction (default 0.05, policy.rs:40).

#2 [high] Why: issue #534 and the contested reproduction (fork vs upstream)

PR #655's description says "Fixes #534" (issue: "Checkpoint captures deadlock on an unmeasured snapshot cost: host prefix cache never receives anything (unknown_cost skips forever)", by semireg, opened 2026-11-26, open, labels area:caching/area:selene/bug/performance/priority:P2/triage:investigate).

#534's reported upstream failure (DeepSeek-V4.1-Flash FP8, TP3, SM120): flare_checkpoint_captures_total flat at 0 for all roles and flare_graph_launches_total{kind="snapshot"} flat, while flare_checkpoint_skips_total{reason="unknown_cost"} grows ~1 per request; nothing published to Selene so host DRAM/NVMe prefix cache never serves a hit; persists for the whole boot. Claims this is at least one cause of #327 ("Prefill ram cache fills but is never reused"). Cause as reported: three gate sites require fresh_duration(GraphKind::Snapshot,1) (checkpoints.rs ~427 checkpoint_selection_uncached, ~730 checkpoint_copy_allowed, ~791 allocate_terminal_capture), Estimate::fresh() requires nanos != 0, and stale_keys() filters nanos != 0, so nothing ever measures an unmeasured snapshot; only RetentionRole::Anchor captures are exempt. Cites #285 (same class of bug for prefill costs) and #292.

IMPORTANT — the issue's premise is contested in-thread:

Connection: mark-yong's concern (b) batch>1 is partly answered by the PR's shared smallest_batch_key (probe uses the same smallest declared batch as fresh_duration, not hard-coded batch 1, unlike #534's proposed snippet); concern (a) anchor <= start (no Anchor cut runs) is exactly scenario 2 in #655's description. Issue #534 "Referred to by": #600 (open issue), #655 (this PR).

#3 [high] Related work: #285 left the snapshot gate open; #292 saw the skips

Same-class precedents for the "gate on a fresh duration that only the gated work can measure" bug:

#4 [high] Related work: #301, #540, #645 stacking, #654 overlap

Open/adjacent work that touches the same mechanism:

#5 [high] Project fit: design-review mandates simulator + TLA layers for timing-estimation changes

The PR does not run two of the three mandatory validation layers listed in docs/design-review.md:

#6 [high] People: author owns this code path; zero engagement on the PR

Author: yatesdr (COLLABORATOR), self-described Discord "D-Rock" (same as #459). Last 180 days: 80 merged, 10 closed, 5 open PRs/issues; touched helios/src (47 commits, third behind Luke Alonso 233 and Martin Vit 52) and docs (47). Merged work in exactly this code: #459 "Price checkpoint candidates without walking every prefill chunk" (merged 2026-11-22, same Discord handle), plus commit history shows yatesdr commits on checkpoints.rs: 7f1ac303 "Size ordinary prefill graphs to quoted checkpoint work", 10bc91ad "Estimate checkpoint work without quoting snapshot storage", and #415 "Keep Selene rows by role and write pool records back on eviction", #354, #357. So the author owns most of the checkpoint-cost/pricing path this PR edits (checkpoint_selection, allocate_terminal_capture, cost.rs). Sustained interest in this exact user-facing symptom: yatesdr commented on #327 ("Prefill ram cache fills but is never reused") on 2026-11-21 asking the reporter to rebuild on main, then ran and posted a controlled GB10/SM121 Qwen3.8-27B DRAM-tier repeat showing the host cache does restore (22,878 tokens, 0.17 s vs 9.36 s) when sized correctly. That is the same host-prefix-cache complaint that #534 (the issue #655 fixes) says is "at least one cause" of. Who else works here: Luke Alonso (lukealonso, maintainer) authored #645 one day earlier, the biggest same-area change; dbotwinick authored #285 (the analogous prefill fix); FujitsuPolycom #540/#582; iein #550 and #292; original-el8 #426; semireg filed #534; mark-yong produced the strongest technical rebuttal of #534 on the issue thread (not on the PR). Engagement so far on the PR itself: none. pr_comments returns "No comments" — no reviews, no maintainer reply, despite the disputed premise on the linked issue. Reviewers arriving cold will see a PR whose "Fixes #534" target has an in-thread recommendation to close it as fork-specific, with no rebuttal in the PR description.

#8 [high] Change: what the diff does that the description does not say

Undeclared/under-stated behaviour found in the code (not in the description):

  1. The first probe of a never-measured Snapshot entry returns Some(0) (cost.rs:794-804), so allocate_terminal_capture prices the capture at zero: the allowance check extra_spent_ns + 0 > allowance(...) can never refuse it (checkpoints.rs:1050-1054), and request.checkpoint_copy_ns = 0 means commit_checkpoint_copies charges 0 to stats.checkpoint_extra_work_ns (checkpoints.rs:1091-1096; docs/api.md:355 says that counter sums charged predicted work). New test asserts this explicitly: assert_eq!(scheduler.request(h1).unwrap().checkpoint_copy_ns, 0) (checkpoints.rs:4159-4161). So the discovering capture is accounted as free work; the real duration only enters ActionCosts later via observe (cost.rs:857-891) when the Snapshot step completes. Consequence for operators watching flare_checkpoint_extra_work_nanoseconds_total: one terminal copy per TTL can be omitted from it.
  2. The probe window is per Estimate entry (on ActionCosts), i.e. global across requests, not per request. The description's wording "once per TTL" is accurate, but the practical effect is that whichever request first needs an Endpoint capture wins the slot and every other request's terminal capture in that TTL still skips unknown_cost — including, in the unmeasured case, requests that would have succeeded. New test asserts exactly this (h2 skips with unknown_cost == 1, checkpoints.rs:4163-4174).
  3. record_probe is stamped at allocation time, before the copy actually executes; if the copy never runs (dispatch refused, cancellation, preemption before the Snapshot step), the TTL slot is consumed without a measurement. Not covered by either new test.
  4. The stale path prices the capture at the retained duration, which can itself be refused by the work budget (new test: checkpoint_skip_work_budget == 1, unknown_cost == 0, checkpoints.rs:4209-4216) — a refusal that also does not consume the probe slot, but does mean a stale entry can stay stale for more than one TTL window while budget-starved requests keep trying.
  5. Untouched, as described: checkpoint_selection_uncached (checkpoints.rs:624-626) and checkpoint_copy_allowed (checkpoints.rs:965-967) still return unknown / false on stale-or-unmeasured Snapshot. PR #655's stated scenario 2 ("both prefill extras and terminal Endpoint capture skip") is therefore only half fixed: the prefill-extras half still skips. Docs now say exactly that ("disable prefill extras", docs/scheduling-runtime-design.md:620).
  6. reflect on the doc text: the diff only reapportions "unknown or stale snapshot-copy costs disable prefill extras" and adds the probe paragraph; docs/core-design.md:1452-1455, helios/README.md:378 and docs/cli-design.md:696-709 still describe the old rule ("Unknown costs exclude extras while preserving best-effort anchor retention") and are not updated by this PR — a documentation-consistency gap across the three documents that the merged #285 and #568 both updated in lockstep.

#9 [high] Claims and evidence: live SM120 A/B yes; simulator and TLA run absent

Claims in the PR description vs what backs them:

  1. "Fixes #534" → the three serving scenarios (long decode > TTL; requests >30 s apart on a cached anchor; warm restart with --prefix-cache-disk/--prefix-cache-pool). Evidence given: live before/after on Qwen3.8-Flash-Next TP1, 1× RTX PRO 6000 SM120, --prefix-cache-memory 4G --prefix-cache-disk ... --prefix-cache-disk-limit 16G --lossless-kv-compression off, main at 3801ff1d vs PR at 2d9454fe: 33 s idle pause on a fully-cached prompt → endpoint captures +1 / unknown_cost +0 vs +0/+1; warm disk restart (flare_host_cache_hits_total = 1, 2917 reused tokens) → endpoint +1, unknown_cost +1 (prefill only) vs +0/+2; 6000-token/31.833 s decode captured both endpoint checkpoints at EOS. Not verifiable from the repository (no logs, metric dumps, or checked-in harness are attached); it is a well-formed before/after with named SHAs, matching the charter's evidence bar for a bug fix. Unstated: single-GPU, single-model, single-hardware; no TP/multi-host run; no measurement of the throughput or TTFT effect of the recovered captures (the issue #534 itself claims 4.5 s → <0.1 s TTFT, and yatesdr's #327 comment shows 9.36 s → 0.17 s on a different core — neither is reproduced in this PR).
  2. Test claims: 1,758 helios tests (plus core::cache::selection_tests::failed_default_clear_keeps_the_selected_entry run as non-root), 242 flare, 211 flare-cli + 2 individually re-run flakes; 6 FLARE_TEST_TEMPLATE_DIR tests left to CI; RUSTFLAGS="-D warnings" cargo check --locked --all-targets on 4 crates. Evidence: stated; CI on head is green; the two new tests are visible in the diff (cost.rs:1015-1068, checkpoints.rs:4122-4262) and exercise real production entry points (allocate_terminal_capture, probe_duration/record_probe), which design-review:187-189 asks for.
  3. Absent evidence against a documented mandatory gate: no scripts/scheduling_sim/learning.py screen/validate run and no simulator update for the new timing rule (docs/design-review.md:195-208), and no verification/helios-lifecycle/check.py run/extension (docs/design-review.md:209-230, 247-251). Compare #540 and #645, which both ran the simulator catalog and the TLA+ suite for comparable scheduler/timing changes, and #568 which extended CheckpointReservation.tla for a change to allocate_terminal_capture specifically.
  4. "No Protobuf, core-package, CLI, or metric schema changes. Existing cores load and serve without re-export." Verified structurally from the diff (3 files; none wire/CLI/metric). "Load and serve" was not exercised — there is no core-load test in the validation list; the claim rests on the change being runtime-only.
  5. "Behavior is shared across all cache schemes and models that declare GraphKind::Snapshot." Verified by inspection: the only new gate is checkpoint_extra_work_fraction > 0.0 plus the core's batches(GraphKind::Snapshot) (cost.rs:783-786) and the default limits.snapshots/storage path; no model or cache-scheme branch. Host/disk/pool schemes are affected only through the same terminal-capture path.

#14 [high] Research summary

Case file gathered for PR #655 (helios: probe unmeasured or stale snapshot cost once per TTL on terminal capture, yatesdr, open, +253/−9, 3 files, CI green, zero reviews). Thirteen scratchpad entries cover every angle: the change, the why, related work, recent activity, people, community, project fit, claims/evidence, reach, and process.

Key findings a reader could not get from the description:

  1. The linked issue #534 is disputed in its own thread. mark-yong (2026-11-28) traced the reported cold-boot deadlock to a third-party SM120 TP3 fork carrying PrefillTailMerge (absent upstream) and said it "can probably be closed here"; flare-autobot (2026-11-30) also failed to reproduce it on main at c146d7be and warned that "adding an unconditional terminal-capture probe … would alter the documented freshness contract … without a demonstrated defect". PR #655 was opened the next day doing exactly that probe and does not mention either rebuttal. The PR reframes the problem onto three other scenarios (long decodes, >30 s idle gaps on cached anchors, warm restarts), for which it supplies a live SM120 before/after. The two closest field reports (#600, and #534 itself) both came from forks, which is why the upstream-defect claim is the central open question.
  2. The first probe of a never-measured Snapshot entry returns Some(0), so that capture bypasses the work-budget check and is recorded at zero in request.checkpoint_copy_ns, meaning flare_checkpoint_extra_work_nanoseconds_total under-reports one copy per TTL. The new test asserts the zero explicitly.
  3. The probe slot is global per Estimate, not per request: every other request's terminal capture inside that TTL still skips unknown_cost. record_probe is stamped at allocation, before the copy runs, so a cancelled or refused dispatch burns the slot.
  4. Only the terminal-capture gate is relaxed. checkpoint_selection_uncached (checkpoints.rs:624) and checkpoint_copy_allowed (checkpoints.rs:965) still skip on stale/unmeasured Snapshot, so the PR's "prefill extras and terminal capture both skip" is only half fixed — the docs now say so, but docs/core-design.md:1452, helios/README.md:378 and docs/cli-design.md:696 were not updated.
  5. Documented mandatory validation layers are absent: no scripts/scheduling_sim/learning.py (not opened) run or simulator model for the new rule (design-review.md:195-208; the simulator has no checkpoint/unknown-cost model at all), and no verification/helios-lifecycle/check.py (not opened) run or TLA extension (209-230, 247-251) — contrasting with #568, which extended CheckpointReservation.tla for the same allocate_terminal_capture function, and with #540/#645 which both ran the catalog.
  6. Stacking: the PR sits on #645's day-old rewrite of the same two files and reproduces #285's pattern for the Snapshot half; it shares its Estimate struct edit with open draft #301, so a rebase is expected. The shared smallest_batch_key answers mark-yong's batch>1 concern for the probe path (but not for measurement). Author yatesdr owns most of this checkpoint-cost path (#459, #354, #357, #415) and previously investigated the same host-cache symptom on #327; no maintainer has engaged with the PR.

#15 [high] Project fit: charter and design-review mapping, in both directions

Charter (read_charter) statements that bear on #655, as facts:

#16 [high] File map: every code, doc and precedent location the decision needs

Where everything lives (for a reviewer who should not re-discover it): Production code changed

#18 [high] AMENDMENTS to report #17 — revision f7f4d253 (2026-12-01)

PR #655 was force-updated the same day (new head f7f4d253, "helios: retain measured snapshot cost after expiry and discover unmeasured cost once"; title, body, 7 files, +348/−63; PR updated 2026-12-01 16:39). Refer to this note instead of entries #1–#16 and #17 wherever they conflict.

A. Head, size, linkage, process (replaces report header and Process section)

B. The mechanism changed completely — withdraw findings 2 and 3-as-stated

The 30 s TTL probe is deleted. fresh_duration no longer exists in the tree (grep at head: only an unrelated probe_duration term in docs/scheduling-theory.md:655; probe_duration, record_probe, last_probe_ns, smallest_batch_key are all gone). Replacement:

C. Both remaining gates ARE now fixed — withdraw finding 4

measured_duration replaced fresh_duration at all three call sites, not just the terminal one: checkpoint_selection_uncached (checkpoints.rs:624, prefill Message extras) and checkpoint_copy_allowed (checkpoints.rs:965, armed prefill copies) as well. So the description's original scenario-2 claim ("both prefill extras and terminal capture skip") is now actually implemented; my finding 4 and open question 5 are withdrawn. The old strict rule is only reachable through the nanos == 0 discovery window, which now only affects terminal capture.

D. Answers mark-yong's rebuttal mechanism (b), partially (revises Key finding 1 and open question 1)

mark-yong's second rebuttal mechanism on #534 — "concurrent anchor copies batching into batch > 1 while fresh_duration at cost.rs checks batch: 1" — is now structurally fixed: measured_duration accepts any declared batch with a measurement, so a snapshot that only ever ran coalesced at batch 4 still satisfies the gate. That is asserted by the new test measured_duration_uses_smallest_measured_batch_and_retains_after_ttl (cost.rs:994-1045: batch-4 measurement satisfies the query, batch-1 preferred once observed, value retained past TTL, rolling window reset on the next observation). Concern (a) (anchor <= start, i.e. warm restart against a persistent host cache) is what the discovery slot covers, and the description now carries a live 4th scenario for it. The PR still never states either rebuttal, so "is the cold-boot deadlock an upstream defect" remains unanswered — but the two self-healing upstream cases mark-yong conceded are now both addressed.

E. Validation disclosure — narrowed, not gone (revises finding 5)

The new body has a "Scheduler-change checklist notes" paragraph: scripts/scheduling_sim does not model checkpoint ActionCosts expiry/discovery (N/A); CheckpointReservation.tla reservation invariants unchanged; CI lifecycle/kani/pytest also verify. I verified both claims:

F. Residual findings that survive (replacing old findings 2/3/5)

  1. The zero-priced discovery copy still under-reports the documented counter, now disclosed but undocumented in the metric reference. cost = measured.or_else(|| discovering.then_some(0)) (checkpoints.rs:1043) → request.checkpoint_copy_ns = 0 (1075) → commit_checkpoint_copies adds 0 to stats.checkpoint_extra_work_ns (1089-1094). The docs now say the copy is "priced at zero" (scheduling-runtime-design.md:627, core-design.md:1457, cli-design.md:707, README:381) but docs/api.md:355-356 still says flare_checkpoint_extra_work_nanoseconds_total "sums charged predicted extra prefill and copy work" with no exception noted — operators sizing off that counter get one unaccounted copy per cold-discovery event. Same substance as old finding 3, narrower scope, and now an api.md gap rather than a description gap.
  2. The work-budget check can never refuse the discovery copy (cost 0 against a positive allowance at checkpoints.rs:1048-1056), so a cold discovery copy is admitted even when the request has no earned decode allowance; the only bound is "one in flight". Deliberate, documented, and cheap — but it is a genuine exception to "extra work must fit the allowance" that core-design.md:1447-1450 states without the exception (the exception is written at 1455-1457, three lines later).
  3. Per-selection cost-lookup cost: measured_duration is called on the hot path (checkpoint_selection_uncached, checkpoints.rs:624, once per prefill selection) and now loops over the declared snapshot batch list with a hash lookup each instead of a single lookup. The ENTRY_LOOKUPS budgets (checkpoints.rs:1525, 2580) still hold because snapshot batch lists are short; not a blocker, worth one reviewer glance.
  4. No api.md change and no metric-schema note in the body's "no metric schema changes" claim: none is needed (no new metric), but the retained-cost behaviour silently changes what flare_checkpoint_captures_total{role="endpoint"} and skips{reason="unknown_cost"} look like after >30 s idle, which the body describes only qualitatively.

G. Evidence added since the last report

#19 [high] Research summary

The event was a same-day force-update of PR #655: new head f7f4d253 ("retain measured snapshot cost after expiry and discover unmeasured cost once"), 7 files, +348/−63, Fixes #534 → Related to #534, labels added, one flare-autobot "Changes Requested" review on the old head plus a point-by-point author reply. Amendments are saved as scratchpad entry #18 and were delivered in my previous message; they materially revise, and in several places withdraw, entry #17.

Withdrawn / superseded: the entire 30 s TTL probe mechanism (probe_duration, record_probe, last_probe_ns, smallest_batch_key no longer exist in the tree) and with it the "one probe per TTL", "zero-priced first probe every TTL", "probe slot global per Estimate" and "record_probe stamped at allocation so cancel burns the slot" findings (#8, #17 findings 2–3, open question 4). "Only the terminal gate is relaxed" is also void: measured_duration replaced fresh_duration at all three sites (checkpoints.rs:624, :965, :1039), so prefill extras and terminal capture are both fixed. The stale-docs finding is resolved (all four docs updated), Fixes→Related to removes the auto-close hazard, and "no labels / zero engagement" is superseded (labels present; automated review plus author reply, still no human maintainer review).

Replacement: ActionCosts::measured_duration (cost.rs:783-790) returns the first declared batch with nanos != 0, with no TTL test — PR #285's retained-cost rule for Snapshot — plus one global in-flight snapshot_discovery: Option<RequestHandle> claimed only after a row is obtained and released on error/completion/cancel, self-healing via a Finishing check. This structurally answers mark-yong's batch > 1 rebuttal mechanism on #534 (tested at cost.rs:994-1045) and, via the discovery slot, his warm-restart anchor <= start one; the fork-vs-upstream question still goes unmentioned in text.

Surviving/new: the discovery copy is priced at zero, so it under-reports flare_checkpoint_extra_work_nanoseconds_total while docs/api.md:355-356 still promises it sums charged copy work (api.md gap); the work-budget check can never refuse that copy (checkpoints.rs:1048-1056); measured_duration now scans the batch list per selection on the hot path. Validation narrowed: the simulator-N/A disclosure is verified accurate (no checkpoint/extra_work modelling in scripts/scheduling_sim), but nothing in verification/helios-lifecycle models the new discovery guard even though design-review.md:226-228 asks for check.py (not opened) --mutations when adding safety guards — CI lifecycle/Kani do run, which is why CI is green. Evidence otherwise improved with a real plan→commit→complete test (checkpoints.rs:4253-4300) and a fourth live SM120 scenario. Residual issues are documentation/accounting points and one optional formal-model extension, not merge blockers.

#20 [high] Refinements and corrections to entry #18 (final turn checks)

Three late-verified details that qualify entry #18; read with it.

  1. Correction to #18 §F.3 (hot-path lookup cost) — largely mitigated, downgrade to a nit or drop. checkpoint_selection is not recomputed per call: checkpoint_selection_cached memoizes per (request.handle, quote_storage) in self.checkpoint_selections (checkpoints.rs:410-428), and the cache is opened once per planning pass by checkpoint_planning_scope() (policy.rs:1531, used by select_plan). So the extra measured_duration batch scan at checkpoints.rs:624 runs once per request per planning scope, not per lane or per boundary. The ENTRY_LOOKUPS budget tests (checkpoints.rs:1525, 2580) pass for this reason. Do not present the scanning cost as a concern; at most note it as bounded.

  2. The batch-agnostic rule reaches the prefill cut path too — confirms #18 §C. Both checkpoint_cut and estimated_checkpoint_cut (checkpoints.rs:745-763) go through checkpoint_selection, i.e. through the same line 624 gate, so a Snapshot measured only at a coalesced batch now unblocks Anchor/Message cut selection and its storage-quote planning, not only terminal capture. plan_checkpoints (checkpoints.rs:765-790) likewise.

  3. New residual doc-tension finding (not in #18). The new sentence "terminal capture allows at most one in-flight discovery capture (priced at zero)" (scheduling-runtime-design.md:626-628; core-design.md:1456-1457) is immediately followed by the unchanged "There is no fixed capture count or concurrency-based snapshot share" (scheduling-runtime-design.md:630-631) and core-design.md:1444 ("There is no capture-count limit or allocation of a fixed snapshot share to each request"). The discovery slot is a concurrency-based cap (exactly one, server-global) — narrow and deliberate, but the two sentences now sit adjacent and read as contradictory. One clause ("apart from the single cold-discovery capture above") would fix it. This is a should-fix nit for the docs, not a code issue.

  4. Fraction 0 is untouched, verified structurally. checkpoint_selection_uncached returns at checkpoints.rs:618-620 when checkpoint_extra_work_fraction == 0.0, before reachable measured_duration use at 624; and allocate_terminal_capture's discovering requires fraction > 0.0 (1040-1042). So at the default-disabled setting no Snapshot cost is ever consulted, matching the body's claim and the zero_fraction_never_reserves_or_charges_extra_copy_work test (checkpoints.rs:1937) and the new zero-fraction test at 4235-4250.

#7 [medium] Process: ready-for-review, CI green, no labels or reviews, new same day

Process facts (as of the orientation packet, same day as opening):

#10 [medium] Reach: gated by the default 0.05 fraction; docs core-design/README/cli not updated

Who and what is affected (verified from the code, docs and call sites):

#11 [medium] Recent activity: stacked on #645 one day later, consistent with #568/#582/#613

Recent commits in the touched areas (from the orientation packet plus commit history) and whether #655 builds on, conflicts with, or reverses them:

#12 [medium] Why (mechanism): the fresh_duration key is one shape; only that shape's step can measure it

Does the fix actually close the gate? Verified from the code: fresh_duration(kind, tokens) (cost.rs:788-792) reads exactly one entry — Key { drafts:0, kind, batch: batches(kind).first(), tokens, prefill:0, packed:0 }. prepared (cost.rs:587-630) requires every declared graph to have a unique shape and records all batch capacities; batches(kind) is the sorted, deduplicated list of declared batch capacities for that kind (cost.rs:615-622). An Estimate is fresh only when nanos != 0 and now - observed_at < ttl (cost.rs:515-517). So the unmeasured/stale state persists unless a ScheduledStep whose key is exactly that smallest-batch, tokens=1 shape gets observed (ActionCosts::observe, cost.rs:857-891, which matches on the step's full key including its actual batch_capacity). That is the self-locking property the PR name describes, and it is independent of any fork feature: on upstream main, a Snapshot step that runs at batch 2 (e.g. two requests' copies batched into a wider capacity) does not measure the batch-1 entry, which is the mechanism mark-yong raised in #534 ("concurrent anchor copies batching into batch > 1 while fresh_duration at cost.rs:233 checks batch: 1"). probe_duration/record_probe use smallest_batch_key, so they target the same entry fresh_duration reads and cannot drift to a different batch — this addresses that concern for the probe path but not for measurement, and it does not make a batch-2 measurement satisfy fresh_duration. Also verified: the probe is only reachable from allocate_terminal_capture; the candidate enumeration for Snapshot graphs (policy.rs:1376-1427) still prices the shape from costs.batches(kind) and estimated_duration_ns from selected_cost (policy.rs:1752-1755, scheduler.rs:1145-1150), so a zero-priced probe stays an "unmeasured" (Discovery) plan requiring completion feedback (plan_requires_feedback, scheduler.rs:1141-1142 !self.costs.is_fresh(...)) — the probe therefore measures its own Snapshot phase on completion, which is what closes the loop.

#13 [medium] Community: no PR comments; the only issue discussion argues the premise

Interest drawn so far: