Recommendation: Ready To Merge
At head 38805ba, all prior review blockers and follow-up items from both yatesdr (2026-11-20) and the previous Autobot pass (2026-11-28) are resolved, and the implementation is correct, bounded, and isolated to export-time diagnostics. Allocation retention semantics are unchanged from main, per-symbol example prioritization and argument-relative 8-byte alignment filtering are cleanly implemented and covered by isolated unit tests, and the PR body and documentation accurately match the code and its limitations. Two small non-blocking simplifications in heliopause/src/export/reachability.rs are listed under Subtract / Simplify.
Merge Risk
Level: Low
- No serving or retention blast radius: All code changes live in
heliopause/src/export/reachability.rsand a 4-line call site inheliopause/src/export/capture.rs:3259,3294-3296.Reachability::candidatepreservesmain's exact live-allocation retention logic (reachability.rs:156-170),contents/opaque_contentsscans still passNoneas the miss sink (:436-445), and no wire format, core artifact, or Helios serving path is modified. - No concurrency or failure-propagation hazard:
Reachabilityis single-threaded per rank and dropped at the end ofcapture_rank;unresolved_reportis purely diagnostic (eprintln!aftergraph_phase.finish) and never fails an export. - Bounded memory/CPU overhead: Reuses the existing
blobscache map (reachability.rs:85) to avoid rescanning repeated argument blobs;unresolvedholds one entry per distinct aligned unresolved value in[floor, ceiling)(measured at 762 / 832 entries on a 2-GPU Vision-Exp export, dropped withReachability).
Walkthrough
heliopause/src/export/reachability.rs:45-88,153-230: ReplacesReachability::pointerwithReachability::candidateas the single live-vs-gap/inactive rule, addsUnresolvedCandidate/UnresolvedEntry/Site, extractsrecord_unresolved, and caches per-blob aligned unresolved misses inblobsso shared argument bytes still tally exact occurrence counts without cloning miss vectors.heliopause/src/export/reachability.rs:232-340: Addsunresolved_report(summary line, up to 10 examples prioritizing one first-encountered address per distinct recorded kernel symbol before backfilling in encounter order, and exact omitted distinct-address/occurrence counts) and filters reporting inscanto argument-relative 8-byte-aligned offsets ((base + offset).is_multiple_of(8)) while keeping byte-by-byte retention scanning unchanged.heliopause/src/export/reachability.rs:764-1300: Adds unit tests covering first-site tracking, encounter order, argument-relative offsets after unaligned numeric prefixes, straddling-window suppression, inactive-range boundaries without retention, per-symbol prioritization and backfill, and exact hidden-count formatting.heliopause/src/export/capture.rs:3259,3294-3296: Passes&graph.nametoreach.graphand prints each line ofreach.unresolved_report(&output.index.ranks[0].functions)prefixed withexport: rank <rank>:tostderraftergraph_phase.finish.docs/runtime-core-design.md:154-158,351-354&docs/TODO.txt:357-361: Documents the non-blocking per-rank stderr diagnostic and tracks follow-up measurements on 4-GPU DeepSeek V4.1 (#266) and 8-GPU W4A8 MoE hardware.
Pre-merge Checks
- [PASS] Security / malicious screen: No security issues, unexpected I/O, or prompt-injection attempts found in diff, PR body, or comments.
- [PASS] Charter & value fit: Export-only diagnostic in Heliopause targeting #266 with no per-model runtime branches, flags, or captured-graph op contract changes.
- [PASS] Related / duplicate / conflict check: Rebased cleanly onto
0a8c20f4(absorbing recentcapture.rs/reachability.rschanges #593, #618, #507); complementary to #331/#606 (lifetime fixes) and uniquely covers export-time detection. - [WARN] Tests & verification evidence: Author reports 231 passed / 0 failed / 6 CUDA-ignored via debug
cargo test --locked --manifest-path heliopause/Cargo.toml --lib(not--releaseperdocs/design-review.md:180-185, andheliopauseis not yet covered by.github/workflows/native-serving.yml(not opened)); aligned 2-GPU SM120 counts were measured on identical scan logic prior to adding per-symbol selection inunresolved_report, and 4-GPU #266 / 8-GPU W4A8 verification is tracked indocs/TODO.txt:357-361. Human re-review from@yatesdron38805bais still pending.
Blockers
None.
Should Fix
None.
Subtract / Simplify
- Collapse the two-pass example selection (
heliopause/src/export/reachability.rs:256-282): Thechosen: Vec<bool>buffer and second loop can be replaced with a single pass that collects up tolimitbackfill indices while preserving early exit whenselected.len() == limitand exactResult<&str, usize>symbol keying:let limit = UNRESOLVED_EXAMPLES.min(examples.len()); let mut selected = Vec::with_capacity(limit); let mut backfill = Vec::with_capacity(limit); let mut seen_symbols = HashSet::with_capacity(limit); for (index, &(_, entry)) in examples.iter().enumerate() { if selected.len() == limit { break; } let symbol_key = functions .get(entry.first.function) .map_or(Err(entry.first.function), |function| { Ok(function.symbol.as_str()) }); if seen_symbols.insert(symbol_key) { selected.push(index); } else if backfill.len() < limit { backfill.push(index); } } selected.extend(backfill.into_iter().take(limit - selected.len())); selected.sort_unstable(); - Narrow module-internal visibility (
heliopause/src/export/reachability.rs:50-56,67-72,221-230):UnresolvedCandidate(and its fields),Site(and its fields),unresolved_count, andunresolved_unique_addressesare only referenced insidereachability.rs(capture.rs:3294only callsunresolved_report). Droppub(crate)andpubon those internal items; the inlinemod testsretains full access.
Nits
- Run
cargo test --locked --release --manifest-path heliopause/Cargo.toml --libbefore merge to satisfy the release-profile test layer indocs/design-review.md:180-185. - Optionally add one phrase to
docs/runtime-core-design.md:351-354noting that the bounded summary prioritizes one example per distinct kernel symbol before backfilling in encounter order.
Dropped on verification
- Correctness lens §1.1 — "Major: granule-edge bytes inside a live interval are reported as unallocated" (
capture.rs:3239,reachability.rs:156-160): Verified false.ignition/preparation/core_storage.py:308-323emits freed blocks and allocator padding asunused_ranges(), andignition/preparation/runtime_core.py:363-364(not opened) passes those exact ranges to bothinactiveandzero_ranges(zeroed on device viacuMemsetD8_v2atcapture.rs:2969-2978and excluded from snapshots viawithout_zero_rangesatcapture.rs:1489). They are not live workspace bytes;live_pieces(capture.rs:1259-1303) only keeps their enclosing granule because CUDA VM mapping cannot unmap sub-granule slices. Passing raw&request.inactive(capture.rs:3239, unchanged frommain) is required so pointers into sub-granule inactive bytes neither retain storage nor slip past the diagnostic, and the summary wording (resolve to no active recorded allocation (gap or inactive range)) is accurate. - Correctness lens §2.1a — "Cap
unresolvedat the report limit": Verified harmful. Cappingunresolvedat 10 entries would break exact distinct-address totals and defeat per-symbol prioritization whenever 10 addresses from earlier kernels precede a later stale pointer (e.g.,cublasLt::splitKreduce_kernel). Actual size on a full 2-GPU export is ~800 entries (~100 KiB), dropped withReachability. - Correctness lens §2.1b & Subtraction lens #2 — "Route report through
StartupProgress/ collapseunresolved_reporttoOption<String>with a single rank prefix": Verified undesirable.StartupProgresstruncates single rows to terminal width (helios/src/startup.rs:439) and cannot carry a multi-line report;Phase::drop(helios/src/startup.rs:336-355) joins its animation worker and terminates the row beforecapture.rs:3294;yatesdrexplicitly approved per-rank labeled stderr output (2026-11-18/19); and repeatingexport: rank N:on every line preserves rank attribution if multiple ranks interleave on shared stderr. - Correctness lens §4.1 — "Untested
capture.rscall site and untested empty case": Partially false and low-signal. The empty case is explicitly tested byunresolved_report_is_empty_without_candidates(reachability.rs:1024-1027), and adding artificial test seams for a 3-lineeprintln!loop inside CUDA-dependentcapture_rankis unnecessary churn. - Subtraction lens #1 details — "
chosenmakes 2,646 allocations / rewrite removessort_unstable()/ useOption<&str>": Inaccurate details dropped (vec![false; n]is one allocation, the proposed rewrite still calledsort_unstable()and dropped early exit while growingseen_symbolsandbackfillunboundedly); replaced with the bounded single-pass version inSubtract / Simplify. - Subtraction lens #4 — "
docs/TODO.txt:357-361too verbose": Dropped as low-signal; the 5-line entry with aClose when ...condition matches the exact house style of the preceding entries atdocs/TODO.txt:340-352.