PR #664: helios,heliopause,ignition: support single-plane BF16 and identity-indexed offloaded embedding tables

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/0d1cfd35-6eab-4403-b169-d9822770a1b9

Opened by a workflow run, Dec 1, 2026 2:50 PM EST. decide malicious: all_clear (100%): No malicious content found

explore

Author: kbenkhaled (CONTRIBUTOR; one prior merged PR, #592 "Add sm110/thor identifiers"; no Discord handle given) Motivation: Gemma 4 E2B/E4B per-layer embedding tables are raw BF16, indexed directly by token ID, and cost 4.38–5.25 GiB — too much to keep resident on unified-memory GPUs. Helios' existing offloaded-embedding path only understood two-plane quantized n-gram tables, so this PR generalizes it with a single-plane BF16 encoding and identity (token = row) indexing. Scale: +1757 / −548 lines in 23 files Proposal:

Full report · Notes

Value Proposition

Value Proposition — PR #664: single-plane BF16 and identity-indexed offloaded embedding tables

Charter alignment — right layer, wrong process. The PR adds a general storage encoding and a general indexing method, appends enum tags (= 3) without disturbing existing FP8/NVFP4 wire layout, and introduces no model allowlist, capability flag, or per-model branch — the "solve the right problem in the right place" posture the charter asks for (#267/#334). Method.IDENTITY removes hashing from the runtime, consistent with the line yatesdr drew in #334. The tension is procedural: Encoding.BF16, Method.IDENTITY and the mailbox semantics (helios/manifest.md:455-470) are new core-contract surface, and the charter requires owner approval before writing such contracts. The PR records none, unlike #566's explicit approval note. The charter's recipe rule ("prove they export and serve cleanly from the PR branch") is also unmet.

Novelty & status — additive. No competing implementation of single-plane BF16 or identity indexing exists among open or closed items. #566 and #590 are the foundations it extends, not substitutes; #554/#334 are adjacent and will collide mechanically. Neither obsolete nor superseded.

Value vs cost — real constraint, weak evidence, high review cost. The motivating problem (4.38 GiB E2B / 5.25 GiB E4B PLE tables crowding KV headroom on unified-memory GPUs) is plausible but is unverified arithmetic, and Validation still carries the placeholder "(update this line once the Thor E2B export + benchmark completes)": no GPU, no serving replay, no Windows build, no mutation testing. Decisively, no producer exists in-tree — ignition/components/engram.py:40-58 still emits only two-plane FP8/NVFP4 — so nothing in this repository exercises the new contract end to end. Cost is substantial: +1757/−548 across 23 files whose surrounding code changed twice in the preceding 48 hours, plus two undeclared behavior changes (stricter shard validation that can reject previously signed gapped cores, untested for compatibility; null tolerance at heliopause/src/export/binding.rs:648-658). The partition fix is sound but its effect flows only through derived PartialEq (runtime_core/model.rs:458) and is undocumented.

Required changes: (1) recorded owner approval for the enum values and mailbox contract (#535 is the venue); (2) a linked recipe/producer plus one exported-and-served BF16/IDENTITY core and a benchmark against main; (3) split shard-contiguity and binding fixes into a separate PR with an issue and an old-core load test; (4) document the partition mechanism and the undeclared relaxations.

Verdict: Worth it with changes.

Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.

Classify intake

Selected: performance, enhancement, area:engram

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +performance, +enhancement, +area:engram

Subtraction and simplicity

Subtraction/simplicity review of PR #664. The structural core is lean — Planes { weights, scales: Option<Plane> } is the minimal generalization of [Plane; 2], test fixtures were updated not duplicated, and no new flags, allowlists or env switches appear. The validation layer is where the diff is not lean.

  1. The "single-plane table cannot carry a scale plane" rejection is copy-pasted eight times with six different messages, and each site separately re-decides whether a required scale plane exists — helios/src/core/schema.rs:451-453, :495-499, helios/src/runtime_core/engram.rs:47-49, :68-72, :107-111, :200-202, :273-276, heliopause/src/export/core.rs:117-121, :149-153, :437-441, :458-462, :1577-1583, :1632-1638. Collapse into one strict engram_scales(encoding, span) -> Result<Option<&Span>> beside engram_encoding_has_scales (schema.rs:319); removes ~40 lines and the drift risk between the four exporter groups that must agree on assets.

  2. TableSource carries two Options that must agree (scales_plane + scales, helios/src/engram/prepared.rs:39-48), enforced by hand at prepared.rs:71 and again at :163-167 with a bespoke error string; same coupling in Table (helios/src/engram.rs:178-183). Option<(PlaneSource, String)> makes the illegal state unrepresentable and deletes three checks.

  3. Table.partition (helios/src/engram.rs:179) is written once (runtime_core/engram.rs:425) and never read in production — only a test at :1076. Its effect is purely to perturb derived PartialEq at the dedup in helios/src/runtime_core/model.rs:458. Compare an explicit delivery key there, or read the field there; don't leave behaviour riding on ==.

  4. Row geometry is computed three ways in one type: Planes::row_bytes/scale_row_bytes (reader.rs:83-89) vs the unchecked hand-rolled try_fold in helios/src/engram.rs:195-199. Add Planes::try_row_bytes() and use it; that also lets the if scales > 0 sentinels (reader.rs:970, :1102, :1156) be driven from planes.iter().

  5. engram_encoding_has_scales (schema.rs:316-329) returns true for Unspecified for legacy fixtures and pushes a separate Unspecified rejection onto every strict caller (schema.rs:355-359). Fold into finding 1; let spans() special-case it locally.

Smaller: helios/manifest.md:456 still says "two pinned payload frames" directly above the new single-plane paragraph; ignition/preparation/rank_group.py:47 duplicates the descriptor count helios/src/engram/prepared.rs:181-187 already validates with the same message; heliopause/src/export/core.rs:1559-1584 and :1604-1637 hold four near-identical format! plane pairs that one plane_job() closure replaces.

Open: whether the partition-as-PartialEq mechanism was intentional; why Python re-checks the descriptor count; and confirming the validate_shards sibling-absence rule (runtime_core/engram.rs:101-106) is genuinely distinct so the shared helper doesn't swallow it. No CI on head, so pass counts unverified.

Full report · Notes

Correctness and contracts

Correctness/contracts review of PR #664 (single-plane BF16 + IDENTITY engram tables). The wire change is clean and backwards compatible, and the new single-plane reader path is actually tested end to end (disk, row cache, warm, RAM) — contrary to the description's own waiver. The problems are elsewhere.

Most important: (1) Major — per-table staging and miss workspace are sized embedding_width * 2 * heads * max_tokens with STAGING_FRAMES = 2 and no width cap; the PR's own test uses 17,920-byte rows, so ~35–42 tables cost several GiB of pinned host memory on the same unified pool the feature is meant to free (engram.rs:195-201, 677-685; reader.rs:1049; charged at model.rs:762-777). (2) Major/process — Encoding.BF16 = 3 and Method.IDENTITY = 3 plus a new captured-graph mailbox contract (row ID in [0, stored_rows), -1 inactive, partition-local) are new core contract with no recorded owner approval, while the description claims no new captured-graph families (manifest.md:455-470). (3) Minor — engram_encoding_has_scales returns Ok(true) for Unspecified, making it the wrong authority for plane presence in 8 call sites. (4) Minor — the "distinct delivery groups" fix rests on an unread partition field whose only effect is derived PartialEq dedup (engram.rs:176-187, model.rs:458), and prepared.rs:131 sets it None unconditionally. (5) Minor — append_planes now tolerates "weights": null (undeclared relaxation, binding.rs:653-657), and four distinct partition errors collapsed into "invalid partitioned engram table" (schema.rs:455-461). (6) The stricter shard-contiguity rule is a genuine fix that matches the loader, but it changes validation for previously signable cores and no test covers an older gapped artifact.

Open: who approved the IDENTITY mailbox; where the producer lives (none in-tree; ignition still emits two-plane FP8 only); whether a gapped existing core was ever observed.

Full report · Notes

Final review

Recommendation: Changes Requested

The runtime and exporter generalization (Planes { weights, scales: Option<Plane> }, Encoding.BF16 = 3, Method.IDENTITY = 3, and the two shared correctness fixes) is technically clean, model-agnostic, and well-tested on CPU, and all audited downstream consumers (core/conversion.rs, runtime_core/protection.rs, export/weight_reuse.rs, engram/cache.rs, and the disk/cache/RAM/Windows reader paths) handle single-plane tables cleanly. However, the PR is blocked on repository contract and verification gates: it introduces new signed core-format / captured-graph contract enums (Encoding.BF16, Method.IDENTITY) without recorded owner approval or a linked producer recipe, and its validation section is unfinished (still carrying the Thor E2B TODO placeholder) with no CI checks, no live GPU export-and-serve proof, and no serving replay of an existing FP8/NVFP4 core.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Unapproved core-format / captured-graph contract extension with no linked producer (helios/proto/core.proto:258,294, helios/proto/runtime_core.proto:660,695, helios/manifest.md:457-463, docs/core-format-design.md:94-104):
    • Verified impact: Adding EngramTable.Encoding.BF16 = 3, EngramHash.Method.IDENTITY = 3, and the single-plane artifact layout (omitting -scales safetensors files) extends the signed core format and captured-graph contract. While IDENTITY cleanly reuses the existing request_buffer mailbox protocol, docs/design-review.md:22-26 and the Project Charter require explicit project-owner approval (Luke Alonso) for new contract surface (contrast #566's explicit approval note / #535). In addition, no producer exists in this repository (ignition/components/engram.py and ignition/components/ngram_delivery.py only emit two-plane FP8/NVFP4) and no companion external recipe PR is linked (contrast #566 -> local-inference-lab/hyperflare-recipes#70, #590 -> hyperflare-recipes#87), leaving the new contract unexercised end to end.
    • Fix: Obtain and record explicit owner approval for Encoding.BF16 and Method.IDENTITY, and link the companion Gemma 4 E2B/E4B recipe PR (or producer) that exports cores targeting this contract.
  2. Incomplete validation and missing live export/serve & backward-compatibility verification (docs/design-review.md Principles 12 & 13; Project Charter):
    • Verified impact: The PR's Validation section still contains an unfinished placeholder (*(update this line once the Thor E2B export + benchmark completes)*), head c769355 has zero CI checks, and the PR explicitly discloses that live GPU export/serving replay of a BF16/IDENTITY core and serving replay of a previously exported FP8/NVFP4 core were not run. Both the Charter ("New model recipes, aliases, or formats ... prove they export and serve cleanly from the PR branch") and Principle 13 ("Validate previous cores through loading and serving") require these checks before merge.
    • Fix: Complete and report the live Thor/GPU export + flare run serving verification and memory measurement for at least one BF16/IDENTITY checkpoint (removing the placeholder), verify loading and serving replay of a previously exported FP8/NVFP4 core without re-export, and ensure CI passes on the updated head.

Should Fix

  1. Strict Unspecified handling in engram_encoding_has_scales (helios/src/core/schema.rs:319-329, heliopause/src/export/core.rs:98,426,1553):
    • engram_encoding_has_scales maps Encoding::Unspecified (0) to Ok(true) solely to accommodate legacy spans() test fixtures (helios/src/runtime_core/engram.rs:506-529). Because heliopause/src/export/core.rs calls this helper in roles(), validate_ranks(), and core_engram() without first rejecting Unspecified, a table with encoding == 0 is treated as two-plane and fails with misleading plane-absence diagnostics instead of "engram table has no encoding" (relying on validate_deployment later).
    • Fix: Make the shared helper reject Encoding::Unspecified and handle the legacy encoding == 0 two-plane fallback locally in helios/src/runtime_core/engram.rs::spans.
  2. Make Table.partition delivery-group semantics explicit (helios/src/engram.rs:179, helios/src/runtime_core/engram.rs:425, helios/src/runtime_core/model.rs:458):
    • Table.partition: Option<usize> is populated during decode (runtime_core/engram.rs:425) and never read directly in production code; its entire effect relies implicitly on derived #[derive(PartialEq, Eq)] at helios/src/runtime_core/model.rs:458 (engram.iter_mut().find(|(existing, _)| existing == &index)). Without a comment or explicit predicate, a future refactor removing an apparently unread field would silently reintroduce cross-rank mailbox collapse when two TP ranks share identical shard payload bytes.
    • Fix: Add an explicit Index::shares_delivery_with(&self, other: &Self) (or document the PartialEq invariant directly on Table.partition and at model.rs:458).

Subtract / Simplify

  1. Collapse repeated single-plane scale checks into one strict helper (helios/src/core/schema.rs:445-453,489-499, helios/src/runtime_core/engram.rs:39-49,60-72,197-203,269-277, heliopause/src/export/core.rs:108-153,432-462,1565-1637):
    • The identical if has_scales { require scales } else if scales.is_some() { reject } logic is hand-written across 10+ sites with six slightly different error strings. Introducing one strict generic helper pub fn engram_scales<'a, T>(encoding: i32, scales: &'a Option<T>) -> Result<Option<&'a T>> in helios/src/core/schema.rs (rejecting Unspecified, with spans() handling legacy 0 locally and validate_shards's rank-selective sibling-absence check at runtime_core/engram.rs:101-106 kept separate) deletes ~45 lines and prevents asset-list drift across exporter and validator stages.
  2. Pair optional scale plane and buffer name into a single Option (helios/src/engram/prepared.rs:39-48,71,163-167,271, helios/src/engram.rs:177-186,1005-1014, heliopause/src/embedding_tables.rs:46-53):
    • TableSource and Table store scales_plane/planes.scales and scales: Option<String> separately, forcing manual parity checks at prepared.rs:71 and a redundant mismatch arm at prepared.rs:166. Pairing them as Option<(PlaneSource, String)> at the Python boundary in heliopause/src/embedding_tables.rs makes mismatched scale metadata unrepresentable in Rust and eliminates both checks.

Nits

  1. Collapsed partitioned-table diagnostics (helios/src/core/schema.rs:455-461): Merging shared-plane presence, empty request_buffer, and shards.len() != ranks into one "invalid partitioned engram table" error loses specificity compared to main; keeping distinct messages makes malformed cores easier to diagnose.
  2. PR description details: Mention the parts.is_null() tolerance added to heliopause/src/export/binding.rs:655-657 (aligning with weight_reuse.rs:406), and update Discord: None to match docs/design-review.md Principle 17 (Discord: no username provided or a Discord username).

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

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

explore

Author: kbenkhaled (CONTRIBUTOR; one prior merged PR, #592 "Add sm110/thor identifiers"; description states Discord: no username provided) Motivation: Gemma 4 E2B/E4B carry huge per-layer embedding tables (4.38–5.25 GiB) that crowd out KV cache on unified-memory GPUs; Flare's offloaded-embedding path assumed two-plane quantized tables indexed by a hash, so this PR adds raw single-plane BF16 storage and direct token-ID indexing so those tables can live on disk with a host row cache. Scale: +1722 / −548 lines in 23 files Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, enhancement, area:engram

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

No label changes

Subtraction and simplicity

Subtraction/simplicity review of PR #664 at head 263dfe9b: the diff is lean overall — the [Plane; 2] → Planes { weights, scales: Option<Plane> } refactor removes indexing assumptions rather than adding a second path, and no env-var knob, capability flag, model allowlist or new captured-graph op family was introduced in code.

Four things are worth cutting (~30 lines, all zero behaviour change except item 3's fixture edit):

  1. HIGH — dead duplicate encoding validation, helios/src/core/schema.rs:367-372: try_from plus if encoding == Unspecified is fully subsumed by engram_encoding_has_scales on the next line, which returns the identical "engram table has no encoding" for Unspecified and unknown tags. Delete four lines.
  2. HIGH — unreachable None arm in the Planes construction, helios/src/runtime_core/engram.rs:257-268: scale_bytes == None implies no scale plane, already rejected for shared tables at :187-193 and partitioned at :97-101. Replace the match with scale_bytes.map(|bytes| plane(scales, bytes)).transpose()?; the test at :1091-1094 keeps its coverage because both errors come from validate_shards.
  3. HIGH — speculative legacy shim, helios/src/runtime_core/engram.rs:28-34, whose own comment says fixtures are the justification; no published core can reach it given the PR's strict Unspecified rejection. Delete it (decode would then error at :155) and give the hand-encoded fixture at :498-500 an explicit encoding.
  4. MED-HIGH — the engram-plane walk exists three times: heliopause/src/export/core.rs:96-142, :408-440 (both with the duplicated "partitioned embedding tables cannot also hold shared planes" and both using unwrap_or(&wire::Span::default()) where helios rejects a missing plane), and helios/src/runtime_core/engram.rs:19-68 (spans). Extract one walker and have all three call it.
  5. LOW — Index::shares_delivery_with (helios/src/engram.rs:195-201) is self == other with a doc comment restating Table::partition's; optional.

Cleared as non-excess: every new Planes helper has callers (iter, iter_mut, total_nbytes, row_bytes, scale_row_bytes; single/two are #[cfg(test)] and used widely); the embedding_tables.rs plane-pairing, prepared.rs closures, reader.rs:1350-1365 and the rank_group.py extraction all net-simplify; engram_scales is real centralization.

Open: whether any real core carries encoding == 0 (fixture-only vs missing migration); where the shared walker should live.

Full report · Notes

Correctness and contracts

Correctness/contracts/system review of PR #664 at 263dfe9b: one blocker, two majors, two minors. The Planes refactor and both shared correctness fixes are sound; the contract gate and the unreported staging cost are what block.

Verified sound: disk/row-cache/advisory/RAM/transfer paths, empty-scale tolerance, out-of-range ID rejection (engram/reader.rs:1416-1423), the validate_buffer panic fix (runtime_core/engram.rs:305-321), BF16 size pinning, descriptor arithmetic, FD accounting, shared-table grouping.

Open: no off-GitHub approval evidence; no producer/recipe PR; E4B unexercised; staging unmeasured; CI silence unexplained.

Full report · Notes

Re-review

Recommendation: Changes Requested

All six code and documentation follow-ups from the previous review were cleanly resolved in 263dfe9 (engram_encoding_has_scales strictness, engram_scales centralization, Index::shares_delivery_with, paired Option<(PlaneSource, String)>, distinct partitioned-table diagnostics, and PR description updates), the Thor E2B live export-and-serve run is now completed, and deep inspection of the reader, row cache, staging, export, conversion, and weight-reuse paths found no correctness or concurrency regressions. The PR remains blocked on two repository gates carried over (and narrowed) from the previous round: recorded project-owner approval and a linked producer/recipe PR for the new Encoding.BF16 / Method.IDENTITY wire contract, and passing CI plus a backward-compatibility serving replay of a pre-existing FP8/NVFP4 core without re-export.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Unapproved core-format / captured-graph contract extension with no linked producer (helios/proto/core.proto:258,294, helios/proto/runtime_core.proto:661,695, helios/manifest.md:457-463, docs/core-format-design.md:92-103): Adding EngramTable.Encoding.BF16 = 3, EngramHash.Method.IDENTITY = 3, single-plane artifact packaging (omitting -scales safetensors files), and the IDENTITY mailbox contract (1-head int64 row IDs in [0, stored_rows) or -1, partition-local indices when sharded, out-of-range IDs failing gather) defines new producer obligations on captured graphs. Per docs/design-review.md:22-26, docs/core-design.md:276-280, and the Project Charter, a new operation/wire contract requires explicit prior approval from project owner Luke Alonso even when reusing an existing graph kind or mailbox mechanism; no human review or approval is recorded on this PR. Additionally, no producer exists in this repository (ignition/components/engram.py:117-126 emits only two-plane FP8/NVFP4) and no companion recipe PR (e.g., Gemma 4 E2B/E4B) is linked. Fix: Record explicit owner approval for Encoding.BF16 and Method.IDENTITY (and their mailbox semantics), and link the companion producer/recipe PR targeting this contract.
  2. Missing CI verification on head 263dfe9 and unverified legacy FP8/NVFP4 core replay (.github/workflows/native-serving.yml:13-78 (not opened), .github/workflows/python-cpu.yml:13-41 (not opened), .github/workflows/helios-lifecycle.yml:18-48 (not opened), docs/design-review.md:116-123,247-251): While the Thor E2B export-and-serve run from Round 1 Blocker 2 is now complete, two verification gates remain unmet: (a) no CI workflows have reported on 263dfe9, leaving the Windows I/O ring build (windows-2022 matrix job), full release crate test suites, python-cpu pytest/heliopause job, and helios-lifecycle TLA+ conformance and Kani proofs unverified (and docs/design-review.md:247-251 states that disclosing runnable CPU/formal checks as limitations does not waive them); and (b) the PR discloses that loading and serving replay of a previously exported FP8/NVFP4 core without re-export was not run, which is required by Principle 13 (docs/design-review.md:123) and the Project Charter. Fix: Unblock and pass CI on the PR head (native-serving, python-cpu, and helios-lifecycle), and verify loading and serving replay of at least one previously exported FP8/NVFP4 core without re-export.

Should Fix

None.

Subtract / Simplify

  1. Remove redundant encoding validation in validate_engram (helios/src/core/schema.rs:367-372): engram_encoding_has_scales(table.encoding)? (helios/src/core/schema.rs:318-327) already rejects unknown tags and Encoding::Unspecified with the identical "engram table has no encoding" error. Delete the duplicate try_from / Unspecified check at lines 367–371 (either check table.encoding == wire::engram_table::Encoding::Bf16 as i32 at line 433 or drop lines 369–371 after engram_encoding_has_scales).
  2. Delete unreachable None branch in decode Planes construction (helios/src/runtime_core/engram.rs:259-267): When scale_bytes is None (has_scales == false), shared tables have already rejected table.scales.is_some() at line 191 and partitioned tables have already rejected shard.scales.is_some() for every shard inside validate_shards at lines 97–101 (called at line 158). Replace lines 259–267 with scales: scale_bytes.map(|bytes| plane(scales, bytes)).transpose()?, (deleting 7 unreachable lines).

Nits

None.

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

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

explore

Author: kbenkhaled (CONTRIBUTOR; one prior merged PR, #592 "Add sm110/thor identifiers"; description states "Discord: no username provided") Motivation: Gemma 4 E2B/E4B keep their per-layer embedding tables as raw BF16 indexed by token id, costing 4.38–5.25 GiB and squeezing KV headroom on unified-memory GPUs, but Helios and the Heliopause exporter only understand two-plane FP8/NVFP4 n-gram tables. The PR adds a single-plane BF16 encoding plus direct (identity) token indexing so those tables can be offloaded instead of resident. Scale: +1711 / −550 lines in 23 files (head fd6dad6; was +1722/−548 at 263dfe9) Proposal:

Full report · Notes

Classify intake

Selected: triage:design-review, performance, enhancement, area:engram, area:memory

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +triage:design-review, +area:memory, -triage:review

Subtraction and simplicity

Subtraction/Simplicity lens on PR #664 (head fd6dad6): the diff is already lean and idiomatic — Planes { weights: Plane, scales: Option<Plane> } with Option-chained iterators is the right collapse of [Plane; 2], no new knob/module/flag, no structural AGENTS.md (not opened) violation. Four worthwhile subtractions, no blockers:

  1. (HIGH) helios/src/core/schema.rs:367 computes has_scales, then engram_scales re-derives it at :331 on both :452/:496 call sites, and :428-436 derives "is BF16" a third way via a raw tag compare. Pass the already-known bool into engram_scales and set bf16_row_bytes = (!has_scales).then(...) — !has_scales IS "encoding == Bf16" after :318-327 rejects Unspecified. Same double-derivation at helios/src/runtime_core/engram.rs:35,45,59; core/reader.rs:231 shows the cleaner pattern already in the PR.
  2. (HIGH) helios/src/runtime_core/selection.rs:52-70: the !has_tables error arm is unreachable — the only caller (model.rs:477-481) derives has_scale_planes from the same tables, so true implies non-empty. Delete the parameter and arm; the surviving message already says the stronger thing.
  3. (MEDIUM) heliopause/src/embedding_tables.rs:41-62: four overlapping presence checks and a 3-arm match for one optional plane, when TableSource.scales: Option<(PlaneSource, String)> makes the pairing unrepresentable. Read scales name first, check planes.len() == 1 + usize::from(scales_name.is_some()); ~22 lines → ~8.
  4. (MEDIUM) heliopause/src/export/core.rs: the same 8-line "weights + optional scales" shape is hand-copied five times (:99-111, :122-138, :411-419, :426-436, :1538-1592) with six engram_scales calls. One fn planes(...) -> Result<Vec<&Span>> helper and iterate.

Minors: Index::shares_delivery_with (helios/src/engram.rs:195-201) is self == other with a doc duplicating the Table::partition field doc; Table carries the scale plane twice in prepared.rs:161-166,270.

Open: I did not read AGENTS.md (not opened) in this run (convention verdict rests on observable diff facts); S1 and S4 should land together since export/core.rs consumes engram_scales across a crate boundary; test-greenness of S2 is read, not run.

Full report · Notes

Correctness and contracts

Correctness/contracts/system review of PR #664 at head fd6dad6. One Major, two Minor new findings; the rest of the change is sound.

Major — BF16 + 24-head XOR_MODULO is legal end-to-end, costing 24× host staging. helios/src/core/schema.rs:397-411 constrains hashing only by token-map emptiness, never by encoding, so a signed core can pair Encoding.BF16 with Method.XOR_MODULO; the decoder then awards 24 heads (helios/src/runtime_core/engram.rs:165-174) over 2-byte BF16 rows (:146-154), and staging is sum(row_bytes) * heads * max_tokens * 2 frames (helios/src/engram.rs:204-208, :212-219, STAGING_FRAMES = 2 at :348; rows at runtime_core/engram.rs:294-296). At 4,096 tokens and the E2B 17,920 B row width that is 3.28 GiB pinned host versus 140 MiB for the IDENTITY layout the PR ships — ~3.1 GiB avoidable on the exact bottleneck the PR targets, caught only by the generic budget check (runtime_core/model.rs:764-770). No producer, test, or doc line covers the combination. Fix: reject non-IDENTITY methods for BF16 in both schema::validate_engram and the decode arm.

Minor — sign/load parity is partial. Schema validates only rows/width plus the BF16 size pin (schema.rs:366-370, :428-436); the decoder requires exact width 256/160, block 32/16, Nvfp4 global_scale > 0 and full hash geometry (runtime_core/engram.rs:139-145, :177-178, :209-234). verify_published (heliopause/src/export/core.rs:3017) can still sign a core Helios refuses — the same class the PR closes only for gapped shards.

Minor — docs document BF16 and IDENTITY separately, never the accepted combination (helios/manifest.md:457-463).

Verified sound and not to be re-litigated: Planes propagation, Index::shares_delivery_with + Table::partition (helios/src/engram.rs:195-201, runtime_core/model.rs:458-465) preventing TP rank collapse, gather ID validation incl. -1 (engram/reader.rs:1416-1423), Windows lane mirror, exporter null/optional-scale handling, resident_scale_bytes = 0 genuinely enforced (engram/reader.rs:1362-1370), resident-scales CLI gating (selection.rs:52-76), Python descriptor counting. No new lock contention or hot-path reversal found.

Dossier blockers stand: owner approval for the enum values (AGENTS.md:376-381, "even if it reuses an existing graph kind or enum value"), and CI plus one legacy FP8/NVFP4 replay. Open: owner approval unrecordable from repo; no producer/recipe PR found; E4B unexercised; pr_diff broken for this PR.

Full report · Notes

Re-review

Recommendation: Changes Requested

The implementation at fd6dad6 is clean, model-agnostic, wire-compatible, and resolves every code-level Should Fix and Subtract/Simplify item from Rounds 1–2 (including removing the duplicate encoding check in schema.rs:367 and the unreachable None arm in runtime_core/engram.rs:259). No new correctness, concurrency, memory-budget, or hot-path defects were found. Merge remains blocked on two process/verification gates carried forward from prior rounds: recorded project-owner approval (plus a companion producer/recipe link) for the new core-format and captured-graph contract enums, and passing CI (native-serving, python-cpu, helios-lifecycle) plus a serving replay of a pre-existing FP8/NVFP4 core without re-export.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Unrecorded project-owner approval for new core-format / captured-graph contract surface and missing producer/recipe link (helios/proto/core.proto:258,294, helios/proto/runtime_core.proto:664,698, helios/manifest.md:457-463, docs/core-format-design.md:94-103): Appending EngramTable.Encoding.BF16 = 3, EngramHash.Method.IDENTITY = 3 (1-head direct row-ID mailbox semantics over request_buffer), and the single-plane artifact layout (omitting -scales files) extends the signed core contract and captured-graph mailbox semantics. AGENTS.md:376-381, docs/design-review.md:22-26, and docs/core-design.md:276-280 require prior explicit approval from project owner Luke Alonso ("even if it reuses an existing graph kind or enum value"; a Design-Signed-Off-By trailer does not grant approval per docs/design-review.md:26,313-318), and no approval is recorded on this PR. In addition, the in-tree producer remains two-plane FP8 only (ignition/components/engram.py:36-49,58) and no companion external recipe PR (e.g., Gemma 4 E2B/E4B) is linked. Fix: Record explicit project-owner approval for Encoding.BF16 and Method.IDENTITY (this is an owner decision, not code rework) and link the companion producer/recipe PR targeting this contract.
  2. Unverified CI workflows on fd6dad6 and missing pre-existing FP8/NVFP4 core serving replay (.github/workflows/native-serving.yml:13-78 (not opened), .github/workflows/python-cpu.yml:13-41 (not opened), .github/workflows/helios-lifecycle.yml:18-48 (not opened), docs/design-review.md:116-123,247-251): No CI checks have reported on fd6dad6, and the PR's Limitations line explicitly discloses that Windows I/O ring builds (windows-2022), mutation testing, and serving replay of a previously exported binary FP8/NVFP4 core were not run locally. Per docs/design-review.md:247-251, disclosing runnable CPU/formal checks (native-serving, python-cpu, helios-lifecycle TLA+ conformance and Kani proofs) as limitations does not waive them, and Principle 13 (docs/design-review.md:116-123) plus the Project Charter require validating a pre-existing FP8/NVFP4 core through loading and serving without re-export. Fix: Run and pass native-serving (Linux + windows-2022), python-cpu, and helios-lifecycle on fd6dad6, and replay at least one previously exported FP8/NVFP4 core without re-export. (Note: the Thor E2B run validates the memory budget, not a throughput/speedup claim over main, and the 5.25 GiB E4B figure remains arithmetic.)

Should Fix

None.

Subtract / Simplify

None.

Nits

None.

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

Applied: +triage:review, -triage:design-review