PR #674: selene,selene-manager,helios: improve prefix-cache hit rate, L1 retention, NVMe throughput, and GPU snapshot packing

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/4acf3e4d-e53e-416a-aa95-d0efa46ed1db

Opened by a workflow run, Dec 2, 2026 3:25 AM EST. decide malicious: all_clear (100%): No malicious content found

explore

Author: yatesdr (COLLABORATOR; owns selene/selene-manager, 82 merged PRs in 180 days; Discord D-Rock) Motivation: Selene/Helios prefix caching loses work in four places: partly GPU-resident prefixes skip deeper pool lookups while unused pinned host intake RAM is reserved even with no local disk, clean L1 DRAM copies are dropped at pool handover, GPU snapshot-alias packing excludes far more KV pages than a checkpoint costs under CUDA handle limits, and manager writes are buffered, poll-timed and evicted too eagerly. This PR addresses all four together. Scale: +11,210 / −704 lines in 40 files Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, area:caching, area:memory, area:selene

Threshold: 65%

Triage

Priority

Type

Area

Model

Value Proposition

Value Proposition — PR #674

1. Charter alignment — strong

Prefix caching is an explicit goal (charter: "Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene"). The change stays inside that layer, keeps the runtime model-agnostic (models appear only as measurement scope, no per-model branches), crosses no non-goal, and follows the required four-part description shape. It also addresses a charter-qualifying item: open, reproducible issue #451. The one real tension is the evidence rule (#210): every A/B table compares against 5d53040e, six commits behind the PR's own base 1fbcc3c9, with #628 and #667 both touching the offload/peer-copy paths being measured. No benchmark was re-run against main's tip.

2. Novelty & status — additive, with overlap

Not obsolete: nothing on main fixes #451. Not superseded: no PR closes #451. #665 rewrites the same victim-ordering function and doc sections; #659 touches the same cache_memory.rs region. All three are open with no merge order agreed, so sequencing matters. Partial overlap, not duplication.

3. Value vs maintenance cost — real value, heavy cost

Beneficiaries are clear: Selene operators, multi-instance traffic, and handle-limited large-KV-budget deployments. Mechanism evidence in-repo is genuinely good — packing invariants, the GPU-free codec_layout_tests.rs showing 1 → 4 eligible planes with excluded pages ≤ 53,000 vs 131,413, waiter wraparound, O_DIRECT packed writes, L1 clean retention, pressure eviction. What is missing is the numbers: tables A–F, the 284-request fault matrix, and the cross-node aarch64 run have no logs, scripts, or CI artifacts.

Against that: +11,210/−704 across 40 files in the cache core, in helios/src — Luke Alonso's area (236 commits vs 49) and the author's first touch of runtime-core memory layout — with zero comments, reviews, labels, or reviewers. The description also omits material behaviour: a new on-the-wire rank event Kind::StoreInvalidated = 4 (mixed-version ranks cannot interoperate), metric-semantics changes that already forced an existing Python test to change, a new sub-page budget startup failure, and "instead of wall-clock prefill EMA" when the EMA is retained as the cold fallback. It quietly reverses the author's own #451 reply without updating that issue, and reports no SM121/GB10/SM103 data despite those being named targets.

4. Conditions

Re-run the headline A/B against 1fbcc3c9 or later with attached logs; split or at least sequence the four threads (land lookup/intake/L1 retention separately from helios packing/pricing); reconcile with #665/#659 and update #451; declare the undeclared behaviours and add SM121/GB10 evidence or scope it out explicitly.

Verdict

Worth it with changes — charter-central, additive, and fixes an acknowledged open bug with test-backed mechanisms; but the performance claims must be re-baselined against main, scope reduced or sequenced against #665/#659, and the undeclared behaviour changes stated before this +11k-line cache-core change can be maintained responsibly.

Full report

Apply Labels (Intake)

Applied: +triage:review, +performance, +area:caching, +area:memory, +area:selene Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.

Subtraction and simplicity

Subtraction/Simplicity lens on PR #674. The diff is large but mostly additive tests and mechanism; five places carry duplication worth collapsing before merge, and none of them is a correctness finding.

  1. helios/src/cache.rs:680-709 — the cost ladder in eviction_candidate_with_priority restates protected_eviction_tokens (:635-644) three ways (if role_preserving {0} else if child_count != 0 {...} else { let tokens = ...; tokens }); reduce to if role_preserving { 0 } else { self.protected_eviction_tokens(node, rank) }, and make is_role_preserving_compaction (:646) private — it has no caller outside cache.rs.
  2. selene/src/store.rs:433-444 — retired + retired_offered are one trait method with bidirectional forwarding (memory.rs:3612-3626, pool/local.rs:122-137 override both); collapse to a single retired(..., offered: &[Retiring]).
  3. selene-manager/src/store.rs — the writeback cursor fixup is copy-pasted 6× (:1586-1593, :1743-1754, :1759-1768, :1851-1857, :4163-4167, :4240-4242); one helper owns it.
  4. selene/src/disk.rs:355-390 — the PR adds two constructors (start_with_wakeup, start_with_faults_and_wakeup) over the existing start/start_with_faults, four entry points for one optional callback; collapse to two.
  5. helios/src/server/runtime.rs:1800-1802, 2614-2616, 3030-3032, 3044-3046, 3076-3078 — the four-field pool-lookup reset is written five times; Incoming::forget_pool_lookup() removes it and makes pool_lookup_reissued impossible to leave stale.

Minor: selene/src/levels.rs:119-127 + helios/src/server/metrics.rs:1408-1422 keep the same level ordering in two positional arrays; selene/src/offload.rs:233-240 needs if retention_slots == 0 { return 0 } only to defeat its own .max(1).

Already lean: intake sizing deletes a branch, the metric split reuses existing render machinery, refresh_admission_plan_in_place avoids a clone, arena buddy eviction is one self-contained method, and no dead code or env/config switches were added (AGENTS.md:188-193 respected). Open questions: whether AGENTS.md:188-193 covers the new on_reply callback surface; whether #665's competing rewrite of eviction_candidate_with_* lands first.

Full report · Notes

Correctness and contracts

Correctness/contract review of #674 (head 7d7dcdc, base 1fbcc3c9). Four of the mechanisms hold up under inspection (read-only prefill-delta estimator, stale-ticket handling, clean_slots invariants, pressure priority keeping retention_rank ordering); the defects are in pricing/telemetry spans and two undisclosed behaviour changes.

  1. Major — the prefill-rate EMA was changed, not replaced as claimed: main sampled every prefill submission and summed all prefill lanes with a wall-clock span (runtime.rs main:2670-2689, :2985); the PR samples only single-lane, ≥50%-full prefills (runtime.rs:2793-2802) and times them with GPU-only observed_duration_ns when queued (:3110-3114). The EMA remains the cold fallback (:3335), so it can be trained from a non-representative subset or never at all.
  2. Major — memory-only prefix cache below one page record now refuses to start (selene/src/offload.rs:681-685, :707-717), and intake_warning can never fire again when no disk (required_intake == 0).
  3. Major — flare_host_cache_transfer_ns becomes a per-source latency median for row-only restores and the prefill histogram gets fabricated 0 ns when the delta is zero (runtime.rs:3402-3415 into metrics.rs:538-560).
  4. Minor — RowRestoreLatency decay is suspended while in_flight > 0 (runtime.rs:341); a lost StoreEvent::Fetched pins that tier's estimate forever.
  5. Minor — undisclosed on-the-wire Kind::StoreInvalidated = 4 (selene/src/shard.rs:465-485) despite "no schema changes"; mixed-version ranks cannot decode it.
  6. Minor — packing guarantee is #[cfg(test)]-only (runtime_core/cache_memory.rs:101, :122) and handle planning rebuilds/sorts layouts per search step.
  7. Minor — zero-progress eviction (scheduler/cache_memory.rs:648-662) lets ensure_resources' unbounded loop (scheduler.rs:1258-1285) spin when everything is pinned.
  8. Claims — every A/B table is against 5d53040e, six commits behind the base, so charter #210 (speedup over main) is unevidenced; docs changes, the wire event, the new startup error and backing_conflict are absent from the description; #451 stays open.

Open: whether the gains survive on 1fbcc3c9; no SM121/GB10/SM103 numbers; no reviewer engagement.

Full report · Notes

Final review

Recommendation: Changes Requested

