Recommendation: Changes Requested
The core implementation at 1ac7073d is sound—retention semantics are preserved, inactive ranges and gaps share one clean predicate in Reachability::candidate, and the 8-byte argument-relative alignment filter cuts the 2-GPU export diagnostic noise by ~8× without missing #266's aligned split-K arguments. However, the GitHub PR description still presents the superseded pre-alignment c3cc87ea numbers and an example the shipped code can no longer emit, and two small targeted improvements (per-kernel example grouping and a non-8-byte-aligned base test) should land before merge.
Blockers
- PR description posts superseded
c3cc87eameasurements and omits the alignment restriction.- Evidence: The current PR body still reports the pre-alignment run from
c3cc87ea: rank 0175,329 / 2,646, rank 1170,544 / 2,637, first exampleMHCPostPrePartialKernelinprefill4096node 34 (which was an offset-4 straddling window,0x100000000800), andcargo test ...: 205 passed, 4 ignored. At head1ac7073d,heliopause/src/export/reachability.rs:300filters reporting with(base + offset).is_multiple_of(8), which cannot emit an offset-4 window and produced the aligned rerun posted in the 2026-11-28 comment (22,618 / 762on rank 0,19,417 / 832on rank 1, starting at node 35;221 passed, 0 failed, 5 CUDA tests ignored). - Additionally,
## Changeomits the argument-relative 8-byte alignment filter (documented indocs/runtime-core-design.md:154-157) and still describes the old omitted-occurrences-only trailing line instead of omitted distinct addresses plus omitted occurrences, and## Limitationsdoes not mention that unaligned unresolved values are not reported. - Comment item 7 on 2026-11-28 notes that the description was reconciled to
1ac7073d, so the edit to the GitHub PR body appears not to have been applied. Update the PR description to match1ac7073dperAGENTS.md:88-112and the charter's PR description standard.
- Evidence: The current PR body still reports the pre-alignment run from
Should Fix
-
Deduplicate printed examples by kernel symbol so repeat constants from early kernels do not fill all ten slots (
heliopause/src/export/reachability.rs:247-263).unresolved_reportcurrently sorts byentry.orderand takes the firstUNRESOLVED_EXAMPLES(10) distinct addresses across all kernels.- In the 2026-11-28 verbatim stderr output, 7 of the 10 printed lines on rank 1 come from just two
DenseGemmKernelsymbols at nodes 40 and 44 (3 from node 40, 4 from node 44), and all 10 slots on both ranks come from 5 symbols in nodes 35–74, hiding 752–822 distinct addresses (13,614–14,776occurrences). - Because
entry.first.functionandfunctionsare already available inunresolved_report, taking at most one example per kernel symbol (as offered in the 2026-11-28 comment) is a local change that doubles symbol visibility without altering retention or counts.
-
Test
(base + offset).is_multiple_of(8)with a non-8-byte-alignedbase(heliopause/src/export/reachability.rs:184-189,:300).- Every existing test with a scanned span after numeric exclusion has
base % 8 == 0:unaligned_straddling_window_is_not_reported_while_aligned_stale_pointer_is(:1046-1069) usesnumeric = vec, andkernel_argument_candidate_offset_counts_from_the_argument_start(:805-822) usesnumeric = vec. - Replacing
(base + offset).is_multiple_of(8)at:300withoffset.is_multiple_of(8)still passes all 26 tests, even though a 4-byte numeric prefix(0, 4)shifts slice offsets by 4 bytes relative to the argument start. - Add one CPU test with a 4-byte numeric span
(0, 4), 4 bytes of padding forming a straddling address-shaped window at argument offset 4 (slice offset 0), and a stale pointer at argument offset 8 (slice offset 4), asserting that offset 4 is excluded and offset 8 is reported withoffset == 8.
- Every existing test with a scanned span after numeric exclusion has
Subtract / Simplify
- Eliminate both
misses.clone()allocations inReachability::blob(heliopause/src/export/reachability.rs:172-212).blob()clones the cachedVec<(usize, u64)>on every cache hit (:175) and clones it again when inserting on a miss (:191) solely to avoid holding an immutable borrow onself.blobswhile mutatingself.unresolved.- Splitting the borrow via a small helper (e.g.,
record_unresolved(&mut self.unresolved, misses, site)) lets the hit path borrow&missesdirectly and the miss path movemissesintoself.blobs.insert(key, misses)with zero vector clones on the repeated-argument hot path.
Nits
- Redundant emptiness guard in
heliopause/src/export/capture.rs:3219-3223:reach.unresolved_report(...)already returns an emptyVecwhenself.unresolved_count() == 0(reachability.rs:232-235), so theif reach.unresolved_count() > 0wrapper can be dropped. - Stale test name in
heliopause/src/export/reachability.rs:782-802:unresolved_examples_are_capped_while_occurrences_are_countedinserts 12 distinct addresses and checksself.unresolvedentries/order without ever callingunresolved_report(capping is tested byunresolved_report_bounds_examples_and_counts_hidden_occurrencesat:877-905). Rename it to match what it verifies.
Verified passes
- Conservative retention intact:
Reachability::scan(reachability.rs:294-305) still scans every byte window forcandidate(pointer)?retention, gating only the diagnosticmisses.pushon(base + offset).is_multiple_of(8); existing unaligned cross-chunk retention tests (:513-521,:651-670) remain unchanged. - Single live/inactive/gap rule:
Reachability::candidate(reachability.rs:156-170) checks mergedself.inactivebeforeself.intervals, returningOk(false)without callingreference()for both inactive ranges and gaps, verified at boundaries by:1072-1133. - Raw
request.inactiveand summary wording are consistent:ignition/preparation/runtime_core.py:300-301feeds all rawinactiveranges intozero_ranges, sowithout_zero_ranges(capture.rs:1305-1329,:1487-1490) zeroes them even when they lie inside a granule-retained piece; describing hits as"resolve to no active recorded allocation (gap or inactive range)"(reachability.rs:237-239,docs/runtime-core-design.md:154-157) is accurate. - Counts and hidden-line arithmetic: Verified in code (
reachability.rs:247-279) and against the 2026-11-28 verbatim stderr totals (rank 0:7,842 + 14,776 = 22,618occurrences,10 + 752 = 762distinct; rank 1:5,803 + 13,614 = 19,417occurrences,10 + 822 = 832distinct). - Emission ordering and index bounds:
capture.rs:3219-3223prints betweengraph_phase.finish(:3215) andmodule_phase(:3224), after allreach.graphcalls finish and before allocation-content scanning (which passesmisses = None). Everycandidate.functionis validated againstkernels(reachability.rs:322-324), which matchesoutput.index.ranks[0].functions1:1 (capture.rs:3001-3083,:3129). - Toolchain, docs, and follow-up tracking:
heliopause/Cargo.toml:5-6pins edition 2024 andrust-version = "1.88", matchingis_multiple_ofand let-chains used across the repo;docs/runtime-core-design.md:154-157,:339-341anddocs/TODO.txt:350-354accurately record behavior and unrun 4-GPU/8-GPU measurements. No prompt-injection or agent-steering content was found.
Dropped on verification
- S1 (raw
inactivevs granule-trimmedlive_piecesover-count / wording contradiction / test gap): Refuted —ignition/preparation/runtime_core.py:300-301adds rawinactivetozero_rangessowithout_zero_ranges(capture.rs:1305-1329) clears those bytes even inside granule-retained segments,"resolve to no active recorded allocation (gap or inactive range)"(reachability.rs:237-239) is truthful, andReachabilitynever readsallocation.alignmentwhile:1072-1133already tests an inactive subrange strictly inside a live allocation. - B1 as Blocker (downgraded to Should Fix): Maintainer
yatesdr's 2026-11-20 request for per-symbol grouping was conditional ("If thousands remain"), aligned distinct counts fell to 762/832, and the 4-GPU/8-GPU follow-up is already tracked indocs/TODO.txt:350-354; no correctness or safety invariant is broken. - S2's "
base = 0regression" phrasing (narrowed to alignment check):reachability.rs:819already assertscandidate.offset == 16, which catchesbase = 0; only the alignment check(base + offset).is_multiple_of(8)vsoffset.is_multiple_of(8)lacks a non-8-byte-alignedbasetest. - S3 as Should Fix (downgraded to Nit): The redundant
reach.unresolved_count() > 0check incapture.rs:3219is harmless and O(0) when empty, not a defect. - X1's claim that
keyallocation regressed againstmain(narrowed tomissesclones):main(reachability.rs:133) already allocated(data.to_vec(), numeric.to_vec())on everyblob()call; only the twomisses.clone()calls are new. - X2 (merging
Site/UnresolvedCandidateand replacingfunctions.get()with direct indexing): Refuted —Site<'a>borrows&'a strto avoid cloninggraph.nameon every kernel argument blob, andfunctions.get(candidate.function)is safer non-panicking formatting than&functions[...]in a diagnostic helper. - X3 (deleting ~100 lines of "redundant tests"): Dropped — the referenced unit tests (
:805,:825,:908,:945,:996,:1020,:1036) each cover distinct contracts cleanly; only the misleading test name at:782is retained as a Nit. - X4 (removing
with_count,unresolved_unique_addresses, and droppingfirstafter 10 addresses): Dropped —with_countcleanly handles five call sites including multi-word noun phrases, and droppingfirstpast 10 addresses would break per-symbol grouping (Should Fix #1) for negligible memory savings (~40 KB during export). - N1 ("one explanation written four times" / drop
docs/runtime-core-design.md:339-341): Refuted —:154-157documents scan semantics while:339-341documents stderr output as explicitly requested in the prior review round. - N2 (
let address = *address;"dead rebind",:1130-1131"stray assertion",candidate()rename): Refuted — infor &(address, entry) in examples.iter()overVec<(&u64, &UnresolvedEntry)>,addresshas type&u64so*addressis a real dereference;:1130-1131is pre-existing frommainverifying that explicitreference()still retains storage with inactive ranges; renamingcandidate()is pure taste.