#1 [high] Change: PR 590 scope, size and what it touches
PR #590 "helios,ignition: fix Engram reader bugs and add PLE lookahead publish" by lukealonso (COLLABORATOR), open, ready for review, opened+updated 2026-11-28, base main, head 4ea9ba0. 4 files, +588/-112, labels none, reviews none, CI pending at head. Files: helios/src/engram.rs (+187/-19), helios/src/engram/reader.rs (+265/-67), helios/src/runtime_core/engram.rs (+107/-26), ignition/components/ngram_delivery.py (+29/-0). Five distinct fixes bundled: (1) DiskReader::gather lane fan-out vs per-lane depth, (2) CachedReader::warm chunking beyond max_rows, (3) pre-6.7 EPERM read-only memfd remap via /proc/self/fd, (4) WaitBackoff replacing spin in ReaderAction::WaitReady + Requests::read, (5) checked u64 mailbox arithmetic + allocation-bounds check + GraphKind::try_from/crate::engram::consumes filter incl "scored_prefill", (6) new flare::ple_advisory_requests op + PreparedPLELookup.publish_lookahead. Fixes #481 (pre-6.7 EPERM). Cites #519 vs #566 for the busy-spin defect.
#2 [high] Why: issue #481 pre-6.7 kernel EPERM report
#481 "RAM embedding tables fail on kernels < 6.7: map resident embedding table: Operation not permitted" — by chanba, opened 2026-11-23 07:01, open, no comments, updated 2026-11-28 by PR #590 referring to it.
Environment: ghcr.io/local-inference-lab/flare:release-6f2bd11-main-20261119 and ghcr.io/raydius/hyperflare-inference:0.2.5; model Qwen3.8-Flash-Next-FLARE tp1-c16-mtp5 safetensors with --embedding-table-storage ram; Rocky Linux 9.9 kernel 5.14.0-741.24.1.el9_9 (also 9.6 5.14.0-570.39.1); RTX PRO 6000 Blackwell SM120, driver 620.70.06. Affected kernels named: RHEL/Rocky/Alma 9 (5.14), Ubuntu 22.04 GA (5.15), Debian 12 (6.1). 25.6 GB table (ftruncate 25600122880).
Root cause per issue: Flare seals memfd F_SEAL_WRITE then mmap(PROT_READ, MAP_SHARED) on O_RDWR fd -> VMA retains VM_MAYWRITE -> EPERM pre-6.7 ("mm: permit write-sealed memfd read-only shared mappings" landed 6.7). Misleading error sends people to SELinux/capabilities/seccomp/memlock; reproduces with --privileged and selinux=0.
Suggested fix in issue == what PR #590 implements: reopen /proc/self/fd/ O_RDONLY and mmap through it, always or as EPERM fallback; plus improve the EPERM message to mention kernel version. Also notes F_SEAL_FUTURE_WRITE makes mmap succeed but Flare then rejects table ("resident embedding table must have immutable size and contents"), so not a viable workaround.
Issue ships an LD_PRELOAD shim workaround (memfd_seal_shim.c) so affected users are unblocked today. Issue still open with zero comments — no maintainer confirmation yet.
#3 [high] Related work: #519 open PR does the same spin-then-nap in Requests::read
#519 (open, PR) "fix(helios): park an Engram gather while it waits for device-published ids" by peperunas, opened 2026-11-25, updated 2026-11-28 18:40, 1 file helios/src/engram.rs +86/-13, head 9fc10f5. Adds spin 4096 rounds then 25us->250us nap ramp (SPIN_ROUNDS/NAP_GROWTH/NAP_MAX/yield_core) in Requests::read device arm.
KEY OVERLAP: PR #590 introduces almost exactly the same constants (SPIN_ROUNDS = 1<<12, NAP_GROWTH 25us, NAP_MAX 250us, yield_core, cfg(windows) spin-only) but moves/applies them to ReaderAction::WaitReady in the reader loop and adds a WaitBackoff struct with reset on Gather/Warm/BlockRecv; plus its own tests. Neither PR description points the other out except #590's "Busy-spinning reader wait (#519 vs #566)" bullet; #519's description does not mention #590.
On 2026-11-28 18:40 lukealonso commented on #519 (blocking): (a) conflicts with main/targets a wait loop that no longer runs in production after #566 (7745deea) — on main ReaderAction::Gather is only dispatched after job.requests.is_ready() returned true, so the real wait site is ReaderAction::WaitReady, which #566 already uses for advisory warming; (b) no served-workload benefit, readiness-latency impact unmeasured (cites AGENTS.md and closed #353). Asked to rebase onto main retargeting ReaderAction::WaitReady with the spin counter reset on leaving WaitReady, evaluated with #566 advisory warming active. PR #590 appears to be exactly that rebase, done as a new PR by the reviewer rather than the author of #519 — competitive/duplicative relationship not stated in #590's description.
#519 autobot reviews (multiple, Changes Requested) also argued: Windows nap unbounded (timer tick ~15.6ms vs 9-10ms step; docs/windows.md:182-186 documents Windows mapped-mailbox Engram coverage), new branch untested, no served benefit (#353 closed on the same wait).
#4 [high] Related work: #566 merged prefetch PR whose contract PR 590 extends
#566 (merged 2026-11-28 13:07) "perf(engram): add graph-driven advisory lookahead prefetch for disk-backed tables" by voipmonitor (Martin Vit), +1501/-199, merged into main same day; commit 7745deea is the main-branch commit touching ignition/components. Adds ValueSource::PROMPT_LOOKAHEAD_TOKEN=41 / PROMPT_LOOKAHEAD_LENGTH=42, EngramTable.prefetch_buffer=16 (mailbox int64 [cap] + active count at nbytes-16 + sequence at nbytes-8), --no-embedding-table-prefetch, Prometheus flare_engram_prefetch_rows_loaded_total / flare_engram_prefetch_errors_total, RowCache PINNED bit + insert_advisory, WARM_BATCH_ROWS=1024 warming, next_reader_action prioritising Gather over Warm. #566 claims on 4x RTX PRO 6000 Blackwell + PCIe5 x4 NVMe DeepSeek-V4.1-Flash TP4: cold 250k 22,906 -> 39,730 tok/s (+73%), warm repeat 31,586 -> 53,288 tok/s. Its autobot review was "Changes Requested" with 1 blocker + 6 should-fix; it was merged anyway with the contract sign-off (B1) still open: "Adding ValueSource::PROMPT_LOOKAHEAD_TOKEN ... extends the captured-graph/core contract (related open request: #535) ... remains open for maintainer approval". #535 (open issue, tastyrice90, 2026-11-26, no comments) asks for maintainer approval of an advisory mailbox producer contract on the prefill graph; names #334 as the consumer side and #267 as where yatesdr described the mailbox. Still unanswered — so PR #590's PLE extension builds on a contract whose owner approval is unrecorded. PR #590's PLE change reuses that same mailbox layout (count at mailbox.numel()-1 implicit in the Triton kernel; publishes via _publish with mailbox.numel()-1 as the location of the sequence).
#5 [high] Related work: #470 merged with the lane-depth defect PR 590 now fixes
PR #470 (merged 2026-11-25, original-el8, +540/-97) introduced the Unix io_uring multi-lane split: depth = DEPTH / workers per lane and the scoped read split. Its Autobot review (2026-11-24 20:12, "If the lanes stay, two real defects ride along") called out exactly the bug PR #590 fixes: "The cutoff compares to DEPTH (reader.rs:634) while a lane is DEPTH / workers deep (:539), so a 17–128-read gather becomes 2–8 serial submit rounds at 8 workers where main did one 128-deep batch" — and also an undrained-error misattribution via entry.user_data(). Both were merged anyway. So PR #590's first fix repairs a defect that review had already flagged in #470's diff, 3 days later. It does not mention #470.
#470 review blocker also said the lane design was "the design this project already closed on measurement (#216, rebase of #184)": #216 recorded 6,915 tok/s at one worker vs 6,525 / 6,328 / 6,143 at 2 / 4 / 8 lanes (−17% at 8 lanes with full per-lane depth) on the drive class it targeted. #216 and #184 are closed. Relevant tension: PR #590 makes multi-worker lane fan-out wider and presumably more effective; the earlier lane design was rejected on measurement, and #470 was merged on a reviewer-testimony benchmark from nero- (2026-11-25 14:25: GB10, workers=4 cuts Engram gather 22.4%). No served A/B accompanies PR #590's lane fan-out fix.
#8 [high] Change: undeclared details (counter move, WaitBackoff reset on Warm, #511 comment)
Verified in tree, NOT stated in the description:
prefetch_rows_loadedcounter moved. Before:Reader::warmadded the returned count (reader.rs:1294-1302 pre-change). After:CachedReader::warmincrements per completed chunk (reader.rs:1133-1136) andReader::warmonly incrementsprefetch_errors(reader.rs:1297-1303). Soflare_engram_prefetch_rows_loaded_totalnow counts rows fromCachedReader::warmdirectly, not whatReader::warmreturns. Same resulting value in the serving path, but any other caller ofCachedReader::warmwould now also be counted andReader::warm's return value is no longer the counted quantity.- New code comment at helios/src/engram.rs:610-611 ("One worker serves every rank whose rows this table holds; a rank-partitioned table becomes a separate
Sharedwith its own workers") documents exactly the mechanism #511 reports as the cause of three-of-four-ranks-idle on rank-partitioned tables. It is a comment, not a fix; PR #590 does not address #511. WaitBackoffis reset onReaderAction::Warm(engram.rs:673) as well as Gather and BlockRecv. With--embedding-table-prefetchactive,next_reader_action(engram.rs:388-415) prefersWarmoverWaitReadywhenever warm work is pending, so the reader may never accumulate spin rounds while warming: the wait path the PR repairs is exercised mainly when no prefetch work is queued or after the advisory tail is consumed. The description presentsWaitReadyas the normal serving wait; #519's reviewers said prefetch already occupies that window.GraphKind::try_from(...).is_ok_and(crate::engram::consumes)replaces the hardcoded 5-kind list in both places (runtime_core/engram.rs:224, :333). Net behavioural change is only thatscored_prefillis now included; unknown kind strings are still silently skipped (not rejected) exactly as before, so a typo'd kind in a core still yields "Engram catalog lacks consumers" rather than a naming error.Transfers::newlower-bound checks (engram.rs:848-879) require the request mailbox to holdmax_tokens*heads + 1int64 slots and the prefetch mailboxmax_rows + 2slots; this duplicates the load-timevalidate_mailboxbounds (runtime_core/engram.rs:302-329) as defence in depth. The description calls them "defensive".
#9 [high] Change: PLE advisory publish is untested and has no in-tree producer
Verified:
- New op
flare::ple_advisory_requests(_advisory_requests, ngram_delivery.py:78-95) reusesPreparedPLELookup's preparedple_embeddinghash plan (require_prepared(..., "sequence.ple_embedding")), then_copy_requests(HAS_LIMIT=True)+_publish(HAS_COUNT=True)— i.e. the same Triton kernels #566 added (ngram_delivery.py:17-56), so no new kernel. PreparedPLELookup.publish_lookahead(ngram_delivery.py:157-164) allocatesids = torch.empty_like(self.ids)andrequests = torch.empty(...)on every call and takes an arbitrary(live_rows, mailbox)pair from the caller; nothing checks thatmailboxis the buffer the core declared asEngramTable.prefetch_buffer, and nothing asserts the mailbox is a host-mapped advisory buffer rather than the synchronous PLE mailbox. Misuse would only be caught at load time by helios's prefetch-buffer shape validation (runtime_core/engram.rs:157-165, 313-329), and only for the declared prefetch buffer.- The synchronous path keeps writing
self.mailbox/self.sequence(table.mailbox.device_view / table.sequence), so the PLE recipe must thread a second mailbox + a live_rows tensor through graph capture itself. - No in-tree consumer:
search_code publish_lookaheadfinds only ignition/components/engram.py:280 (Engram, from #566) and the new PLE one.grepover tests/ finds no reference topublish_lookahead,ple_advisory_requests, orPreparedPLELookup; tests/preparation/test_core_boundary.py:18 only requires thengram_deliverymodule name to exist. So the PLE path is completely unexercised by this repository's tests, and the description'spytest tests/preparation/test_core_boundary.py tests/clievidence does not touch it. - The description itself says the consumer is the companion recipe PR in local-inference-lab/hyperflare-recipes and gives a merge-order note (merge #590 before bumping uv.lock there).
- docs/performance-work.md:106-109 points at tests/components/test_ple_delivery_cuda.py and tests/recipes/test_qwen38_ple.py, neither of which exists in this repo (recipes were moved out; see commit 4d957175 "Move recipe collective wrappers and PCIe factories out of core Ignition"). So there is no in-repo harness for PLE delivery at all.
#10 [high] Project fit/process: captured-graph op approval rule and unrun formal checks
docs/design-review.md principle 1 (lines 22-26): "Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."
Reading: flare::ple_advisory_requests is a new torch custom op that reuses the existing advisory-mailbox contract #566 introduced (no new ValueSource, no new EngramTable field, no new graph kind). If a maintainer treats a new custom op in a captured graph as a new operation family, owner approval is required; the PR description does not record any approval. Mitigating fact: the PR author IS the named project owner, so a self-approval reading is defensible — but there is no explicit statement in the description that the contract is approved, and #566's own B1 sign-off for the underlying prefetch_buffer/ValueSource 41-42 contract is still open (#535 unanswered, #566 merged with "B1 (owner contract sign-off) ... remains open for maintainer approval").
Other process requirements this PR's evidence does not mention:
- docs/design-review.md:209-251 requires
python3 verification/helios-lifecycle/check.py(and Kani) "whenever changing admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering or ownership, offload aggregation, readiness, or rank coordination". PR #590 changes the Engram reader readiness wait and cancellation check loop (helios/src/engram.rs ReaderAction::WaitReady / Requests::read). Neithercheck.pynor Kani is listed in the evidence, unlike sibling PRs #566, #580 and #583 which all report running check.py (and #580 with --mutations). - Mutation testing ("Run mutation testing ... when adding or changing safety guards", lines 226-228) is not reported for the new checked arithmetic guards.
- Principle 17 (:163-169) Discord line: PR provides "Discord: no username provided" as required.
docs/design-review.mdreview-and-acknowledgment (:263-311) expects aDesign-Signed-Off-Bytrailer; #519's reviewer also flagged missing Signed-off-by trailers in that series. Commit 4ea9ba04 not verifiable from here.- #519's review asked for
ulimit -l 65536soengram::readertests pass; PR #590 reports "cargo test ... -- engram: 48 passed, 0 failed" without saying whether memlock was raised.
#11 [high] Claims and evidence: bundle mixes a measured prefetch win with unmeasured defect fixes
Verified vs claimed (PR #590):
- Claimed: "reduced synchronous PLE gather time by 76.5% (0.881 s -> 0.207 s, row-cache hit 43.1% -> 94.7%) and cold 111,915-token TTFT by 4.6% (7.778 s -> 7.418 s)". Environment named: 1× RTX PRO 6000 Blackwell SM120, /dev/md0 NVMe RAID, exported TP1 core gb202-tp1-202611282155,
--embedding-table-storage disk --embedding-table-cache-size 4GiB --embedding-table-resident-scales --embedding-table-workers 1. That core id is not in this repo's shipped-core list and is not fetchable from here; the paired run depends on the unmerged companion recipe PR in local-inference-lab/hyperflare-recipes, which is not linked by number in this description (contrast #566, which nameslocal-inference-lab/hyperflare-recipes#70). No repeat count, no interleaved A/B statement, noflare_replay_readiness_wait_nanoseconds_totalfigure, and no decode/ITL numbers. The 76.5% number is PLE gather time, i.e. the sum offlare_engram_gather_nanoseconds_total-style counter in the PLE table, and much of it is explained mechanically by the row-cache hit rate rising 43.1% → 94.7% — that is the prefetch effect #566 measured, not an independent gain from the three reader fixes, which are bundled with it. - The three defect fixes (lane fan-out, warm chunking, EPERM) have NO measurement at all. Claimed "2x–8x multi-worker io_uring QD collapse on 17–128 reads" is stated as a mechanism, and no served A/B for
--embedding-table-workers 4|8is given, even though that is precisely the configuration the lane fix changes. #561 (merged the same day) did measure workers=4 (its table C, +3.2–3.8%), so the benchmark exists. - The
EPERMfix is verified only indirectly: the new testsealed_resident_readonly_mapping_drops_write_capability_via_proc_reopen(reader.rs:2290+) assertsF_GETFL == O_RDONLYandmprotect(PROT_WRITE)→ EACCES on the current kernel (Linux 6.18 per the description), never on a <6.7 kernel. Issue #481's reporter (chanba) is not asked to re-test, and #481 remains open with no comment from this PR. - Reported test results are plausible for the files touched:
helios ... --lib -- engram48 passed;flare228+7+1 passed/4 ignored;heliopausecargo check clean; clippy 0 warnings in modified lines;pytest tests/preparation/test_core_boundary.py tests/cliclaimed as part of "247 passed, 7 CUDA-skipped combined run" but the per-suite pass/fail counts are not broken out and the CUDA-skipped 7 mean GPU coverage did not run.flare-clihas one accepted unrelated failure (distribution::tests::source_waits_for_receiver_file_verification, BrokenPipe timeout). - Limitations disclosed: pre-6.7 EPERM verified on 6.18 via F_GETFL/mprotect rather than on an old kernel; Windows builds and host CPU-time profiling of WaitReady not re-run. Notably #519's whole evidence case was
/procthread-CPU profiling — PR #590 adopts #519's mechanism but drops its evidence method and provides no replacement, so the CPU-occupancy benefit claimed by #519 is neither re-measured nor withdrawn.
#12 [high] People: author is the project owner and the reviewer who demanded #519's rebase
Author: lukealonso (Luke Alonso), GitHub association COLLABORATOR, and per docs/design-review.md:23 he is the project owner lalonso@gmail.com who must approve captured-graph op families. Charter lists him as a priority contributor (@voipmonitor, @original-el8, @lukealonso).
Recent merged PRs (last 180 days, 11 merged, 1 open): #589 (open, CUDA 12 batched copies/ARM64/Selene budgeting), #579 (InitialState hash bypass, TP startup drain hang, VLM teardown deadlock, PatchMerge validation), #573, #570 (CI setup-java), #569, #568, #546, #545 (RecipeParameters), #543, #510. Areas: docs (7), helios/src (6), ignition/preparation (5), tests/preparation (3), verification/helios-lifecycle (3). He is the dominant committer in helios/src (215 of last 180 days) and second in ignition/components (106).
Relevant to this PR's style: #579 is the same shape — a multi-defect repair bundle in helios landed same-day; #589 is another open multi-fix bundle. So the bundling pattern is his established practice, and his PRs generally land quickly (several same-day).
He is also the person who CLOSED #528 with the architectural ruling (keep row-ID computation in Ignition, isolate storage-reader changes), and the reviewer on #519 who demanded the rebase onto ReaderAction::WaitReady. So PR #590 is the same person acting as the reviewer's own requested fix: he told #519's author to rebase and re-target WaitReady, and then shipped that retarget himself — without linking #519's authorship or credit. #519 by peperunas remains open and is now functionally superseded.
Other people in these areas: Martin Vit (voipmonitor, 51 helios/src commits) authored #566, #561, #555, #557, #558, #559; Jason Cook (47) authored #470 (the io_uring lanes), #532, #425; FujitsuPolycom authored the two competing reader PRs #580/#583; tastyrice90 authored #511/#535/#528; chanba filed #481; peperunas authored #519.
#15 [high] Reach: old-kernel RAM users unblocked; scored_prefill sizing may newly reject some cores
Who/what is affected:
- Users/operators with kernels < 6.7 (RHEL/Rocky/Alma 9 = 5.14, Ubuntu 22.04 GA = 5.15, Debian 12 = 6.1) running
--embedding-table-storage ram: they go from total startup failure to working, with no re-export. This is the broadest-impact fix in the PR and affects anyone on an LTS enterprise distro. Issue #481 shows they currently need an LD_PRELOAD shim. - Operators using
--embedding-table-workers 2|4|8on NVMe: behaviour changes for gathers of 17–128 planned reads (more lanes active). No config or default change;WORKERSdefaults unchanged (4 on Windows, 1 elsewhere). - Operators using disk tables with a row cache: the advisory warming path (from #566) is unaffected functionally, but the counter
flare_engram_prefetch_rows_loaded_totaltiming/placement changed slightly. - Cores with
scored_prefillgraphs and Engram: previously the scored-prefill graph was silently excluded from staging capacity computation, so a core whose widest Engram consumer isscored_prefillwould have sized staging for a smaller graph and failed (or worse, under-sizedmax_staged_rows). After the fix such cores are validated and sized against the widest consumer including scored_prefill. Effect: some previously-rejected/mis-sized cores now load; a core that was silently under-sized may now be REJECTED at load (Engram staging capacityerrors). That is a compatibility-relevant behaviour change for existing exported cores — the description only says "Existing exported cores withoutprefetch_bufferload and serve unchanged", which addresses the #566 field, not the scored_prefill sizing change. - Qwen3.8 PLE recipes (external repo): gain
publish_lookahead; the PR states a merge-order requirement (merge #590 before bumping uv.lock in local-inference-lab/hyperflare-recipes) so external recipes only compile against the new API after this lands. A version-skew hazard for downstream recipe repos. - Windows: unchanged code paths for the read-only remap (cfg(target_os = "linux") only) and for the lane fan-out (Unix only). WaitBackoff keeps spin-only semantics on Windows, matching the constraint #519's reviewers imposed (Windows timer tick ~15.6 ms > NAP_MAX). docs/windows.md:182-186 documents Windows mapped-mailbox Engram fixtures — untouched.
- No CLI flag, Protobuf field, manifest field, or docs change in this PR: no new defaults, no documentation update at all (contrast #566/#561 which documented their flags/metrics). The only doc-adjacent change is the EPERM error string.
#16 [high] Related work: #590 stacks on #566+#561, supersedes #519, conflicts with #580/#583
Stacking/overlap map for PR #590 (files: helios/src/engram.rs, helios/src/engram/reader.rs, helios/src/runtime_core/engram.rs, ignition/components/ngram_delivery.py):
- #566 (merged 2026-11-28, Martin Vit/voipmonitor): introduced the entire advisory-mailbox contract,
next_reader_action,ReaderAction::{Gather,Warm,WaitReady,BlockRecv},prefetch_buffer,publish_lookaheadfor Engram, WARM_BATCH_ROWS, andprefetch_rows_loadedstats. #590 is a follow-on patch series on top of it (same four files). Its PLE work is the direct analogue of #566's Engram work. - #561 (merged 2026-11-28, voipmonitor): rewrote
UnixLaneto a sliding-window refill withfree_slots/in_flightand per-lane metric flushing. #590's lane fan-out fix lives inDiskReader::gather, aboveUnixLane, and #590's new test inspectslane.slot_read— i.e. it asserts against #561's structure. So #590 presumes #561'sUnixLaneshape. #590's description does not mention #561. - #519 (open, peperunas): same spin-then-nap mechanism, placed in
Requests::read. #590 supersedes it functionally by moving it toReaderAction::WaitReadyand adding the reset. #519 is not closed or linked as superseded. - #580 (open, FujitsuPolycom): moves
RowCacheinsertion out ofCachedReader::gatherto afterbuffers.signal(job.generation), addingReader::gather_into_output/commit_missesand touching the same worker loop in helios/src/engram.rs. Direct textual conflict risk with #590's edits toReaderAction::Gather/Warmin that same loop. - #583 (open, FujitsuPolycom): adds an
EarliestTableGateandReader::gather_with_disk_hook, also editing helios/src/engram.rs worker ordering. Same conflict zone. - #554 (open draft, ateska): RDMA row-cache misses, touches the same three helios files.
- #334 (open draft, javieratomic): the rejected-design read-ahead (native hash in Helios); explicitly rejected by yatesdr in #267 terms. #590's advisory-mailbox path is the approved alternative direction. Not competing directly, but #334 occupies the same files and its own read-ahead store overlaps conceptually.
- #528 (closed by lukealonso 2026-11-28) and #511: rank-partitioned tables; #566/#590's design (each rank's graph publishes its own row IDs) is the answer to #511's problem, but neither #590 nor its evidence demonstrates the rank-partitioned case; #590 even adds a code comment stating a rank-partitioned table gets its own
Sharedwith its own workers. - #470 (merged): source of the lane-depth defect being fixed; its review already flagged the defect.
- #561's own merge means #590's fan-out test (
lane.slot_read) would fail onmainbefore #561 only ifslot_readdid not exist; it does exist post-#561. - #481 is the only item #590 closes. The other four defects have no issue of their own: the lane-depth and warm-truncation defects were never filed; the mailbox overflow defect was never filed; the WaitReady spin (#519) remains its own open PR.
#19 [high] Research summary
Case file complete for PR #590 (18 scratchpad entries covering all nine angles).
What it is. An open, single-commit, same-day PR by lukealonso (+588/−112 over 4 files: helios/src/engram.rs, helios/src/engram/reader.rs, helios/src/runtime_core/engram.rs, ignition/components/ngram_delivery.py). It bundles five unrelated repairs — io_uring lane-depth fan-out, CachedReader::warm chunking, pre-6.7 sealed-memfd EPERM remap via /proc/self/fd, a WaitBackoff for ReaderAction::WaitReady, checked mailbox arithmetic plus a scored_prefill filter fix — with one new feature, a PLE advisory lookahead publisher.
Things a reader could not get from the description.
- The
prefetch_rows_loadedcounter was moved fromReader::warmintoCachedReader::warm; the reader's own return value is no longer the counted quantity. WaitBackoffis reset onReaderAction::Warmtoo, andnext_reader_actionprefers warming overWaitReady, so the repaired wait is largely the no-prefetch-work path — the same objection reviewers raised against #519.- The PLE
publish_lookaheadtakes an arbitrary caller-supplied mailbox with no validation, has no in-tree consumer and no test anywhere in this repo (pytest tests/preparation/test_core_boundary.pyonly checks the module name); its whole justification lives in an unlinked companion recipe PR. - The
scored_prefillfix is compatibility-relevant in both directions: it can now newly reject previously-loading cores that were silently under-sized, which the "existing cores load unchanged" sentence does not cover. - The lane-depth defect being fixed was already flagged in #470's review three days earlier and merged anyway, and #470's design descends from #216/#184, which were closed on measurement.
- The spin fix functionally supersedes #519, by the same author who reviewed #519 and demanded exactly this re-target, without linking or crediting it; #519 stays open.
- The new PLE torch op engages design-review principle 1 (owner approval for a captured-graph operation family); the author is that owner, but no approval is recorded, and the underlying #566 contract sign-off (B1/#535) is itself still open.
verification/helios-lifecycle/check.py(not opened) and Kani/mutation runs are mandatory for readiness/cancellation changes and are absent from the evidence, unlike sibling PRs #566/#580/#583.- The headline 76.5% gather reduction is mostly the #566 prefetch effect (row-cache hit 43.1% → 94.7%); the three defect fixes carry no measurement at all, including for
--embedding-table-workers 4|8, the configuration they change. - The EPERM fix is verified only indirectly (F_GETFL/mprotect on 6.18), never on a <6.7 kernel; issue #481 stays open with its reporter unreached.
Context mapped: charter/design-review fit (model-agnostic reader fixes align; captured-graph op approval and evidence bar are the friction points), docs and CLI surfaces (no docs updated; docs/TODO.txt:88-89 qualification still open), reach (old-LTS-kernel RAM users, multi-worker operators, Windows unchanged, external recipe version skew), people (author is project owner, 215 helios commits, also closed #528 and reviewed #519), community (zero reviews so far, but five PRs now open on the same files) and a full stacking/conflict map (#566/#561 ancestors, #519 superseded, #580/#583/#554 conflict zones).
#20 [high] Change verified: pre-6.7 EPERM fix mechanism and its reach into shared-RAM handoff
Verified in tree (helios/src/engram/reader.rs:106-177):
ResidentMapping::newwas split intoopen_readonly_view(Linux only,File::open(format!("/proc/self/fd/{fd}"))),map_fd(fd, nbytes, protection)returningio::Result<usize>, andnew.- The reopen is attempted whenever
!writableontarget_os = "linux"— unconditionally, not only as an EPERM fallback — so every read-only remap now opens an extra descriptor under/proc/self/fd.Self::open_readonly_view(file).ok()swallows the error, so a missing/blocked procfs silently falls back to the O_RDWR descriptor (and then hits the old EPERM on old kernels). The comment at reader.rs:133-137 explains why; the description says "falling back to file.as_raw_fd() if procfs is unavailable", matching. - The new diagnostic only fires when
!writable && raw_os_error() == EPERM(reader.rs:151-159), appending "(kernels older than 6.7 require /proc/self/fd to map a write-sealed memfd read-only)" — exactly issue #481's "suggested fix" second bullet. map_fd's mmap argument changed fromfile.as_raw_fd()tofd, andmadvise(MADV_POPULATE_READ)now castsaddress as *mut libc::c_void; functionally unchanged.- Call sites affected:
Resident::initializebuilds the writable mapping (writable = true, reopen skipped) and then, afterseal_resident, callsfrom_shared→ResidentMapping::new(&file, extent, false)(reader.rs:334-339, 350-372) — that is the mapping that used to fail.from_sharedis also the path used for shared-rank RAM handoff:helios/src/engram/prepared.rs:158-185(PreparedTables::from_shared) called fromheliopause/src/embedding_tables.rs:78-83(NativeEmbeddingTables::new(descriptors=...)), i.e. theignition debug-serveshared-RAM handoff documented at docs/windows.md:172-175. The description testsResident::loadbut does not mention the debug-serve handoff, which shares the fixed code path. - Non-Linux Unix (macOS/BSD) keeps
map_fd = file.as_raw_fd()— no behaviour change, and since theEPERMrefusal is Linux-specific that is consistent. - Test:
sealed_resident_readonly_mapping_drops_write_capability_via_proc_reopen(reader.rs ~2290+) assertsF_GETFL & O_ACCMODE == O_RDONLYon the reopened view, that the mapping's bytes match, and thatmprotect(PROT_READ|PROT_WRITE)returns -1 withEACCES— a proxy for "no VM_MAYWRITE" on the current kernel only.
#21 [high] Change verified: scored_prefill provenance (#538) and its load-time compatibility consequence
search_history --text scored_prefill returns only two commits: ba35da3f (2026-11-26, PCCessna, "Restrict cold pure-prefill discovery to natural-fit graph capacities (#538)") and 4ea9ba04 (this PR). So GraphKind::ScoredPrefill reached the Engram filters' blind spot only two days before #590; the hardcoded five-kind lists in runtime_core/engram.rs were written before scored_prefill existed and were never updated when it was added.
Consequences, stated as verified code facts:
- Before:
decodecomputedtokens(max packed tokens over "consumer" graphs) and themax_staged_rowsstaging-capacity bound from a list excludingscored_prefill, and skipped the hash-input-binding check forscored_prefillgraphs. A core whose widest Engram consumer is a scored prefill would therefore size staging from a narrower graph, and a scored-prefill graph missing its hash binding would pass validation. - After: both filters are
GraphKind::try_from(g.kind.as_str()).is_ok_and(crate::engram::consumes)(runtime_core/engram.rs:224, :333) andcrate::engram::consumesincludesScoredPrefill(helios/src/engram.rs:1011-1021). This makes the runtime loader agree withengram::consumes, which already gated transfer/readiness dispatch (helios/src/execution/transport.rs:971, 1047, 1095, 1141, 1198, 1266; helios/src/engram/prepared.rs:216, 266) — i.e. the loader was the outlier, not the dispatcher. - Direction of risk for existing cores: a core that previously loaded can now be rejected if a scored-prefill graph lacks its hash binding, or if its buffers are sized for a narrower graph than the scored-prefill width. The PR's test
scored_prefill_graphs_participate_in_capacity_and_hash_binding_validation(runtime_core/engram.rs:757-789) asserts precisely both directions, including that adding a 256-token scored_prefill to 128-token fixtures must fail. The description's "Existing exported cores withoutprefetch_bufferload and serve unchanged" addresses the #566 field only and does not mention this. - Also verified: unknown graph-kind strings are still silently skipped rather than rejected (
is_ok_andis false forErr), unchanged from before.
#6 [medium] Change verified: DiskReader lane-depth fan-out (reader.rs:787-800)
Verified in the working tree (helios/src/engram/reader.rs):
DEPTH = 128(reader.rs:30), lanes built withdepth = DEPTH / workers(reader.rs:692), workers restricted to 1|2|4|8 (reader.rs:687).- Fix at reader.rs:787-800:
let lane_depth = DEPTH / self.lanes.len();thenif self.lanes.len() == 1 || self.reads.len() <= lane_depth { one lane } else { active_lanes = reads.len().div_ceil(lane_depth).min(lanes.len()); chunk = reads.len().div_ceil(active_lanes); split_first_mut over self.lanes[..active_lanes] }. Single-lane fast path unchanged; lanes beyond active_lanes stay idle (no behaviour change for them). Windows path (reader/windows.rs) untouched. - Test added:
unix_disk_reader_fans_out_when_reads_exceed_single_lane_depth_below_total_depth(reader.rs ~2240-2290), 80 reads, workers 2/4/8, asserts used_lanes == 80.div_ceil(lane_depth).min(workers). Test is Unix-only and uses files from temp dir. - Depends on CHUNK = 64 KiB per read slot and the read planner merging up to CHUNK (reader.rs:758-779), so "reads" count is planned I/O chunks, not rows; the 17-128-read window claim in the description matches plan granularity.
#7 [medium] Change verified: warm chunking + prefetch_rows_loaded counter moved into CachedReader::warm
Verified in tree:
CachedReader::warm(reader.rs:1081-1140) now iteratesids.chunks(self.max_rows)and returnstotal_loaded; stats counters (resident_rows, evictions, prefetch_rows_loaded) are incremented INSIDE warm now (reader.rs:1125-1136), not by Reader::warm.Reader::warm(reader.rs:1292-1304) no longer addsprefetch_rows_loaded(previously did); it still incrementsprefetch_errorson error. This is a refactor the description does not mention: the counter now counts only rows actually loaded per chunk, and no longer double counts / is no longer incremented at the outer layer. Any test/metric relying on the old placement changes.gatherrefuses ids.len() > max_rows with "embedding gather exceeds the row cache workspace capacity" (reader.rs:1002-1004); warm did not, hence truncation. Description's claim that tail rows were silently dropped is confirmed by the old&ids[..ids.len().min(self.max_rows)].- Worker clamps warm micro-batch:
WARM_BATCH_ROWS.min(max_tokens * table.heads).max(1)(helios/src/engram.rs:607-609). max_tokens*heads is the samerowshanded asmax_rowsto Reader::from_files (engram.rs:539-548), so with the clamp the chunking path in warm is only reachable via direct calls/tests rather than the serving loop — the two fixes are redundant defences. - Test:
advisory_warm_chunks_ids_exceeding_workspace_max_rows(reader.rs ~2174-2210) uses max_rows=8 with 24 ids and asserts prefetch_rows_loaded == 24 and zero extra disk reads.
#13 [medium] Community: no comments or reviews yet; heavy crowding from sibling PRs
State at time of research: 0 comments, 0 reviews, no labels, CI pending on head 4ea9ba0, opened and last updated 2026-11-28 (same day, ~26 minutes after #566 merged at 13:07 and after #519's reviewer comment at 18:40 — the review comment precedes the PR body's framing). No human engagement yet. Interest level in the underlying topic is very high: #566 (the contract this builds on) is a 1501-line merged perf PR with a large case-file review; #561 merged the same day; #511, #528 (closed), #334 (open draft), #535 (open, unanswered), #580, #583, #554 (draft) all crowd the same reader/engram files; five separate PRs touching helios/src/engram.rs are open right now (#519, #554, #580, #583, #590). Autobot auto-reviews on this repo fire ~90 minutes after a push and have been the substantive review voice on all sibling PRs (often "Changes Requested"); this PR was created less than 90 minutes before this snapshot, so no review exists yet.
#14 [medium] Project fit: charter clauses touching captured-graph ops, evidence bar, and TODO qualification
Charter (read_charter) relevant clauses:
- "Keep the runtime small and model-agnostic ... Helios handles scheduling, caches, and requests, and shouldn't accumulate per-model branches (#267, #334)." PR #590's READER fixes comply; the PLE publisher puts the model-specific hashing in Ignition, which is the boundary the charter wants (same pattern #566 used). It aligns.
- "Captured-graph op contracts: Adding a new one—even if it reuses an existing graph kind—requires owner approval before you write it." The PLE op is a new captured-graph op name; the PR records no explicit approval (though the author is the owner).
- "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210). Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)." The bug-fix half satisfies "root cause" well (the EPERM fix is exactly the root cause #481 diagnosed; the mailbox overflow fix closes a real UB path). The perf half (PLE lookahead) is measured only end-to-end on a companion recipe PR that is not in this repo.
- "Don't make a violating contribution acceptable by weakening its governing rule" / "#404 right problem in the right place": the lane fan-out fix is in the right place; the
Transfers::newbounds checks duplicate load-time validation rather than replacing it. - Roadmap: "Engram & shared Engram tables (#267): A broader design, scoped as its own project." This PR is incremental repair inside that scoped project, not a new design.
- docs/cli-design.md:774-778 already documents "Workers share 128 I/O slots and 8 MiB of direct-read staging per embedding table" — which is factually what the code claimed but not what it did before this fix (the per-lane depth was only ever used by lane 0 for ≤128 reads).
- docs/TODO.txt:88-89 still lists "[ ] Validate the unbuffered Windows core guard and parallel disk workers with complete DeepSeek Engram serving and with complete Qwen PLE serving" — the open qualification item most directly touched by the lane fan-out fix and by the PLE publisher. Neither this PR nor its description updates docs/TODO.txt.
#17 [medium] Recent activity: three Engram reader commits in one day; EPERM socket predates #470
Timeline facts: commit 4ea9ba04 dated 2026-11-28 by Luke Alonso (single commit on branch, base a54a8b8a). Preceding commits on main that this builds on: d17efddc (#561, io_uring sliding window, same day), 7745deea (#566, advisory prefetch, same day), cb787f29 (#470, parallel gathers incl. the lane split, 2026-11-25), plus 6b2d25f7 "Prefault resident embedding table mappings before row delivery" (2026-10-14, Martin Vit) and cb786267 "Retry transient busy seals before publishing resident embedding tables" (2026-10-18, Martin Vit) — the two earlier commits that created the seal/mmap sequence #590 now has to work around for pre-6.7 kernels. So the EPERM defect predates #470 by six weeks in the map resident embedding table form and has been live since resident/RAM tables were introduced for the Qwen3.8 PLE path.
search_history --ref pr/590confirms no commits on main since branch point touch the changed files other than the four cited; the orientation packet says the same.- Activity in the area is extremely dense: helios/src has 8 distinct commits in the last day, three of them (7745deea, d17efddc, 4ea9ba04) touching exactly the Engram reader. #590's WaitBackoff, warm clamp, and lane fan-out all sit on code less than 24 hours old.
- The EPERM fix lands inside
ResidentMapping::new, which is also used by the writable path (writable=true) and byfrom_sharedfor shared-rank RAM tables (prepared.rs:158-185, heliopause embedding_tables.rs:80). So the fix affects not justflare run --embedding-table-storage rambut also theignition debug-serveshared-RAM handoff path, which docs/windows.md:172-175 notes is Linux-fd based. That path is not mentioned in the description's testing.
#18 [medium] Process: lead coverage and what was not examined
Packet leads checked and dispositions:
- #519 (open PR) — followed, see related-work entry. Competing/superseded.
- #566 (merged) — followed. Ancestor and the source of the PLE analogue.
- #580, #583 (open) — read. Both edit the same worker loop in helios/src/engram.rs; conflict risk + overlapping goals (deferring cache insertion, table priority) that neither #590 nor they acknowledge mutually.
- #554 (draft) — noted, RDMA row-cache misses, same 3 helios files, not examined in depth (draft, different mechanism).
- #561 (merged) — followed. #590 presumes its UnixLane structure.
- #267 (closed issue) — referenced by #334/#535/#528 as where yatesdr described the advisory mailbox; the design #590's PLE work continues. Not re-read in full.
- #470 (merged) — read. Origin of the lane-depth defect and of the DEPTH=128 budget wording.
- #479 (merged, voipmonitor) — touches engram.rs and runtime_core/engram.rs; not examined (TerminalPrefill/gated gather, different mechanism). Not obviously overlapping.
- #334 (open draft) — read. Rejected design direction; #590 follows the accepted direction.
- #481 (open issue) — read in full. The only issue this PR fixes.
- #535 (open issue) — read. Unanswered owner-approval request for the very contract #590's PLE op plugs into.
- #511 (open issue) — read. Rank-partitioned three-of-four-ranks-idle; #590 does not fix it, and adds a comment describing its cause.
- #528 (closed PR) — read. Closed by the same author on the same day for the boundary violation; explains the design rationale #590 follows.
- #589/#579 etc. (same author) — checked for pattern; #589 open multi-fix bundle, #579 merged same-day multi-fix bundle.
- Charter — read. docs/design-review.md, docs/cli-design.md:750-816, helios/manifest.md:465-477, docs/windows.md:172-192, docs/TODO.txt:88-89, docs/core-design.md:689 consulted. Not examined, low expected value: #410, #408, #353, #352, #219, #220, #216, #184, #161 (older engram/DeepSeek work; #216/#184 cited only via #470's review), #539, #550, #573 (unrelated subsystems), flare-cli #196-test note.