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
- Modifies signed core schema validation (
helios/proto/{core,runtime_core}.proto,helios/src/core/{schema,reader}.rs), the native embedding reader/cache/transfer pipeline (helios/src/engram.rs,engram/{reader,prepared}.rs,runtime_core/{engram,model,selection}.rs), and theheliopauseexporter (export/{core,binding}.rs,embedding_tables.rs), all in recently active areas. - Backward wire compatibility for two-plane FP8/NVFP4 cores is preserved structurally (new enum values appended at
= 3, existing layouts untouched,runtime_core_pb2.py(not opened) regenerated, andDiskReader::gather/RowCachehandle wide single-plane rows via 4 KiB fragments and 64 KiB coalesced reads), and every downstream consumer (conversion.rs,weight_reuse.rs,describe.rs,reader.rs) cleanly toleratesscales: None. - No CI workflow has run on
263dfe9(leaving Windows I/O ring builds, TLA+ lifecycle conformance, and Kani sequential proofs unverified), and serving replay of a previously exported FP8/NVFP4 core without re-export has not been performed.
Walkthrough
- Wire contract & schema (
helios/proto/core.proto:258,294,helios/proto/runtime_core.proto:661,695,helios/src/core/schema.rs:318-511,helios/src/core/reader.rs:228-245,ignition/preparation/runtime_core_pb2.py(not opened)): AppendsEngramTable.Encoding.BF16 = 3(rawembedding_width * 2-byte rows, no scale plane/metadata, overflow-checked payload size pinning) andEngramHash.Method.IDENTITY = 3(1-head direct indexing overrequest_buffer, emptytoken_mapand hash arrays,compressed_vocabulary == rows), centralizes scale-plane checks inengram_encoding_has_scales/engram_scales, skips absent scale payloads inrequired_payloads, and aligns signed-core shard contiguity validation withruntime_core::engram::validate_shards. - Native reader, staging, and model loading (
helios/src/engram.rs:176-219,631-657,911-1029,helios/src/engram/reader.rs:60-102,792-1460,helios/src/engram/prepared.rs:39-224,helios/src/engram/reader/windows.rs,helios/src/runtime_core/{engram,model,selection}.rs): Replaces[Plane; 2]withPlanes { weights, scales: Option<Plane> }across disk, row-cache, advisory warm, RAM,Transfers, andPreparedTablespaths; recordsTable.partition: Option<usize>and groups ranks viaIndex::shares_delivery_withso byte-identical TP shards never collapse into one delivery group; skips resident scale loading for single-plane tables and rejects explicit--embedding-table-resident-scaleswhen no table carries a scale plane; fixes an out-of-bounds shape index invalidate_buffer(helios/src/runtime_core/engram.rs:306-309). - Exporter & peer handoff (
heliopause/src/export/{core,binding}.rs,heliopause/src/embedding_tables.rs:41-62,ignition/preparation/rank_group.py:44-61): Makes scale planes optional inroles(),validate_ranks(),core_engram(), FD preflight accounting, andNativeEmbeddingTables(pairingOption<(PlaneSource, String)>at the Python boundary); tolerates JSONnullplanes inappend_planes(matchingweight_reuse.rs:406); counts descriptors dynamically viasum(len(table["planes"]) for table in catalog["tables"])in_receive_embedding_tables. - Docs & tests (
helios/manifest.md:455-464,docs/{cli-design,core-format-design,model-preparation}.md,tests/preparation/test_embedding_table_handoff.py, Rust unit tests): Documents BF16 single-plane layout,IDENTITYmailbox semantics, omitted-scalesfiles, and--embedding-table-resident-scalesrejection; adds isolated CPU unit tests covering schema validation, decode, single-plane disk/cache/warm/RAM gathering, partitioned delivery-group separation, publish-time gapped-shard rejection, and mixed-plane peer descriptor handoff.
Pre-merge Checks
- [PASS] Security / malicious screen: No credential access, suspicious network/external behavior, or unsafe memory regressions;
validate_buffer(helios/src/runtime_core/engram.rs:305-321) hardens shape-arity validation before indexing. - [WARN] Charter & value fit: Clean, model-agnostic runtime extension with no allowlists or capability flags, but introduces new signed core-format / captured-graph contract semantics (
Encoding.BF16,Method.IDENTITY) without recorded project-owner approval (docs/design-review.md:22-26,docs/core-design.md:276-280) and without an in-repo or linked external producer recipe. - [PASS] Related / duplicate / conflict check: Additive to #566 and #590 with no competing implementation; note mechanical merge overlap with open drafts touching
Planes(e.g., #334, #554). - [WARN] Tests & verification evidence: Thor SM110 Gemma 4 E2B export+serve run is now reported and CPU unit tests are well isolated, but head
263dfe9has zero CI runs (Windows build, pytest, TLA+ lifecycle, and Kani unverified), E4B remains untested, and no serving replay of a pre-existing FP8/NVFP4 core without re-export has been run (docs/design-review.md:116-123,247-251).
Blockers
- 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): AddingEngramTable.Encoding.BF16 = 3,EngramHash.Method.IDENTITY = 3, single-plane artifact packaging (omitting-scalessafetensors files), and theIDENTITYmailbox contract (1-headint64row 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. Perdocs/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-126emits only two-plane FP8/NVFP4) and no companion recipe PR (e.g., Gemma 4 E2B/E4B) is linked. Fix: Record explicit owner approval forEncoding.BF16andMethod.IDENTITY(and their mailbox semantics), and link the companion producer/recipe PR targeting this contract. - Missing CI verification on head
263dfe9and 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 on263dfe9, leaving the Windows I/O ring build (windows-2022matrix job), full release crate test suites,python-cpupytest/heliopausejob, andhelios-lifecycleTLA+ conformance and Kani proofs unverified (anddocs/design-review.md:247-251states 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, andhelios-lifecycle), and verify loading and serving replay of at least one previously exported FP8/NVFP4 core without re-export.
Should Fix
None.
Subtract / Simplify
- 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 andEncoding::Unspecifiedwith the identical"engram table has no encoding"error. Delete the duplicatetry_from/Unspecifiedcheck at lines 367–371 (either checktable.encoding == wire::engram_table::Encoding::Bf16 as i32at line 433 or drop lines 369–371 afterengram_encoding_has_scales). - Delete unreachable
Nonebranch indecodePlanesconstruction (helios/src/runtime_core/engram.rs:259-267): Whenscale_bytesisNone(has_scales == false), shared tables have already rejectedtable.scales.is_some()at line 191 and partitioned tables have already rejectedshard.scales.is_some()for every shard insidevalidate_shardsat lines 97–101 (called at line 158). Replace lines 259–267 withscales: scale_bytes.map(|bytes| plane(scales, bytes)).transpose()?,(deleting 7 unreachable lines).
Nits
None.
Dropped on verification
- Round 1 code/doc asks (6 of 8 items from prior review on
c769355): All verified resolved in263dfe9— strictUnspecifiedrejection inengram_encoding_has_scales(helios/src/core/schema.rs:318-327),engram_scalescentralization (:330-341),Index::shares_delivery_with(helios/src/engram.rs:195-201,helios/src/runtime_core/model.rs:458-460), pairedOption<(PlaneSource, String)>(helios/src/engram/prepared.rs:43,heliopause/src/embedding_tables.rs:54-62), distinct partitioned-table diagnostics (helios/src/core/schema.rs:461-473), and PR description updates (parts.is_null()andDiscord: no username provided). - Correctness Lens §2 ("Major — pinned staging amplification ~2.8x and per-rank delivery split"): Dropped as misleading. Staging (
helios/src/engram.rs:204-219,STAGING_FRAMES = 2) is already accounted inembedding_host_bytesand checked before KV sizing (helios/src/runtime_core/model.rs:491-493,764-779), whereengram_tokens(:483-490) is already the maximum consuming graph'spacked_tokens(). Partitioned ranks with distinct shard spans already formed separate delivery groups onmain;Table.partitiononly prevents false cross-rank mailbox collapse when two ranks share byte-identical shard spans. - Correctness Lens §3 sub-claims ("missing
mainspeedup baseline" and "flare_engram_resident_scale_bytes = 0is structurally zero"): Dropped — the PR motivates a memory-headroom / enablement goal on Gemma 4 E2B/E4B rather than claiming a latency speedup overmain, and reportingflare_engram_resident_scale_bytes = 0alongside real gather/cache/direct-I/O counters simply confirms the resident-scale skip path. (The surviving CI and legacy-core replay gaps are retained in Blocker 2.) - Correctness Lens §4 ("inaccurate claim that two-plane FP8/NVFP4 tables keep exact validation rules"): Dropped as low-signal; Solution §3 of the PR description already explicitly discloses the pre-publication shard contiguity tightening, and Helios's loader (
helios/src/runtime_core/engram.rs:70-107) already enforced those exact rules onmain, so no previously loadable core is broken. - Correctness Lens §5 ("hard startup failure on
--embedding-table-resident-scalesfor BF16-only vs no-op on single-plane tables in a mixed catalog"): Dropped — failing fast when no table in the catalog has a scale plane is documented (docs/cli-design.md:791-799) and aligns with the Charter's rule against silently ignoring explicit flags, while mixed catalogs legitimately apply the flag to the tables that carry scales. - Subtraction Lens §3 ("delete legacy
encoding == 0shim inhelios/src/runtime_core/engram.rs:29-34") and §5 ("deleteIndex::shares_delivery_with"): Dropped to prevent moving goalposts — both were explicitly requested by Round 1's review (Should Fix #1/#2 and Subtract #1) to keepschema::engram_encoding_has_scalesstrict while preserving the pre-existingmetadata_without_partitions_retains_shared_planeswire fixture (helios/src/runtime_core/engram.rs:496-519) and documenting theTable.partitionequality invariant. - Subtraction Lens §4 ("deduplicate engram-plane walks across
roles,validate_ranks, andspans"): Dropped — those per-stage walks already existed onmainwith distinct validation/ownership semantics (rolesbounds-checksshard.rank,validate_rankslocates payload parts,spansenforcesworld/validate_shards/rank selection and legacyencoding == 0), and the author already centralized the scale-plane check viaengram_scalesas requested in Round 1.