PR #728: heliopause,ignition: enforce export reachability, owned warmup pools, native ForwardCache hashing, and Triton AOT guard contracts

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/284f2ad4-956d-496e-ba0a-0b96ca607730

Opened by a workflow run, Dec 4, 2026 12:31 PM EST. decide malicious: all_clear (100%): No malicious content found

explore

Author: lukealonso (COLLABORATOR; named priority contributor, 51 merged PRs in 180 days; Discord lukealonso) Motivation: Four gaps make Ignition preparation and Heliopause export fail obscurely or produce stale artifacts: export failures print raw addresses with no context, cuBLAS warmup workspaces land in memory the exporter does not own so GB10 exports are rejected, the compiled-forward cache only hashes .py files so native source edits silently reuse stale forwards, and external recipe objects plus non-static Triton results blow up late inside pickle.dumps. Scale: +1571 / −85 in 24 files Proposal:

Full report · Notes

Value Proposition

Value Proposition — PR #728

Charter alignment (mostly yes). All four parts target SM120/SM121 + DGX Spark, the named hardware focus. Two parts reduce special-casing in shared layers: prepared_module_roots() removes the hardcoded ('ignition.', 'b12x.') tuples and derives recipe prefixes from bound source_roots, and hashing moves into Heliopause Rust rather than Python glue — consistent with "smallest footprint in the right place" and "keep the runtime small and model-agnostic". No new flags, aliases, or per-model branches. The description has the required four parts plus a Limitations section. However, the reachability work is explicitly not the rejecting check #266 requested: it prints ~19–22k unresolved values / 762–832 distinct addresses per rank to stderr and never fails an export.

Novelty & status: additive, but packaged wrong. Nothing is obsolete — no merged change reverses it; it sits on #658/#668/#671/#711/#720. Nothing is genuinely superseded either: #332, #606, and #574 are narrower siblings this PR absorbs, yet Closes names only #724. Three contributors' reviewed work (three CHANGES_REQUESTED rounds on #332, two Ready-To-Merge passes on #606, one open blocker on #574) is carried verbatim and none of those PRs is closed — a tension with "Respect contributors". Credit where due: #574's documented objection (ContextVar does not cross SPAWN) is genuinely answered by threading roots through CompilePool.

Value vs cost. #606's owned warmup pool fixes a reproducible GB10 export failure with real evidence; CompilePool root propagation and the guard/non-static-Triton rejections fix real gaps. The .cu/.cpp cache invalidation is plausible but has no issue or measurement behind it — the weak link against "Bring real evidence". Costs are substantial: ~1,571 lines with zero reviews, a one-time recompile of every forward for every user, a widened prepared_module_roots() basename predicate, silent pruning on the non-frozen _load_inductor path, private Triton StaticTritonCompileResult/CompiledKernel dependencies, and collision surface with #642, #597, #678, #710. Also, Closes #724 is not demonstrated on GB10/SM121 (SM120 unit-level evidence only), the .rs hashing claim is false as written (no Rust tree is passed), and the "pre-existing unrelated failure" looks mistaken — that test asserts exactly the stock-3.8.0 behaviour described and is CI-covered. The auxiliary-stream seeding is undocumented.

Required changes: close #332/#606/#574 with authorship preserved (or land as separate PRs); rebase over #678's _EXTRA_ROOTS encapsulation; produce the end-to-end Inkling2 GB10 export or rescope the #724 claim; correct the .rs and "pre-existing failure" statements; explicitly acknowledge the four behaviour changes; document auxiliary seeding; and either make reachability fail-fast or state that it is diagnostic-only.

Verdict: Worth it with changes.

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

Classify intake

Selected: triage:review, bug, enhancement, area:preparation

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +triage:review, +bug, +enhancement, +area:preparation

Gates and contracts

Contracts, Charter & Verification Gates Audit — PR #728 (head 71af7c9)

Scope: only the four hard gates (contract boundaries, vendored/cross-PR dependencies, mandatory verification evidence, material claim contradictions). Algorithm correctness is out of scope for this lens.

