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:
Reachability::unresolved_reportplus per-rank stderr diagnostics naming graph, kernel, argument-relative 8-byte-aligned offset and candidates (non-blocking).CoreStorage.warmup_pool()owns warmup cuBLAS workspaces; new_seed_auxiliary_workspacesseedsmm/addmm/bmmin the graph pool..cpp/.hppadded to the native source collector plus anexcluded_filesargument;ForwardCache.__init__now keys offforward_source_identity()instead ofrglob('*.py').prepared_module_roots()/is_prepared_object_module()derive recipe prefixes from boundsource_roots, replacing hardcoded('ignition.', 'b12x.');CompilePoolworkers inherit bound roots.- Non-static
TritonCompileResultpruned or rejected beforedeepcopy/pickle.dumps;_GuardPicklerraisesTypeErroron a guardedtriton.compiler.CompiledKernel. Touches: heliopause/src/export/reachability.rs(+738/−27, largest and most behaviourally subtle)ignition/preparation/{aot.py,source_identity.py,inductor_tuning.py,compile_pool.py}(cache key + AOT serialization)ignition/preparation/{capture.py,core_storage.py}(CUDA memory ownership during export) Related items:- #332 Report unresolved kernel argument address candidates during export (open): the reachability third, carried verbatim, same 4 files and counts; 3 rounds of CHANGES_REQUESTED by yatesdr; not closed
- #606 fix(ignition): seed warmup workspaces inside export storage pool (open): carried verbatim, Autobot "Ready To Merge", same 5 files and counts, not closed
- #574 Strip unguarded attributes from hyperflare_recipes objects in AOT guard serialization (open): generalized here; 1 Autobot blocker; verified on GB10 TP4 which #728 does not reproduce
- #724 failed to export inkling-2-mini on GB10 (open): the only item in
Closes; failure is warmupKernelMetadatapickling, no GB10 run offered - #642 / #678 / #597 (open): same
inductor_tuningfreeze region, the_EXTRA_ROOTSencapsulation #728 pre-empts, and Inductor winner keying Link: https://github.com/NVIDIA/hyperflare-inference/pull/728 Autobot comments: Three of four parts are other contributors' open PRs (disclosed in the body) with none inCloses, so #332/#606/#574 need closing by hand.Closes #724rests on SM120 unit evidence only, on hardware/model not run. Description overstates hashing scope:forward_source_identitypasses no Rust tree, sohelios/src/heliopause/srcedits still do not invalidate a forward. Undeclared:aot._load_inductornow sanitizes non-frozen bundles; auxiliary-stream seeding has no docs statement despite the body implying it; the reshaped cache key forces a one-time full recompile of all forwards. The "1 pre-existing failure" intest_runtime_triton.pylooks mistaken — that test asserts exactly the stock Triton 3.8.0 behaviour claimed to fail. PR inspection caveat: the localmainis far behind the base, so per-file diffs mix in merged upstream work;pr_filesis the only trustworthy change list. Zero reviews, zero comments, CI pending.
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
- [✓]
triage:review: 95.3% -
triage:validation: 2.9% -
triage:design-review: 1.5% -
triage:investigate: 0.1% -
triage:partial: 0.1% -
triage:integration: 0.1% -
none: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Priority
-
priority:P2: 52.9% -
none: 25.0% -
priority:P1: 22.1%
Type
- [✓]
bug: 67.9% - [✓]
enhancement: 67.9% -
performance: 62.2% -
duplicate: 50.0% -
community: 32.1% -
documentation: 0.2%
Area
- [✓]
area:preparation: 98.2% -
area:caching: 43.8% -
area:memory: 43.8% -
area:packaging: 11.9% -
area:api: 2.6% -
area:kernels: 1.8% -
area:scheduling: 0.9% -
area:orbit: 0.6% -
area:rocenante: 0.2% -
area:engram: 0.2% -
area:selene: 0.1%
Model
-
model:inkling-small: 46.9% -
model:deepseek-v4: 2.9% -
model:deepseek-v4.1: 2.3% -
model:qwen3.8-flash-next: 1.8% -
model:glm-5.3: 1.2% -
model:qwen3.8-27b: 0.9% -
model:nemotron-3.5-bolt: 0.6% -
model:gemma4: 0.5% -
model:kimi-k3.1: 0.4% -
model:muse-glimmer: 0.4% -
model:mimo-v2.6: 0.4%
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
- No proto, wire-kind, enum, or captured-graph operation changes.
helios/proto/core.proto(not opened),helios/proto/runtime_core.proto(not opened),helios/src/core/*, andhelios/src/runtime_core/*are absent frompr_files. The 24-file declared change set contains nowire::addition, no new graph kind, and no new operation contract.docs/design-review.md:22-26therefore requires no owner approval here. - Normative docs updated, not contradicted. The reachability diagnostic is added to
docs/runtime-core-design.md:163-171(argument-relative 8-byte-aligned unresolved values reported per rank on stderr, non-blocking) and:360-372(native stderr rows). The warmup-pool ownership statement is added todocs/preparation-development.md:88-98. No shipped default, capacity enumeration, or scheduling/admission invariant fromdocs/scheduling-theory.md(not opened) /scheduling-runtime-design.md(not opened) /core-format-design.md(not opened) is contradicted. - No hardcoded batch-capacity / graph-shape list added in Helios or direct-execution policy (principle 1,
docs/design-review.md:27-35). - No per-model branch or allowlist added. The change removes two hardcoded tuples (
ignition/preparation/forward_metadata.py:40-46,ignition/preparation/rebuild_manifest.py:341-371) in favour ofprepared_module_roots()/is_prepared_object_module()derived from boundsource_roots(ignition/preparation/source_identity.py:31-58), consistent withdocs/design-review.md:56-61. - Compatibility: existing cores continue to load. No core-format version, protobuf default, or execution-ABI gate is touched. The
ForwardCachekey change (ignition/preparation/aot.py:899-918) invalidates compiled-forward cache directories, not exported cores, so principle 13 (docs/design-review.md:116-123) is not engaged.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored upstream file is forked.
helios/native/roce_proxy.c(not opened),helios/native/roce_proxy_dlopen.c(not opened), andselene/native/kv_codec/cpu.cpp(not opened) are untouched. - No new external dependency is introduced.
pyproject.toml:47keeps the FlashInfer pin at1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e; the PR adds no[tool.uv.sources]entry and no version bump. - Info (not a violation): the PR names unmerged co-fixes in other repositories —
local-inference-lab/flashinfer#224,hyperflare-recipes#163/#151,hyperflare-jetson-recipes#7— as necessary forCloses #724and for hashing jetsoncsrc/after install. Because the FlashInfer pin is unchanged,Closes #724is not reproducible from this repository alone. Gate 2 asks "without a pin or link"; all three are linked, so this is a disclosure/merge-order matter, not a gate breach.
Gate 3 — Mandatory verification evidence: FAIL (Major)
Applicability first, so nothing is over-claimed:
- The declared diff touches preparation-side CUDA storage ownership (
ignition/preparation/core_storage.py:309-318,ignition/preparation/capture.py:82-107,151-160) and Heliopause export serialization/hashing. It does not touch Helios admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering, offload aggregation, readiness, or rank coordination. Soverification/helios-lifecycle/check.py(not opened), Kani, and the scheduling simulator are not triggered (docs/design-review.md:195-230). - No performance/speedup claim is made, so no
main-vs-branch served-workload A/B is required (AGENTS.md:502-508). - Layer 1 for Heliopause is satisfied as reported:
cargo test --locked --release --manifest-path heliopause/Cargo.toml (not opened) --lib→ 250 passed, and.github/workflows/python-cpu.yml:34-41(not opened) runs exactly that in CI.
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
- Gate 1: PASS (no core-format, wire, protobuf, or captured-graph contract change; normative docs updated).
- Gate 2: PASS (no vendored fork, no new unpinned dependency; co-fix PRs linked though unpinned).
- Gate 3: FAIL — mandatory
pytest tests/Layer-1 suite is reported red on head, and disclosure does not excuse a failing applicable CPU check (docs/design-review.md:247-251). - Gate 4: FAIL — new docstring/PR claim that
.rsedits invalidateForwardCacheis contradicted byforward_source_identity's actual root set.
Both are one-line-to-traceback fixes; neither requires a design change.
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:
_selected/_snapshot/freeze:result, = _static_results(tuner) or raise_load_inductornon-frozen: drop the mutation entirely and just assert.
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
heliopause/src/export/binding.rs:1146-1168:excluded_directoriesandexcluded_filesare concatenated unconditionally. Keeping two parameters on the#[pyfunction]signature buys nothing (see #6). Oneexcluded=parameter.heliopause/src/export/source_identity.rs:73-75:source_identity(roots)is now a one-line wrapper oversource_identity_excluding(roots, &[])whose only caller isbinding.rs:1160'sif excluded.is_empty()branch — a branch that also only exists to preserve the wrapper. Delete both, always callsource_identity_excluding.ignition/preparation/compile_pool.py:180:extra_roots = tuple((label, str(root)) for label, root in _EXTRA_ROOTS.get())— thestr()round-trip exists only becausesource_roots()(source_identity.py:23) doesPath(path)on the way back in. Pickle thePaths (they pickle fine) and drop both conversions.ignition/preparation/aot.py:925-928: theCompiledKernelcheck is placed after animportinside the hotreducer_override(from triton.compiler import CompiledKernelon every reduce) whileJITFunctionabove it is a module-level import used the same way. Hoist the import; theisinstancecheck then costs nothing.
What is genuinely lean (no action)
forward_metadata.py:40-44andrebuild_manifest.py:369: the two('ignition.', 'b12x.')tuples are deleted and replaced by one predicate. This is the PR's best subtraction — net −2 hardcoded package-name lists, and it lets_BASE_PREPARED_MODULE_ROOTS(source_identity.py:17) be the single source of truth.aot.py:284-287,:876-879,:1184-1187: three copies of theNamedTemporaryFile/os.replace/unlinkidiom collapsed into_atomic_write_file, andsave_compiled_functioncallers (:1318, :1461, :1470) onto_save_compiled_function. Genuine dedup (though, per the tooling caveat, that helper came from #668, not this PR).core_storage.py:309-318warmup_pool(): 10 lines, mirrors the existingtorch.cuda.MemPool(...)+_preparation_pools.add(...)pattern at:286-291and:305-306exactly. Correctly placed; no wrapper is needed beyond it.
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.
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, ...}]}:
external_extents == []→ onlybinding.rs:633runs → 8192 accepted, written intooutput.index.ranks[0].execution.external_extents == [{"channel":"experts", ...}]→ the same alignment is rejected with "alignment 8192 exceeds core container alignment 4096".
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)
heliopause/src/export/reachability.rs(+738) — no defect found. Hand-traced every new construct:pointer()→candidate()(:162-179) preserves the exactreference()and inactive-shadows-live ordering of the oldreturn Ok(());blob()caching (:205-228) is keyed on(data, numeric)whose miss set is a pure function of immutableReachability::newstate, and the insert moved after the successful scan so a failed scan no longer poisons the cache (a fix vs. the old insert-before-scan);record_unresolved(:181-203) makesorderunique so thesort_unstable_by_keyat:264is total and deterministic despite theHashMap;unresolved_report(:246-324) keepsselected.len() == UNRESOLVED_EXAMPLES.min(examples.len())and never double-counts occurrences, sooccurrences - shown_occurrencescannot underflow;(base + offset).is_multiple_of(8)(:343) is correctly argument-relative, which is what makes an unaligned numeric prefix still report a genuinely 8-aligned pointer;subtract_ranges/merge_rangespreconditions hold (excludedsorted viamerge_ranges, which dropsstart >= end); boundary semantics are end-exclusive and verified against the existing kernel-argument-boundary test. Cold path only (single caller, post-graph-loop) — O(U log U), no allocations×args×buffers nesting, so no hot-path regression. All new tests recomputed by hand and consistent; none vacuous or failing.ForwardCache.__init__hashing rewrite (aot.py:905-919) — the suspected Blocker does NOT hold. The old exclusion semantics are preserved exactly:_COMMAND_SOURCES/_PUBLICATION_SOURCESsplit cleanly into real directories (ignition/cli,ignition/direct) and real files (six plus__main__.py(not opened)), and the Rust side applies exact-PathBufequality to both files (source_identity.rs:42-43) and directories (:19-22), so passing files is meaningful and no exclusion silently no-ops. I explicitly rejected the sub-agent's contrary claim that this breaks on relative/absolute paths:forward_source_identityresolves bothignition_root(:79) and every excluded path (:93-94) before calling Rust, and Rust'sread_diryields paths rooted at that same resolved root, so==matches. The only behavioural change is a superset (.rs/.c/.cpp/.cu/.cuh/.h/.hpp, FlashInferdata/{include,csrc}, bound extra roots) — intended by the PR._seed_warmup_workspacespool threading (capture.py:53-79) — the nestedif pool is None: pool = _warmup_pools.get(index)only rebinds when the caller passed nothing, so aCoreStorage.warmup_pool()is used and_warmup_poolsstays empty; the 2-argument fallback and thehasattr(warmup_storage, "warmup_pool")gate (:151-157) are both correct forwarmup_storage is None.CoreStorage.warmup_pool()retains theMemPoolonself, so exitinguse_mem_pooldoes not release the cached workspace._warmup_streamcontext ordering is unchanged._loadcorrupt-artifact path (aot.py:1366-1390) — safe:if required: raiseprecedes the warn+unlink, so required loads (the peer-transfer_load(..., required=True)and the post-save reload) never delete a file;_atomic_write_filepublishes viaos.replaceso no reader sees a partial file; a correct peer's file cannot be damaged because only a rank that itself failed to parse it unlinks. Worst case is redundant recompiles, not corruption._atomic_write_file/_save_compiled_function(aot.py:87-109) — handle closed beforeos.replace/ before the callee reopens the path; thefinally: temporary.unlink(missing_ok=True)preserves the target if the writer raises. No double-close, no leak, no*.tmpresidue._prune_static_compile_results/_sanitize_static_bundle(inductor_tuning.py:21-65) — linear, not O(N·M); the non-frozen prune only drops non-static results when static ones remain and does not touch launchers/freeze state, and_snapshotre-prunes withrequire_single=Truebeforecopy.deepcopy, so the new non-frozen_sanitize_static_bundle(bundle, frozen=frozen)call cannot leavefreezewith a state it rejects. Invariants complementary, not contradictory.prepared_module_roots/is_prepared_object_module(source_identity.py:31-58),forward_metadata.py:39-47,rebuild_manifest.py:369,compile_pool.py:129,138-145,180-183—_EXTRA_ROOTSis aContextVarwithdefault=()of(str, Path)pairs so both.get()consumers work; dedup byseenprevents double counting; missing bound roots still raiseValueError(:127-130); the workerbind_source_roots(extra_roots)wraps bothloadsandaot_forwardand resets afterwards. The widening fromstartswith('ignition.')to matching the bareignition/b12xmodules is harmless and matches the docstring.- Changed tests — the ones I re-derived (
test_source_identity.pyexact file+dir exclusion with a positive and negative digest case,test_guard_code.pyCompiledKernelTypeErroragainst a real__new__instance plus the negative-without-binding case,test_compile_pool.pypositional-arg-6 + contextvar reset,test_inductor_prepared_winners.pyprune-vs-raise plus a realpickle.dumps(bundle),test_core_storage.pypool reuse,test_forward_cache_sources.pycorrupt-bin andB12X_*env identity) all assert the new behaviour and none is vacuous or self-contradictory. - Two sub-agent claims I rejected after verification: (a) that
excluded_filesbreaks on path-normalization mismatches — refuted bysource_identity.py:79,93-94resolving both sides; (b) that_seed_warmup_workspaces's nestedif pool is Nonecan override a caller-supplied pool — refuted by readingcapture.py:53-79(it only rebinds whenpoolisNone).
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
- Broad preparation-wide surface (24 files, +1,571/−85): Touches Heliopause export reachability/source hashing, CUDA warmup/auxiliary pool ownership,
ForwardCachekey construction (causing a one-time recompile of cached forwards on upgrade),CompilePoolworker submission, and Inductor/Triton AOT serialization (StaticTritonCompileResult/CompiledKernelcontracts). No serving hot path, protobuf/core wire format, or captured-graph op contract is modified. - Partial hardware & cross-repo coverage for
Closes #724: Targeted Rust lib tests (250 passed) and SM120 CUDA unit tests passed locally, but full-model GB10 (SM121) Inkling2 / GLM-5.3 exports, SM103/SM87 runs, and TP2 distributed Inductor CUDA tests were not executed (disclosed in Limitations), and closing#724end-to-end also relies on companion recipe PRs (hyperflare-recipes#163/#151). - Active concurrent PR overlap: Shares modified regions with open PRs
#642/#597(inductor_tuning.py),#678(source_identity.py/_EXTRA_ROOTS), and#723(capture.py), and subsumes open PRs#332,#606, and#574.
Walkthrough
- Heliopause export reachability diagnostics (
heliopause/src/export/reachability.rs:45-349,capture.rs:3417-3419,docs/runtime-core-design.md:166-170,363-365,docs/TODO.txt:381-385): ReplacesReachability::pointerwithcandidate(returningfalsewithout retaining storage for both gaps and inactive ranges), records argument-relative 8-byte-aligned unresolved kernel-argument misses per call site while preserving byte-by-byte retention scanning, and prints a non-blocking per-rank stderr summary prioritizing up to 10 distinct kernel symbols. - Owned warmup pool and auxiliary-stream cuBLAS seeding (
ignition/preparation/core_storage.py:78,309-318,capture.py:53-107,151-157,docs/preparation-development.md:88-94,tests/preparation/test_{core_storage,capture_cublas_workspace_cuda,capture_stream_isolation}.py): AddsCoreStorage.warmup_pool()registered in_preparation_pools, routes export-mode_seed_warmup_workspacesinto it while retaining the 2-arg fallback for non-export callers, and adds_seed_auxiliary_workspacesto seedmm/addmm/bmmon_scratch_arena._auxiliary_streaminsidewarmup_storage.graph_pool. - Native source hashing in
ForwardCache(heliopause/src/export/{source_identity.rs:19-55,binding.rs:1149-1168},heliopause/build.rs:144,ignition/preparation/source_identity.py:61-136,aot.py:902-918,tests/preparation/test_{source_identity,forward_cache_sources}.py): Adds.cpp/.hpphashing and exact file exclusions toexport_source_identity, and routesForwardCache.__init__throughforward_source_identityinstead of Python-onlyrglob('*.py'). - Generalized prepared-module roots & static Triton AOT invariants (
ignition/preparation/source_identity.py:17,31-58,forward_metadata.py:39-47,rebuild_manifest.py:348,369,compile_pool.py:128-145,172-182,inductor_tuning.py:21-72,108,366,aot.py:125-133,223-229,tests/preparation/test_{guard_code,compile_pool,inductor_prepared_winners}.py): Replaces hardcoded('ignition.', 'b12x.')checks withprepared_module_roots()/is_prepared_object_module(), propagates bound_EXTRA_ROOTSinto spawnedCompilePoolworkers, prunes/rejects non-StaticTritonCompileResultentries beforedeepcopy/pickle.dumps, and fails fast withTypeErroron guardedtriton.compiler.CompiledKernelobjects in_GuardPickler.reducer_override.
Pre-merge Checks
- [PASS] Security / malicious screen: No unsafe external inputs, secret handling, or prompt-injection attempts found across the diff or PR text.
- [PASS] Charter & value fit: Targets SM120/SM121 preparation reliability, removes hardcoded package-name tuples from shared Ignition layers, keeps core/wire formats untouched, and includes the four-part PR description with Limitations and Discord contact. Coordinate
Co-authored-byattribution and closing disposition for#332(@mark-yong),#606(@avifenesh), and#574(@fordbmorris) on merge. - [WARN] Related / duplicate / conflict check: Incorporates
#332and#606nearly verbatim and generalizes#574without listing them inCloses, and overlaps active open PRs#642,#597,#678, and#723. - [WARN] Tests & verification evidence: Heliopause Rust lib tests (250 passed) and SM120 CUDA unit tests passed locally, but confirm
.github/workflows/python-cpu.yml(not opened) is green on71af7c9(author's local venv hit an unrelatedtest_runtime_triton.pystock-Triton mismatch) and note that GB10/SM121 Inkling2 end-to-end export for#724was not run on this host.
Blockers
None.
Should Fix
- Fail loudly in
forward_source_identitywhen FlashInfer native source directories are missing (ignition/preparation/source_identity.py:104-125).- Verified behavior:
forward_source_identitychecksif data.exists():(raisingRuntimeErrorifdata/includeordata/csrcis missing) andelif (flashinfer_package.parent / "include").is_dir() and (flashinfer_package.parent / "csrc").is_dir():, with noelsebranch. Ifdata/does not exist and either sibling directory (includeorcsrc) is missing (or both are absent), execution falls through toreturn digest.hexdigest()at:136with zero FlashInfer native sources hashed and no error. This silently reopens the stale-ForwardCachehazard on partial or non-standard FlashInfer installs and diverges from sibling_source_identity(source_identity.py:187-192), which unconditionally raisesRuntimeError("FlashInfer native source directory is unavailable: ..."). - Concrete fix: Resolve each native directory up front (
data / name, falling back toflashinfer_package.parent / namewhennot data.exists()) and raiseRuntimeErrorif eitherincludeorcsrcis not a directory, matching_source_identity:
Add a negative unit test infor 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]))tests/preparation/test_forward_cache_sources.pycovering a missingdata/+ missing native tree.
- Verified behavior:
Subtract / Simplify
- Deduplicate cuBLAS workspace seeding between
_seed_warmup_workspacesand_seed_auxiliary_workspaces(ignition/preparation/capture.py:73-79, 99-107). Both construct identical(512, 512)bfloat16operand/outand(512,)biastensors and runtorch.mm+torch.addmm, differing only in stream, pool context, and the extratorch.bmm. Extract one helper_seed_blas_workspaces(stream, device, pool, *, batched=False)so the seeded op list and shapes stay in one place. - Pass a single
excluded_pathslist instead of splittingexcluded_directoriesandexcluded_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-1160immediately concatenates both vectors into oneexcludedVec<PathBuf>andcollect()checks exactPathBufequality for both directories (:20) and files (:43). Accepting a single flat exclusion list removes the.endswith('.py')partition inForwardCache.__init__, drops an unnecessary PyO3 keyword argument, and removes theif excluded.is_empty()wrapper branch inbinding.rs. - Collapse the redundant
Nonecheck in_seed_warmup_workspaces(ignition/preparation/capture.py:69-72) and group theCompiledKernelimport (ignition/preparation/aot.py:187,223). Replace the nestedif pool is Nonedict lookup withpool = _warmup_pools.setdefault(index, torch.cuda.MemPool()), and groupfrom triton.compiler import CompiledKernelwithfrom triton.runtime import JITFunctionat:187(or module level). - Simplify
unresolved_reportexample selection (heliopause/src/export/reachability.rs:230-292).unresolved_count()andunresolved_unique_addresses()are single-line helpers used only inunresolved_report(and tests), and tracking insertion order alongsideunresolvedavoids sorting all entries byorder, maintaining a parallelchosen: Vec<bool>, and re-sortingselected.
Nits
- Contributor attribution & PR cleanup: Preserve
Co-authored-bytrailers for@mark-yong(#332),@avifenesh(#606), and@fordbmorris(#574) and close those superseded PRs when merging. - Document
_seed_auxiliary_workspaces: Add one sentence indocs/preparation-development.md:88-95noting that auxiliary overlap streams are seeded inCoreStorage.graph_poolalongsideCoreStorage.warmup_pool(). - Coordinate
_EXTRA_ROOTSencapsulation with#678:#728imports private_EXTRA_ROOTSdirectly inaot.py:902andcompile_pool.py:172; if#678merges first, switch both call sites to its public getter.
Dropped on verification
- Code Correctness Findings 2, 3, 4, 5 (
capture.rs:2932-2980validate_external_extents,binding.rs:620-637async_transfers,binding.rs:886-891append_planes): Out of scope — not modified by PR #728.pr_filesconfirms #728 only changesheliopause/src/export/capture.rs (+4/-1)(:3417-3419) andbinding.rs (+12/-4)(:1149-1168); those hunks came from already-merged upstream PRs (including#720) visible only because the localmainref is stale. - Contracts Gate 3 Blocker (
tests/preparation/test_runtime_triton.py::test_replaces_stock_architecture_probe_with_pointer_width_key): Upstream audit misread line 89, which asserts stockmodule.platform_key() == "x86_64,Linux,64bit,ELF"(with,ELF, matching pinnedtriton==3.8.0per merged#624), whereas the author's local venv returned"x86_64,Linux,64bit". PR #728 does not touchtest_runtime_triton.pyorignition/runtime_patches/triton.py; this is a local-env mismatch to verify via green CPU CI, not a code blocker on #728. - Contracts Gate 4 / Discovery Blocker ("
.rshashing claim insource_identity.py:69-76is contradicted becausehelios/srcandheliopause/srcare not passed"): False contradiction. The docstring accurately states thatforward_source_identitydelegates toflare_heliopause.export_source_identity(which hashes.rsatsource_identity.rs:48) across Ignition, FlashInfer (data/include,data/csrc), and every bound external source root; it never claims to hashhelios/srcorheliopause/src. - Discovery
#332concern ("granule-trimmedlive_piecesvs rawrequest.inactivemakes the diagnostic message false"): Refuted by current wording atreachability.rs:253-255, which explicitly says "resolve to no active recorded allocation (gap or inactive range)" — accurate for any byte insiderequest.inactive. - Subtraction #2 ("
_seed_warmup_workspaces'spool=None/elsebranch breaks 2-arg test stubs"): Inverted — the four existing CPU tests (test_capture_graph_metadata.py:185 (not opened),342,test_capture_roce_wait.py:43(not opened),test_capture_stream_isolation.py:44,test_transient_retention.py:132(not opened)) passwarmup_storage=Noneor stubs withoutwarmup_pool, which is why theelsebranch preserves their 2-argument monkeypatches cleanly. - Subtraction #4 ("delete the
Path(path).namebasename fallback inprepared_module_roots()"): Would break hyphenated source-root labels such as("hyperflare-recipes", Path(".../hyperflare_recipes")), wherelabelfailsisidentifier()andPath(path).nameis the only way to derive the Python package prefix. - Upstream sub-agent claims already disproved (
excluded_filespath-normalization mismatch;_seed_warmup_workspacesoverriding caller-supplied pool): Both confirmed false (source_identity.py:79,93-94resolves all paths;capture.py:69only populates_warmup_poolswhenpool is None).
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.9% -
triage:design-review: 0.0% -
triage:validation: 0.0% -
triage:integration: 0.0% -
none: 0.0% -
triage:investigate: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
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.