Verdict: worth it with changes — not as it stands
The change is in the right place, does not weaken any existing guarantee, and answers a real maintainer request. But in its current form it does not meet the condition the maintainers attached to that request, and the author's own evidence shows the output is dominated by exactly the false positives it was supposed to avoid. It needs narrowing, better example selection, and a demonstrated true positive before it can merge.
What it does (verified in the diff)
Two files, +434/−30, one commit c3cc87ea.
heliopause/src/export/reachability.rs:131-145—pointer()becomescandidate(), returning whether a value resolved to a live allocation instead of only silently retaining it.:147-188—blob()cache changes from aHashSetof scanned blobs to aHashMap<(data, numeric), Vec<(offset, address)>>, and each scan miss is charged to anunresolved: HashMap<u64, UnresolvedEntry>keyed by address, keeping the first site (graph, node, function index, argument, byte offset), an insertionorder, and an occurrence count.:190-246—unresolved_report()prints one summary line, up toUNRESOLVED_EXAMPLES = 10distinct addresses, and a trailing "… N more occurrences not shown" in the same "N occurrences / M distinct addresses" shape as the exchange in #266.:248-274—scan()now walks windows with abaseoffset and optionally collects misses.:276-317—graph()takes the graph name and enumerates node and argument position so a site can be named; symbols are resolved fromwire::Functionat report time.capture.rs:3137-3141— after all graphs are serialized,unresolved_reportlines are printed witheprintln!("export: rank {}: {line}").
Behaviour is strictly non-blocking and retention is unchanged: candidate() still returns before reference() for inactive ranges, so no allocation that was previously dropped is now retained, and nothing new can fail an export.
Why it is worth doing
- Right layer. The charter says to solve the problem in the right place with the smallest footprint; the reachability scan is where graph argument bytes are already interpreted, and no per-model branch, flag, or new mechanism is added.
- A maintainer asked for it. In #266 (2026-11-11 15:28,
@calvarado2004) the requester asked for an export-time check that records "graph, node, function symbol, argument index and byte offset" and either fails or warns via typednumericspans.@original-el8(2026-11-13) set P1 and asked for "export-time detection where pointer provenance can be established without misclassifying numeric kernel parameters." This is a direct response to that thread. - It does not duplicate existing checks.
check_relocations/check_bindings(capture.rs:294-359) only validate declared relocation fields, andflare inspect --memory-map(docs/cli-design.md:1528,helios/src/runtime_core/describe.rs:389-395) reports coverage, not argument provenance. Nothing else inspects graph argument values. - Detection still matters after the fix. #331 (merged) removed the cause of #266 by isolating warmup streams, but it is one fix for one leak path; #395 (
CUDAGraph.reset()freeing a workspace other graphs share) is a live second hazard, and #331 explicitly notes that cores exported before it keep the stale address. A cheap, non-fatal report is a defensible residual safety net.
Why not as-is
- The maintainer's condition — do not misclassify numeric parameters — is not met, by the PR's own numbers. The SM120 two-GPU export reports 175,329 occurrences / 2,646 distinct addresses on rank 0 on a healthy package, all ten examples coming from b12x mHC Cutlass
MHCPostPrePartialKernelinprefill4096node 34, at "argument 0, offset 4" of0x100000000800/0x100000000900. An offset of 4 inside an 8-byte-aligned parameter is the signature of two adjacent 32-bit fields, not a pointer — precisely the misaligned byte-window false positive #266 warned about ("narrow the scan to 8-byte-aligned offsets of parameters whose size is 8").@FujitsuPolycom's independent run on #331 measured 864 unaligned byte-window matches per rank on a clean export. A diagnostic that fires ~170k times per rank with no observed true positive is noise, not evidence. - No true positive is demonstrated. The PR does not reproduce #266 (three GPUs, four-GPU DeepSeek V4.1 export not runnable), and the one export it does report identifies no stale pointer — only mHC values it explicitly does not claim are stale. So the change is untested against the case it exists for.
- Example selection works against the purpose.
reachability.rs:73-75, 222-224keeps the first ten addresses in first-encounter order. In #266 the real signal is one address carried by ~10 arguments out of 175k occurrences; a rare value is guaranteed to be crowded out by pervasive constants from the earliest nodes. Theoccurrencesfield is counted but never used to rank. - The remaining defects:
scan()(:262-269) re-computes the inactive-range test thatcandidate()(:131-134) already did, so one predicate lives in two places that the new tests depend on; the blob cache now clones the whole miss vector on every cache hit (:149-169) and holds a miss list for every distinct argument blob for the whole export, where the oldHashSetshort-circuited duplicates; andeprintln!atcapture.rs:3139bypasses bothStartupProgress/Phase(helios/src/startup.rs:241-369) and the established Python-side inventory reporting path (ignition/preparation/runtime_core.py:346-348→memory_inventory.print_inventory,memory_inventory.py:323-327), so on a terminal it interleaves with phase rows and is invisible to startup observation. - Tests and docs. Several tests assert exact prose strings (
reachability.rs:~826-846,~858-875), which will churn on every wording edit; the repo's prose rules (AGENTS.md:40-45) make that costly.docs/cli-design.md:1609enumerates whatignition exportprints and is not updated, and AGENTS.md:52-55 requires the unresolved limitation ("values outside the recorded envelope and stale values aliasing live storage are not detected") to live indocs/TODO.txtrather than only in the PR text.
Costs
Small in code (two files, ~430 lines including ~330 lines of tests) and negligible in export time — the scan already ran, this only records misses it was discarding. The real cost is operational: ~350 KB-range of stderr per export on a clean package, and the risk that maintainers learn to ignore the message, which is worse than no message. Maintenance cost is one more map and one more report format in the hottest inner loop of export.
What would make it mergeable
- Narrow the scan to what provenance can support: 8-byte-aligned slots of parameters whose driver-reported size is 8, plus the tensor-map base-address field.
function_layout/parameter_sizesalready reach this code (capture.rs:2911-2942,ignition/preparation/tensor_metadata.py:140-149), so this is a filter, not a new mechanism. - Group the report by kernel symbol + argument rather than by raw address, with distinct-address counts per group, and order examples by rarity (or show one example per group) so a handful of stale arguments is visible next to 2,646 benign ones.
- Route the output through the existing progress/console path (a phase detail line, or the
--verbose/print_inventoryroute) instead of bareeprintln!, and document it indocs/cli-design.md:1609with the limits indocs/TODO.txt. - Collapse the duplicated inactive predicate into one function returning an enum (live / inactive / gap), and stop cloning the miss vector per cache hit.
- Add one true-positive check: a captured-graph fixture, or an archived known-bad package, where a stale split-K argument is actually reported, plus a false-positive budget on a real export. Drop the prose-equality assertions.
- Fix the description so the claimed result matches the evidence: state that no stale pointer was found and that the observed hits are numeric constants in mHC kernels — which is the argument for change 1, not a success story.
With those changes this becomes a genuinely useful, low-cost export guard for a class of defect that the #331 fix and the #395 hazard show is still reachable. As submitted it is a well-placed diagnostic whose sensitivity is far too high and whose specificity is unproven.
(No instruction-shaped content or attempts to direct an agent were found in the PR, its comments, or #266; the #266 thread's "we can share the script" offer is informational only.)