Headline: no contract-boundary, wire-format, captured-graph, or vendored-file blockers. Two genuine gate violations: one mandatory-verification gate failure (Layer 1 CPU suite not green on head, per the PR's own report) and one unsupported claim in changed repository prose (.rs cache-invalidation coverage).


Gate 1 — Signed core-format / wire / captured-graph / public contract boundaries: PASS

Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS

Gate 3 — Mandatory verification evidence: FAIL (Major)

Applicability first, so nothing is over-claimed:

Major — the mandatory Layer-1 CPU pytest suite is not green on 71af7c9, and the "pre-existing unrelated" attribution is unsupported. The PR reports tests/preparation/test_runtime_triton.py::test_replaces_stock_architecture_probe_with_pointer_width_key failing on head under Triton 3.8.0. That test is at tests/preparation/test_runtime_triton.py:82-93 and asserts module.platform_key() == "x86_64,Linux,64bit,ELF" for stock Triton with platform.architecture mocked to return ("64bit","ELF"), then "x86_64,Linux,64bit" for the Ignition patched platform_key (ignition/runtime_patches/triton.py:9-14). The behavior the PR attributes to stock 3.8.0 is precisely what the test demands, so the reported failure is most plausibly a real regression in the pinned-stack expectation introduced by a merge the PR sits on (#624 rewrote this test), not a harmless pre-existing red. Either way this is a rule violation: .github/workflows/python-cpu.yml:30-33 (not opened) runs pytest tests/ on every PR, and docs/design-review.md:247-251 is explicit — "Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable." A failing applicable CPU test is strictly worse than an unrun one. Required: either fix the expectation on head or produce the actual failing traceback showing it fails identically on main at the base commit — and note that an unrelated red in the same required suite still blocks acceptance because it makes the Layer-1 result uninterpretable for this PR's 1,431-test claim.

Deliberately not flagged (per calibration): CI check-run state is unobservable with these tools; SM120-only GPU evidence with GB10/SM121, SM103/SM87, TP2 distributed, and multi-host runs disclosed as unexecuted is an honest limitations statement, not a missing-gate violation, since the author ran the targeted CUDA tests (test_capture_cublas_workspace_cuda.py (not opened), test_inductor_tuning_cuda.py (not opened), test_recorded_export_graph_cuda.py (not opened)) and disclosed the gaps.

Gate 4 — Material scope / claim contradictions: FAIL (Major)

Major — the .rs invalidation claim in new repository prose is not implemented. ignition/preparation/source_identity.py:69-76 (new docstring) states that .rs edits "across Ignition, FlashInfer … and every bound external source root invalidate compiled forward caches", and the PR body repeats the .py/.rs/… framing. But forward_source_identity mixes only ignition_root, flashinfer_package, flashinfer data/{include,csrc}, and extra:<label> roots (source_identity.py:89-134). The Rust collector does accept .rs (heliopause/src/export/source_identity.rs:48), yet no Rust tree is ever passed, and ignition/ contains no .rs files — so an edit under helios/src or heliopause/src does not invalidate a compiled forward. _source_identity does hash helios/heliopause (source_identity.py:205-212), but that is the multi-host agreement identity, a different function. docs/design-review.md:158-162 requires rewriting unsupported claims in changed prose; this is a changed docstring making a claim the code does not satisfy. Required: either pass the Rust trees into forward_source_identity, or narrow the docstring and the PR text to .py/.c/.cpp/.cu/.cuh/.h/.hpp for the forward cache.

Info / Nit — one undeclared behavioural widening with a contract flavour (not a gate violation on its own). prepared_module_roots() adds each bound root's directory basename as a prepared-module prefix in addition to its label (ignition/preparation/source_identity.py:36-47), so the "prepared object" predicate used by guard pickling (forward_metadata.py:40-46) and weight-view walking (rebuild_manifest.py:369) now matches any package whose top-level name equals a source-root directory name. This loosens a type predicate rather than crossing a contract boundary; it is worth an explicit acknowledgement in the description, nothing more.

Not flagged: framing of reachability as a diagnostic (design choice already escalated elsewhere, and now documented normatively); docs/TODO.txt bookkeeping (+6 lines recording the required 4-GPU/8-GPU measurement, docs/TODO.txt:377-383) — excluded by calibration; #332/#606/#574 authorship disposition (Charter/respect-contributors item, outside my four gates); overlap with open #642/#597/#678 (informational).


Tooling caveat applied

heliopause/src/export/capture.rs and binding.rs per-file diffs contain large merged-upstream hunks (validate_external_extents, external_extents fields, async-transfer code) that are not in this PR — pr_files records capture.rs +4/−1 and binding.rs +12/−4, and those come from #711/#720 on the stale local base. None of that noise is attributed to this PR or flagged.

Verdict

Both are one-line-to-traceback fixes; neither requires a design change.

Full report

Subtraction and simplicity

Subtraction & Simplicity audit — PR #728

Scope reviewed: all 24 declared files, with full reads of the Python production hunks (source_identity.py, aot.py, inductor_tuning.py, capture.py, core_storage.py, compile_pool.py, forward_metadata.py, rebuild_manifest.py) and the Rust hunks (reachability.rs, binding.rs, capture.rs, source_identity.rs, build.rs). Note on tooling: the local main ref is stale, so pr_diff mixes in already-merged upstream work (seal_low_window, HostVmmRegion/EXTERNAL_FLOOR, _SMALL_INTEGRATED_*, _b12x_forward_env/_atomic_write_file/_save_compiled_function, validate_external_extents, async_transfers — confirmed absent on main in results 24/32). I excluded all of that from the findings below; every citation is real #728 content.

The diff is not lean. Below are the concrete subtractions, ordered by value.


1. Delete _seed_auxiliary_workspaces's duplicate seed body — it re-implements _seed_warmup_workspaces (HIGH)

ignition/preparation/capture.py:53-79 and :82-107 are the same 6-line cuBLAS seed sequence, copy-pasted:

# :74-78  (_seed_warmup_workspaces)
        operand = torch.empty((512, 512), dtype=torch.bfloat16, device=device)
        bias = torch.empty((512,), dtype=torch.bfloat16, device=device)
        out = torch.empty_like(operand)
        torch.mm(operand, operand, out=out)
        torch.addmm(bias, operand, operand, out=out)
# :100-106 (_seed_auxiliary_workspaces)
        operand = torch.empty((512, 512), dtype=torch.bfloat16, device=device)
        bias = torch.empty((512,), dtype=torch.bfloat16, device=device)
        out = torch.empty_like(operand)
        torch.mm(operand, operand, out=out)
        torch.addmm(bias, operand, operand, out=out)
        batched = operand.view(1, 512, 512)
        torch.bmm(batched, batched, out=out.view(1, 512, 512))

The only differences are the stream and the bmm. One helper serves both:

def _seed_blas_workspaces(stream, device, pool=None, *, batched=False):
    ...  # existing body, with `if batched: torch.bmm(...)` appended

with _seed_warmup_workspaces reduced to a thin alias, or better, call _seed_warmup_workspaces(aux, device, pool=graph_pool) from the auxiliary path and drive batched from a parameter. That removes ~20 lines and, more importantly, removes the drift hazard: the sizes (512), dtypes and op list must now be kept in sync by hand in two places.

2. _seed_warmup_workspaces's new pool=None default creates an unreachable-in-export branch that exists only for a test (HIGH)

ignition/preparation/core_storage.py:309-318 adds CoreStorage.warmup_pool(). ignition/preparation/capture.py:151-157 then does:

    warmup_pool = warmup_storage.warmup_pool() if hasattr(warmup_storage, "warmup_pool") else None
    if warmup_pool is not None:
        _seed_warmup_workspaces(warm, device, warmup_pool)
    else:
        # Keep the 2-argument call for non-export callers and existing test stubs.
        _seed_warmup_workspaces(warm, device)

Three branches (hasattr, is not None, else) to express "pass a pool if the storage has one". The else comment states its own justification: existing test stubs. Note the fallback also doesn't work as intended — the four test doubles monkeypatch _seed_warmup_workspaces with a 2-argument lambda (tests/preparation/test_capture_graph_metadata.py:185 (not opened),342, test_capture_roce_wait.py:43 (not opened), test_capture_stream_isolation.py:44: lambda stream, device: None), so the 3-argument call at :153 raises TypeError whenever warmup_storage is a real CoreStorage in those tests. The compatibility branch is dead for the stubs it claims to serve.

Simplification: make the pool a required argument on _seed_warmup_workspaces, have capture_forwards do pool = warmup_storage.warmup_pool() if warmup_storage is not None else _module_pool(device), and update the four stub lambdas to *_. Deletes hasattr probing, the None re-fetch at :70, and the misleading comment.

3. _seed_warmup_workspaces's module-level fallback is now double-keyed and does nothing new (MEDIUM)

capture.py:67-72 inside an existing with torch.cuda.device(device)::

        index = torch.cuda.current_device()
        if pool is None:
            pool = _warmup_pools.get(index)
            if pool is None:
                pool = _warmup_pools[index] = torch.cuda.MemPool()

This is exactly the pre-PR two-line _warmup_pools.get / setdefault behaviour re-wrapped in a redundant if pool is None: guard on an already-None pool. _warmup_pools is not reset by anything in production; warmup_storage.warmup_pool() memoizes in _warmup_pool (core_storage.py:313-317). So the module dict is now a third memoization tier for a path only non-export callers take. Collapse to:

        if pool is None:
            pool = _warmup_pools.setdefault(index, torch.cuda.MemPool())

4. prepared_module_roots() is a second, divergent source-root enumerator; it should read _EXTRA_ROOTS once (MEDIUM-HIGH)

ignition/preparation/source_identity.py:31-58 invents a fresh prefix list including a basename rule:

        resolved_name = Path(path).name
        if resolved_name and resolved_name != label:
            candidates.append(resolved_name)

This is speculative generality with real cost: it widens "this module's state must be stripped" to any package whose directory happens to be named the same as a bound root (source_identity.py:37-39), it must re-validate identifiers (:43), it re-walks _EXTRA_ROOTS on every is_prepared_object_module() call — which is the hot path in _GuardPickler.reducer_override (aot.py:225) and rebuild_manifest.weight_views' recursive walk (rebuild_manifest.py:369) — and it duplicates the root-normalization already done in source_roots() (:23) and again in forward_source_identity (:127-130) and a fourth time in source_identity (:154). Nothing in the diff demonstrates a case where the label differs from the basename in a way the basename covers. Delete the basename branch and cache the tuple; four call sites then share one normalized root form instead of three slightly different ones.

5. _prune_static_compile_results has four exits and a require_single axis that is never used in the "many" mode productively (MEDIUM)

ignition/preparation/inductor_tuning.py:21-57. Call-site census (result 23/37): require_single=True at :71 (_selected), :108 (_snapshot), :366 via _sanitize_static_bundle(frozen=True), aot.py:128 via frozen=True; require_single=False only from aot.py:128 with frozen=frozen on the non-frozen peer-load path. So the function must express "return one" and "return many, pruning silently". That produces the awkward intermediate re-binding of both tuner.compile_results and the local results at :37-39, and a RuntimeError/TypeError split (:41 vs :53) that reports the same underlying condition (unusable compile results) under two classes with two message shapes.

Simplification: split into two named predicates — _static_results(tuner) (pure: prune-to-launcher + partition, no exceptions) and then:

Additionally, _sanitize_static_bundle (:60-65) is a two-line loop with an if bundle is None guard whose only effect for frozen=True is to raise; for frozen=False it mutates. Both callers already know which they are. Inlining it removes a helper and a parameter that encodes the caller's identity.

6. ForwardCache.__init__'s exclusion-splitting is a hand-rolled partition of two constants (MEDIUM)

ignition/preparation/aot.py:905-910:

        excluded_dirs = [ignition_root / entry for entry in _COMMAND_SOURCES if not entry.endswith('.py')]
        excluded_files = [
            ignition_root / '__main__.py (not opened)',
            *(ignition_root / entry for entry in _COMMAND_SOURCES if entry.endswith('.py')),
            *(ignition_root / entry for entry in _PUBLICATION_SOURCES),
        ]

Two constants (aot.py:793,795) that already encode file-vs-directory by whether the name ends in .py, re-partitioned with an endswith('.py') test repeated twice, plus '__main__.py (not opened)' spliced in by literal. Because export_source_identity now takes both lists and concatenates them into one excluded vec anyway (heliopause/src/export/binding.rs:1154-1159: excluded.extend(files); source_identity.rs:43 tests one flat list), the split has no meaning at either end. Replace all three with one flat _CACHE_EXCLUDED_SOURCES = ('__main__.py (not opened)', 'cli', 'direct', 'errors.py (not opened)', 'planning.py (not opened)', 'progress.py (not opened)', 'preparation/model_core.py (not opened)', 'preparation/core_file.py (not opened)', 'preparation/protection.py (not opened)') and pass a single excluded_paths= argument — deleting the .py-sniffing, the second list, and the excluded_files parameter from the pyfunction signature.

7. unresolved_report's two-phase example selection is far more machinery than the stated goal (MEDIUM)

heliopause/src/export/reachability.rs:246-320. The requirement is "up to 10 examples, prefer distinct symbols". The implementation allocates examples: Vec<&(u64, UnresolvedEntry)>, chosen: vec![false; n], then a HashSet keyed by a hand-rolled Result<&str, usize> (:288-294):

            let symbol_key = functions
                .get(entry.first.function)
                .map_or(Err(entry.first.function), |function| {
                    Ok(function.symbol.as_str())
                });

then a second backfill pass over chosen, then selected.sort_unstable(), then a shown_occurrences accumulator justified only by the trailing "not shown" line. UNRESOLVED_EXAMPLES = 10 is a const used once. Since entries are already ordered by order (the encounter index) and unresolved is a HashMap<u64, _>, a BTreeMap<usize, (u64, &Entry)> keyed by order — or simply recording candidates in a Vec at insert time and keeping the HashMap only for occurrence counting — removes the sort, the chosen bitmap, and the order field entirely. This is the largest single block of removable Rust in the PR (~40 lines of selection logic → ~12) and it is pure diagnostic formatting, not correctness.

Related: unresolved_count() and unresolved_unique_addresses() (:230-239) are two public methods whose bodies are sum() and len(), called from exactly one production site (:248,258) plus tests. Inline them.

8. Site/Source plumbing threads a 4-field borrow into every scan for diagnostics only (LOW-MEDIUM)

reachability.rs:56-72 adds Site<'a>, and blob()/scan() gain a site/misses parameter pair threaded through three call sites (:205, :378, :443). scan()'s signature becomes:

    fn scan(&mut self, data: &[u8], base: usize, mut misses: Option<&mut Vec<(usize, u64)>>)

where every non-kernel caller passes None (:443, :447). And blob() re-keys its memo HashSet into a HashMap<(Vec<u8>, Vec<(usize, usize)>), Vec<(usize, u64)>> (:85) so cached misses can be replayed at a new Site (:207-210) — i.e. the memo now returns positions in a blob which are then re-attributed. That's inherent to the feature, but Option<&mut Vec<...>> plus as_deref_mut() plus base + offset alignment is the most convoluted way to express it. A two-method split (scan_pointers for the reference-retaining path; scan_misses for the kernel path) would remove the Option and the base parameter from half the calls and let the alignment filter live in one place.

9. Dead/low-value knobs and duplicates elsewhere


What is genuinely lean (no action)

Bottom line

Highest-value deletions, in order: (1) fold the duplicated cuBLAS seed body into one helper; (2) delete the hasattr/None/else triple and the pool=None compatibility default in _seed_warmup_workspaces (the test doubles it protects would raise TypeError anyway); (4) drop the source-root basename rule and re-derivation in prepared_module_roots(); (5) collapse _prune_static_compile_results' four exits and inline _sanitize_static_bundle; (6) replace the split excluded_directories/excluded_files partition with one flat list end-to-end; (7) replace unresolved_report's bitmap+sort+HashSet selection with an order-keyed Vec/BTreeMap. Together these remove roughly 120–160 lines and, more importantly, remove four places where the same fact (which files count as sources; which ops seed the workspace) is now stated twice and must be kept in sync by hand.

Full report

Code correctness

Deep Correctness, Invariants & Hot-Path Performance Audit — PR #728 @ 71af7c9

Scope partitioned (24 files, ~1,600 changed lines, 2 subsystems) into two disjoint slices audited concurrently in Turn 1: (A) heliopause/ Rust (reachability.rs, binding.rs, capture.rs, source_identity.rs, build.rs), (B) ignition/preparation/ Python (aot.py, capture.py, source_identity.py, inductor_tuning.py, compile_pool.py, core_storage.py, forward_metadata.py, rebuild_manifest.py) plus the 8 changed test files. I independently re-read every diff site and callee behind each reported claim (citations below are from my own reads; two sub-agent claims that did not survive my verification are listed at the end as rejected).

Verdict: 2 Major + 3 Minor verified defects. The largest change, reachability.rs (+738), is clean.


FINDING 1 — Major: forward_source_identity silently hashes no FlashInfer native sources for a legitimate install layout, silently re-opening the stale-cache bug the PR set out to fix

Diff site: ignition/preparation/source_identity.py:104-125. Divergent sibling callee (same file): source_identity.py:188-192.

104      if data.exists():
105          for name in ("include", "csrc"):
106              native = (data / name).resolve()
107              if not native.is_dir():
108                  raise RuntimeError(
109                      f"FlashInfer native source directory is unavailable: {data / name}; "
110                      "install the selected FlashInfer package before preparation"
111                  )
...
116      elif (flashinfer_package.parent / "include").is_dir() and (
117          flashinfer_package.parent / "csrc"
118      ).is_dir():
119          for name in ("include", "csrc"):

The if/elif has no else. If neither the data/{include,csrc} layout nor the both-siblings-present layout matches — i.e. no data/ directory at all, or a data/ dir that exists but lacks include/csrc, or a parent layout with only one of the two — control falls straight through to return digest.hexdigest() at :136 with zero native FlashInfer bytes mixed in and no error. The sibling function that must agree on FlashInfer identity, source_identity() (used for rebuild metadata), raises loudly for the identical condition (source_identity.py:188-192: if !source.is_dir(): raise RuntimeError(...)).

Concrete counterexample: FlashInfer installed at site-packages/flashinfer/ with no data/ subdirectory (a valid layout for older/source-tree installs), and a site-packages/include, site-packages/csrc pair where only include exists. Edit include/flashinfer/attention.cuh. ForwardCache.__init__ (aot.py:905-919) computes an identical self.root before and after the edit, so _restore → _load finds and restores the stale compiled forward — the exact Python-only ForwardCache hashing gap the PR description claims to close, merely relocated to a different install layout. Note the elif is also all-or-nothing: the include-only case skips include too, even though it is present and hashable.

Fix: resolve the native trees up front and fail loudly, mirroring _source_identity:

for name in ("include", "csrc"):
    native = (data / name)
    if not native.is_dir():
        native = flashinfer_package.parent / name
    if not native.is_dir():
        raise RuntimeError(
            f"FlashInfer native source directory is unavailable: {data / name}; "
            "install the selected FlashInfer package before preparation")
    mix_hex(f"flashinfer.{name}", flare_heliopause.export_source_identity([native.resolve()]))

FINDING 2 — Major: async_transfer.alignment is validated twice with contradictory upper bounds, so the same manifest's validity flips on an orthogonal request field, and the permissive path defers a real misalignment failure to load time

Diff sites: heliopause/src/export/capture.rs:2932-2944 (new validate_external_extents) vs heliopause/src/export/binding.rs:629-637 (new async_transfers block in execution()).

// capture.rs:2906-2907
    let container_align = helios_core::core::container::ALIGNMENT;      // == 4096
    let min_align = u64::from(helios_core::async_transfer::MIN_ALIGNMENT); // == 4096
// capture.rs:2932-2944
        let align = u64::from(channel.alignment);
        if align < min_align || !align.is_power_of_two() { return Err(...); }
        if align > container_align {
            return Err(invalid(format!(
                "external_extents channel {:?} alignment {align} exceeds core container alignment {container_align}",
// binding.rs:630-637
                if alignment < 4096 || alignment > u32::MAX as u64 || !alignment.is_power_of_two() {
                    return Err(super::invalid(
                        "async transfer alignment must be a power of two >= 4096",
                    ));
                }

Guard-domain resolution (protocol §1): container_align == min_align == 4096, so capture.rs:2933-2944 together admit exactly one value, 4096. binding.rs:633 admits every power of two in [4096, 2³²).

Concrete counterexample — proven from the read code: validate_external_extents is driven by for ext in external_extents (capture.rs:2909), so with request.external_extents == [] it validates nothing. Manifest {"async_transfers":[{"name":"experts","alignment":8192, ...}]}:

A field with no causal relationship to alignment (external_extents) flips the verdict. In the permissive branch the exported core carries alignment: 8192 while the payload container base is only guaranteed 4096-aligned (container.rs:39 (not opened)), so the load-time absolute-offset alignment check in decode_extent_directory (ring.rs:529-536, if (abs_offset & align_mask) != 0 { return Err(...) }) can reject at load a core that export declared valid — precisely the "export accepts, runtime rejects" class this PR targets.

Fix: apply the bound unconditionally where the channel is first validated, at binding.rs:633 (alignment != helios_core::core::container::ALIGNMENT → error, or thread the real payload base alignment through), keeping validate_external_extents as the second line of defence. Better: replace both hand-derived predicate sets with a single call to helios_core::async_transfer::validate_control_layout / a shared validate_channel_alignment so the two sites cannot drift.


FINDING 3 — Minor: export accepts completion_slots == u32::MAX, which the loader's validate_control_layout always rejects

Diff site: heliopause/src/export/binding.rs:620-628. Callee: helios/src/async_transfer/ring.rs:293-295 with NO_COMPLETION_SLOT = u32::MAX at ring.rs:27.

                if completion_slots == 0 || completion_slots > u32::MAX as u64 {
                    return Err(super::invalid(
                        "async transfer completion_slots must be a positive uint32",
                    ));
                }
// ring.rs:293-295
    if completion_slots == 0 || completion_slots == NO_COMPLETION_SLOT { return false; }

4294967295 passes the export guard (> u32::MAX as u64 is false) and is then rejected at load. Fix: add || completion_slots == u64::from(helios_core::async_transfer::NO_COMPLETION_SLOT), or delegate to validate_control_layout (which also subsumes Finding 2).


FINDING 4 — Minor: append_planes now silently accepts "weights": null / "scales": null, which previously failed export

Diff site: heliopause/src/export/binding.rs:886-891.

    for name in ["weights", "scales"] {
        if let Some(parts) = value.get_mut(name) {
            if parts.is_null() {
                continue;
            }
            let sources: Vec<super::FileSource> = serde_json::from_value(parts.clone())?;

Order-of-operations trace (protocol §2): the continue fires before the plane rewrite *parts = serde_json::json!({"offset":start,"nbytes":*cursor-start}) at binding.rs:915, so a null plane is neither rejected nor rewritten — it survives verbatim into message("Engram", &data) where prost-reflect treats null as unset. Previously serde_json::from_value::<Vec<FileSource>>(Value::Null) errored, so {"tables":[{"weights": null, "scales": null}]} was a hard failure and is now silently accepted into an engram table with absent weight/scales descriptors. Silent acceptance of previously-rejected input, no diagnostic. Fix: if let Some(parts) = value.get_mut(name).filter(|v| !v.is_null()), or emit a zero-length {offset, nbytes: 0} descriptor so downstream shape is unchanged.


FINDING 5 — Minor: the absolute-offset alignment assertion in validate_external_extents is unsatisfiable (dead validation) and its explanatory comment is false

Diff site: heliopause/src/export/capture.rs:2973-2980. Callee: helios/src/async_transfer/ring.rs:321-324 and :529-536.

2973              // Payload containers guarantee `container::ALIGNMENT` (4 KiB) base alignment;
2974              // validating at `container_align` exercises the real nonzero container offset.
2975              resolved_segments.push((seg_idx as u32, container_align, len));

From Finding 2, align == container_align == 4096 is forced by :2933-2944; validate_extent_entry forces each relative entry offset to a multiple of align = 4096; and the fabricated base is the constant container_align = 4096. Hence abs_offset = 4096 + k*4096 = (k+1)*4096, so abs_offset & 0xFFF == 0 for every k: the abs_offset branch of decode_extent_directory (ring.rs:529-536) can never trigger. Because the base is fabricated rather than read from the real payload plan, the check cannot detect the load-time misalignment it was written to catch (Finding 2 is exactly the case it misses). Fix: thread the actual segment base offset from the payload planner into resolved_segments, or delete the fabricated base and state that only relative entry alignment is validated.


Verified-clean (explicit negative results, so these need no re-audit)

Hot-path performance

No regression found. The only newly-hot code is warmup_storage.seal_low_window() called once per exported graph name (capture.py:266-267), which is O(names × span_count) with an early skip of already-reserved spans (core_storage.py:180-184); it is not dead — the first capture legitimately reopens the low window — and it runs N times by design during a cold export, not per served token. ForwardCache.__init__'s Rust tree hash runs once per export per rank, not per forward. unresolved_report is a cold-path diagnostic. _b12x_forward_env adds ~14 constant names to the key.

Full report Merge Risk: medium_high (100%): Medium or high merge risk (core runtime/scheduler/GPU/CUDA/VMM/RoCE/multi-rank/contracts/ABI, large multi-crate changes, or Blocker/Major findings) — route to Super Agent.

Final review

Recommendation: Changes Requested

PR #728 is technically sound across its four subsystems — Heliopause reachability diagnostics (reachability.rs), CoreStorage.warmup_pool() + auxiliary overlap stream seeding (core_storage.py, capture.py), Rust-backed ForwardCache source hashing (source_identity.{rs,py}, aot.py), and bound source_roots propagation plus static-only Triton AOT guard contracts (compile_pool.py, inductor_tuning.py, aot.py) — with zero verified blockers. One real error-handling gap warrants fixing before merge: forward_source_identity (ignition/preparation/source_identity.py:104-125) silently hashes zero FlashInfer native sources instead of raising RuntimeError when data/ is absent and sibling {include,csrc} directories are not both present, diverging from _source_identity in the same file.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Fail loudly in forward_source_identity when FlashInfer native source directories are missing (ignition/preparation/source_identity.py:104-125).
    • Verified behavior: forward_source_identity checks if data.exists(): (raising RuntimeError if data/include or data/csrc is missing) and elif (flashinfer_package.parent / "include").is_dir() and (flashinfer_package.parent / "csrc").is_dir():, with no else branch. If data/ does not exist and either sibling directory (include or csrc) is missing (or both are absent), execution falls through to return digest.hexdigest() at :136 with zero FlashInfer native sources hashed and no error. This silently reopens the stale-ForwardCache hazard on partial or non-standard FlashInfer installs and diverges from sibling _source_identity (source_identity.py:187-192), which unconditionally raises RuntimeError("FlashInfer native source directory is unavailable: ...").
    • Concrete fix: Resolve each native directory up front (data / name, falling back to flashinfer_package.parent / name when not data.exists()) and raise RuntimeError if either include or csrc is not a directory, matching _source_identity:
      for name in ("include", "csrc"):
          native = (data / name if data.exists() else flashinfer_package.parent / name).resolve()
          if not native.is_dir():
              raise RuntimeError(
                  f"FlashInfer native source directory is unavailable: {data / name}; "
                  "install the selected FlashInfer package before preparation"
              )
          mix_hex(f"flashinfer.{name}", flare_heliopause.export_source_identity([native]))
      
      Add a negative unit test in tests/preparation/test_forward_cache_sources.py covering a missing data/ + missing native tree.

Subtract / Simplify

  1. Deduplicate cuBLAS workspace seeding between _seed_warmup_workspaces and _seed_auxiliary_workspaces (ignition/preparation/capture.py:73-79, 99-107). Both construct identical (512, 512) bfloat16 operand/out and (512,) bias tensors and run torch.mm + torch.addmm, differing only in stream, pool context, and the extra torch.bmm. Extract one helper _seed_blas_workspaces(stream, device, pool, *, batched=False) so the seeded op list and shapes stay in one place.
  2. Pass a single excluded_paths list instead of splitting excluded_directories and excluded_files (ignition/preparation/aot.py:905-916, ignition/preparation/source_identity.py:65-66,93-94, heliopause/src/export/binding.rs:1149-1168, heliopause/src/export/source_identity.rs:73-75). binding.rs:1157-1160 immediately concatenates both vectors into one excluded Vec<PathBuf> and collect() checks exact PathBuf equality for both directories (:20) and files (:43). Accepting a single flat exclusion list removes the .endswith('.py') partition in ForwardCache.__init__, drops an unnecessary PyO3 keyword argument, and removes the if excluded.is_empty() wrapper branch in binding.rs.
  3. Collapse the redundant None check in _seed_warmup_workspaces (ignition/preparation/capture.py:69-72) and group the CompiledKernel import (ignition/preparation/aot.py:187,223). Replace the nested if pool is None dict lookup with pool = _warmup_pools.setdefault(index, torch.cuda.MemPool()), and group from triton.compiler import CompiledKernel with from triton.runtime import JITFunction at :187 (or module level).
  4. Simplify unresolved_report example selection (heliopause/src/export/reachability.rs:230-292). unresolved_count() and unresolved_unique_addresses() are single-line helpers used only in unresolved_report (and tests), and tracking insertion order alongside unresolved avoids sorting all entries by order, maintaining a parallel chosen: Vec<bool>, and re-sorting selected.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: no (96%): 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.