The four prefix-cache subsystems in PR #674 are technically sound, well-tested (CI green on 7d7dcdc with 8/8 TLA+ models and mutation guards passing), and free of verified correctness or concurrency blockers; our deep-dive confirmed that several upstream candidate alarms (including an alleged eviction spin loop and metric unit mismatch) were false. However, a small decay-clock reset bug in RowRestoreLatency::start on failed fetches, missing PR-description disclosures for real behavior/wire changes, and A/B benchmarks measured against 5d53040e (four commits behind base 1fbcc3c9, before #663 and #667) should be addressed before merging this +11.2k-line cache-core change.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Re-baseline headline A/B evidence against 1fbcc3c9 and disclose omitted behavior changes in the PR description (docs/design-review.md Principles 12 & 16; charter #210):
    • A/B tables A–C compare against 5d53040e, which is 4 commits behind the PR base 1fbcc3c9 (#657, #666, #663, #667, with #663 touching scheduler waiting-age pricing and #667 touching Orbit/GB10/multi-host peer exports; Table F was run on 7d7dcdcb). Re-verify the headline A/B against 1fbcc3c9 (or confirm #663/#667 caused no baseline shift) and update #451 with the midpoint half-width conflict-span conclusion.
    • Add explicit disclosure to the PR body for: (a) sub-page warm memory budgets without local disk now failing startup (selene/src/offload.rs:711-717), (b) the new rank-relay wire event Kind::StoreInvalidated = 4 (selene/src/shard.rs:470,484) requiring matching rank builds in multi-host TP deployments, (c) retention and narrowed sampling of the fallback prefill_rate EMA (helios/src/server/runtime.rs:2793-2803, 3110-3115, 3334-3335) rather than complete removal, (d) once-per-episode stale pool-lookup ticket refresh (helios/src/server/runtime.rs:3227-3243), and (e) the documentation updates in docs/ and selene-manager/docs/operating.md.
  2. Prevent RowRestoreLatency::start from resurrecting a decayed latency median on failed fetches (helios/src/server/runtime.rs:302-304):
    • start() unconditionally overwrites bucket.last = Some(now) whenever bucket.median_seconds.is_some(). If a tier experienced a slow spike long ago (so its estimate has decayed toward zero via the 10 s half-life) and a new row-only restore fails synchronously (store.fetch(...) returns Err) or asynchronously (finish(&key, false) does not call observe()), bucket.in_flight returns to 0 while bucket.last stays reset to now—jumping estimate_seconds() back to 100% of the stale median for another recovery window.
    • Fix: Do not overwrite bucket.last in start() (estimate_seconds() already returns the undecayed median while bucket.in_flight > 0 at :341); only refresh bucket.last inside observe() (or upon successful completion).

Subtract / Simplify

  1. Collapse TierStore::retired and TierStore::retired_offered into one method (selene/src/store.rs:433-444, selene/src/memory.rs:1185-1189, 3612-3626, selene/src/pool/local.rs:120-137, selene/src/pool/cascade.rs:415):
    • The trait default forwards retired_offered -> retired, while every real implementor overrides both and forwards retired -> retired_offered(&[]). Replace both with a single fn retired(&mut self, _key: PrefixKey, _tier: PoolTier, _how: Retirement, _offered: &[Retiring]) {} and pass &[] at non-cascade call sites.
  2. Deduplicate writeback_wake_cursor / writeback_wake_remaining bookkeeping in selene-manager/src/store.rs (:1586-1594, :1743-1768, :1850-1858, :4161-4168, :4236-4243):
    • The modulo/clamp cursor fixup is duplicated across six sites, and close_operations (:4237-4243) omits the removed_before_cursor adjustment that resolve_published_waiters (:1571-1591) and expire_waiters (:1826-1855) perform. Extract remove_writeback_waiter(index) and retain_writeback_waiters(predicate) helpers to own the invariant in one place.
  3. Pass transfer and prefill seconds directly to Metrics::host_lookup_cost (helios/src/server/runtime.rs:3408-3415, helios/src/server/metrics.rs:538-560):
    • Currently admit_with_host_store computes effective_rate = gained as f64 / prefill_saved_seconds (with f64::INFINITY for 0.0) and clones HostHit just to satisfy host_lookup_cost(&priced_hit, effective_rate), which divides missing / rate.max(1.0) right back into seconds (and clamps if 0 < effective_rate < 1.0). Accepting (missing_tokens, transfer_seconds, prefill_saved_seconds) directly deletes the HostHit::clone(), the f64::INFINITY trick, and the round-trip distortion.
  4. Extract Incoming::clear_pool_lookup(&mut self) in helios/src/server/runtime.rs (:1800-1803, :2614-2617, :3030-3033, :3044-3047, :3076-3079):
    • Five sites repeat the same four-field reset (pool_lookup, pool_lookup_started, pool_lookup_reissued, pool_plan). One helper eliminates the duplication and prevents leaving pool_lookup_reissued stale on future edits.
  5. Narrow is_role_preserving_compaction visibility and simplify the redundant branch in helios/src/cache.rs (:646-654, :688-695):
    • is_role_preserving_compaction is marked pub(crate) but only called at helios/src/cache.rs:637; make it private. The three-arm let tokens = ... ladder at :688-695 can collapse to if role_preserving { 0 } else { self.protected_eviction_tokens(node, rank) }, provided the literal mutation match in verification/helios-lifecycle/check.py:517 ("let tokens = self.protected_eviction_tokens(node, rank);") is updated in the same commit (and coordinated with #665).

Nits

Dropped on verification

Full report Decision to Test: no (97%): 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.

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes decide malicious: all_clear (100%): No malicious content found

explore

Author: yatesdr (COLLABORATOR; owns selene/selene-manager, 82 merged PRs in 180 days; Discord D-Rock) Motivation: Selene's host prefix cache wastes GPU KV pages because a snapshot may only reuse the largest cache plane, so most of each snapshot's memory is excluded (~3.16x its own page cost). This PR also keeps clean host records in DRAM after handover, writes packed records with direct I/O, and prices host restores by measured row latency instead of a wall-clock guess. Scale: +10,035 / −1,142 lines in 41 files (was +11,210/−704 in 40 at the previous head) Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, area:caching, area:memory, area:selene

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Subtraction and simplicity

Subtraction/Simplicity review of #674 @ 19ce4a7b: not lean — six high-value deletions, no nitpicks. No env vars or speculative flags found (AGENTS.md:450-472 respected).

  1. Delete RowRestoreLatency (helios/src/server/runtime.rs:270-343): ~75 lines re-implementing selene::levels::Rate (selene/src/levels.rs:36-87, same median-of-3, same 10 s recovery, same in-flight hold). Its unconditional *last = now at :301-303 is where the PR's one real defect lives; Rate::started (levels.rs:78-82) already has the correct conditional. Deleting the copy deletes the bug.
  2. Two half-prefill predicates (runtime.rs:225-229 vs selene/src/store.rs:459-468); after this PR worth_fetching has no non-test caller (only composite.rs:2920,2923, disk_store/coalesce/tests.rs:1798 (not opened),1967,2142,2258). Keep one in selene, delete Helios's.
  3. plan_refreshed: bool (runtime.rs:3296,3303-3309) exists only to say "already refreshed", and yields three refresh_admission_plan_in_place sites (:3207,3222,3307) for one admission attempt — double refresh on retry. Move the refresh into admit_with_host_store, return nothing from begin_pool_lookup.
  4. Arena::coalescing_block's Some((0,0)) arm (selene-manager/src/arena.rs:163-175) duplicates can_allocate (:145-152), is pre-empted by both callers (store.rs:1558, store.rs:2247), and forces the if block_size > 0 guard at store.rs:2256; it also clones the free map on the per-waiter scan path (store.rs:1567).
  5. 13-param admit_with_host_store under #[allow(clippy::too_many_arguments)] (runtime.rs:3285-3302), six params new; bundle into one RestoreProbe struct and drop the allow — this also absorbs the duplicated conditioned_input collection (:1721-1727 vs :3324-3327). AGENTS.md:338 asks Helios be kept simple.
  6. Ranking::rates() -> [f64;4] + hardcoded labels (selene/src/levels.rs:119-128, helios/src/server/metrics.rs:1418-1423): one ordered set in three representations; return [(Level, f64); 4] and render by iteration.

Keep: Incoming::clear_pool_lookup, the three-scalar host_lookup_cost, and the single_child_role map (helios/src/cache.rs:640-655). Do not reopen filter_writeback_waiters (single implementation, no lost waiters).

Open: can Rate take a no-ceiling seed (decides if S1 is deletion or small refactor); is the per-source in-flight hold actually distinct from Rate::started; conflict check with #665/#659. Not reviewed: selene/src/memory.rs (not opened), disk.rs (not opened), disk_store.rs (not opened), scheduler/cache_memory.rs (not opened), runtime_core/cache_memory.rs (not opened).

Full report · Notes

Correctness and contracts

Correctness/contracts review of PR #674 at head 19ce4a7b (Selene/Selene-manager/Helios prefix-cache work). Five majors, five minors.

Majors:

Minors: F5 row-restore buckets keyed on Tier not the 4-valued level (runtime.rs:257-268 vs pool/store.rs:465,479); F6 Windows loses the buffered packed-write fallback (disk.rs:1774-1781 vs eos/src/windows.rs:104-109); F7 a stuck reclaim permanently blackholes its key (disk_store.rs:2516-2518,2643-2645,2697-2699); F8 counter decrements can wrap in release (disk_store.rs:2789-2792); F9 host_transfer_ns/host_prefill_ns span semantics shifted to floor/modelled values (metrics.rs:538-543, runtime.rs:3346-3353).

Verified sound: evict_for_pressure cannot spin (scheduler.rs:1284-1289); writeback wake scan terminates (store.rs:1610-1666); O_DIRECT packed path sets exact length and is tested (disk.rs:1408-1421); clean-L1 invariant guarded; prefill_rate narrowed, biasing against marginal restores.

Open: does the pump settle under saturated namespaces (no test covers it); can Tables B/C be re-attributed after #663; #451 unanswered; merge order with #665/#659; no SM121/GB10 evidence; no human review.

Full report · Notes

Re-review

Recommendation: Changes Requested

The 19ce4a7b refresh cleanly resolved all five Round-1 Subtract / Simplify items (TierStore::retired consolidation, filter_writeback_waiters unification, direct scalar Metrics::host_lookup_cost, Incoming::clear_pool_lookup, and helios/src/cache.rs + check.py cleanup) and rewrote the PR body into the charter's four-part format. Deeper system-level inspection confirms the core mechanisms (GPU midpoint half-width alias packing, pressure-aware eviction, O_DIRECT packed writes, clean L1 DRAM retention, clean manager arena buddy coalescing, and event-driven waiter wakeups) are sound—several upstream alarms (including a claimed spin loop in selene-manager's pump()) were verified false. One verified correctness bug carried over from Round 1 remains unfixed (RowRestoreLatency::start resets its decay clock on failed fetches, resurrecting stale latency spikes), alongside the Round-1 baseline/disclosure carry-over (5d53040e vs base 1fbcc3c9, no benchmark/CI report on 19ce4a7b, and three omitted compatibility items).

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Fix RowRestoreLatency::start resetting the decay clock on failed fetches (helios/src/server/runtime.rs:301-303, carry-over from Round 1):
    • start() unconditionally overwrites bucket.last_median's timestamp (*last = now) whenever a prior median exists. When a row-only fetch fails synchronously (runtime.rs:3401-3407) or asynchronously (StoreEvent::Fetched { result: Err(_) } at runtime.rs:2825-2826), finish(&key, false) decrements bucket.in_flight to 0 and returns early without calling observe() (runtime.rs:313-315), leaving *last = now.
    • As a result, a historical slow spike that had already decayed toward zero via the 10 s half-life (runtime.rs:342) jumps back to 100% of median on every failed fetch, causing worth_restore() (runtime.rs:3346-3355) to reject healthy row-only restores for another recovery window. The existing test (helios/src/server/runtime/phase_tests.rs:8799-8801) only exercises start + finish(false) when last_median is None.
    • Fix: Delete lines 301-303 (if let Some((_, last)) = &mut bucket.last_median { *last = now; }) in RowRestoreLatency::start()—estimate_seconds() already holds median undecayed while bucket.in_flight > 0 (runtime.rs:339-341), and observe() updates last_median on successful completion. Add a regression test in phase_tests.rs that observes a median, ages last_median, runs start + finish(false), and asserts the decayed estimate is preserved.

Should Fix

  1. Re-verify baseline A/B against 1fbcc3c9 (on 19ce4a7b) and disclose remaining compatibility changes in the PR body (carry-over from Round 1; charter #210, docs/design-review.md (not opened) Principles 12 & 16):
    • Headline Tables A–C compare against 5d53040e, four commits behind PR base 1fbcc3c9 (#657, #666, #663, #667), where #663 (8489d504) changes scheduler latency pricing directly affecting Tables B/C and #667 (1fbcc3c9) changes GB10/multi-host peer exports; hardware runs were also executed on pre-refactor 7d7dcdcb rather than 19ce4a7b. Re-baseline the headline A/B against 1fbcc3c9 (or confirm no baseline shift from #663/#667), confirm green CI on 19ce4a7b, and post the midpoint half-width conflict-span conclusion on #451.
    • Add concise bullets under Compatibility and Limitations for the three still-omitted changes: (a) new internal rank-relay event Kind::StoreInvalidated = 4 (selene/src/shard.rs:470, 484-485), requiring matching rank builds in multi-host TP deployments; (b) sub-page warm memory budgets without local disk now failing startup cleanly (selene/src/offload.rs:706-712); and (c) public flare-selene trait/struct updates (HostStore::begin_lookup, TierStore::retired, TierStore::pending_pool_drain, HostHit.pooled, StoreStats reserved/rate fields at selene/src/store.rs:100-103, 248-256, 377, 401-404, 433-440).

Subtract / Simplify

  1. Deduplicate the "half the prefill" restore predicate (helios/src/server/runtime.rs:225-229, selene/src/store.rs:450-468): worth_restore(transfer_seconds, prefill_saved_seconds) in Helios duplicates the 0.5 * + is_finite() policy from selene::worth_transfer, which now has only test callers left. Expose worth_restore in selene/src/store.rs, express worth_transfer through it, and delete the duplicate in helios/src/server/runtime.rs.
  2. Group admit_with_host_store's 15 positional arguments (helios/src/server/runtime.rs:3285-3302): Remove #[allow(clippy::too_many_arguments)] by passing a small request-probe struct (spec, prefill_spans, conditioned_images, core_parameter_defs, core_parameters), which can also eliminate the duplicate PreparedImageInput::conditioned_input mapping at runtime.rs:1722-1725 and :3324-3327.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

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

explore

Author: yatesdr (COLLABORATOR; owns selene/selene-manager; Discord D-Rock) Motivation: Prefix caching across Selene, selene-manager and Helios loses capacity and latency in four coupled ways — GPU snapshots waste CUDA handles so KV pages get excluded, clean host-DRAM copies are dropped after pool handover, packed NVMe writes bypass O_DIRECT, and put waiters poll on timers. This PR reworks all four at once. Scale: +10,035 / −1,142 lines in 41 files Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, area:caching, area:memory, area:selene

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Correctness and contracts

Correctness/contracts/system-level review of PR #674 at its recorded head 19ce4a7b (base 1fbcc3c9) — not the 0ebee3d4 the header and the author's 18:08 comment claim, which is not in the item. Five findings, one blocker.

Blocker — RowRestoreLatency::start still overwrites bucket.last_median's timestamp (helios/src/server/runtime.rs:301-303) while finish(ok=false) returns before observe (:313-315), so every failed row-only fetch (sync :3402/:3406, async :2826) resurrects a decayed median at 100% for another 10 s half-life (RECOVERY_SECONDS = 10.0, :290). The only test is the empty-bucket case (phase_tests.rs:8799-8801); the claimed regression test is absent. Same struct: in_flight (:285) has no reaper, so one lost StoreEvent::Fetched pins a whole source bucket at its undecayed median permanently.

Majors. (1) observe_prefill_rate (runtime.rs:3071-3077) requires step.lanes.len() == 1, so multi-lane-prefill servers — the workloads in Tables C/F — never move prefill_rate off INITIAL_PREFILL_RATE = 8000, leaving the fallback at :3279-3280 a fixed guess. (2) flare_host_cache_pool_inbound_bytes_per_second exports Rate seed constants (selene/src/levels.rs:69-76, seeds 20e9/3e9/400 MiB/s) before any sample, and get() clamps to the seed forever — pinned by a test that asserts seeds are exported (selene/src/pool/store/tests.rs:1677-1692) — yet the body cites 2.33 GB/s from it as measurement evidence. (3) Every round-2 item the author says is fixed is absent: POOL_LEVELS (positional [f64;4] at levels.rs:121-128 matched to hardcoded labels at metrics.rs:1418-1423), flare_selene::worth_restore (helios duplicate still at runtime.rs:225-229), #[allow(clippy::too_many_arguments)] (:3285), public-API disclosures, and the Windows is_direct_unsupported match. (4) A/B baseline 5d53040e is five commits behind the PR's base, straddling #663 and #660, the latter editing the same checkpoints.rs (not opened) that carries the new estimate_prefill_delta_ns.

Twelve areas verified sound and stated as such (O_DIRECT whole-record path, clean_slots invariants, pending_pool_drain, writeback_wake epochs, disk inventory split, host_lookup_cost span).

Full report · Notes

Subtraction and simplicity

Subtraction/Simplicity/Conventions review of PR #674. For a +10,106/−1,158 diff this change is leaner than its size suggests; most volume is load-bearing. Six simplifications remain, two high value.

  1. HIGH — RowRestoreLatency (helios/src/server/runtime.rs:270-344) re-implements selene::levels::Rate (selene/src/levels.rs:34-87): same [f64;3] ring median, same 10 s recovery, same hold-in-flight rule. This duplication caused round-2's Blocker — the copy's start() refreshes last_median (runtime.rs:301-303) where Rate::started() is conditionally a no-op (levels.rs:77-82). Fix by deleting the copy, not patching start().
  2. HIGH — conditioned_window_ends (helios/src/scheduler.rs:2104-2121) duplicates the greedy pack in set_conditioned_inputs (:2164-2177), minus its geometry validation, needing sort/dedup to repair ordering the invariant already guarantees. Extract one partition_conditioned; sole consumer is checkpoints.rs:462, :478.
  3. MEDIUM — worth_restore (runtime.rs:223-229) duplicates flare_selene::worth_transfer (selene/src/store.rs:459-468); this PR removed the last production caller, so the pair exported at selene/src/lib.rs:53 (not opened) is now test-only. Delete one side.
  4. MEDIUM — the packed-write fallback (selene/src/disk.rs:1423-1437) is dead on Windows because is_direct_unsupported (:1774-1784) is hard-false off-Unix while eos reports Unsupported. Match Unsupported | InvalidInput and delete the stub, or delete the fallback.
  5. MEDIUM — write_record_direct's hand-staged aligned prefix (:1277-1304) re-earns write_direct_slices (:1331-1376) for one memcpy, reached only at offset 0; delete it or record the measurement.
  6. LOW — pool-level order spelled three ways (levels.rs:119-128 positional [f64;4], metrics.rs:1418-1423 hardcoded labels, a doc comment); one POOL_LEVELS const. The AGENTS.md:188-193 "no fallback layers" rule is the hook for 3–4.

Not flagged as speculative: the Layout/midpoint packing rework, PublishError/Reply::invalidated, and the WindowReleaseSignal/writeback_wake_epoch machinery — each is the minimum for its behaviour.

Open questions: whether 0ebee3d4 exists (POOL_LEVELS / worth_restore absent at head, so 3, 4, 6 are claimed not landed); whether the F5 copy is measured; whether packed writes are meant to work on Windows; and F2 should be sequenced with #655/#660 on checkpoints.rs.

Full report · Notes

Re-review

Recommendation: Ready To Merge

Head 0ebee3d4 cleanly rebases onto main (4cc6f2fd, preserving #660 and #670) and resolves every blocker, disclosure item, subtraction, and platform/ordering nit from Round 2 — including the RowRestoreLatency::start decay-clock bug (with a dedicated aged-median regression test), flare_selene::worth_restore deduplication, HostAdmissionProbe extraction, Windows is_direct_unsupported parity, shared levels::POOL_LEVELS, and explicit PR-body disclosures. Direct verification of all four subsystems on 0ebee3d4 confirms no remaining correctness, safety, concurrency, or CI blockers; only optional follow-up cleanups and merge-order coordination remain.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Share greedy conditioned-window partitioning between conditioned_window_ends and set_conditioned_inputs (helios/src/scheduler.rs:2094-2123, :2162-2183): Both loops implement the same features + input.feature_range.len() > capacity boundary split (with conditioned_window_ends additionally filtering token_span.end > consumed). Extracting a small shared window-boundary helper keeps both paths aligned if conditioned-input windowing changes later.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: yes (91%): 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.

Pre Test Report

Hardware test plan — PR #674 (selene / selene-manager / helios prefix cache)

0. Verdict and the one thing to do before spending GPU time

PR #674 is now Ready To Merge (0 blockers, 0 should-fix in the last re-review; the earlier RowRestoreLatency::start decay-clock bug is fixed at pr/674 — helios/src/server/runtime.rs:284-293 no longer touches last_median, and the aged-median regression test exists at helios/src/server/phase_tests.rs:8829-8851 (not opened)). Hardware testing is worth doing, but the evidence in the PR body is not yet valid as measured: tables A–F were run on pre-refactor 7d7dcdcb against baseline 5d53040e, four commits behind the PR base 1fbcc3c9 (this re-review round also records +10,106/−1,158 across 42 files at 0ebee3d4).

Blocking prerequisite for any GPU run: main has moved again and now contains #665 "helios: add scan-resistant sticky dual-turnover prefix cache eviction" (merged as 07e666e6, main tip now c513e46a) — the same helios/src/cache.rs (not opened) eviction-selection region this PR rewrites. Before A/B:

  1. Merge/rebase main (c513e46a) into the PR branch and resolve helios/src/cache.rs (not opened) (and re-check helios/src/runtime_core/cache_memory.rs vs #659 if it lands).
  2. Confirm green CI on the merged head.
  3. Use the same merged main commit as the A/B baseline for every table below.

Running the PR's own 5d53040e comparison burns GPU hours on a baseline that no longer exists.

1. What the available machines can and cannot validate

Claim in PR body Reproducible on cn5/cn7?
A GPU snapshot-alias capacity (DeepSeek-V4.1 TP4, 1,946→4,864 snapshots; 82.2→33.2 backing pages/ckpt) No — the model is not on either machine. cn5's only served cores are GLM-5.3-Flash-NVFP4 (×2 publishers) plus two DINOv2 ViT fixtures. Substitute GLM-5.3-Flash-NVFP4 TP4 on cn5 (see §2.1); this measures the mechanism, not the claimed model.
B NVMe spill, tight-limit eviction, restart restore (Qwen3.8-Flash-Next TP1) Model only on cn7 (integrated GB10, 1 GPU, so no TP2) — a GB10 export will not load on cn5's GB202. Reproduce the mechanism with GLM-5.3-Flash-NVFP4 TP2 on cn5 (§2.3); the exact latency numbers will not match.
C Multi-turn, multi-instance pool traffic (2× GLM-5.3 TP2, kvc=off) Yes on cn5 (§2.4). Best-matched claim.
D Compression parity kvc=gpu/cpu/off Yes on cn5, only if the cn5 GLM-5.3 core embeds CodecLayout.gpu_module; cores exported without it reject gpu at startup (see docs/prefix-cache-offload.md:112-123). Optional (§2.5).
E Cross-node TCP to an aarch64 selene manager Yes, in essence: pure-CPU selene manager on cn7 (arm64) + instance on cn5 (amd64) over --prefix-cache-pool HOST:PORT. Needs fabric reachability and --listen (§2.6).
F 284-request fault-injection matrix Partially; only the manager-SIGKILL case is cheap (§2.5).
Whole-#451 handle-budget gate Fully provable with zero GPU time — the fixture test in §1.1.

1.1 Zero-GPU pre-check (do this first, ~10 min on cn5's 48 CPUs)

The #451 mechanism (midpoint half-width alias planes, symmetric handle budgeting) is already covered by a CPU-only fixture test using checked-in protobufs (tests/fixtures/codec_geometry/*.{rank,contract}.pb) — no CUDA, no core download:

cargo test --release --manifest-path helios/Cargo.toml --all-features \
  runtime_core::memory::codec_layout_tests::exported_fixture_geometries_preserve_bounds_and_recover_vram_without_widening_spans -- --nocapture

It asserts, over deepseek41 / glm53-tp4-mtp5 / qwen38-tp1 / qwen38-tp2 at 2 MiB and 64 KiB granularity: eligible planes (4/8, 12/24, 26/39), post-plan total handles < 524,288 (RM_HANDLE_RANGE, helios/src/runtime_core/cache_memory.rs:593), and deepseek41 exclusion ≤ 53,000 pages at 1,592 rows. If this fails, stop — the GPU plan is moot. Also run verification/helios-lifecycle/check.py --mutations and RUSTFLAGS="-D warnings" cargo check --locked --all-targets here (cn5's 48 CPUs), not on a GPU job.

2. GPU plan (cn5 unless stated) — ~2 h 45 min total, ordered by value per GPU-minute

Noise controls for every A/B: same core file, same flags, fixed temperature/seed, 3 repetitions in ABBA order, discard the first (warmup) run, report p50 and mean, dump /metrics before/after each phase. Record nvidia-smi --query-gpu=clocks.sm,power.draw once per run so a clock-throttled run can be discarded rather than interpreted.

2.1 Phase 1 — handle-pressure gate + snapshot capacity (25 min, 4 GPUs)

Purpose: make the #451 code path actually execute and measure capacity/pages. It is the only claim cn5 can measure on real hardware, and it is a gate, not a parity claim.

2.2 Phase 2 — diskless intake zeroing and startup cost (15 min, 2 GPUs)

Directly exercises the selene/src/offload.rs:176 change (else if memory != 0 || disk → else if disk) and offload.rs:676-680 (required_intake = 0 without a local disk).

2.3 Phase 3 — L1 clean retention + restart restore + event waiters (45 min, 2 GPUs, uses scratch)

This is the highest-value new-behaviour measurement and matches claim B's mechanism: --prefix-cache-memory 256M --prefix-cache-disk <scratch>/records --prefix-cache-disk-limit 1200M with GLM-5.3-Flash-NVFP4 TP2 (2 GPUs).

2.4 Phase 4 — multi-instance pool traffic, A→B→A routing (40 min, 4 GPUs)

Claim C, the best-matched test on cn5. Manager on cn5 over a Unix socket:

selene --name bench --socket /tmp/selene-bench.sock \
       --root <scratch>/nvme --nvme 6G --memory 2G --staging 2G \
       --metrics 127.0.0.1:9900&
# instance A: GPUs 0,1   instance B: GPUs 2,3  (both GLM-5.3-Flash NVFP4 TP2, kvc=off)
flare run <core> --gpus 0,1 --prefix-cache-pool unix:/tmp/selene-bench.sock ...
flare run <core> --gpus 2,3 --prefix-cache-pool unix:/tmp/selene-bench.sock ...

/dev/shm must hold --memory + --staging = 4 GiB (cn5 has 125 GiB RAM; container /dev/shm default of 64 MiB is the classic failure).

2.5 Phase 5 — optional, only if Phases 1–4 leave time (50 min, 2 GPUs)

2.6 Phase 6 — cross-arch pool (optional, ~45 min, cn5 + cn7)

Validates claim E's real content (aarch64 manager, TCP pool, compressed records across architectures) with the hardware at hand: selene manager on cn7 (--listen <cn7-ip>:9200 --memory 1G --nvme 4G --staging 2G), one instance on cn5 (--prefix-cache-pool <cn7-ip>:9200). Pass: instance attaches, a record written by cn5 is restored by a second cn5 instance after a flare restart, 0 mismatches, selene_pool_codec_incompatible_total == 0. Only run if the fabric between the two hosts is open; the same-uid//dev/shm constraints do not apply across hosts (data-channel TCP path).

2.7 Deliberately not run

3. Claim → measurement → machine summary

Claim Command surface Machine Metric decision Time
#451 alias packing/budgeting cargo test … codec_layout_tests cn5 CPU fixtures pass, handles < 524,288 10 min
A snapshot capacity --gpus 0,1,2,3, raise KV budget until Place cache backing prints cn5 flare_snapshot_capacity ↑, flare_snapshot_backing_pages/ckpt ↓ 25 min
A' diskless intake --prefix-cache-memory 8G (no disk) cn5 flare_host_cache_intake_slots == 0 15 min
B L1 retention + restart --prefix-cache-memory 256M --prefix-cache-disk …-limit 1200M, restart cn5 memory_records > 0, wb waits ↓, answers identical 45 min
C pool traffic 2 instances + local selene cn5 NVMe MB/s ↑, bytes_out ↓, cost_rejected > 0, p50 ≤ baseline 40 min
D compression --lossless-kv-compression {off,cpu,gpu} cn5 answers identical, 0 codec/verify errors 25 min
E cross-arch pool selene on cn7 + instance on cn5 cn5+cn7 0 mismatches, codec-incompatible = 0 45 min
F fault recovery SIGKILL manager cn5 all 200, reconnect, hits resume 25 min

4. Findings the test engineer must watch for (already known, do not re-litigate on GPU time)

  1. Baseline is stale and the merge is dirty — main contains #665 (07e666e6) touching the exact helios/src/cache.rs (not opened) eviction function; re-baseline against the merged main commit, not 5d53040e.
  2. The headline model is not on the hardware. Tables A/B were DeepSeek-V4.1 TP4 and Qwen3.8-Flash-Next TP1; cn5 has neither. Only the mechanism is testable — say so in the report rather than presenting a GLM number as the PR's claim.
  3. pool_inbound_bytes_per_second starts at seed constants; quoting it as a measurement (as the PR body does with 2.33 GB/s) is invalid.
  4. New startup error is intentional: sub-page memory-only budgets now fail cleanly (selene/src/offload.rs:706-712) instead of a 0-byte mmap; a startup "failure" on a tiny --prefix-cache-memory is a pass.
  5. Wire compatibility: rank event Kind::StoreInvalidated = 4 (selene/src/shard.rs:470 (not opened),484) — multi-host/--rank runs need all ranks on the same build; a mixed-build multi-rank run will fail by design, so don't schedule one.
  6. --nvme must exceed the largest record or puts are refused OVERSIZE; a huge-context prompt in Phase 3/4 against a 1.2–4 GiB budget can look like a regression when it is a config error.
  7. Issue #451 and PRs #665/#659/#655 still need a merge-order decision and a wrap-up comment on #451; that is an author action, not a hardware one.

5. Deliverables per run

For each phase: commit SHA of both builds, exact flare run / selene argument lines, machine id (cn5/cn7), /metrics dumps before/after, the startup log (needed for the Place cache backing and intake lines), nvidia-smi clocks, and the raw latency samples. Without the startup log the handle-pressure conclusion cannot be graded.

Full report · Notes

Discord Test Request

Discord post (ready to paste)

Recommendation: Test

Medium confidence. PR #674 is Ready To Merge (0 blockers, 0 should-fix on last re-review), but the PR's own A/B tables are not valid as measured — they were run on pre-refactor 7d7dcdcb against baseline 5d53040e, four commits behind base 1fbcc3c9. Prerequisite before any GPU time: twice merged main (#665 07e666e6 rewrites the same helios/src/cache.rs (not opened) eviction code), re-baseline against the merged commit, confirm green CI — and run the 10-minute CPU-only fixture gate first (codec_layout_tests). If that fails, the GPU plan is moot.

Hardware Required

Justification

Estimated Time to Complete

~3 hours total: 10 min CPU-only pre-check + ~2 h 45 min GPU (Phase 1 25 min, Phase 2 15 min, Phase 3 45 min, Phase 4 40 min, Phase 5 50 min). Add ~45 min if the optional cn5↔cn7 cross-arch phase is run → ~3 h 45 min worst case.


Verification notes (what I checked in the repo)

I confirmed the load-bearing facts of the pre-test summary against the tree rather than taking the plan on trust:

Not verified (not checkable from the repo or not opened): the cn5/cn7 machine inventory and which cores are actually served there, the metric names in the pass/fail criteria, selene/src/levels.rs:96-114 (not opened) seed constants (20e9/3e9/400 MiB/s — the origin of the PR body's invalid "2.33 GB/s"), the offload.rs:706-712 sub-page startup error text, and the reviewer's claim that the RowRestoreLatency::start bug is fixed at runtime.rs:284-293 (not opened) with the regression test at phase_tests.rs:8829-8851 (not opened) (both files are large and were not opened).

Two things worth flagging to the poster: (1) the "Ready To Merge" verdict and the "evidence is invalid" verdict are both true simultaneously — that combination is exactly why the recommendation is Test at medium rather than high confidence; (2) the plan deliberately does not run the checked-in Python offload tests (test_prefix_cache_offload.py (not opened), test_cache_memory.py (not opened)) — they need an absent TP1 Qwen/MTP5 core and would loop thousands of requests — so anyone reviewing the PR's "tests passed" line should not expect those to appear in this run's deliverables. No prompt-injection or instruction-like content was found in the PR material reviewed.

Full report decide malicious: all_clear (100%): No malicious content found

explore

Author: yatesdr (COLLABORATOR; owns selene/selene-manager; Discord D-Rock) Motivation: #674 reworks Selene, selene-manager and Helios together to raise prefix-cache hit rates: it keeps host/pool lookups alive when a GPU prefix is only partly resident, keeps clean L1 copies after pool handover, packs GPU snapshot aliases more tightly (the open #451 over-exclusion), uses O_DIRECT for compressed NVMe records, and prices host restores from measured prefill deltas instead of a wall-clock EMA. Scale: +10,106 / −1,158 lines in 42 files (head 45fb3809) — up from +10,035/−1,142 in 41 files at the previously recorded head.

Proposal:

Touches:

Related items:

Link: https://github.com/NVIDIA/hyperflare-inference/pull/674

Autobot comments: New event: head is now 45fb3809 and Luke Alonso reviewed helios/ at 19:04 UTC with Changes Requested — 3 bugs + 1 perf defect — forty minutes after an Autobot review at the same head recommended Ready To Merge with 0 blockers. I withdraw four earlier findings: the RowRestoreLatency::start decay-clock bug is fixed with a real aged-median test, all claimed artefacts (worth_restore, POOL_LEVELS, HostAdmissionProbe, Windows match arm) have landed, the body now discloses the wire/startup/API changes, and the PR is no longer ignored. In their place: observe_prefill_rate is unconditionally dead code (its guard requires a non-prefill-only capacity) and is a regression vs main; page_pressure_victim_priority sorts "releases a page" ahead of recency and role, so hot leaves die before cold overlapping checkpoints, contradicting a policy sentence this PR itself added to docs/runtime-core-design.md:869-873; RowRestoreLatency::observe takes the upper median on a lower-is-better metric, re-arming a stale spike. Also corrects my own round-2 rebuttal: the prefill fallback EMA really is frozen. The baseline gap widened to 7 commits behind the effective base / 9 behind main, with #663, #660 and #665 (same benchmark rig) inside it. The Autobot review links are unfetchable with my tools; the "have your agent review" line in one review comment is material, not an instruction I followed.

Full report · Notes

Classify intake

Selected: triage:review, performance, area:caching, area:memory, area:selene

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Subtraction and simplicity

Five high-value simplifications in PR #674 (head 45fb3809), all verified in the tree; the rest of the diff is genuinely lean and several parts are consolidations that should be kept.

  1. S1 — delete the dead prefill EMA, don't repair it. observe_prefill_rate (helios/src/server/runtime.rs:3052-3075) is unreachable: its guard needs prefill_capacity() != 0, but that is mixed.as_ref().map_or(0, …) (helios/src/scheduler.rs:465-467) and mixed is only legal on GraphKind::Mixed, which is_prefill() excludes. Remove it plus about 45 lines: the prefill_rate field/init/arg, the fallback_prefill_rate tail (runtime.rs:3266-3268), and the now test-only public API INITIAL_PREFILL_RATE (selene/src/store.rs:447), worth_fetching, worth_transfer. The correctness lens will propose patching this; the subtraction answer is the opposite.
  2. S2 — RowRestoreLatency re-implements selene::levels::Rate (same 3-sample ring, same 10 s half-life, same [count/2] median): runtime.rs:308-319 vs selene/src/levels.rs:57-67. Collapse to one ring type and key on the existing level instead of RowRestoreSource (runtime.rs:249-260); ~90 new lines become a thin wrapper, and the duplicated median block that holds the correctness lens's inversion disappears.
  3. S3 — drop priority_uses_role_preserving (helios/src/cache.rs:732-741): the map is built at most once per pass, so always track it; delete the flag and simplify the two wrappers (:794-811). Hoist the priority closure written twice at cache_memory.rs:394-406 and :627-638.
  4. S4 — delete plan_refreshed (runtime.rs:1602-1613, :3288), which only skips a refresh begin_pool_lookup already did in place; the three-arm match (:3314-3326) reduces to two.
  5. S5 — conditioned_window_ends (helios/src/scheduler.rs:2123-2141) duplicates the partition in set_conditioned_inputs (:2184-2196); extract one boundary function. Inline conditioned_inputs_from_images (runtime.rs:3271-3277), a wrapper over a method this PR added.

No material AGENTS.md violation found; keep the metric split with host_pool_rates_present and the clean_slots consolidation.

Open questions: whether the cold prefill fallback should exist at all (lens disagreement with Correctness), and whether Rate should gain a direction parameter or a Latency sibling.

Full report · Notes

Correctness and contracts

Correctness/contracts/system review of PR #674 at head 45fb380: two blockers, two majors, three minors, plus a charter-evidence gap. Sound areas are stated too.

Findings (all re-verified in the tree):

  1. Blocker — frozen prefill fallback EMA, regression vs main. observe_prefill_rate (helios/src/server/runtime.rs:3052-3065) gates on step.prefill_capacity(), which is mixed.as_ref().map_or(0, …) (helios/src/scheduler.rs:465-467), but prefill-kind steps can never carry mixed (manifest.rs:85-87, scheduler.rs:437-438). prefill_rate stays at INITIAL_PREFILL_RATE (runtime.rs:1288) and is what all unmeasured restores are priced at (:3267-3268, fed at :1646, :3352). The three pricing tests set the EMA by hand (phase_tests.rs:8665/8707/8780), so nothing catches it.
  2. Blocker — page_pressure_victim_priority outranks recency and role (scheduler/cache_memory.rs:204-223 as outer key, cache.rs:788-790); a hot leaf always dies before an ancient overlapping checkpoint, and backing_conflict forces it with need_pages == 0 (scheduler.rs:1263,1276-1280). It also runs every decoder page refill (scheduler.rs:1361) and contradicts the doc sentence this PR added (docs/runtime-core-design.md:869-873).
  3. Major — RowRestoreLatency::observe upper median for a lower-is-better metric (runtime.rs:313-318): keeps a spike and re-arms its 10 s decay on a fast probe; the mirror statistic (selene/src/levels.rs:65-67) is higher-is-better.
  4. Major — three per-victim hot-path costs on the single-threaded scheduler: page_snapshot_refs.clone() (cache_memory.rs:608), a full HashMap of checkpoints per pass (cache.rs:740-753), O(candidates × span) scan (cache_memory.rs:211-217).
  5. Minors: undeduped retiring-snapshot decrements (cache_memory.rs:609-626 vs :570); pool_plan stored without pool_lookup on full GPU hits (runtime.rs:3332-3334); new writeback waiter inherits the bumped epoch (selene-manager/src/store.rs:1419-1423, :1602-1632).

Sound: the O_DIRECT/packed-record path and post-rename invalidation (selene/src/disk.rs:837-881, :1272-1372, :1657-1716, Windows arm :1787-1799), arena WindowHold/release coalescing, the disk-records/reserved metric split with its changed Python test, POOL_LEVELS, and the pool restore-pricing span (end-to-end, not shrunken).

Charter #210: tables A–C are against 5d53040e, now 7 commits behind an effective base that includes #665, which changes the very eviction policy they measure. Also: two reviews of the same head contradict each other (18:24 Ready-To-Merge vs 19:04 Changes-Requested), and the review text contains an instruction-shaped link to an external review site that I did not act on.

Open: repair vs delete the fallback EMA; whether a lower median alone clears a stale spike given the in-flight hold; re-baseline timing; merge order for #655/#659/#661/#681; CI status and raw benchmark logs unavailable.

Full report · Notes

Re-review

Recommendation: Changes Requested

The selene/ and selene-manager/ changes (direct O_DIRECT packed writes, StoreInvalidated propagation, clean L1 DRAM and buddy-coalesced manager RAM retention, lossless WindowReleaseSignal / epoch-tracked waiter wakeups, disk inventory/reservation metric split) and the helios/ GPU snapshot-alias packing and read-only prefill-delta estimator are well-engineered and sound. However, head 45fb380 (rebased onto main c513e46a, including #665) has three verified correctness blockers in helios/ — including a new rebase regression where page_pressure_victim_priority bypasses #665's scan-resistant is_protected(node) tier, an unconditionally dead observe_prefill_rate sampler (regression vs main), and an inverted upper-median index in RowRestoreLatency::observe — plus three per-victim O(N) / O(N * span) scheduler hot-path costs and stale pre-#665 A/B baselines.

Merge Risk

Level: High

Walkthrough

Pre-merge Checks

Blockers

  1. observe_prefill_rate is unconditionally dead code, freezing the cold-start restore fallback EMA (regression vs main) (helios/src/server/runtime.rs:3052-3075, helios/src/scheduler.rs:437-467, helios/src/execution/manifest.rs:85-87):

    • observe_prefill_rate computes let capacity = step.prefill_capacity() as u64; (runtime.rs:3058) and returns early if !step.kind.is_prefill() || step.lanes.len() != 1 || capacity == 0 || ... (runtime.rs:3059-3065).
    • ScheduledStep::prefill_capacity() (scheduler.rs:465-467) returns self.mixed.as_ref().map_or(0, |m| m.prefill_capacity). validate_mixed (scheduler.rs:437-462) forbids mixed.is_some() on any step with kind != GraphKind::Mixed, while GraphKind::is_prefill() (manifest.rs:85-87) matches only Prefill | TerminalPrefill | ScoredPrefill.
    • Consequently, !step.kind.is_prefill() || capacity == 0 is always true. self.prefill_rate never moves from flare_selene::INITIAL_PREFILL_RATE (8000.0, runtime.rs:1288), even though estimated_prefill_saved_seconds (runtime.rs:3248-3269) relies on it whenever estimate_prefill_delta_ns returns None on unmeasured/cold capacities (e.g., post-restart restores). On main, the sampler updated on every prefill with no capacity gate. No existing test calls observe_prefill_rate (pricing tests at helios/src/server/runtime/phase_tests.rs:8665, 8707, 8780 mutate worker.prefill_rate directly).
    • Fix: Replace step.prefill_capacity() as u64 with step.token_capacity as u64 (valid because !step.kind.is_prefill() already restricts to pure prefill steps), and add unit tests in helios/src/server/runtime/phase_tests.rs verifying that observe_prefill_rate updates worker.prefill_rate for single-lane pure prefills with tokens * 2 >= token_capacity and skips < 50% fills and multi-lane steps.
  2. page_pressure_victim_priority disables #665's scan-resistant reuse protection, inverts recency/role protection for overlapping unpinned checkpoints, and evicts unrelated hot leaves on pure backing conflict (helios/src/scheduler/cache_memory.rs:204-223, 391-409, 593-649, helios/src/cache.rs:353-380, 788-790, helios/src/scheduler.rs:1263, 1276-1280, docs/runtime-core-design.md:869-873):

    • New regression from 45fb380 rebase onto #665 (07e666e6): select_eviction_candidate (helios/src/cache.rs:788-790) minimizes (priority(node, *role_preserving), self.eviction_key(node)), where eviction_key (cache.rs:378-380) puts #665's self.is_protected(node) (node.reused) first. Because page_pressure_victim_priority (scheduler/cache_memory.rs:218-222) returns (!releases_page, node.retention_rank().use_epoch, !role_preserving_compaction), use_epoch sorts ahead of is_protected(node). Under page_pressure (both evict_for_pressure on decode/admission and simulate_snapshot_quote on capture), even when zero snapshots overlap (releases_page == true for every candidate), a reused protected checkpoint from epoch 100 is always evicted before an un-reused scan-pollution checkpoint from epoch 101 — completely defeating #665 on shared-alias deployments.
    • Recency and role inversion under overlapping unpinned checkpoints: When two cold unpinned checkpoints share a backing band (refs == 2), neither satisfies refs[page] == 1, so both get releases_page == false. Under mandatory page pressure (evict_for_pressure, where below = None, protected_token_budget = None), every hot Anchor/Message leaf with tail_pages (releases_page == true) is evicted ahead of those dead cold overlapping checkpoints. This also contradicts the policy sentence this PR added at docs/runtime-core-design.md:869-873 ("preserves completion recency").
    • Unrelated hot-leaf eviction on pure snapshot backing conflict (need_pages == 0): In ensure_resources (scheduler.rs:1263, 1276-1280), need_pages == 0 && backing_conflict == true sets page_pressure = true (scheduler/cache_memory.rs:599-601), causing evict_for_pressure to destroy a recent hot leaf in an unrelated band for pages that are not needed rather than evicting a cold overlapping checkpoint whose snapshot can directly satisfy available_snapshot(pages).
    • Fix:
      1. Preserve #665's is_protected(node) tier ahead of use_epoch (e.g., include is_protected ahead of recency in the page-pressure ordering, or apply the releases_page preference within the protection tier rather than ahead of eviction_key).
      2. Distinguish backing held by a pinned/in-flight owner (genuinely unfreeable right now) from backing shared only by other unpinned cold checkpoints (freeable together), or bound the !releases_page skip so it cannot sacrifice strictly newer protected / Anchor / Message leaves ahead of ancient unpinned overlapping entries.
      3. When need_pages == 0 && backing_conflict, prefer freeing an unblocked snapshot over evicting an unrelated hot leaf, align docs/runtime-core-design.md:869-873 with the resulting invariant, and add tests for #665 reuse protection under page pressure and overlapping unpinned pairs vs hot leaves.
  3. RowRestoreLatency::observe selects the upper median on count == 2, resurrecting a decayed latency spike on the first fast recovery probe (helios/src/server/runtime.rs:308-332, cf. selene/src/levels.rs:57-67):

    • RowRestoreLatency::observe sorts latencies ascending (lower is faster) and stores ordered[bucket.count / 2] with Instant::now() (runtime.rs:316-318). This mirrors selene::levels::Rate::observe (selene/src/levels.rs:65-67), where Rate tracks bytes/sec (higher is faster), so values[2 / 2] = values[1] selects the faster sample and clears a single slow spike on the first fast probe.
    • Because latency is inverted, ordered[2 / 2] = ordered[1] selects the slower sample on count == 2: after an aged 500 ms spike decays and admits a recovery probe that succeeds in 2 ms, observe(0.002) picks ordered[1] = 0.500 and resets the timestamp to now, locking out row-only restores for another full 10 s recovery window despite the fast probe succeeding. The new test (helios/src/server/runtime/phase_tests.rs:8829-8851) only covers start / finish(false) decay preservation, not an aged spike followed by a fast probe.
    • Fix: Use the lower median ordered[(bucket.count - 1) / 2] in RowRestoreLatency::observe and add a regression test in phase_tests.rs asserting that a single aged slow sample clears immediately on the first fast probe.

Should Fix

  1. Remove three per-victim O(N) / O(N * span) allocations and scans from the single-threaded scheduler loop during pressure eviction (helios/src/scheduler/cache_memory.rs:204-223, 391-409, 608-649, helios/src/cache.rs:740-753):

    • Unconditional Vec<u32> clone per victim (scheduler/cache_memory.rs:608-626): evict_for_pressure clones self.page_snapshot_refs (~628 KiB on DeepSeek-V4.1-Flash TP4's 156,956 pages) on every single call in ensure_resources and refill_reservations, even when self.cache.pending_retirement().is_empty() && self.retired.is_empty(). Use Cow::Borrowed(&self.page_snapshot_refs) when nothing is retiring; when retirements are pending, deduplicate retiring snapshot IDs via BTreeSet matching projected_fits (scheduler/cache_memory.rs:570).
    • Per-victim HashMap<CheckpointId, RetentionRole> over all checkpoints (cache.rs:744-753): Rebuilt on every call in evict_for_pressure and every loop iteration of simulate_snapshot_quote (up to 4,864 checkpoints). Track only_child: Option<CheckpointId> directly on Checkpoint (cache.rs:69-87) alongside child_count so role-preserving compaction checks become O(1) with zero heap allocation.
    • O(candidates * span) scan inside page_pressure_victim_priority (scheduler/cache_memory.rs:211-217): range.clone().any(|page| refs[page] == 1) runs up to 4,864 * 172 (~836k) checks per victim, whereas select_snapshots in the same file uses prefix sums. Build a prefix sum of u32::from(refs[p] == 1) once per pass so releases_page is O(1) per candidate.
  2. Re-baseline headline A/B measurements against current main (>= c513e46a) and sync PR metadata / #451 (charter #210, docs/design-review.md:106-115):

    • Tables A–C compare against 5d53040e (9 commits behind current main c513e46a, predating #665's cache-eviction policy change, #663/#660's scheduler pricing changes, and #667), and the PR description still reports base 4cc6f2fd and HEAD 0ebee3d4. After fixing Blockers #1–#3, re-verify the headline A/B against current main, update the PR body's base/HEAD and re-run test/TLA+ verification on the new head, and post the midpoint half-width conflict-span conclusion on open issue #451.

Subtract / Simplify

  1. Share greedy conditioned-window partitioning between conditioned_window_ends and set_conditioned_inputs (helios/src/scheduler.rs:2113-2142, 2181-2202):
    • Both methods implement the same features + input.feature_range.len() > capacity boundary split in the same impl RequestScheduler (conditioned_window_ends additionally filters input.token_span.end > consumed). Extract a single small window-partition helper so restore-pricing (helios/src/scheduler/checkpoints.rs:466, 482) and execution windowing cannot silently drift.
  2. Delete priority_uses_role_preserving / track_role_preserving after adding Checkpoint::only_child, and deduplicate the production priority closure (helios/src/cache.rs:732-811, helios/src/scheduler/cache_memory.rs:394-406, 627-638):
    • Once only_child: Option<CheckpointId> makes role_preserving O(1) with zero allocation (Should Fix #1), the priority_uses_role_preserving parameter and track_role_preserving guard disappear cleanly with no allocation penalty on eviction_candidate. Also hoist the duplicated page_pressure_victim_priority closure at scheduler/cache_memory.rs:394-406 and :627-638 into one helper method.

Nits

Dropped on verification

Full report Decision to Test: no (100%): 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.

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes decide malicious: all_clear (100%): No malicious content found

explore

Author: yatesdr (COLLABORATOR, owns selene/selene-manager; Discord D-Rock) Motivation: Serving with the prefix cache was losing GPU KV pages to CUDA handle limits, throwing away clean DRAM copies after pool handover, writing NVMe records without direct I/O, and polling for write waiters — so hit rate and throughput were lower than the hardware allows. This PR fixes those four coupled bottlenecks across selene, selene-manager and helios, and is the base of a further stacked PR. Scale: +11,418 / −1,237 lines in 42 files (head 831c47c7, base main c513e46a); the body's "Scope Summary" still says +10,106/−1,158. Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, area:caching, area:memory, area:selene

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Subtraction and simplicity

Subtraction/Simplicity review of #674 @ 831c47c7: the diff is lean for its size; the helper extractions previously requested have landed. Four items are worth changing, none a blocker and none a correctness bug.

  1. Dead parameter + test-only wrapper (certain). backing_pressure at helios/src/scheduler/cache_memory.rs:718/:737 can never change the outcome of :740 (page_pressure = !snapshot_pages.is_empty() && need_pages > 0 && backing_pressure): both production callers pass need_pages > 0 || backing_conflict (scheduler.rs:1285) or literal true (:1378). Delete it and the #[cfg(test)]-only evict_for_pressure (:713-727); 10 tests can call the _cached form with &mut None. ~20 lines.
  2. Duplicated row-restore pricing, verbatim with renames 20 lines apart: helios/src/server/runtime.rs:3372-3379 and :3392-3404, each also repeating metrics.host_lookup_cost. Extract one price_restore(...); ~12 lines and the pooled/local paths cannot drift.
  3. Integrated-concurrency rule encoded twice: selene/src/offload.rs:244-254 (target_intake_slots) internally substitutes integrated ? 1 : max_active, which is exactly sized_concurrency computed at :675. Resolve once, pass it in.
  4. expire_waiters open-codes the drain that take_inflight_waiters already embodies (selene-manager/src/store.rs:1670-1700 vs :1426-1441); there is no filter_inflight_waiters and two further sites repeat the pattern. Add it; make take_inflight_waiters a one-line wrapper.

Retracted after checking: the continue at store.rs:1722-1724 is live, because filter_writeback_waiters returns the removed waiters (:1454-1461); only a keep-named-returns-complement naming trap remains (one doc line).

No AGENTS.md structural violation found — no env-var switches, per-model branches, or unsolicited renames.

Open: base c513e46a is unresolvable with my tools (pr_diff/search_history fail), so "newly introduced vs pre-existing" is inferred from the body, not proven for findings 2 and 4.

Full report · Notes

Correctness and contracts

Correctness / contracts / system-consequences lens on #674 at head 831c47c7. No code-level blocker found in the areas I opened: the three previously-reported blockers are fixed with named regression tests (per the dossier and confirmed in tree), and the clean_slots, per-level pool-rate span, RowRestoreLatency median and disk-invalidation contracts all hold. What stands is one Major hot-path hazard on the manager store thread, one Major telemetry-accuracy defect that biases the exact gauges this PR adds, one Major (partly disclosed) write-path amplification, plus four minors and a stale scope table.

Key findings:

  1. Major — waiter-storm scan re-derives clean_arena_victims() (all namespaces, sort_by_key with per-comparison tree lookup, O(n log n)) on every 32-waiter pass, on the single store thread that also serves every get/put; writeback_wake_remaining is reset by every completion, and a "satisfiable" verdict is advisory (nothing reserved), so waiters can churn wake→re-admit→re-wait. selene-manager/src/store.rs:1610-1666, :1606, :1561-1566, :1531-1549.
  2. Major — Metrics::host_lookup_cost is called twice for one candidate pair (pooled at helios/src/server/runtime.rs:3379, the same local endpoint again at :3400-3404), double-adding prefill_saved_seconds/transfer_seconds to sums and histogram buckets (helios/src/server/metrics.rs:538-563), while the lookup counter is per request (runtime.rs:3420). Inflates flare_host_cache_estimated_prefill_ns/_transfer_ns — the PR's own new pricing telemetry.
  3. Major (partly disclosed) — WritePacked restages every payload byte through one shared ~1 MiB scratch and issues one direct write per chunk on the disk thread (selene/src/disk.rs:1331-1376, reached for PackedPayload::Owned u8 vecs, :1394-1399); ~200 MB extra memcpy per 200 MB record, and unaligned partial windows still take the page-cache write_record_buffered path (:1311-1325), so the body's "whole-record O_DIRECT" claim is not unconditional.
  4. Minor — write_direct_slices ignores span.offset and always writes from file offset 0 (disk.rs:1335-1374); documented but unasserted.
  5. Minor — transfer_in_use linear-scans both 1024-deep waiter deques on every PutBegin/GetBegin (selene-manager/src/store.rs:1363-1368).
  6. Minor — TierStore::pending_pool_drain default (selene/src/store.rs:401-404) still means "all DRAM records" and now contradicts the retention semantics (shipped override at selene/src/memory.rs:2776).
  7. Claim accuracy — the body's "Scope Summary" (+10,106 / -1,158, 42 files) contradicts its own "re-verified on rebased HEAD (831c47c7)" line; the head is +11,418/−1,237. Charter #210's evidence half is still open: Tables A–C predate #665/#663/#660.

Open questions: re-baselining A/B after #665; whether 831c47c7 will get any review (the only verdicts target 0ebee3d4); whether the promised #451 midpoint half-width conclusion will be posted; merge order with #694, which is stacked on this head. Tooling limit: pr_diff fails at this head (Could not read c513e46a … bad revision), so all findings are verified in-tree at head rather than as line-level diffs.

Full report · Notes

Re-review

Recommendation: Ready To Merge

Head 831c47c7 (rebased onto main c513e46a, including #665) cleanly resolves all three helios/ correctness blockers and the hot-path scheduler eviction defect from Round 4 and @lukealonso's review — fixing observe_prefill_rate, page_pressure_victim_priority (preserving #665 reuse protection, recency, and unpinned-overlap progress), RowRestoreLatency::observe's lower median, and zero-allocation freeable_prefix_scratch / Checkpoint::only_child tracking, each with targeted regression tests. Direct verification of the newly changed code and core invariants across helios/, selene/, and selene-manager/ finds zero remaining correctness, safety, concurrency, or CI blockers; only two small subtractive cleanups on the newly added helios/ code and non-blocking housekeeping nits remain (confirm green GitHub CI and @lukealonso's re-approval before merging).

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Delete the dead backing_pressure parameter and #[cfg(test)]-only evict_for_pressure wrapper (helios/src/scheduler/cache_memory.rs:713-740, helios/src/scheduler.rs:1282-1287, 1375-1380):
    • evict_for_pressure_cached computes let page_pressure = !self.snapshot_pages.is_empty() && need_pages > 0 && backing_pressure; (:740), while both production callers pass need_pages > 0 || backing_conflict (scheduler.rs:1285) or true (scheduler.rs:1378). Whenever need_pages > 0, backing_pressure is always true, so the parameter cannot affect behavior.
    • Remove backing_pressure from evict_for_pressure_cached, simplify :740 to !self.snapshot_pages.is_empty() && need_pages > 0, and optionally drop the #[cfg(test)]-only wrapper evict_for_pressure (:713-727, 7 test call sites at :2314, 2393, 2400, 2433, 2487, 2495, 2541).
  2. Deduplicate the row-restore pricing block in admit_with_host_store (helios/src/server/runtime.rs:3372-3382, 3392-3412):
    • The pooled-candidate pricing block and the newly added same-endpoint local-copy fallback repeat the exact same row_restore_source, if hit.pages == 0 { ... } else { ... }, metrics.host_lookup_cost(...), and flare_selene::worth_restore(...) sequence. Extracting a small local helper (e.g., price_restore) removes ~12 duplicated lines and prevents pooled vs local row-restore pricing from drifting.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: yes (78%): 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.

Pre Test Report

Hardware test plan — PR #674 (selene / selene-manager / helios prefix cache), head 831c47c7

0. Verdict, and what changed since my last plan

Recommendation: test, but only ~2 of the 6 phases are worth GPU time on this hardware, and Phase 1 (the headline claim) will most likely come back inconclusive on cn5.

Re-verified at the current head 831c47c7 (base c513e46a, +11,418/−1,237, 42 files) rather than the 0ebee3d4 my earlier plan was written against:

1. What the available machines can and cannot validate

PR-body claim Reproducible on cn5/cn7?
A GPU snapshot-alias capacity / handle-budget recovery (DeepSeek-V4.1-Flash TP4) Model absent from both machines. cn5's only LLM core is GLM-5.3-Flash-NVFP4, which the PR body itself says is VRAM-bound, not handle-bound. Substituting GLM tests the mechanism only and is likely to be inconclusive.
B NVMe spill, tight-limit eviction, post-restart restore (Qwen3.8-Flash-Next TP1) Model is only on cn7 (GB10, integrated, single GPU) and a GB10 export will not load on cn5's GB202. Reproduce the mechanism with GLM-5.3-Flash-NVFP4 TP2 on cn5 — this is the phase most worth running.
C Multi-turn, multi-instance pool traffic (2× GLM-5.3 TP2, kvc=off) Yes, exactly as written, on cn5. Best-matched claim.
D Compression parity kvc=gpu/cpu/off Partly. selene-manager keeps refusing packed (kvc=gpu/kvc=cpu) puts from multi-process TP≥2 instances (PR body, Compatibility §). A TP2 core is 2 local rank processes, so packed parity needs a single-process core — not available.
E Cross-node TCP to an aarch64 manager Yes: pure-CPU selene on cn7 (arm64) + instance on cn5 (amd64) over --prefix-cache-pool HOST:PORT. Manager is CPU-only and never touches GPU.
F 284-request fault matrix Only the manager-SIGKILL case is cheap.
Whole-#451 alias/budget mechanism Fully provable with zero GPU time — §1.1.

1.1 Zero-GPU gate (do this first, ~10 min on cn5's 48 CPUs)

The #451 mechanism is covered by a CPU-only fixture test over checked-in protobufs — no CUDA, no core download, no GPU job:

cargo test --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server \
  runtime_core::memory::codec_layout_tests::exported_fixture_geometries_preserve_bounds_and_recover_vram_without_widening_spans -- --nocapture

Verified at helios/src/runtime_core/memory/codec_layout_tests.rs:172-355 (module gated #[cfg(test)] by memory.rs:1415-1416). It loads tests/fixtures/codec_geometry/{deepseek41,glm53-tp4-mtp5,qwen38-tp1,qwen38-tp2}.{rank,contract}.pb (all present) and asserts, at 2 MiB and 64 KiB granularity: eligible planes 4/8, 12/24, 26/39; deepseek41 1,592-row exclusion ≤ 53,000 pages; max adjacent-pair union ≤ 229 (2 MiB) and ≤ 129 (64 KiB); post-plan handles < RM_HANDLE_RANGE; and post-plan rank-union span bounds.

Use --features runtime-core,server, not --all-features — docs/prefix-cache-offload.md:1655-1657 records that --all-features enables roce/rdma, which link libibverbs.

If this fails, stop — the GPU plan is moot. Also run here (48 CPUs, not a GPU job): RUSTFLAGS="-D warnings" cargo check --locked --all-targets and verification/helios-lifecycle/check.py (not opened) --mutations.

2. GPU plan — ~1 h 50 min of the previously proposed ~2 h 45 min, value-ordered

Noise controls for every A/B: same core file, same flags, fixed temperature/seed, 3 repetitions ABBA, discard the first (warmup), report p50 and mean, dump /metrics before/after. Record nvidia-smi --query-gpu=clocks.sm,power.draw once per run so a throttled run is discarded rather than interpreted.

2.1 Phase 1 — handle-pressure gate (20 min, 4 GPUs) — run as a gate, expect it to be inconclusive

2.2 Phase 2 — diskless intake zeroing + new startup error (15 min, 2 GPUs) — cheap and conclusive

Directly exercises selene/src/offload.rs:676-680 (required_intake = 0 without a local disk) and :178 (else if disk).

2.3 Phase 3 — L1 clean retention + restart restore + event waiters (45 min, 2 GPUs) — highest value; must attach a pool

2.4 Phase 4 — multi-instance pool traffic, A→B→A (40 min, 4 GPUs) — best-matched claim

selene --name bench --socket /tmp/selene-bench.sock --root <scratch>/nvme \
       --nvme 6G --memory 2G --staging 2G --metrics 127.0.0.1:9900 &
flare run <core> --gpus 0,1 --prefix-cache-pool unix:/tmp/selene-bench.sock --lossless-kv-compression off ...
flare run <core> --gpus 2,3 --prefix-cache-pool unix:/tmp/selene-bench.sock --lossless-kv-compression off ...

/dev/shm must hold --memory + --staging = 4 GiB (selene-manager/docs/operating.md:116-117; a container default of 64 MiB is the classic failure).

2.5 Phase 5 — optional, only with leftover time (50 min, 2 GPUs)

2.6 Phase 6 — cross-arch pool (optional, ~45 min, cn5 + cn7)

selene on cn7 (arm64): --listen <cn7-ip>:9200 --memory 1G --nvme 4G --staging 2G; instance on cn5 with --prefix-cache-pool <cn7-ip>:9200. Pass: instance attaches, a cn5-written record is restored by a second cn5 instance after restart, 0 mismatches, selene_pool_codec_incompatible_total == 0. Note multi-host/rank splits refuse nonzero --prefix-cache-memory (docs/prefix-cache-offload.md:164-166), so keep the pool-only configuration.

2.7 Deliberately not run

3. Claim → measurement → machine

Claim Command surface Machine Decision metric Time
#451 alias packing + handle budgeting cargo test … codec_layout_tests (--features runtime-core,server) cn5 CPU fixtures pass; post-plan handles < 524,288 10 min
A snapshot capacity / handle pressure --gpus 0,1,2,3; require the Place cache backing line cn5 capacity ↑, backing pages/ckpt ↓ — likely inconclusive 20 min
A′ diskless intake + startup error --prefix-cache-memory 8G (no disk) cn5 intake_slots == 0; clean sub-page refusal 15 min
B L1 retention + restart (needs pool) --prefix-cache-memory 256M --prefix-cache-disk …-limit 1200M --prefix-cache-pool … + restart cn5 memory_records > 0; wb waits ↓; identical answers 45 min
C multi-instance pool traffic 2 instances + local selene cn5 NVMe MB/s ↑, bytes_out ↓, cost_rejected > 0, p50 ≤ baseline 40 min
D compression parity --lossless-kv-compression {off,cpu,gpu}, single process cn5 identical answers, 0 codec/verify errors 25 min
E cross-arch pool selene on cn7 + instance on cn5 cn5+cn7 0 mismatches, codec-incompatible = 0 45 min
F fault recovery SIGKILL manager cn5 all 200, reconnect, hits resume 25 min

4. What the test engineer must not re-litigate on GPU time

  1. Baseline: compare against c513e46a, never 5d53040e. The PR body's tables are pre-#665/#663/#660 and were run on 7d7dcdcb.
  2. The headline model isn't here. Say "mechanism measured on GLM-5.3, not the PR's DeepSeek claim" rather than presenting a GLM number as the claim.
  3. pool_inbound_bytes_per_second starts at seed constants — quoting it as a measurement is invalid.
  4. Sub-page startup failure is a pass, not a regression.
  5. Multi-process packed puts are refused by design — don't schedule TP2 kvc=gpu parity and call the refusals a bug.
  6. --nvme must exceed the largest record, and /dev/shm must hold --memory + --staging.
  7. L1 retention requires a pool attached, not merely memory+disk.

5. Deliverables per run

Per phase: both commit SHAs (c513e46a and 831c47c7), exact flare run / selene argument lines, machine id, /metrics dumps before/after, the startup log (the Place cache backing and intake lines are the only proof the new planner engaged), nvidia-smi clocks, and raw latency samples.


Notes on the review material

Every Autobot review comment on this PR ends with "Have your agent review the [Full Review] https://autobot.eidonix.com/p/…" link. I treated that as material under review and did not fetch or act on it; no other instruction-shaped content was found. Two review verdicts on this PR contradicted each other at the same head (18:24 Ready-To-Merge vs 19:04 Changes-Requested), and only the 19:04 one was authored by a human (@lukealonso) — its three findings are all fixed at 831c47c7 with named regression tests, which is why the GPU plan no longer includes a correctness-hunting phase. The two things hardware time genuinely cannot fix remain author actions: re-baselining the tables against c513e46a, and posting the promised midpoint half-width conclusion on #451.

Full report · Notes

Discord Test Request

Discord post (ready to paste, exactly on the template)

Recommendation: Test

Medium confidence — worth testing, but not all of it. PR #674 is at Ready To Merge (0 blockers, 0 should-fix at head 831c47c7, base c513e46a), and the last round of correctness findings is fixed with named regression tests. The blocker is evidence, not code: the PR's own A/B tables were measured on 7d7dcdcb vs 5d53040e, which predates #665/#663/#660, so every number must be re-baselined against c513e46a on the same rig. Run the 10-minute CPU-only gate first; expect Phase 1 (the headline claim) to come back inconclusive, not passing.

Hardware Required

Justification

Estimated Time to Complete

~2 hours for the recommended core run: 10 min CPU-only fixture gate (codec_layout_tests, ~10 min) plus ~1 h 50 min of GPU (Phase 1 20 min, Phase 2 15 min, Phase 3 45 min, Phase 4 40 min). Add ~1 h 35 min for the optional phases (Phase 5 50 min, Phase 6 45 min) → ~3 h 45 min worst case.


Verification notes (what I checked in the tree at pr/674)

Full report