Correctness and contracts scratchpad · NVIDIA/hyperflare-inference #674

Raw Markdown for agents: https://autobot.eidonix.com/p/3d73eef9-de8f-4803-86ec-b6ae16f2ad18.md

#1 [high] Head identity: recorded head is 19ce4a7b, not claimed 0ebee3d4

PR #674 recorded head = 19ce4a7b ("selene,selene-manager,helios: improve prefix-cache hit rate..."), base 1fbcc3c9. search_history (default = PR head) newest first: 19ce4a7b, 1fbcc3c9, 8489d504(#663), 5c0d9c67(#666), a3c80e19(#657), 5d53040e(#628). The author's 18:08 comment and the task header claim HEAD 0ebee3d4 rebased onto main 4cc6f2fd; that commit is not in the item and the tree does not contain the claimed work.

Evidence the claimed fixes are NOT landed at 19ce4a7b:

Dossier A2/A3-consistent: baseline 5d53040e is 6 commits behind base 1fbcc3c9 (19ce4a7b's own base is 1fbcc3c9), and main has moved to 4cc6f2fd (#660) which touches heios/src/scheduler/checkpoints.rs — the file carrying #674's new estimate_prefill_delta_ns.

#2 [high] F1 BLOCKER: RowRestoreLatency decay clock still unfixed at recorded head

Severity: Blocker. Recorded head is 19ce4a7b (base 1fbcc3c9); the author's 18:08 comment and the task header claim HEAD 0ebee3d4. search_history at PR head returns 19ce4a7b, 1fbcc3c9, 8489d504(#663), 5c0d9c67(#666), a3c80e19(#657), 5d53040e(#628) — 0ebee3d4 is not in the item.

helios/src/server/runtime.rs:292-304 (verbatim):

fn start(&mut self, key: crate::cache::PrefixKey, source: RowRestoreSource) {
    let now = std::time::Instant::now();
    if let Some((previous, _)) = self.in_flight.insert(key, (source, now))
        && let Some(bucket) = self.buckets.get_mut(&previous)
    { bucket.in_flight = bucket.in_flight.saturating_sub(1); }
    let bucket = self.buckets.entry(source).or_default();
    bucket.in_flight += 1;
    if let Some((_, last)) = &mut bucket.last_median {
        *last = now;
    }
}

finish(ok=false) returns before observe — runtime.rs:306-317: if !ok { return; } self.observe(source, started.elapsed()...) at :313-316. So a failed row-only fetch leaves in_flight == 0 but last_median timestamp reset to now.

estimate_seconds — runtime.rs:332-343: if bucket.in_flight > 0 { return median; } median * 0.5f64.powf(last.elapsed().as_secs_f64() / Self::RECOVERY_SECONDS) with RECOVERY_SECONDS = 10.0 (:290).

Failed-fetch call sites: sync runtime.rs:3402 row_restore_latency.start(key, source) → :3406 finish(&key, false); async runtime.rs:2825-2826 StoreEvent::Fetched { key, result } => { self.row_restore_latency.finish(&key, result.is_ok()); ... }.

Impact: after any failed row-only fetch the whole source bucket jumps back to 100% of a long-decayed median for another 10 s half-life window, so the scheduler can reject a cheap local-DRAM row restore (worth_restore at :225-229, used at :3354). Pricing-estimate defect, not a correctness/concurrency/data bug.

Test gap: the only test is the empty-bucket case — helios/src/server/runtime/phase_tests.rs:8799-8801:

worker.row_restore_latency.start(dummy_key, local_dram);
worker.row_restore_latency.finish(&dummy_key, false);
assert_eq!(worker.row_restore_latency.estimate_seconds(local_dram), 0.0);

(last_median == None ⇒ 0.0). No test pins the decayed-median path. Neighbours at :8837-9002 cover source bucketing, not the clock. The claimed added regression test is absent.

Fix: delete the if let Some((_, last)) = &mut bucket.last_median { *last = now; } block from start(); refresh last only in observe() (:329 already does). Add a test that observe()s a slow sample, ages it (e.g. by shrinking RECOVERY_SECONDS under #[cfg(test)] or exposing an age() like selene::levels::Rate::age at levels.rs:83-86), then start()+finish(false) and asserts estimate_seconds stays decayed.

Secondary (same mechanism, wider blast radius): in_flight entries at runtime.rs:285 have no reaper and no timeout. If a StoreEvent::Fetched for a row-only restore is ever lost, bucket.in_flight stays > 0 forever and estimate_seconds returns the undecayed median permanently for that whole source bucket — not just the 10 s window — affecting every other request pricing a restore from that source. Pre-existing leak semantics were per-request (finish_inbound), the new counter makes it per-bucket. Fix: reap entries older than some multiple of RECOVERY_SECONDS at the top of start()/estimate_seconds(), or derive in_flight from the in_flight map on demand per source.

#3 [high] F2 MAJOR: restore-pricing fallback prefill_rate never updates under concurrency

Severity: Major (claim accuracy + admission-pricing accuracy).

helios/src/server/runtime.rs:3064-3084 (verbatim):

fn observe_prefill_rate(&mut self, step: &ScheduledStep, tokens: u64, timing: crate::execution::ExecutionTiming) {
    let capacity = step.prefill_capacity() as u64;
    if !step.kind.is_prefill()
        || step.lanes.len() != 1
        || capacity == 0
        || (step.lanes[0].tokens as u64).saturating_mul(2) < capacity
    { return; }
    let Some(duration_ns) = crate::scheduler::observed_duration_ns(timing)
        .or((timing.wall_ns > 0).then_some(timing.wall_ns))
    else { return; };
    let seconds = duration_ns as f64 * 1e-9;
    if tokens > 0 && seconds > 0.0 {
        self.prefill_rate = 0.8 * self.prefill_rate + 0.2 * (tokens as f64 / seconds);
    }
}

self.prefill_rate initialises to flare_selene::INITIAL_PREFILL_RATE = 8000.0 (selene/src/store.rs:447; init at runtime.rs:1299).

The fallback pricing path that consumes it — runtime.rs:3279-3280:

let gained = candidate_tokens.saturating_sub(resident_tokens);
gained as f64 / fallback_prefill_rate.max(1.0)

The PR body claims: "Price host restores using read-only scheduler prefill-delta estimates (estimate_prefill_delta_ns) paired with measured per-level pool restore rates instead of wall-clock prefill EMA" and lists under Limitations only that a "narrowed cold-start fallback prefill_rate EMA (sampled on single-lane prefill steps with >= 50% capacity fill)" is retained.

Impact: the sampling predicate requires exactly one prefill lane. A server that always has ≥2 concurrent prefill requests (the multi-instance / multi-turn workloads the PR measures in Tables C and F) never satisfies step.lanes.len() == 1, so prefill_rate never leaves 8000 tok/s. Whenever RequestScheduler::estimate_prefill_delta_ns returns None (not yet measured — runtime.rs:3269-3278), restore pricing falls back to a constant gained / 8000, i.e. the very wall-clock-free guess the change set out to remove. Restore admission therefore cannot adapt to prompt length, batch shape, or model on exactly the busy configurations this PR targets, and RestoreWait::defer (runtime.rs:240-252) budgets waiting against the same constant.

Fix: either (a) also sample when step.lanes.len() > 1 using per-lane token share and the shared step duration (dividing capacity by lane count), or (b) gate the fallback itself — when prefill_rate has never been observed, treat estimated_prefill_saved_seconds as None and let the caller admit without a restore (safe default) rather than pricing off a constant. Add a test that drives N>1-lane prefill steps and asserts prefill_rate != INITIAL_PREFILL_RATE.

#4 [high] F3 MAJOR: claimed-fixed items absent at head (POOL_LEVELS, API disclosure, Windows parity, worth_restore, clippy allow)

Severity: Major (contract/documentation regression + metric-semantics drift; prior round marked "resolved" but the recorded tree still lacks it).

Claimed-fixed items that are demonstrably absent at head 19ce4a7b (search_code returns "No matches" for POOL_LEVELS|HostAdmissionProbe|conditioned_inputs_from_images):

  1. POOL_LEVELS / positional level labels. selene/src/levels.rs:119-128 still:
/// Current transfer rates in bytes per second for pool restore levels:
/// `[NeighbourGpu, HostDram, HostNvme, RemoteNvme]`.
pub fn rates(&self) -> [f64; 4] {
    [
        self.rates[Level::NeighbourGpu.index()].get(),
        self.rates[Level::HostDram.index()].get(),
        self.rates[Level::HostNvme.index()].get(),
        self.rates[Level::RemoteNvme.index()].get(),
    ]
}

consumed positionally at helios/src/server/metrics.rs (new block, flare_host_cache_pool_inbound_bytes_per_second): hardcoded [("neighbour_gpu", &self.host_pool_inbound_rates[0]), ("host_dram", ...1), ("host_nvme", ...2), ("remote_nvme", ...3)]. Two independent orderings, no shared constant; Level::index() is fn index(self) (private, levels.rs:18-26) so nothing outside can verify order. Renaming/reordering Level silently mislabels the gauge — and this gauge is now published as a pricing input (docs/api.md new paragraph) and quoted in the PR body as measurement evidence ("flare_host_cache_pool_inbound_bytes_per_second{level=\"neighbour_gpu\"} measured 2.33 GB/s").

  1. HostHit.pooled disclosure gap. The PR body's "Compatibility and Limitations" still has only four bullets and does not list the public flare-selene API changes: HostStore::begin_lookup(.., resident: u64) (selene/src/store.rs:377), HostHit::pooled (new field, selene/src/store.rs:100-103), TierStore::retired(.., _offered: &[Retiring]) (:433-440), TierStore::pending_pool_drain (:401-404), StoreStats reserved/rate fields. The body claims "Public flare-selene API updates" is disclosed — it is not in the recorded body; only a generic "in lockstep with workspace callers" phrase appears.

  2. Windows direct-I/O fallback still dead. selene/src/disk.rs:1774-1784:

fn is_direct_unsupported(error: &io::Error) -> bool {
    #[cfg(unix)] { error.raw_os_error() == Some(libc::EINVAL) }
    #[cfg(not(unix))] { let _ = error; false }
}

eos/src/windows.rs:104-109 returns io::ErrorKind::Unsupported when a sector does not divide 4096. The new buffered fallback arm at selene/src/disk.rs:1423 (Err(e) if is_direct_unsupported(&e) => { ... write_all ... }) is therefore unreachable on Windows, so a Windows host whose volume reports a non-dividing sector size gets Err(e) => return Err(io_failure("create packed record file", e).into()) at :1438 and packed v4 writes fail outright instead of degrading to buffered writes. Same dead arm for Job::WriteRecord at :859-861. Windows is a supported target (merged #171). Fix: matches!(error.kind(), io::ErrorKind::Unsupported | io::ErrorKind::InvalidInput) in the non-unix arm.

  1. worth_restore still duplicated. Helios defines fn worth_restore(transfer_seconds, prefill_saved_seconds) at helios/src/server/runtime.rs:225-229; flare_selene still exports worth_fetching (selene/src/store.rs:450) and worth_transfer (:459) but no worth_restore, and worth_transfer/worth_fetching now have no production callers (only tests). Two implementations of the same admission rule; the selene one is untested-in-production dead code while helios' copy is the live rule. This is a divergence risk for the RestoreWait budget which uses the same predicate.

  2. #[allow(clippy::too_many_arguments)] still present on admit_with_host_store (helios/src/server/runtime.rs:3285) with 15 positional parameters (:3286-3301), and the duplicated PreparedImageInput::conditioned_input mapping exists at both runtime.rs:1722-1725 and :3324-3327.

Note: these were flagged in round 2 and the author's 18:08 comment claims them fixed; the tree contradicts that for every one. Downstream should not mark them closed until the next recorded head.

#5 [high] F4 MAJOR: pool inbound rate gauge exports seed constants, not measurements

Severity: Major (silent semantic change to a published metric; found by tracing the rate-span question).

New field and gauge: StoreStats.pool_inbound_rates: Option<[f64; 4]> set from Ranking::rates() in selene/src/pool/store.rs (stats.pool_inbound_rates = Some(self.rates.rates());, at the end of PooledStore::stats), rendered at helios/src/server/metrics.rs as flare_host_cache_pool_inbound_bytes_per_second{level=...} behind host_pool_rates_present (AtomicBool, set on store(), cleared when None). Documented in the new docs/api.md paragraph.

What the value actually is: selene/src/levels.rs:36-87 Rate is a seed-initialised, capped estimator, not a measurement:

pub(crate) fn new(seed: f64) -> Self { ... median: seed, ... }
pub(crate) fn get(&self) -> f64 {
    match self.last {
        Some(last) if self.median < self.seed => (self.median * 2f64.powf(last.elapsed().../RECOVERY.as_secs_f64())).min(self.seed),
        _ => self.median,
    }
}

Seeds at selene/src/levels.rs:97-103: INITIAL_MEMORY_RATE = 20e9 (selene/src/store.rs:444) for ThisGpu, NeighbourGpu, HostDram; INITIAL_STAGED_DISK_RATE = 3e9 (:445) for HostNvme; 400 MiB/s for RemoteNvme. get() only ever recovers upward toward the seed and never exceeds it.

Verification gap: the only thing that trains a level is PooledStore::fetch → self.rates.started(level) (selene/src/pool/store.rs:538-540) and the matching observe on pool_finished. started() (levels.rs:78-82) only moves last, and observe is fed from PooledStore's restore completion.

Impact:

Secondary span issue in the same area: Ranking::observe(level, bytes, elapsed) (levels.rs:108-112) is called for pool fetches only; local-tier restores go through CompositeStore::disk_inbound_rate / memory rates instead (selene/src/composite.rs memory_fetched sets self.stats.inbound_rate = self.memory.stats().inbound_rate at :1187). So flare_host_cache_pool_inbound_bytes_per_second{level="host_dram"} and flare_host_cache_inbound_bytes_per_second measure different populations (pool-candidate restores vs local-store restores) — the new docs/api.md text does say this, but the label host_dram will be compared to inbound_bytes_per_second by any dashboard operator and they are not comparable.

Fix: (a) render only levels that have at least one completed sample (track count > 0 per level and emit the gauge absent/0 otherwise), or rename to ..._pool_inbound_bytes_per_second_estimate and document the seed; (b) either remove the .min(self.seed) cap in Rate::get() for the exported gauge or add a separate uncapped median() accessor for observability; (c) add a test asserting an unmeasured level is not exported (or exported as 0), not as its seed.

#7 [high] F5 MAJOR: A/B baseline is 5 commits behind base, straddling two pricing commits

Severity: Major (charter #210 / docs/design-review.md Principle 12 evidence rule).

The PR body's A/B baseline is 5d53040e. Actual ancestry (search_history at PR head 19ce4a7b): 19ce4a7b -> 1fbcc3c9 (#667) -> 8489d504 (#663) -> 5c0d9c67 (#666) -> a3c80e19 (#657) -> 5d53040e (#628). So the baseline is 5 commits behind the PR's own base 1fbcc3c9, not 4 as the 11:24 review says, and not "the author's 18:08 rebase onto 4cc6f2fd" which is not in the tree at all.

Among the five gap commits are two scheduler-pricing changes:

Tables A-C report deltas on quantities both of those commits touch (host restore pricing, prefill cost modelling, restore admission). The PR body has no attached raw logs; Tables A-F remain author-reported, and Table F's own note says it ran on 7d7dcdcb, an even older commit. The body's "Measured Results" preamble also says "hardware benchmarks and live saturation runs were executed on pre-refactor commit 7d7dcdcb against 5d53040e", which means the headline numbers may predate the code being merged.

Fix: re-run Tables A-C against 1fbcc3c9 (the actual merge base) or, if 4cc6f2fd is now the base, against that; attach the raw metric dumps; state explicitly which commits produced each table. Also disclose that #660 changed anchor-split pricing in the same file.

Additional disclosure items still absent from the body's four "Compatibility and Limitations" bullets: the new rank-relay wire event Kind::StoreInvalidated = 4 (which the body does mention — good, this one is present), the sub-page memory-only startup error (selene/src/offload.rs:706-712, body mentions it — present), but not: the public flare-selene API changes (HostStore::begin_lookup gaining resident, HostHit::pooled, TierStore::retired gaining offered, TierStore::pending_pool_drain, StoreStats reserved/rate fields), the narrowed-but-retained prefill_rate EMA single-lane sampling, or the RowRestoreLatency admission floor.

#8 [high] Research summary

I completed the Correctness, Contracts & System-Level Consequences review lens on PR #674 at its recorded head 19ce4a7b (base 1fbcc3c9) — not the 0ebee3d4 the task header and the author's 18:08 comment claim, which is not in the item at any recorded state. Findings are on the scratchpad in seven notes.

Blocking. The prior-round blocker is still unfixed: RowRestoreLatency::start (helios/src/server/runtime.rs:301-303) still overwrites bucket.last_median's timestamp, and finish(ok=false) returns before observe (:313-315), so any failed row-only fetch (sync :3402/:3406, async :2826) resets the decay clock and jumps estimate_seconds back to 100% of a stale median for another 10 s half-life. The only test is the empty-bucket case (phase_tests.rs:8799-8801); the claimed regression test is absent. I added a second, wider-radius defect in the same struct: in_flight (runtime.rs:285) has no reaper, so a single lost StoreEvent::Fetched pins the whole source bucket at its undecayed median permanently, affecting every other request pricing that source.

Majors. (1) The narrowed observe_prefill_rate (runtime.rs:3064-3084) requires exactly one prefill lane, so busy multi-lane servers — the very configurations Tables C and F measure — never move prefill_rate off the INITIAL_PREFILL_RATE = 8000 constant, and the fallback pricing at :3279-3280 is therefore a fixed guess whenever estimate_prefill_delta_ns is cold. (2) The new flare_host_cache_pool_inbound_bytes_per_second gauge exports Rate seed constants capped at the seed (levels.rs:36-87, seeds 20e9/3e9/400 MiB/s), not measurements, so an idle manager publishes 20 GB/s and a faster-than-seed fabric is permanently under-reported — yet the PR body cites 2.33 GB/s from it as evidence. (3) Every round-2 claim the author says is fixed is absent from the tree: POOL_LEVELS, HostAdmissionProbe, flare_selene::worth_restore, and the is_direct_unsupported non-Unix match (still false, making the new Windows buffered fallback at disk.rs:1423 and :859-861 dead, so packed writes hard-fail on a Windows volume with a non-dividing sector). (4) The A/B baseline 5d53040e is five commits behind the PR's own base, straddling two scheduler-pricing commits (#663 and #660, the latter editing the same checkpoints.rs (not opened) that carries the new estimate_prefill_delta_ns), with no attached logs.

I also recorded twelve areas I verified as sound rather than inventing issues: the O_DIRECT whole-record write path with exact set_len recovery and temporary cleanup; the clean_slots invariant machinery in selene/src/memory.rs (update_clean_slots snapshot accounting plus a full index-scan assertion at every mutation point) as the strongest part of the change; handover_valid role/fork/descendant invalidation; the pending_pool_drain shutdown loop; the covered-zero-slot endpoint and doomed-eviction preflight fixes in composite.rs; the disk inventory split; the host_lookup_cost signature change, which fixes rather than introduces a span distortion; RowRestoreSource bucketing; and the writeback_wake epoch/rotation scheme, which cannot spin and survives cursor adjustments on removal. Kind::StoreInvalidated is propagated symmetrically with Stored in composite.rs.

Two limits: I could not read the review's external HTML artefacts, and whether 0ebee3d4 exists and fixes the blocker can only be settled by the next recorded head.

#9 [high] Limits of this lens and author action list

What I could not do / could not find (say so plainly in the report):

Author action list, ordered:

  1. Blocker — delete the last_median overwrite from RowRestoreLatency::start (helios/src/server/runtime.rs:301-303); refresh last only in observe() (:329). Add a regression test that exercises a decayed median (not the empty bucket at phase_tests.rs:8799-8801) and, ideally, a reaper or per-source derivation for in_flight (:285) so one lost Fetched cannot pin a bucket at its undecayed median forever.
  2. Major — fix or gate the prefill_rate fallback: observe_prefill_rate (runtime.rs:3064-3084) refuses to sample when step.lanes.len() != 1, so concurrent-prefill servers price restores off the constant INITIAL_PREFILL_RATE. Either sample multi-lane steps or treat an unobserved rate as None and admit without a restore.
  3. Major — stop exporting seed constants as measured rates: flare_host_cache_pool_inbound_bytes_per_second (helios/src/server/metrics.rs, fed from Ranking::rates() at selene/src/levels.rs:119-128) renders 20e9/3e9/400 MiB/s before any sample and clamps at the seed forever. Omit unsampled levels, or rename/document as an estimate and add an uncapped accessor.
  4. Major — land the round-2 items the 18:08 comment claims are done but are absent: shared POOL_LEVELS/level labels (levels.rs:121-128 vs the hardcoded array in metrics.rs), flare_selene::worth_restore dedup (helios copy at runtime.rs:225-229; worth_transfer/worth_fetching in selene/src/store.rs:450-468 now have only test callers), the HostAdmissionProbe extraction (runtime.rs:3285 still carries #[allow(clippy::too_many_arguments)] with 15 parameters and the duplicated conditioned_input mapping at :1722-1725/:3324-3327), and the Windows is_direct_unsupported match (selene/src/disk.rs:1774-1784) that makes :859-861/:1423 dead.
  5. Major — re-baseline Tables A–C against the actual base and attach raw logs; disclose the public flare-selene API changes and the narrowed prefill_rate sampling in the body's Limitations.
  6. Process — push a recorded head that actually contains the claimed work before asking for re-review; the tree currently contradicts the author's own accounting on five separate items.

Credit where due (state in the report, not as a finding): the clean_slots invariant machinery in selene/src/memory.rs, the O_DIRECT whole-record write path with exact set_len recovery and temp cleanup, the pending_pool_drain shutdown narrowing, the writeback_wake epoch/rotation scheme, the covered-zero-slot endpoint path, the doomed-eviction preflight, the disk inventory split, and the host_lookup_cost scalar refactor are all correct and well tested. The metric split is covered end-to-end by a changed Python test and clean-L1 retention by selene-manager/tests/client.rs additions.

#6 [medium] Verified-sound areas (no finding) — write-up material

Verified-sound items in this lens (state plainly, do not invent):

  1. write_packed O_DIRECT path (selene/src/disk.rs:1378-1447, helpers at :1272-1376). Whole-record slices are staged through a fixed BLOCK_BYTES-multiple scratch buffer, tail zero-padded (:1363-1367), written with write_direct_slices at file offset 0, then file.set_len(total) (:1419-1420) restores the exact logical length before publish. total is checked_add-accumulated (:1346-1348, overflow -> invalid). On error the temporary file is removed (:1443-1445). The partial-window case in write_record_direct (:1278-1304) only block-rounds the tail into owned zero-padded scratch, never reads past src, and the unaligned partial-window path deliberately stays buffered (:864-868) because block-rounding would overwrite an adjacent window. Reply.invalidated (:333-335) is propagated for post-rename dir-sync failure and covered by tests at :4508-4610.

  2. is_direct_unsupported unix arm (:1774-1778) uses raw_os_error() == Some(libc::EINVAL), which is what O_DIRECT-refusing filesystems actually return; correct on Linux.

  3. L1 clean retention invariants (selene/src/memory.rs). clean_slots is maintained exclusively through update_clean_slots (:951-958), which snapshots the per-key contribution before and after the mutation, so pin_record (:1118-1123), unpin_record (:1128-1133), set_ready (:1266-1272) and role promotion all keep the counter exact rather than relying on callers to remember a delta. release_removed (:960-970) does the same for multi-node removal. assert_clean_slots_invariant (:1055-1080) cross-checks the counter against a full index scan and re-validates each persisted_in_pool entry against handover_valid; it is called after every mutation point (:717, 782, 969, 1027, 1119, 1129, 1150, 1203, 1275, 1352, 1416, 3214) and the test helper assert_clean_slots (:5498-5521) re-derives the same relation independently. reclaimable_clean_slots (:1092-1116) correctly refuses to count a clean node whose subtree has an un-evictable descendant, and reserve (:1161-1166) uses it so shortfall cannot promise slots leaf-first eviction cannot actually free. This is the strongest part of the change.

  4. handover_valid role/shape invalidation (:922-935) re-checks capture-role monotonicity, fork count, and descendant_row coverage, so a stale handover cannot keep a record marked "safe to drop locally" after its role is promoted or its last descendant row is thinned. refresh_ancestors / refresh_same_page_descendants / promote_role (:979-1040) cover the paths that change those inputs. Tests :7005-7280 exercise pin/unpin, role promotion, fork, thin, and blocked-ancestor transitions.

  5. Shutdown drain (selene/src/pool/store.rs:307-352, selene/src/memory.rs:3517-3527, node_pending_pool_drain :2964-2982). The loop now waits on pending_pool_drain(), which returns 0 once every ready record is in persisted_in_pool, so clean retained L1 copies no longer stall teardown. !node.ready and hashing/held/finishing records still block, so no in-flight hash or transfer is abandoned early. left in the summary now comes from the same predicate (:351) instead of a second begin_pool_drain() call that could double-mutate drain state — an improvement over main.

  6. CompositeStore::store zero-slot endpoint path (selene/src/composite.rs:1291-1338). The split needed = if covered { 0 } else { record_slots(tail.len(), true) } with short forced to 0 for the covered case is what lets a same-page covered Endpoint queue through memory.store_empty (:1338-1342) instead of being bounced by short > 0 into the direct-to-disk bypass. Pinned end-to-end by covered_zero_slot_endpoint_stores_while_staged_io_occupies_intake.

  7. start_read doomed-eviction preflight (selene/src/composite.rs:876-887) checks memory.fits and shortfall and spills parked records before allocating, so a doomed read no longer evicts durable clean L1 records (the failure this PR's own test doomed_start_read_preserves_durable_l1_records_and_spills_parked pins, alongside doomed_store_preserves_durable_l1_records_and_spills_parked).

  8. Disk inventory split (selene/src/composite.rs:1610-1618): disk_records/disk_bytes now carry only ready indexed records while disk_reserved_records/disk_reserved_bytes carry parked/in-flight reservations. Covered by disk_stats_separate_committed_records_from_reserved_entries and a changed Python assertion. docs/api.md updated consistently.

  9. host_lookup_cost span/scope. The signature change (helios/src/server/metrics.rs:538-560, call site helios/src/server/runtime.rs:3353) replaces the round-trip missing / rate.max(1.0) reconstruction with the actual prefill_saved_seconds from estimated_prefill_saved_seconds. This fixes a unit/scope distortion rather than introducing one: the old code divided by an effective_rate that could be f64::INFINITY (yielding 0 ns) or 0 < rate < 1 (clamped to 1.0, yielding absurd ns), and the histogram is documented as an estimate (docs/api.md:293-294). The transfer_seconds fed in now correctly uses max(hit.estimated_seconds, row_restore_latency.estimate_seconds(source)) for row-only restores (runtime.rs:3346-3352), which is the right span (end-to-end setup + transfer), so the histogram does not shrink.

  10. RowRestoreSource bucketing (runtime.rs:257-268) keys on (pooled, Tier); Tier is Gpu/Dram/Nvme (selene/src/shared/mod.rs), so from the declared purpose (keep slow remote/NVMe claims from raising the floor for fast local DRAM) it does isolate local DRAM from pooled sources. Collapsing pooled HostNvme/RemoteNvme into one bucket is coarse but conservative for that purpose; it is a refinement opportunity, not a bug. Confirmed against selene/src/pool/store.rs:473-481, which sets tier: candidate.tier + pooled: true, and selene/src/composite.rs:373 + selene/src/pool/store.rs:418 which set pooled: false for local hits.

  11. writeback_wake epoch/rotation (selene-manager/src/store.rs:1443-1475, 1588-1666). Removing one waiter keeps the cursor on the same logical position (index % len), filter_writeback_waiters adjusts for removals before the cursor (:1452-1472), writeback_wake_remaining is re-clamped to the new length, and the epoch guard (:1629-1633) prevents re-checking a waiter twice within one wake sweep while advanced < len guarantees termination. pump (:5044-5073) only re-arms when writeback_wake_remaining > 0, and scan_writeback_waiters_step zeroes it once advanced == len, so the previously-feared self-rearming spin cannot occur. WindowReleaseSignal (:5309-5341) uses swap(true) so coalesced releases lose nothing, and WindowHold field order (:5346-5349) guarantees the extent Arc drops before the notify.

  12. Kind::StoreInvalidated rank-relay propagation (selene/src/shard.rs) is handled symmetrically with Stored at selene/src/composite.rs:1528-1533 (TransportEvent::StoreInvalidated { id, error } => self.disk_stored(id, Err(error), None)) so a sharded peer's invalidation completes the same job bookkeeping as a local failure; covered by selene/src/shard/tests.rs additions.