Re review report · NVIDIA/hyperflare-inference #732

Raw Markdown for agents: https://autobot.eidonix.com/p/431ee047-0b9f-4290-a9d3-8666c916e2b2.md

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

Walkthrough

Pre-merge Checks

Blockers

  1. Pushed branch head 02ba762 is 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 to feat/qwen4-fp8-ple):
      • ignition/components/ngram_delivery.py: _ple_lookup_planes does not exist anywhere in the repo (search_code returns zero matches); :105-114 and :136-144 still contain the duplicated if / elif / else dispatch with no ValueError validation (see Should Fix #1).
      • tests/components/test_ngram_delivery.py:29-37: Contains only 1 test function parametrized over 3 valid modes (3 test cases total, not 10 passed), with zero invalid mode/plane rejection tests.
      • heliopause/src/export/core.rs:3907-3971: reuse_engram_hardlinks_shared_and_partitioned_embedding_planes is unchanged from main and loops only over NVFP4 and BF16 (for (partitioned, bf16) at :3910); Fp8E4m3Global only appears in core_engram_preserves_shared_and_partitioned_plane_layouts (:4570, :4583, where cache = None).
      • helios/src/core/schema.rs:504-512, 561-571 and helios/src/runtime_core/engram.rs:150-167: Neither the single exhaustive Encoding match in validate_engram nor the consolidated single-plane geometry helper in runtime_core::engram is present.
      • docs/core-design.md: Not among the 10 changed files (:607 still 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.
  2. 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) and flare --release --lib (247 passed) were upgraded to full release-mode lib suites, and helios was 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:
      • helios was still filtered to core:: and runtime_core::, skipping helios::engram::* (runtime table staging/reader/cache) and helios/tests/ integration/legacy-core targets (docs/verification.md:32 (not opened)), and run without --locked.
      • tests/preparation/ (which includes test_core_boundary.py:15 (not opened),18 covering engram/ngram_delivery, test_core_protection.py (not opened), and test_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 (if FLARE_TEST_TEMPLATE_DIR cannot be prepared offline, run the full unfiltered --lib plus 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/.

Should Fix

  1. Unfixed Round-1 defect: Non-exhaustive bare else: and missing None plane/scale validation in ignition/components/ngram_delivery.py:98-115, 132-145:
    • Verified behavior at 02ba762: Because scales and scale are now legitimately torch.Tensor | None (:99-100, :132), both _lookup (:105-114) and PreparedPLELookup.__init__ (:136-144) duplicate an if mode == "bf16" / elif mode == "fp8_e4m3_per_tensor" / else: dispatch where:
      • Any unrecognized quant_mode string silently falls into the two-plane NVFP4 else: branch and crashes with AttributeError: 'NoneType' object has no attribute 'view' whenever scales is None (which is now the normal state for single-plane FP8_E4M3_GLOBAL and BF16 tables).
      • "nvfp4_group16" does not validate scales is not None and scale is not None; "fp8_e4m3_per_tensor" does not reject scale is None or unexpected non-None scales; "bf16" silently drops unexpected scales/scale.
    • Fix: Extract the shared _ple_lookup_planes(mode, weight, scales, scale) helper (already described in the PR summary) called by both PreparedPLELookup.__init__ and _lookup that explicitly handles "nvfp4_group16", "fp8_e4m3_per_tensor", and "bf16", validates plane/scale presence per mode, raises ValueError on unsupported modes or mismatched planes, and add negative test cases in tests/components/test_ngram_delivery.py.

Subtract / Simplify

  1. Match the decoded Encoding enum once in helios/src/core/schema.rs:497-512, 561-571: Replace the three raw table.encoding == ... as i32 comparisons (:506, :561, :567) and duplicated "single-plane engram table cannot carry scale metadata" error return (:505, :508) with a single exhaustive match on decoded wire::engram_table::Encoding.
  2. Consolidate single-plane decode geometry in helios/src/runtime_core/engram.rs:150-167: Factor the shared single-plane width-to-row_bytes conversion between Encoding::Bf16 (* 2) and Encoding::Fp8E4m3Global (* 1) (or share a small helper with schema.rs) while keeping both global_scale guards explicit.
  3. Deduplicate single-plane schema validation test (helios/src/core/schema.rs:2068-2167 vs :1945-2065): Optional cleanup — validates_single_plane_fp8_global_engram_table mirrors bf16_identity_single_plane_engram_validation almost line-for-line and could share a small table-driven helper.

Nits

  1. docs/core-design.md:607 still reads "b12x NVFP4 PLE embedding" (stale since #664's BF16 and now also omitting FP8_E4M3_GLOBAL; already listed in the PR summary once the follow-up commit is pushed).
  2. helios/src/core/schema.rs:565 keeps "BF16 engram row width overflow" while sibling messages (:582, :584, :626, :628) were generalized to "single-plane..." (cosmetic only).
  3. Getting a brief maintainer sign-off (@lukealonso) on the new signed-core enum tag and pinned b12x (1441ce86 in pyproject.toml:47 (not opened)) "fp8_e4m3_per_tensor" vocabulary remains good hygiene (non-blocking).

Dropped on verification