Architecture scratchpad · NVIDIA/hyperflare-inference #590

Raw Markdown for agents: https://autobot.eidonix.com/p/65cdc858-ef3c-4f1c-a7de-dc823ada2a21.md

#1 [high] Should fix: PR bundles four unrelated fixes plus a new feature; previously blocked #519 nap re-landed inside it

PR #590 (head 4ea9ba0) changes 4 files, +588/-112, and carries five separate outcomes:

  1. io_uring lane fan-out (helios/src/engram/reader.rs:787-800)
  2. CachedReader::warm chunking (reader.rs:1081-1140)
  3. pre-6.7 EPERM read-only remap (reader.rs:107-176)
  4. WaitBackoff spin-then-nap (helios/src/engram.rs:322-377, 685-687)
  5. unchecked u64 mailbox arithmetic + scored_prefill filters (helios/src/runtime_core/engram.rs)
  6. NEW capability: PreparedPLELookup.publish_lookahead (ignition/components/ngram_delivery.py:78-95, 157-164)

Against AGENTS.md:155-199 ("Keep each PR focused on one coherent outcome and describe its problem, resulting behavior, validation, and material limitations"; "Reject unsupported abstractions and churn ... Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement") and docs/design-review.md:135-146, this is one PR delivering six outcomes across two languages and two layers (native runtime + ignition component). It also drags #519's disputed change in.

#519 (open, PR by peperunas) is exactly the WaitBackoff design; lukealonso's 2026-11-28 comment there blocked it: "No served-workload benefit demonstrated, and readiness-latency impact is unmeasured ... lowering idle reader CPU on a discrete-GPU host without a demonstrated served improvement does not meet the merge bar (matching why #353 was closed on the same wait)" and asked for flare_replay_readiness_wait_nanoseconds_total to be reported. This PR bundles the same WaitBackoff with genuine bug fixes, which removes the ability to accept the fixes and reject the parking change separately, and the description offers no served measurement for it (the 76.5% gather / 4.6% TTFT numbers are attributed to the PLE lookahead feature, not to the backoff). Charter "How We Work": "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)". Test added (wait_ready_backoff_naps_until_publication_and_cancellation_and_resets, engram.rs:1139-1183) proves only that the wait returns; it cannot show a benefit. Fix: split the backoff (and ideally the PLE feature) out, or obtain an explicit maintainer ruling that idle reader-thread CPU occupancy is itself the defect, and report readiness-wait metrics before/after.

#2 [high] Should fix: WaitBackoff is a third hand-rolled wait policy, and its Requests::read half is unreachable in production

docs/design-review.md principle 1: "Keep Helios as simple as possible." helios already has at least three bespoke wait policies: spin_wait_until (helios/src/execution/threaded.rs:65-88, 32 spins then HANDOFF_POLL spin/yield), recv_after_spin (threaded.rs:40-59), GraphExecutor::park + thread::yield_now (helios/src/server/runtime.rs:1176-1182), plus thread::yield_now in the io_uring error paths (reader.rs:514, 595). PR #590 adds a fourth with its own schedule (SPIN_ROUNDS=4096, 25 us growth, 250 us ceiling) and no stated reason for those numbers (engram.rs:322-352). #519's own review already argued the ramp costs ~51 lines for one sleep and that it reaches the ceiling after ~1.4 ms of a measured 28.8 ms wait, so const NAP_MAX + spin/sleep is equivalent and shorter.

Second half: Requests::read (engram.rs:299-320) gets its own WaitBackoff, but after #566 the only production caller is ReaderAction::Gather (engram.rs:626-671), which is dispatched only when job.requests.is_ready(cancelled) has already returned true (engram.rs:401-405), i.e. ready == sequence or cancelled. The loop at engram.rs:311-316 therefore never iterates in serving; wait.step() there is dead code, kept only for the unit tests. The description presents backoff in Requests::read as part of the fix ("used by both ReaderAction::WaitReady ... and Requests::read"), which overstates it. Fix: keep one wait helper (or reuse an existing one) applied at ReaderAction::WaitReady, and either delete the read loop's backoff or say it is test-only.

#3 [high] Research summary

