#2 [high] Pre-test report v2 (head 0c04b1e2), run 263 — decision: REFER to hardware, minimal cn7 plan
PR #496 head 0c04b1e2 (base main c0c4f798), 3 files +3358/−933: selene/src/disk_store.rs, selene/src/shard.rs, docs/prefix-cache-offload.md. Author FujitsuPolycom.
Prior report (note #1) blockers — all settled at this head, verified by 3 lenses (Correctness clean, Simplicity clean, Prose clean, Architecture no blocking):
- logical/physical byte conflation in inbound_rate → FIXED: TransportEvent::InboundWindowSample observed once per physical window (disk_store.rs:3632-3635, emitted apply_shared_disk), stats.bytes_in logical (:3669), Fetched no longer samples.
- 61.3K 8/9-vs-7/9 regression → RESOLVED: 5 seed repeats (1234..1238, 60,534 tokens) identical top-5 logprobs/token ids both arms; temperature=0 clamped by helios, per-build prompt nonces caused the original gap. New test misaligned_follower_attaching_to_shared_partial_tail_and_row_matches_private_restore (~:8900+) byte-compares vs private baseline.
- benchmarks predate head → FIXED: table keyed main c0c4f798 vs 0c04b1e2; 18,177.5→4,306.7 MB (4.22x), TTFT 7,974.6→5,662.8 ms (−29.0%) simultaneous; 18,194.2→4,843.6 MB (3.76x), 6,883.6→5,951.9 (−13.5%) staggered; Flash-Next 7,944.9→1,981.1 (TTFT −3.1%) / 7,958.0→2,251.5 (−2.8%).
Remaining should-fixes (all behaviour-neutral for the measurements, per lenses):
- TransportEvent::InboundWindowSample rides the wire-event enum (disk_store.rs:97-101; shard.rs:477 unreachable!, guards shard.rs:722-725 & :1148-1150; shard/tests.rs:339 maps Kind::of over events). CompositeStore bumps stats.progress per event (composite.rs:1376) → maintenance re-runs per physical window (gate :1418-1424). Not a defect today; release-panic only via a new caller.
- HeaderIdentity hand-written Hash (disk_store.rs:1014-1050) duplicates Header PartialEq (shared/record.rs:136-152); silent drift hazard once #504 (Header.packed) lands. Verified field-consistent today.
- pick_next_pending_plan restates Layout::record_slots (disk_store.rs:1766-1777 vs geometry.rs:180-182).
- Subtractive: deleting build_pending_demand+demand (~80 lines) is behaviour-visible ONLY in staggered arrival ordering (author's own 3.76x vs 4.22x note) — must be flagged in report as the one change that could alter a tested number.
- selene::disk_store is
pub mod(lib.rs:25) so the new variant is public-API addition, not re-exported. - Exact assertion disk_window_reads()+coalesced_windows()==10 at disk_store.rs:8487 (Value lens calls it flake-prone; appears to be a total-window invariant) → Step 0 re-run once, non-blocking.
Hardware: cn7 ready, 1× GB10 (SM121, same class as author's evidence), job 10 CPUs / 60 GiB RAM / 16 GiB scratch; models nvidia/Qwen3.8-27B-NVFP4, Qwen3.8-Flash-Next-FP4-Local, incoai/Qwen3.8-27B-DFlash2 listed at 0 GiB (verify cached). cn5 never connected → unused. Feasibility note: 61K-token prefix ≈ 954 pages × ~4.19 MB ≈ 4.0 GB records → fits 16 GiB scratch; 4 concurrent branches fit 60 GiB RAM; 8 branches risky. Discrepancy worth one trial: description says 8 branches but before-read 18.18 GB ≈ 4.5 copies (not 8) while bytes_in is claimed 8× → run 4 branches to match the table (expect ~4.2x). Test plan ~2h: Step 0 desk cargo test -p selene --features test-support (~476 tests); Step 1 A/B 4-branch burst, physical NVMe bytes from /sys/block/*/stat or /proc/diskstats delta (not bytes_in, which is logical), burst median TTFT, fetch_failed==0; Step 2 correctness 4/4 outputs byte-identical to disk-off baseline + 3-repeat 61K parity spot check; Step 3 regressions single-stream restore ≈ main, tests/server/test_prefix_cache_offload.py (composite read_into), SIGTERM drain. Skip: Flash-Next, DeepSeek TP4, multi-host RoCE, Windows, discrete PCIe, cn5, >3 trials/arm. #497 not stacked on #496; #496's pump_all still runs maintenance first (disk_store.rs:2291-2312).
#3 [high] cn7 run prerequisites verified: explicit --prefix-cache-disk-limit, metric names, offload test env
PLAN-CRITICAL for cn7 (16 GiB scratch): docs/prefix-cache-offload.md:839-842 — "Disk limit: one tenth of the free space on the directory's filesystem at startup. --prefix-cache-disk-limit SIZE overrides it; zero selects no disk store and does not create its directory."
Consequence: on a 16 GiB scratch the DEFAULT disk limit is ~1.6 GB, while a ~61K-token Qwen3.8-27B-NVFP4 TP1 prefix is ~954 pages × ~4.19 MB ≈ 4.0 GB of parent record. The warm prefix would be evicted/thinned and the burst would restore from prefill instead of disk — the test would silently measure nothing. MUST pass --prefix-cache-disk-limit 8G (or similar) explicitly, and assert startup reports that limit. Child branch records are small (tails only), so 4 branches fit alongside the parent.
Metric names verified (helios/src/server/metrics.rs:1087-1310): flare_host_cache_lookups_total, _hits_total, _reused_tokens_total, _stored_total, _store_failed_total, _fetched_total, _fetch_failed_total, _bytes_in_total (LOGICAL, not usable as physical gauge), _inbound_bytes_per_second (exposed DiskStore inbound_rate — now disk-thread-only), _inbound_in_flight, _outbound_in_flight, _slots_in_use/_slots_total/_intake_slots, _disk_records/_disk_bytes, _restores_total{tier="nvme"}. Flush with flare_host_cache_inbound_in_flight==0 / outbound_in_flight==0 (pattern at tests/server/test_prefix_cache_offload.py:49-57).
Regression test prerequisites (tests/server/test_prefix_cache_offload.py:26-31 + docs/prefix-cache-offload.md:1425-1447): needs FLARE_RUN_CUDA_TESTS=1, CUDA_VISIBLE_DEVICES, FLARE_OFFLOAD_TEST_CORE=<core .safetensors>, built flare-cli release binary, --basetemp on a direct-I/O filesystem, and it launches its own servers. Docs show cargo test --manifest-path helios/Cargo.toml --all-features offload:: -- --ignored --test-threads=1 with FLARE_OFFLOAD_TEST_DIR for the Rust equivalents. NOT a drop-in "run the CLI" step — pre-check the env or fold these into Step 0; if the runtime core is unavailable on cn7, substitute an HTTP-level corrupt-record check.
test_prefix_cache_offload.py already asserts the exact properties I want (fetched>0, fetch_failed==0, reused_tokens>32000 at :160-173; corrupt-record fallback at :185-186) → it is the cheapest composite/read_into + failure-isolation regression available.
selene test geometry constants for reference: PAGE_RECORD=16384, ROW_RECORD=4096 (disk_store.rs:3956-3958) — unit-test scale only, not the model scale.
#5 [high] PR #496 now conflicts semantically with merged #504 (v4 packed disk path) — mandatory rebase
VERIFIED at ref main vs pr/496 (head 0c04b1e2, base c0c4f798; branch last updated 2026-11-25 05:23 UTC, #504 merged 2026-11-25 18:22).
Post-#504 main has, in selene/src/disk_store.rs:
- :949
enum Destination(with:961 HostPacked), :1043struct InboundRecord(:1036packed_buf), :1481completed_packed_reads - :1555
pub fn write_packed(..), :1576pub fn read_into_packed(..), :1619pub fn take_packed_read(..) - :259
enum Sourceincl.:273 HostPacked;ReadPackeddisk job (:1318 submit, :1089/:1099 completion, :1298-1330 contiguous packed read) selene/src/composite.rs:565write_packed, :871read_into_packed, :1042take_packed_read(zero-copy packed disk spill/restore)selene/src/shared/record.rs:127pub packed: Option<Arc<packed::Layout>>and it IS inHeader::PartialEq(main:146,eqat :144-160).
At pr/496 (searched all of selene/src): NO matches for write_packed, read_into_packed, take_packed_read, Source::HostPacked, HostPacked, Destination, InboundRecord. #496's enum Source (pr/496 disk_store.rs:274) has only Device and Host; its enum Owner (:265) has HostInbound/SharedSegment, no InboundRecord.
=> #496 deletes/rewrites precisely the code post-#504 main depends on for compressed (v4 packed) disk checkpoint spill + restore. Merging requires porting the whole packed path onto HostInbound/DeviceInbound/SharedWindow: packed windows are read as one contiguous ReadPacked per record (not per-window ReadPages/ReadRow), need a packed payload buffer in the host inbound record (Destination::HostPacked + completed_packed_reads semantics), and the coalescing key SegmentKey{path, expected: HeaderIdentity} must account for Header.packed.
Correction to the case-file's claim: #496's hand-written Hash omitting packed (pr/496 disk_store.rs:1016-1031, .. at :1030) does NOT let two records collide into one WindowKey — HeaderIdentity::eq (pr/496 :1006-1010) still compares full Header, so a==b ⇒ hash(a)==hash(b) holds and unequal keys are separated inside the bucket. It is a hash-coarseness/perf hazard plus a maintenance trap, not correctness.
Docs: #504 also touched docs/prefix-cache-offload.md (+89/−6), including the §2.4 region #496 rewrites (pr/496 docs:330-366).
#7 [high] Report of 2026-11-25-2, run 3 (round 3) — decision: DO NOT refer to hardware yet (#504 collision)
Round 3 (head unchanged 0c04b1e2). Decision: DO NOT refer to hardware testing yet.
New blocking reason (see note #5 for citations): merged #504 put the v4 packed disk spill/restore path (write_packed / read_into_packed / take_packed_read / Destination::HostPacked / ReadPacked / completed_packed_reads) into main's selene/src/disk_store.rs and composite.rs:533-565, 869-874, 1039-1062; #496 deletes Destination/InboundRecord and has zero matches for all of those symbols. Requires a semantic port (packed destination on HostInbound/DeviceInbound, contiguous ReadPacked window model, decide whether packed records coalesce, reconcile docs §2.4 with #504's +89/-6). Also Header.packed now exists in main's PartialEq, so #496's HeaderIdentity hash omits it (hash coarseness, not collision — map key equality is fine). A/B baseline c0c4f798 predates #504.
Round-2 blockers remain closed (physical vs logical inbound_rate; 61.3K parity via 5 cold-VRAM repeats + misaligned-follower test; benchmarks keyed to head at the time). Should-fix left: InboundWindowSample on TransportEvent (unreachable! at shard.rs:476-478, guards :722-725/:1148-1150, composite.rs:1376 progress inflation); HeaderIdentity manual Hash; pick_next_pending_plan restates Layout::record_slots (pr/496:1767-1777); §2.4 doc paragraph duplicating §4; maintainer sign-off; exact-total flake at disk_store.rs:8487.
Minimal plan AFTER rebase (~2-2.5 h cn7): Step 0 desk cargo test -p selene --features test-support incl. post-#504 packed suites + build current main; Step 1 4-branch cold-VRAM burst A/B with --prefix-cache-disk-limit 8G, physical bytes from /proc/diskstats (NOT flare_host_cache_bytes_in_total), 3 interleaved trials; Step 2 all four outputs byte-identical to disk-off serving, one staggered no-hang run, 3x 61.3K 9-fact probe both arms; Step 3 single-stream parity, tests/server/test_prefix_cache_offload.py (needs FLARE_RUN_CUDA_TESTS=1, CUDA_VISIBLE_DEVICES, FLARE_OFFLOAD_TEST_CORE, --basetemp direct-I/O), SIGTERM drain. Skip multi-host/Windows/discrete-PCIe/split_pools/DeepSeek/Flash-Next/cn5 and all compressed-mode live testing (no core declares codec_layout).
#9 [high] Head cb3db468 verified: round-3 #504 blocker resolved (packed path ported), rate sample out-of-band
PR #496 head cb3db468 (rebased onto main 6d74db3a after merged #504 lossless KV compression). 5 files, +8682/−5630 (disk_store +8470/−5627).
ROUND-3 BLOCKER RESOLVED — #504 packed path preserved AND extended to coalesce:
- Preserved:
write_packed(disk_store.rs:1766),read_into_packed(:1787),take_packed_read(:1830),HostDestination::Packed(:979, used :1303),Source::HostPacked(:297), disk.rs:988 write_packed. - Packed coalescing: shared
disk::Job::ReadPackedsubmitted per aligned window (:2674-2679); packed window byte span frompacked::Layout(:2650-2667);win.packed_buf = reply.payloadretained on the shared window (:2123-2124) until followers' decode/upload finish. - Test
concurrent_packed_fetches_coalesce_opens_and_read_packed_windowsexists at :10545.
RATE SAMPLE OFF THE CROSS-RANK ENUM (previously should-fix, now fixed):
DiskTransport::drain_inbound_samplestrait method with default no-op body (disk_store.rs:150); Staged impl :3165-3167.- Buffered
inbound_samples: Vec<(u64, Duration)>(:1663), pushed once per completed physical window (:2149, values from :2136-2141). - Drained by
observe_inbound_samples(:3649-3655) frompoll_transport(:3662),poll(:4640),close(:4678). - Sharded forwards local on rank 0, discards on poison (shard.rs:1005-1012); peers discard (:1214). No
unreachable!left. DiskStore::applynow does unconditionalstats.progress += 1(:4410) and theFetchedOk arm only adds logicalstats.bytes_in(:4442) — so composite progress is not inflated per window.
Admission guard uses the allocator's arithmetic: layout.record_slots(plan.count, plan.row) with hoisted transfers lock (disk_store.rs:2306-2320); packed segments skip slot accounting (:2314-2319).
Staged::close separates abandoned jobs (:3192-3194, store_jobs.max(owners.len()).max(maintenance.len())) from leaked_shared (:3195) with distinct messages (:3214-3225). Surviving cosmetic nit: .max() over heterogeneous collections is still labelled "disk transport jobs".
hit().estimated_seconds = bytes / inbound_rate (disk_store.rs:4403) — inbound_rate now disk-thread-execution-only, so restore admission pricing is optimistic (mirror of the earlier inflation). Author's live figures 6.07 GB/s single vs 7.71 GB/s 8-way; #497's end-to-end 8.68 GB/s. Direction provable; magnitude is a test question.
pump_all (:2957-2978) still drains maintenance first, then outbound, host_inbound, device_inbound. MAINTENANCE_DEFER_LIMIT does NOT exist at this head (repo-wide search: no matches) — it lives in #497, which is not stacked on this branch. So a test at this head exercises maintenance-first ordering; pump_all will move again after #497.
#10 [high] cn7 test feasibility: page arithmetic, disk-limit trap, compression not live-testable, metric names
Hardware: cn7 = 1× GB10 (SM121, matches author's evidence) with nvidia/Qwen3.8-27B-NVFP4 and local-inference-lab/GLM-5.3-Flash-NVFP4 listed (all at 0 GiB — must confirm weights cached or cold download dominates). Job: 10 CPUs / 60 GiB RAM / 16 GiB scratch. cn5 = 4× RTX PRO 6000 Blackwell (SM120) but no Qwen3.8-27B weights (dinov2/GLM only) — not the load-bearing row; only useful as a disambiguator.
Record size arithmetic (from PR description, verified consistent): Qwen3.8-27B-NVFP4 TP1 ~60.5K-token prefix = 472 pages at 128 tokens/page + 101 MB row = 2,274 MB single restore. 8 branches × 2.27 GB = 18.18 GB = the table's "before" 18,177.5 MB. So the earlier "4.5 copies not 8" objection is withdrawn — pages are 128 tokens, not 64.
DISK-LIMIT TRAP (verified docs/prefix-cache-offload.md:923-924): limit defaults to one tenth of free space at startup. On 16 GiB scratch ≈1.6 GB < 2.27 GB prefix → the warm prefix is evicted and the burst silently prefills. MUST pass --prefix-cache-disk-limit 8G (or similar) and confirm the startup line reports it.
Expected "after" physical bytes for 8-way: ~1.9 copies ≈ 4,306.7 MB in the author's run, NOT 2.27 GB — because a window released before a later restore attaches is re-read (documented limit, docs §2.4 :439-443) and there are 8 child tails. So expect ~4–5× reduction vs 8×-before; a 4.3 GB result is a pass, not a failure. Set that expectation for the tester.
COMPRESSION IS NOT LIVE-TESTABLE HERE: codec_layout is produced only by ignition/preparation/contract.py:117 (helper) and consumed at helios/src/runtime_core/memory.rs:638-646; this repo has no ignition/recipes/ (recipes live in the external local-inference-lab/hyperflare-recipes repo) and no recipe declares codec_layout. Cores serve compression off. Requesting cpu/gpu against a core without codec_layout fails at startup with a clear message (memory.rs:640-642) — that startup rejection is cheap to check on hardware and worth one command; live packed serving is NOT testable and must not be attempted.
Verified metric names at head (helios/src/server/metrics.rs): flare_host_cache_fetched_total (:1198), flare_host_cache_fetch_failed_total (:1203), flare_host_cache_bytes_in_total (:1213, LOGICAL by design), flare_host_cache_inbound_bytes_per_second (:1371, disk-thread-only). No slots_in_use metric found at head — don't assert on it. Physical NVMe bytes must come from /proc/diskstats (or /sys/block//stat sectors-read deltas) on the device backing the cache dir.
No qualify package exists in this repo (python3 -m qualify.host_cache_isolation at docs:1598 is external), so the burst harness must be hand-built HTTP. tests/server/test_prefix_cache_offload.py needs FLARE_RUN_CUDA_TESTS=1, CUDA_VISIBLE_DEVICES, FLARE_OFFLOAD_TEST_CORE, a release binary and a direct-I/O basetemp.
Docs §2.4 at head is three nested bullets (:424-448) with the metrics contract stated once in §4 (:1612-1617) — the round-2 docs finding is resolved. Remaining cosmetic nit: ":425-426 aligned to WINDOW_PAGES (64-page) file boundaries" is accurate for raw v1–v3 but for packed windows alignment is in page-index space (:1052-1056) while the byte range follows page_offset, so "file boundaries" only fits raw.
#12 [high] PR #496 head ba1c73fd — verified facts + cn7 plan (round 5)
Head ba1c73fd (base 6d74db3a; main now 99339606). 6 files: docs/prefix-cache-offload.md (+48/-2), selene/src/disk_store.rs (+337/-288), selene/src/disk_store/coalesce.rs (+1416 new), selene/src/disk_store/coalesce/tests.rs (+3217 new), selene/src/shared/packed.rs (+44), selene/src/shared/record.rs (+119/-1). selene/src/shard.rs diff is now 0 (rate samples removed).
Verified in source:
- inbound_rate reverted to end-to-end: Inbound{read_nodes, logical_bytes, started, rode_preexisting} disk_store.rs:2044-2060; fetch computes read_nodes/logical_bytes=layout.record_bytes(chain.pages) and rode_preexisting (overlap on read nodes) :3422-3455; apply: if bytes>0 and (!rode_preexisting || measured<current) observe(job.logical_bytes, elapsed) :3244-3251.
- Coalescing counters disk_opens/disk_window_reads/coalesced_windows are #[cfg(any(test, feature="test-support"))] disk_store.rs:1498-1514; helios depends on flare-selene without test-support (helios/Cargo.toml:45; test-support only in dev-dependencies :69) => NOT available in a release serving binary or /metrics. Physical-read evidence must come from the device (/proc/diskstats) or a test-support build.
- Packed v4 reads are BUFFERED: disk::Worker::open uses File::open for packed (disk.rs:1064) and read_packed uses read_exact_at (disk.rs:1037-1056) => page-cache hits; not valid for physical-NVMe measurement. Raw v1-v3 uses flare_eos::direct_file (O_DIRECT) disk.rs:1088 => physical reads real.
- Packed records are written when codec enabled and fits_units: disk_store.rs:1722-1727 (Source::Device), codec_enabled()=transfers.codec_profile().is_some() :250. So --lossless-kv-compression cpu|gpu + disk tier writes v4 packed .ckpt => exercises shared ReadPacked windows.
- Compression gates: cpu|gpu requires contract.cache.codec_layout else startup error "core was exported without a codec layout" (helios/src/runtime_core/memory.rs:638-642); gpu additionally requires embedded gpu_module else "use --lossless-kv-compression cpu or re-export" (helios/src/runtime_core/model.rs:626-632). codec_layout read at selection.rs:386-390 (/model_contract/cache/codec_layout). Metrics for codec: flare_kv_codec_active, _original_bytes_total, _stored_bytes_total, _transform_nanoseconds_total, _failed_windows_total, _verification_failures_total (docs/operating.md:57-69).
- No greedy decode: temperature=0 rejected (helios/src/model.rs:230-233); correctness comparison must be logprob/seed based (needs core max_top_logprobs != 0, /v1/models flare block models.rs:88).
- Metric names present at head: flare_host_cache_fetched_total (metrics.rs:1198), fetch_failed_total (:1203), bytes_in_total (:1213), inbound_in_flight (:1321), inbound_waiting (:1326), slots_in_use (:1331), slots_total, intake_slots (:1341), disk_bytes (:1361), inbound_bytes_per_second (:1371), reused_tokens_total (:1158).
- Disk limit default = one tenth of free space at startup (docs/prefix-cache-offload.md:924-927) => ~1.6 GB on 16 GiB scratch; must pass --prefix-cache-disk-limit 8G.
- pump_all at this head still drains maintenance first; MAINTENANCE_DEFER_LIMIT lives only in #497 (open, head ca863852); #497 says merge #497 first then rebase #496.
- Test names (coalesce/tests.rs): header_identity_caches_digest_and_matches_header_equality :466; poll_at_full_window_credit_..._avoids_demand_rebuild_and_rehashing :504 (mean_us<200 bound only, ~0.25-0.75us realized); aligned_windows_align... :618; concurrent_burst_coalesces... :676; staggered_arrival... :763 (assert reads+coalesced==10 at :851); different_skip_pages... :875; private_failure_isolation... :986; shared_ancestor_failure... :1094; staged_close_drains... :1182; misaligned_follower... :1256; coalesced_restores_keep_inbound_rate_end_to_end... :1444; overlapping_shared_stream... :1623; leader_private_failure... :1846; packed_restore_inbound_rate_includes_decode_delay... :1982 (cfg codec); sharded_inbound_rate_reflects_end_to_end... :2153; sharded_concurrent_fetches_coalesce... :2283; tight_pool_waits_for_shared_ancestor... :2533; tight_pool_wait_never_deadlocks... :2695; concurrent_packed_fetches_coalesce... :2905 (cfg codec).
- selene features: default=["codec"]; test-support=["codec"] (selene/Cargo.toml:13-20). WINDOW_CREDITS=2 (shared/limits.rs:18); RECORDS_IN_FLIGHT=8 (disk_store.rs:71); intake_slots(layout,max_active)=2max_activerow_slots+2*64 (offload.rs:175-177). Plan: cn7 only, Qwen3.8-27B-NVFP4 TP1. Step0 desk gate (prepared core + codec_layout probe + crate tests + stale-1.5-49ms bench on GB10 CPU), Step1 compressed cpu arm (primary new validation of v4 packed coalescing), Step1b gpu arm, Step2 raw compression-off A/B vs main for physical bytes via /proc/diskstats, Step3 single-stream parity + SIGTERM + corrupt-record. ~3-3.5h GPU.
#6 [medium] cn7 plan post-rebase: compression live-test likely impossible (no codec_layout in repo cores)
From merged #504's own material limitations: "nothing in this repository declares codec_layout ... so every core exported here serves off", and it flags as a doc defect that the omission is not listed. Live --lossless-kv-compression cpu|gpu requires a core with codec_layout.
Consequence for the cn7 plan after #496's rebase: do NOT budget GPU time for packed-mode restores; confirm first whether the served core (nvidia/Qwen3.8-27B-NVFP4 exported via local-inference-lab/hyperflare-recipes) declares codec_layout. If not, the ported packed path is only exercisable by cargo test -p selene --features test-support and the SM121 helios offload:: GPU suites (#504 reports 490 selene tests and real-GPU codec round trips).
=> cn7 hardware value after rebase remains exactly the coalescing claim in uncompressed mode (4-branch cold-VRAM burst, A/B vs main). Everything else is desk/unit work.
Also: post-#504 Header carries packed, so #496's coalescing benchmark numbers were measured on a tree whose Header had no packed field. Not a blocker, but the A/B arm must be rebuilt from post-#504 main for a like-for-like comparison (author's baseline c0c4f798 predates #504).