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
- Modifies signed core schema validation (
helios/proto/{core,runtime_core}.proto,helios/src/core/{schema,reader}.rs), the native offloaded-embedding reader/cache/delivery pipeline (helios/src/engram.rs,engram/{reader,prepared}.rs,engram/reader/windows.rs,runtime_core/{engram,model,selection}.rs), and theheliopauseexporter (export/{core,binding}.rs,embedding_tables.rs), all in active subsystems (heavy overlap with open #696 and open drafts #334/#554;rank_group.pyalready integrates merged #670 and is disjoint from open #678). - Wire backward compatibility and hot-path safety are preserved structurally: new enum values are appended at
= 3without altering FP8/NVFP4 layouts,DiskReader::gatherandRowCachecleanly handle wide single-plane rows via 4 KiB fragments and 64 KiB coalesced reads,validate_bufferfixes a pre-existing shape-index OOB bug, andhelios/src/execution/threaded.rschanges are test-fixture-only (no TP dispatch/transport behavior changed). - Residual risk stems from unverified gates: no CI workflows have reported on
fd6dad6(leaving thewindows-2022I/O ring build, full release crate tests, pytest, TLA+ lifecycle conformance, and Kani proofs unverified), and no serving replay of a previously exported FP8/NVFP4 binary core has been run.
Walkthrough
- Wire contract & signed schema (
helios/proto/core.proto:258,294,helios/proto/runtime_core.proto:664,698,helios/src/core/schema.rs:318-506,helios/src/core/reader.rs:230-247,ignition/preparation/runtime_core_pb2.py(not opened)): Appends orthogonal primitivesEngramTable.Encoding.BF16 = 3(rawembedding_width * 2-byte single-plane rows, no scale metadata/plane, overflow-checked payload size pinning) andEngramHash.Method.IDENTITY = 3(1-head direct indexing overrequest_buffer, emptytoken_mapand hash arrays,compressed_vocabulary == rows), centralizes strict scale validation inengram_encoding_has_scales/engram_scales, skips absent scale planes inrequired_payloads, and aligns signed-core shard contiguity checks with native loading. - Native reader, delivery grouping, and load options (
helios/src/engram.rs:176-219,631-657,911-1029,helios/src/engram/reader.rs:60-102,803-1460,helios/src/engram/prepared.rs:39-280,helios/src/engram/reader/windows.rs,helios/src/runtime_core/{engram,model,selection}.rs): Replaces[Plane; 2]withPlanes { weights: Plane, scales: Option<Plane> }across disk, row-cache, advisory warm, RAM,Transfers, andPreparedTables; recordsTable.partition: Option<usize>and groups ranks viaIndex::shares_delivery_withso byte-identical TP shards stay in distinct delivery groups; skips resident scale loading for single-plane tables (flare_engram_resident_scale_bytes = 0) and rejects explicit--embedding-table-resident-scaleswhen no table carries a scale plane; hardensvalidate_buffershape-arity matching (helios/src/runtime_core/engram.rs:297-314). - Exporter & peer handoff (
heliopause/src/export/{core,binding}.rs,heliopause/src/embedding_tables.rs:41-72,ignition/preparation/rank_group.py:44-60): Makes scale planes optional acrossroles(),validate_ranks(),core_engram(), andNativeEmbeddingTables(pairingOption<(PlaneSource, String)>at the Python boundary); tolerates JSONnullplanes inappend_planes(heliopause/src/export/binding.rs:655-657); counts handoff descriptors dynamically assum(len(table["planes"]) for table in catalog["tables"]). - Docs & tests (
helios/manifest.md:457-463,docs/{cli-design,core-format-design,model-preparation}.md,helios/src/execution/threaded.rs:1448-1638,helios/src/runtime_core/event_tests.rs,tests/preparation/test_embedding_table_handoff.py): Documents single-plane BF16 storage,IDENTITYmailbox semantics, omitted-scalesfiles, and--embedding-table-resident-scalesbehavior; adds isolated CPU unit tests covering schema validation, decode, single-plane disk/cache/warm/RAM gathering, single-descriptorPreparedTablessharing, partitioned delivery-group separation, publish-time gapped-shard rejection, and mixed-plane Python handoff.
Pre-merge Checks
- [PASS] Security / malicious screen: No suspicious network/external behavior, credential handling, or unsafe regressions;
validate_buffer(helios/src/runtime_core/engram.rs:297-314) fixes a pre-existing OOB shape index before length validation. - [WARN] Charter & value fit: Right model-agnostic runtime layer with no allowlists or capability flags, but appends core-format / captured-graph contract enums (
Encoding.BF16,Method.IDENTITY) without recorded project-owner approval (AGENTS.md:376-381,docs/design-review.md:22-26) or a linked producer recipe. - [PASS] Related / duplicate / conflict check: Additive to #566 and #590 with no competing implementation;
rank_group.pyalready incorporates merged #670 and is disjoint from open #678 (note mechanical overlap with open #696 and drafts #334/#554). - [WARN] Tests & verification evidence: CPU unit tests are thorough, isolated, and exercise real production entry points, and the Thor SM110 E2B run substantiates the memory-budget claim, but
fd6dad6has zero reported CI runs (Windows build, release crate suites, pytest, TLA+ lifecycle, and Kani unverified) and no serving replay of a pre-existing FP8/NVFP4 core without re-export (docs/design-review.md:116-123,247-251).
Blockers
- 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): AppendingEngramTable.Encoding.BF16 = 3,EngramHash.Method.IDENTITY = 3(1-head direct row-ID mailbox semantics overrequest_buffer), and the single-plane artifact layout (omitting-scalesfiles) extends the signed core contract and captured-graph mailbox semantics.AGENTS.md:376-381,docs/design-review.md:22-26, anddocs/core-design.md:276-280require prior explicit approval from project owner Luke Alonso ("even if it reuses an existing graph kind or enum value"; aDesign-Signed-Off-Bytrailer does not grant approval perdocs/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 forEncoding.BF16andMethod.IDENTITY(this is an owner decision, not code rework) and link the companion producer/recipe PR targeting this contract. - Unverified CI workflows on
fd6dad6and 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 onfd6dad6, 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. Perdocs/design-review.md:247-251, disclosing runnable CPU/formal checks (native-serving,python-cpu,helios-lifecycleTLA+ 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 passnative-serving(Linux +windows-2022),python-cpu, andhelios-lifecycleonfd6dad6, 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 overmain, and the 5.25 GiB E4B figure remains arithmetic.)
Should Fix
None.
Subtract / Simplify
None.
Nits
None.
Dropped on verification
- Correctness Lens F1 ("Major — BF16 + 24-head XOR_MODULO accepted with 24× staging amplification"): Dropped. The PR explicitly defines
Encoding.BF16andMethod.IDENTITYas orthogonal primitives, enabling narrow BF16 n-gram tables (e.g.,embedding_width = 128, matching FP8's byte width) or quantizedIDENTITYtables. Flippingencodingalone cannot silently trigger 24-head wide PLE staging becausedecodeenforces matchingtoken_map, hash arrays (helios/src/runtime_core/engram.rs:209-226),[T, 24]hash_buffer, and[T*24, row_bytes]weight_buffershapes (:315-326), andcheck_memory_limit(helios/src/runtime_core/model.rs:764-779) explicitly budgets host staging. - Correctness Lens F2 ("Minor — publish-time parity incomplete for FP8/NVFP4 per-encoding geometry"): Dropped. Pre-existing on
main(helios/src/core/schema.rs:339-384); the PR accurately scopes its parity claim to shard contiguity (:469-502), and its newBF16(:428-436,443-451,487-495) andIDENTITY(:412-422) validators already pin exact byte sizes and hash geometry at signing time. - Correctness Lens F3 ("Minor — docs omit BF16+XOR_MODULO combination"): Dropped as a corollary of F1;
helios/manifest.md:457-463accurately documentsBF16andIDENTITYas independent, orthogonal primitives. - Subtraction Lens S1 ("HIGH —
schema.rsdecides encoding three times per table"): Dropped.engram_scales(encoding: i32, ...)(helios/src/core/schema.rs:330-341) implements Autobot Round 1's requested helper signature and is called directly across 6 cross-crate sites inheliopause/src/export/core.rs(:108,131,416,431,1538,1580) wherehas_scalesis not precomputed; inferringBF16(width * 2) from!has_scalesatschema.rs:428would also be fragile if another single-plane encoding is added later. - Subtraction Lens S2 ("HIGH —
has_tablesis a dead/unreachable parameter invalidate_embedding_resident_scales"): Dropped as factually false. Whenengram.is_empty()is true (has_tables = false, has_scale_planes = false),if !has_tables(helios/src/runtime_core/selection.rs:58-62) is reachable and fires first with"resident embedding scales require an embedding table catalog", distinguishing models without embedding tables from models with single-plane tables (:63-67). - Subtraction Lens S3 ("MEDIUM — overlapping presence checks in
heliopause/src/embedding_tables.rs:41-62"): Dropped as low-signal Round 3 churn; the author implemented the Python-boundary pairing requested in Round 1 with distinctPyValueErrordiagnostics for bad plane count vs plane/binding mismatch. - Subtraction Lens S4 ("MEDIUM — five hand-copies of weights+scales in
heliopause/src/export/core.rs"): Dropped as overstated / low-signal Round 3 churn;:1528-1600builds distinct weight/scale filenames (-weights.safetensorsvs-scales.safetensors) and separate struct fields (weights_idx,scales_idx: Option<usize>), so a uniform span-slice helper would not cover them. - Dossier item #4 ("Round 2 Subtract/Simplify item 1 is only half done"): Dropped. Round 2 explicitly suggested either checking
table.encoding == wire::engram_table::Encoding::Bf16 as i32or dropping the duplicatetry_from/Unspecifiedcheck afterengram_encoding_has_scales; both Round 2 Subtract/Simplify items are fully resolved atfd6dad6(helios/src/core/schema.rs:367,helios/src/runtime_core/engram.rs:259). - Subtraction Lens minors (
shares_delivery_withdoc comment,prepared.rs:161-166,270,Planes::iter): Dropped as Round 3 nitpicks on clean code.