Reviewed PR #590 (head 4ea9ba0, 4 files, +588/−112) through the architecture-and-scope lens, against the charter, AGENTS.md and docs/design-review.md. All four changed files were read in context (helios/src/engram.rs, helios/src/engram/reader.rs, helios/src/runtime_core/engram.rs, ignition/components/ngram_delivery.py), with their callers (Transfers::new/enqueue, Shared::new/with_readers/next_reader_action, runtime_core/model.rs engram wiring, GraphKind::try_from, engram::consumes, PreparedEngramRequests) and the governing docs (helios/manifest.md §prefetch_buffer, docs/cli-design.md §embedding-table flags, docs/design-review.md testing hierarchy).

Two confirmed findings recorded in the scratchpad, both "should fix":

  1. Scope. One PR delivers six outcomes across two layers and two languages (io_uring lane fan-out, warm-batch chunking, pre-6.7 memfd remap, a spin-then-nap wait, defensive mailbox arithmetic + scored_prefill filters, and a brand-new PreparedPLELookup.publish_lookahead capability). AGENTS.md:155-199 requires each PR to keep "one coherent outcome" and rejects both unneeded extension points and churn; the validation evidence is a single combined test tally, so no individual outcome can be accepted or rejected on its own. Most seriously, the WaitBackoff block (engram.rs:322-377) is the change currently blocked in open PR #519, where the maintainer's 2026-11-28 comment asks for served evidence and flare_replay_readiness_wait_nanoseconds_total and notes that #353 was closed on this same wait; bundling it with genuine bug fixes removes that judgement and the description offers no served measurement for it (the 76.5% gather / 4.6% TTFT numbers belong to the PLE feature).

  2. Wait simplification. WaitBackoff is a fourth bespoke wait policy in Helios beside spin_wait_until/recv_after_spin (execution/threaded.rs:40-88), GraphExecutor::park + yield_now (server/runtime.rs:1176-1182) and the io_uring yield_now paths (reader.rs:514, 595), with unexplained 4096/25 µs/250 µs constants (design-review principle 1: keep Helios as simple as possible). Its Requests::read half is unreachable in serving: after #566 the only production caller is ReaderAction::Gather, dispatched only once is_ready() is already true, so the new loop in read exists just for unit tests while the description describes it as part of the fix.

The pre-6.7 mapping fix is correctly targeted at the reported root cause in #481 and works on every kernel (read-only descriptor, no VM_MAYWRITE), and preserves the seals/immutability check — it does not fall back silently. The scored_prefill filter change is a genuine correctness convergence on the shared engram::consumes predicate rather than a new special case. No charter-violating layer crossing was found in the Python addition (Ignition prepares, Helios serves), though its scope belongs with the recipe PR it depends on.

#6 [high] Should fix: hot-path fan-out threshold lowered with no latency measurement, and docs still describe the old rule

Head 6fe7bed2. helios/src/engram/reader.rs:37-51 adds lane_fanout(reads, lanes); Unix DiskReader::gather (reader.rs:807-840) and Windows Readers::gather (reader/windows.rs:89-118) now call it instead of reads.len() <= DEPTH.

What actually changes for latency: before, a gather of <=128 reads ran entirely on the delivery thread (one lane). After, any gather above DEPTH/lanes spawns active_lanes-1 scoped helper threads via std::thread::Builder::spawn_scoped (reader.rs ~815-830, windows.rs:99-106). With the Windows default of 4 workers that is 33 reads (lane_depth=32); with 8 workers, 17 reads (lane_depth=16). So the helper-thread path now covers the common small-gather regime that docs/cli-design.md:777-778 describes as staying on the delivery thread: "Large gathers use scoped helper threads, whose startup cost is included in gather latency. Small gathers stay on the delivery thread." That sentence is now wrong for 17-128 reads, and the doc block at 774-780 is not updated by this PR.

Evidence gap: the only check is lane_fanout_scales_workers_from_per_lane_depth (unit table, reader.rs:2236-2250) and unix_disk_reader_fans_out_when_reads_exceed_single_lane_depth_below_total_depth (reader.rs ~2260-2330), which asserts thread spawn happened and rows are correct. Nothing measures gather time, so the change could equally slow 17-64 read gathers (thread spawn + fixed 8 MiB staging per lane, DEPTH/workers slots) as speed them up. The PR description discloses "multi-worker QD fan-out ... verified by unit tests rather than exercised by that served run" - honest, but the charter's bar is explicit: "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)" (charter, How We Work) and docs/design-review.md:106-115 principle 12 ("Performance claims require equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements"). The claimed benefit "restores multi-worker queue depth for 17-128 read batches on both Unix io_uring and Windows I/O rings" is a performance claim resting on a lane count.

