Recommendation: Changes Requested
The underlying EngramTable.Encoding.FP8_E4M3_GLOBAL = 4 wire, schema, runtime-decode, and export additions remain sound, strictly additive, and wire-compatible (and independent end-to-end SM120/SM121 GSM8K-1319 verification from @nero- strengthens confidence in the contract). However, the follow-up code, test, and doc fixes described in the updated PR body are not present at head 02ba762 — the branch diff is still the original 10-file change (+565 / -145), leaving Round 1's ignition/components/ngram_delivery.py bare-else None-dereference defect and missing negative tests unfixed, while the PR summary and pytest count (10 passed) describe a local commit that appears not to have been pushed. In addition, Round 1's Layer-1 CPU verification blocker remains partially unresolved (helios still skips helios::engram::* and helios/tests/, and tests/preparation/ remains unrun).
Merge Risk
Level: Low
- Core Rust/wire surface is verified clean and additive:
FP8_E4M3_GLOBAL = 4is appended cleanly tohelios/proto/{core,runtime_core}.protowithignition/preparation/runtime_core_pb2.pyregenerated to match (+21bytes in_ENGRAMTABLE_ENCODING), and downstream consumers (helios/src/core/reader.rs:221,helios/src/engram.rs:203-219,helios/src/runtime_core/describe.rs:479,646,helios/src/core/conversion.rs:2862-2863,heliopause/src/export/weight_reuse.rs:397-410,472) already route generically through #664's single-plane seam. - Unpushed follow-up commit risk:
02ba762does not contain the_ple_lookup_planesrefactor, negative mode/plane tests, FP8 hardlink-reuse test coverage, or Rust/doc cleanups claimed in the PR description, meaning the reported verification runs (pytest: 10 passed, FP8 hardlink reuse) do not correspond to the commit currently queued to merge. - Remaining code & verification gaps:
ignition/components/ngram_delivery.py:105-114, 136-144still crashes withAttributeErroron unknownquant_modewith single-plane tables (scales is None), and unfilteredhelios+tests/preparation/Layer-1 CPU suites have not been reported on the pushed head.
Walkthrough
- Protobuf & Python bindings (
helios/proto/core.proto:268-269,helios/proto/runtime_core.proto:664-665,ignition/preparation/runtime_core_pb2.py:5,27,182-183): AppendsEngramTable.Encoding.FP8_E4M3_GLOBAL = 4(raw 1-byte-per-element FP8 E4M3 rows, no scale plane,scale_block == 0, finite positiveglobal_scale) and regeneratesruntime_core_pb2.py(_ENGRAMTABLE_ENCODINGspan11543..11643, verified consistent). - Signed-core schema validation (
helios/src/core/schema.rs:445-457, 497-512, 561-589, 622-637, 2067-2167): ClassifiesFp8E4m3Globalas single-plane inengram_encoding_has_scales, enforces emptyscale_buffer,scale_block == 0, finite positiveglobal_scale, absentscalesplane, and exactrows * embedding_widthbyte lengths for shared and partitioned tables (preserving #664's BF16 behavior), plusvalidates_single_plane_fp8_global_engram_table. - Runtime-core decoding (
helios/src/runtime_core/engram.rs:159-167, 1161-1235): Adds theEncoding::Fp8E4m3Globaldecode arm yielding(embedding_width, 0, row_bytes, None)for positiveembedding_widthand finite positiveglobal_scale, plusfp8_global_single_plane_tables_decode_shared_and_partitioned. - Heliopause export tests (
heliopause/src/export/core.rs:4410-4768): Adds shared and partitionedFp8E4m3Globaltables (plus scale-plane rejection and signed round-trip verification) tocore_engram_preserves_shared_and_partitioned_plane_layouts; production export code needs no FP8-specific branch. (reuse_engram_hardlinks_shared_and_partitioned_embedding_planesat:3907-3971is unchanged at02ba762.) - Ignition PLE delivery & tests (
ignition/components/ngram_delivery.py:98-115, 131-157,tests/components/test_ngram_delivery.py:29-135): Widensscales/scaletotorch.Tensor | Noneand adds an"fp8_e4m3_per_tensor"branch in both_lookupandPreparedPLELookup.__init__, with 1 parametrized test over the 3 valid modes. - Docs (
docs/core-format-design.md:94-95,helios/manifest.md:526-528): DocumentsFP8_E4M3_GLOBALsingle-plane layout, omitted-scalessafetensors file, andglobal_scalecontract.
Pre-merge Checks
- [PASS] Security / malicious screen: No unsafe code, credential handling, external network calls, or suspicious behavior introduced.
- [PASS] Charter & value fit: Model-agnostic wire/format extension on #664's single-plane seam with zero per-model runtime branches, flags, or new captured-graph operation families; linked to
local-inference-lab/hyperflare-recipes#165. - [PASS] Related / duplicate / conflict check: Duplicate PR #733 closed in favor of #732 with
@nero-'s endorsement; SM120 gate #731 is Ready To Merge; 6-file textual overlap with open #723 is rebase-only. - [WARN] Tests & verification evidence: Strong live hardware corroboration (author SM121 disk/RAM + NVFP4 replay, plus
@nero-SM120/SM121 GSM8K-1319) and enum tag numbers in the PR body are now fixed, but the pushed head02ba762does not match the PR body's claimed fixes/tests (10 passedpytest, FP8 hardlink reuse) and Layer-1 CPU suites forhelios(unfiltered) andtests/preparation/remain unrun.
Blockers
- Pushed branch head
02ba762is missing the follow-up changes and tests claimed in the PR description (docs/design-review.md:156-162):- Verified mismatch at
02ba762: Five concrete claims in the updated PR summary and verification section do not exist in the pushed tree (it appears the follow-up commit was tested locally and summarized in the PR body, but not pushed tofeat/qwen4-fp8-ple):ignition/components/ngram_delivery.py:_ple_lookup_planesdoes not exist anywhere in the repo (search_codereturns zero matches);:105-114and:136-144still contain the duplicatedif / elif / elsedispatch with noValueErrorvalidation (see Should Fix #1).tests/components/test_ngram_delivery.py:29-37: Contains only 1 test function parametrized over 3 valid modes (3test cases total, not10 passed), with zero invalid mode/plane rejection tests.heliopause/src/export/core.rs:3907-3971:reuse_engram_hardlinks_shared_and_partitioned_embedding_planesis unchanged frommainand loops only over NVFP4 and BF16 (for (partitioned, bf16)at:3910);Fp8E4m3Globalonly appears incore_engram_preserves_shared_and_partitioned_plane_layouts(:4570, :4583, wherecache = None).helios/src/core/schema.rs:504-512, 561-571andhelios/src/runtime_core/engram.rs:150-167: Neither the single exhaustiveEncodingmatch invalidate_engramnor the consolidated single-plane geometry helper inruntime_core::engramis present.docs/core-design.md: Not among the 10 changed files (:607still reads"b12x NVFP4 PLE embedding").
- Fix: Push the follow-up commit to
feat/qwen4-fp8-ple(which should resolve both this mismatch and Should Fix #1), or update both the code and PR description so the pushed head matches the claimed changes and test results.
- Verified mismatch at
- Unresolved Round-1 Layer-1 CPU verification gap (
docs/design-review.md:180-194, 247-251;AGENTS.md:309-321):- Verified gap: Since Round 1,
heliopause --release --lib(234 passed) andflare --release --lib(247 passed) were upgraded to full release-mode lib suites, andhelioswas expanded to--release --lib core::(527) and--lib runtime_core::(204). However, two runnable Layer-1 obligations remain unrun — and existing counts must also be confirmed on the pushed head once Blocker #1 is resolved:helioswas still filtered tocore::andruntime_core::, skippinghelios::engram::*(runtime table staging/reader/cache) andhelios/tests/integration/legacy-core targets (docs/verification.md:32(not opened)), and run without--locked.tests/preparation/(which includestest_core_boundary.py:15 (not opened),18coveringengram/ngram_delivery,test_core_protection.py(not opened), andtest_embedding_table_handoff.py) remains unrun.
- Fix: On the pushed head commit, run and report:
cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server(ifFLARE_TEST_TEMPLATE_DIRcannot be prepared offline, run the full unfiltered--libplus non-template integration tests and note only the externally gated template fixtures),cargo test --locked --release --manifest-path heliopause/Cargo.toml (not opened) --lib,pytest tests/components/ tests/preparation/.
- Verified gap: Since Round 1,
Should Fix
- Unfixed Round-1 defect: Non-exhaustive bare
else:and missingNoneplane/scale validation inignition/components/ngram_delivery.py:98-115, 132-145:- Verified behavior at
02ba762: Becausescalesandscaleare now legitimatelytorch.Tensor | None(:99-100, :132), both_lookup(:105-114) andPreparedPLELookup.__init__(:136-144) duplicate anif mode == "bf16" / elif mode == "fp8_e4m3_per_tensor" / else:dispatch where:- Any unrecognized
quant_modestring silently falls into the two-plane NVFP4else:branch and crashes withAttributeError: 'NoneType' object has no attribute 'view'wheneverscales is None(which is now the normal state for single-planeFP8_E4M3_GLOBALandBF16tables). "nvfp4_group16"does not validatescales is not Noneandscale is not None;"fp8_e4m3_per_tensor"does not rejectscale is Noneor unexpected non-Nonescales;"bf16"silently drops unexpectedscales/scale.
- Any unrecognized
- Fix: Extract the shared
_ple_lookup_planes(mode, weight, scales, scale)helper (already described in the PR summary) called by bothPreparedPLELookup.__init__and_lookupthat explicitly handles"nvfp4_group16","fp8_e4m3_per_tensor", and"bf16", validates plane/scale presence per mode, raisesValueErroron unsupported modes or mismatched planes, and add negative test cases intests/components/test_ngram_delivery.py.
- Verified behavior at
Subtract / Simplify
- Match the decoded
Encodingenum once inhelios/src/core/schema.rs:497-512, 561-571: Replace the three rawtable.encoding == ... as i32comparisons (:506, :561, :567) and duplicated"single-plane engram table cannot carry scale metadata"error return (:505, :508) with a single exhaustive match on decodedwire::engram_table::Encoding. - Consolidate single-plane decode geometry in
helios/src/runtime_core/engram.rs:150-167: Factor the shared single-plane width-to-row_bytesconversion betweenEncoding::Bf16(* 2) andEncoding::Fp8E4m3Global(* 1) (or share a small helper withschema.rs) while keeping bothglobal_scaleguards explicit. - Deduplicate single-plane schema validation test (
helios/src/core/schema.rs:2068-2167vs:1945-2065): Optional cleanup —validates_single_plane_fp8_global_engram_tablemirrorsbf16_identity_single_plane_engram_validationalmost line-for-line and could share a small table-driven helper.
Nits
docs/core-design.md:607still reads"b12x NVFP4 PLE embedding"(stale since #664's BF16 and now also omittingFP8_E4M3_GLOBAL; already listed in the PR summary once the follow-up commit is pushed).helios/src/core/schema.rs:565keeps"BF16 engram row width overflow"while sibling messages (:582, :584, :626, :628) were generalized to"single-plane..."(cosmetic only).- Getting a brief maintainer sign-off (
@lukealonso) on the new signed-core enum tag and pinnedb12x(1441ce86inpyproject.toml:47(not opened))"fp8_e4m3_per_tensor"vocabulary remains good hygiene (non-blocking).
Dropped on verification
- Earlier Discovery / Value Prop / Contracts claim ("Undeclared BF16 validation tightening in
helios/src/core/schema.rs"): Verified false (and retracted in Round-2 audits) —main:helios/src/core/schema.rs:555-578already enforced exactrows * embedding_width * 2plane sizing for shared and partitioned BF16 tables from #664;02ba762only renamesbf16_row_bytestosingle_plane_row_bytesand addsFp8E4m3Globalwithout altering BF16 behavior. - Code Correctness sub-claim ("
caps.quant_modevsstate.query.quant_modetwo-source-of-truth silent dtype divergence"): Speculative —statecomes fromplan_from_handle(self.plan.handle)forself.plan = ple_embedding.plan(caps, ...)(ngram_delivery.py:104,145,192), sostate.queryoriginates fromcaps. (The non-exhaustive bareelse:,Nonedereference, missing plane/scale validation, and duplicated dispatch remain verified and are retained.) - Code Correctness Minor (
helios/src/runtime_core/engram.rs:190table.embedding_width != widthself-comparison): Intentional pre-existing pattern shared withNvfp4E4m3Global(:147) andBf16(:157); onlyFp8E4m3E8m0fixes width to 256 (:140), and buffer bounds are enforced byvalidate_buffer(:310-327). - Code Correctness Minor (
helios/src/core/schema.rs:506-512finalelsebranch): Verified sound —engram_encoding_has_scales(:445-457) already rejectsUnspecifiedand unknown encodings at:497, sohas_scales == falsereaches:506exclusively for{Bf16, Fp8E4m3Global}. - Owner-approval hard gate (
docs/design-review.md:22-26, cited from #733): Not a blocker — Principle 1 gates new captured-graph operation families/contracts; PR #732 adds no graph kind,ValueSource,EngramHash.Method, or mailbox protocol, only an encoding tag on #664's existing single-plane seam. - Open-PR overlap / external gating (
#7236-file textual overlap,#731SM120 pin, unobservable CI status): Informational context only (#731is already Ready To Merge and@nero-independently verified SM120 + SM121); not blockers or should-fixes. - Subtraction §6 (
heliopause/src/export/core.rs:4557-4648positionalbad_idx % 2and hardcoded test offsets): Pre-existing test-fixture style inherited from #664; low-signal nit, dropped.