Fix: run the same served workload (Qwen3.8 or DeepSeek-V4.1, --embedding-table-workers 4, disk storage + row cache) A/B on main vs branch and report gather time / TTFT, or state the outcome as an expectation only and drop the performance framing; and update docs/cli-design.md:774-780 to state the per-lane depth rule (DEPTH/workers reads per active lane) rather than "large gathers".

#7 [high] Should fix: publish_lookahead is unreachable in-repo, untested, and publishes a count that can exceed the rows written

Head 6fe7bed2. ignition/components/ngram_delivery.py:78-95 adds flare::ple_advisory_requests and :157-164 adds PreparedPLELookup.publish_lookahead.

(a) Unreachable and untested in this repository: a whole-repo search for publish_lookahead finds only the two definitions (ignition/components/engram.py:280 for the Engram path added by #566, and this one); nothing calls it and no test in tests/ references it (tests/components/test_engram_local_heads.py covers PreparedEngramRequests only). AGENTS.md:194-199: "Require focused, meaningful validation. Tests must exercise the affected behavior or contract... Do not present scaffolding or partially wired features as supported." The justification is entirely an external companion PR (local-inference-lab/hyperflare-recipes#87), and the PR body itself says "Merge this PR before bumping uv.lock in hyperflare-recipes so Qwen3.8 exports detect PreparedPLELookup.publish_lookahead" - i.e. the consumer is not in this repository and does not exist on main. Contrast #566, which landed the Engram twin together with served evidence in-repo.

(b) Silent truncation at ngram_delivery.py:84-89: state.hash_state.run_tensors(..., ids, requests, token_count=ids.shape[0]) hashes exactly ids.shape[0] rows (ids = torch.empty_like(self.ids), and self.ids = table.hashes[:tokens] with tokens = output.shape[0], ngram_delivery.py:120-121, so the lookahead window is capped at the PLE table's captured token capacity). But _copy_requests (ngram_delivery.py:18-25) is called with limit = live_rows, N = ids.numel(), and _publish (:29-33) writes count = tl.load(live_rows) unclamped by N. So if a caller asks for a lookahead window with live_rows > ids.shape[0] (the natural intent of "look ahead past the current chunk"), the published row count exceeds the number of rows actually hashed and written; AdvisoryMailbox::snapshot (helios/src/engram.rs:253-266) then copies up to min(count, max_rows) i64s, i.e. stale mailbox words from the previous publication, and CachedReader::warm warms those stale ids. Not memory-unsafe (helios/src/engram/reader.rs:1103-1107 clamps ids against plane bounds and drops negatives), but the interface silently does something other than what it says; nothing documents or checks the live_rows <= ids.shape[0] precondition, and the docstring ("Hash an upcoming prompt window") says nothing about it. Fix: either assert/validate live_rows <= ids.shape[0] (and size ids to the requested window) or publish min(count, N) from the kernel, plus an in-repo test of the custom op; if the consumer really must live in hyperflare-recipes, land this with that PR rather than ahead of it.

#8 [high] Should fix (revised): WaitBackoff is gone, so the scope finding shrinks to four fixes plus one unreachable feature

Head 6fe7bed2, 5 files, +464/-103 (per orientation packet; earlier head 4ea9ba0 was +588/-112 with the disputed WaitBackoff).

Update to my earlier finding #1/#2: the author dropped WaitBackoff in 7035ea8c (PR comment 2026-11-29 00:04; commit message says paired A/B on DeepSeek-V4.1-Flash TP4 showed +30% to +201% regression in flare_replay_readiness_wait_nanoseconds_total). A whole-repo search for WaitBackoff|NAP_GROWTH|SPIN_ROUNDS|NAP_MAX at head returns no matches, and ReaderAction::WaitReady is still std::hint::spin_loop() (helios/src/engram.rs:625-627). So my two previous should-fix findings are resolved and must not be repeated.

What remains in scope: four independent defect fixes plus one new capability, across Rust and Python and two layers (Helios runtime + Ignition component):

  1. lane fan-out (reader.rs:37-51, 807-840; windows.rs:89-118)
  2. CachedReader::warm chunking (reader.rs:1097-1156)
  3. pre-6.7 EPERM read-only /proc/self/fd remap (reader.rs:121-199)
  4. checked mailbox arithmetic + allocation bounds + scored_prefill filter (runtime_core/engram.rs:221-347; engram.rs:552-554, 611-618, 782-819)
  5. new capability: PLE advisory lookahead publish (ngram_delivery.py:78-95, 157-164)

AGENTS.md:198-199: "Keep each PR focused on one coherent outcome and describe its problem, resulting behavior, validation, and material limitations." docs/design-review.md:135-146 principle 15. Severity: should fix, not blocking - each item is individually justified (issue #481 is named for #3; #1/#2/#4 are demonstrated defects; #5 is the one non-defect addition) and the description does separate each change's evidence. Recommend splitting #5 out (it has no in-repo consumer, see note #7) and ideally the memfd fix, so #481 can be closed by reviewable diff.

#11 [high] Report of 2026-11-29, run 2064 (head 6fe7bed2)

Head reviewed: 6fe7bed2 (5 files, +464/-103). Lens: architecture and scope, judged against the charter (read_charter), AGENTS.md, docs/design-review.md, docs/cli-design.md.

Verdict: should-fix issues only. No blocking finding.

Blocking: none.

Should fix (3):

  1. PR-wide scope: one PR carries four unrelated defect fixes plus a new capability, across Rust (Helios) and Python (Ignition) - AGENTS.md:198-199 "Keep each PR focused on one coherent outcome", docs/design-review.md:135-146. Individually each item is justified (#481 for the memfd remap; demonstrated defects for fan-out, warm truncation, mailbox overflow, scored_prefill divergence), and the description does separate evidence per change, so this is a split request, not a rejection. Recommend at minimum landing the PLE lookahead publish with its consumer (finding 2) and splitting it from the #481 fix. See note #8.
  2. helios/src/engram/reader.rs:37-51 + reader.rs:807-840 + reader/windows.rs:89-118: lane_fanout lowers the scoped-helper-thread threshold from ">128 reads" to ">DEPTH/workers reads" (64/32/16 for 2/4/8 workers; Windows defaults to 4), so 17-128 read gathers now spawn helper threads and pay spawn + per-lane staging cost. Only lane-count unit tests exist; no served or gather-latency measurement, though the claimed benefit is a performance one - charter "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)"; design-review.md:106-115. Also leaves docs/cli-design.md:777-778 ("Small gathers stay on the delivery thread") describing behavior the code no longer has. Fix: A/B the same served workload at --embedding-table-workers 4 (gather time / TTFT), state the outcome as expectation if unmeasured, and update cli-design.md:774-780 to the per-lane depth rule. See notes #6 and #10.
  3. ignition/components/ngram_delivery.py:78-95, 157-164: PreparedPLELookup.publish_lookahead has no caller or test anywhere in this repository (only the definitions, plus #566's Engram twin at engram.py:280); its justification is an external recipe PR, so per AGENTS.md:194-199 it is "scaffolding or partially wired features presented as supported". Additionally the op hashes ids.shape[0] rows but publishes count = live_rows unclamped (ngram_delivery.py:84-89 vs :18-33), so live_rows > ids.shape[0] publishes more rows than were written and AdvisoryMailbox::snapshot (engram.rs:253-266) warms stale mailbox words; clamp to min(count, N) or reject the precondition, and land with an in-repo test/consumer. See note #7.

Nits (1): docs/cli-design.md:774-780 stale (folded into should-fix 2).

Resolved from my earlier review: WaitBackoff was removed in 7035ea8c; whole-repo search for WaitBackoff|SPIN_ROUNDS|NAP_GROWTH|NAP_MAX returns nothing at head and ReaderAction::WaitReady is a plain spin_loop (engram.rs:625-627). My prior two should-fix findings on it no longer apply.

Verified sound (no finding): pre-6.7 /proc/self/fd read-only remap keeps the seals and fixes #481's root cause; scored_prefill now goes through the existing GraphKind/engram::consumes predicate instead of a hardcoded list, matching design-review.md:27-35; checked mailbox arithmetic and allocation-bound checks restore validation without weakening any; CachedReader::warm chunking stays in bounds and moves prefetch_rows_loaded into the loop without double counting; ReaderAction::Warm clamping keeps slices inside prefetch_cap; layer roles hold (Ignition prepares, Helios serves), and no env var, per-model flag or hardcoded capacity list is introduced. See note #9.

Open question needing a test: the live_rows vs ids.shape[0] mismatch in should-fix 3 is settled only by exercising the op with a lookahead window wider than the PLE table's captured token capacity.

#12 [high] Research summary

Reviewed PR #590 at head 6fe7bed2 (5 files, +464/−103) through the architecture-and-scope lens, against the charter, AGENTS.md, docs/design-review.md and docs/cli-design.md. I read every changed function in its surroundings and followed the callers (Shared::with_readers, Transfers::new/enqueue, runtime_core::engram::decode, runtime_core/model.rs staging sizing, the reader/windows lane construction, and the surrounding docs).

Verdict: should-fix issues only, no blocking finding. My two earlier should-fix findings on WaitBackoff are resolved — it was dropped in 7035ea8c and a whole-repo search finds no WaitBackoff/SPIN_ROUNDS/NAP_GROWTH/NAP_MAX at head, with ReaderAction::WaitReady back to a plain spin loop.

Three should-fix items: (1) scope — four unrelated fixes plus a new capability across Rust and Python, against AGENTS.md:198-199 "one coherent outcome", with a split (not rejection) recommended; (2) lane_fanout lowers the scoped-helper-thread threshold from >128 reads to >DEPTH/workers (64/32/16), so 17–128 read gathers now spawn helper threads with only lane-count unit tests and no served or latency measurement, while docs/cli-design.md:777-778 still says small gathers stay on the delivery thread — a performance claim against the charter's #210 evidence bar plus stale docs; (3) PreparedPLELookup.publish_lookahead has no caller or test in-repo (justified only by an external recipe PR, AGENTS.md:194-199) and publishes count = live_rows while hashing only ids.shape[0] rows, so a wider lookahead window silently warms stale mailbox words.

The four defect fixes themselves are correctly placed and reuse existing mechanisms rather than adding special cases: the /proc/self/fd read-only remap targets #481's root cause and keeps the seals, scored_prefill now converges on the shared GraphKind/engram::consumes predicate instead of a hardcoded list, the checked mailbox arithmetic restores validation without weakening it, and warm chunking stays in bounds without double-counting. No layer-role violation and no new env var, per-model flag or hardcoded capacity list. Full findings with file:line citations are in scratchpad notes #6–#11.

#4 [medium] Verified-correct parts of #590 (no finding): memfd read-only remap and scored_prefill filter converge on existing mechanisms

Pre-6.7 EPERM fix (helios/src/engram/reader.rs:107-176): ResidentMapping::new now reopens /proc/self/fd/<fd> read-only (File::open, O_RDONLY|O_CLOEXEC) when !writable and maps through that descriptor, keeping MAP_SHARED|PROT_READ. This is exactly the root cause and remedy in issue #481 (fd is O_RDWR so the VMA keeps VM_MAYWRITE; pre-6.7 kernels refuse; a read-only file description has no VM_MAYWRITE). Seals are untouched (RESIDENT_SEALS at reader.rs:186-188, from_shared checks F_GET_SEALS at reader.rs:351-355), so immutability is still enforced — this is not an error-swallowing fallback (AGENTS.md "don't just swallow, skip, or retry an unexplained error"): the procfs reopen is preferred, and if it is unavailable the code maps the original fd and fails with an EPERM message naming the kernel requirement (reader.rs:151-159). Only nit-level risk: the write path (initialize, reader.rs:326) still maps the original fd, which is correct since it needs PROT_WRITE. Test sealed_resident_readonly_mapping_drops_write_capability_via_proc_reopen (reader.rs:2290-2320 region) checks F_GETFL==O_RDONLY and mprotect EACCES; the PR honestly discloses it ran on 6.18, not on a <6.7 kernel.

scored_prefill convergence (helios/src/runtime_core/engram.rs:224, 333): both filters now use GraphKind::try_from(g.kind.as_str()).is_ok_and(crate::engram::consumes), the same predicate already used at runtime (execution/transport.rs:971, 1047, 1095, 1141, 1198, 1266; engram/prepared.rs:216, 266) and at runtime_core/model.rs:480. So this removes a divergence rather than adding a special case — good under design-review principle 1 ("Let the scheduler operate over whatever valid graphs the core provides").

io_uring fan-out (reader.rs:787-800): lane_depth = DEPTH / self.lanes.len() mirrors the depth actually constructed in from_files (reader.rs:690-698, let depth = DEPTH / workers), and active_lanes = reads.len().div_ceil(lane_depth).min(lanes.len()) guarantees each active lane gets at most lane_depth reads, matching its slot count (free_slots = depth, reader.rs:456). split_first_mut on [..active_lanes] with active_lanes>=2 in that branch is safe. Correct fix for the described QD collapse; the real dependency is that lanes beyond active_lanes stay idle, which is intended.

CachedReader::warm chunking (reader.rs:1081-1140): ids.chunks(self.max_rows) keeps every chunk within the allocated miss_ids/miss_output workspace, and prefetch_rows_loaded moved from Reader::warm (now reader.rs:1297-1303) into the chunk loop, so the counter no longer double counts. miss_output[..count*(weights+scales)] with count<=max_rows remains in bounds.

Transfers::new lower-bound checks (helios/src/engram.rs:848-882) and runtime_core/engram.rs checked_mul/checked_add + offset+nbytes <= allocation.nbytes close real wrap and OOB paths; they are removed-validation-free hardening, not new mechanism.

#9 [medium] Verified-sound parts of #590 at head (no finding)

Verified at head 6fe7bed2, so the report need not re-derive them (unchanged from note #4, extended):

  1. pre-6.7 EPERM (reader.rs:121-199): ResidentMapping::new reopens /proc/self/fd/<fd> (O_RDONLY via File::open) for the !writable mapping, falls back to the original fd if procfs is missing, and keeps the EPERM text naming the <6.7 kernel requirement plus the preserved reopen error. Seals untouched (RESIDENT_SEALS, from_shared F_GET_SEALS check), so immutability is still enforced. This is the root-cause fix issue #481 asks for, not an error-swallow (charter "Bug fixes need to address the root cause; don't just swallow, skip, or retry").
  2. scored_prefill (runtime_core/engram.rs:221-227, 330-347): both filters now use GraphKind::try_from(kind).is_ok_and(crate::engram::consumes), which is engram::consumes (engram.rs:948-958) including GraphKind::ScoredPrefill; the hardcoded five-kind list is gone. Same predicate already used by runtime_core/model.rs:480-481 and engram/prepared.rs, so this converges rather than special-cases - consistent with docs/design-review.md:27-35 ("must enumerate available graphs... from prepared model core metadata", "Validate only structural bounds").
  3. Checked arithmetic (runtime_core/engram.rs:242-256, 272-301; engram.rs:782-819): checked_mul(8), checked_add, offset + nbytes <= allocation.nbytes, and the new lower bounds max_staged_rows+1 / max_rows+2 at Transfers::new close the release-build wrap and OOB paths. No validation removed; Transfers requires >= what decode already enforces.
  4. CachedReader::warm chunking (reader.rs:1097-1156): ids.chunks(self.max_rows) keeps miss_ids/miss_output within the allocated workspace, prefetch_rows_loaded now increments per chunk inside the reader (the Reader::warm increment at reader.rs:1313-1319 is removed, so no double count), and total_loaded is returned.
  5. lane_fanout arithmetic (reader.rs:37-51): lane_depth = DEPTH/lanes mirrors DiskReader::from_files (depth = DEPTH/workers, reader.rs:709-722) and Readers::new (windows.rs:52-74); active_lanes = reads.div_ceil(lane_depth).min(lanes) guarantees <= lane_depth reads per active lane, and self.lanes[..active_lanes].split_first_mut() is only reached with active_lanes >= 2. Correctness sound; the problem is the unmeasured latency and stale doc, see note #6.
  6. ReaderAction::Warm clamping (engram.rs:552-554, 611-618): WARM_BATCH_ROWS.min(max_tokens*table.heads).max(1) keeps each warm slice inside prefetch_cap, which runtime_core validates as <= max_staged_rows = max_tokens*heads (runtime_core/engram.rs:313-328).

Layer roles hold: Ignition prepares (ngram_delivery.py hashes and publishes into a prepared mailbox), Helios serves (engram.rs reader thread snapshots and warms). No Python callback or eager fallback added; no new env var or per-model flag; no hardcoded batch-capacity list introduced.

#10 [medium] Nit: stale delivery-thread threshold in docs/cli-design.md, plus description/manifest consistency checks

Head 6fe7bed2, verified in code:

  1. docs/cli-design.md:777-778 says "Large gathers use scoped helper threads, whose startup cost is included in gather latency. Small gathers stay on the delivery thread." After lane_fanout (reader.rs:37-51) the helper path starts above DEPTH/workers reads (64/32/16 for 2/4/8 workers), so 17-128 reads are no longer "small" and are no longer "large" under the old <= DEPTH reading. pr_files confirms docs/cli-design.md is not in this PR, and it is the only place that documents the delivery-thread/helper rule (helios/manifest.md:455-477 does not cover it). AGENTS.md:55-60 forbids stating designed behavior the code does not implement, and charter gives "inaccurate documentation" as a mergeable reason; here the change makes the doc inaccurate. Severity: nit-to-should-fix; grouped with note #6 as the same fix.

  2. noseek: helios/src/engram.rs:320-322 comment on WARM_BATCH_ROWS ("Rows warmed per advisory disk micro-batch before re-checking for a ready real gather") is still accurate after the warm_batch clamp because the clamp only shrinks the batch - not a finding. (My earlier stale-SPIN_ROUNDS nit is gone with the WaitBackoff removal.)

  3. PR description accuracy check: "Both call a shared lane_fanout(reads, lanes) helper ..." matches code; "CachedReader::warm iterates ids.chunks(self.max_rows) and increments prefetch_rows_loaded per completed chunk" matches reader.rs:1101-1152; "On Linux when !writable, ResidentMapping::new reopens /proc/self/fd/ read-only (O_RDONLY | O_CLOEXEC)" - File::open sets O_CLOEXEC on Linux via std, so accurate. The attribution paragraph correctly restricts the 76.5%/4.6% numbers to the PLE lookahead change with the companion recipe PR, matching AGENTS.md:95-101 ("Never attribute a combined result to one PR"). Limitations disclose the workers=1 bypass, the 6.18-not-<6.7 verification, and unrun Windows I/O ring.

#13 [medium] Context for the report: PLE lookahead reuses the existing prefetch_buffer contract, but adds a new captured op without stating owner approval

Two architecture points about the PLE addition (ignition/components/ngram_delivery.py:78-95, 157-164) that the report should state precisely, distinct from the reachability/truncation finding in note #7.

Right home, right contract. The change does not invent a new runtime contract. It reuses the mailbox layout #566 already defined and Helios already validates: prefetch_buffer per table (helios/proto/*.proto field 16), layout [cap] row IDs then count at nbytes-16 then sequence at nbytes-8, documented in helios/manifest.md:465-477, validated in helios/src/runtime_core/engram.rs:313-328 and helios/src/engram.rs:798-819, consumed by AdvisoryMailbox::snapshot (engram.rs:244-266) and enabled/disabled only through --no-embedding-table-prefetch (docs/cli-design.md:753, 808-816). The Engram twin PreparedEngramRequests.publish_lookahead (ignition/components/engram.py:280-283) already exists and calls the shared publish_advisory_requests (ngram_delivery.py:47-56). So this is shape-reuse, not a new mechanism: consistent with design-review.md:16-21 (limit native specialization to concrete cache storage requirements) and :36-46 (ignition/components/ is where Helios-ABI runtime interface components belong). Nothing in Helios branches on model identity or PLE-vs-Engram: the same reader thread drives both.

New captured op. It does add an operation contract, flare::ple_advisory_requests, distinct from flare::ple_requests (ngram_delivery.py:59-75) because it hashes into a caller-supplied window and publishes an advisory mailbox. Charter, Standards & Contributions: "Captured-graph op contracts: Adding a new one—even if it reuses an existing graph kind—requires owner approval before you write it." design-review.md:22-26 repeats it ("A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."). The PR states no such approval. Mitigating fact to state honestly rather than as a pass: the author, lukealonso, is the project owner named in design-review.md:23 ("Luke Alonso lalonso@gmail.com"), so the approval requirement is plausibly self-satisfied; a reviewer should still ask for one line saying so, because the rule asks for an explicit decision rather than an implication.

Neither point is blocking; both belong in the report as the "is the approach right" answer alongside note #8 (scope) and note #7 (reachability/truncation).