PR #332 — "Report unresolved kernel argument address candidates during export"
Case file. Author mark-yong; open, ready-for-review, head c3cc87e, base f9aec99; +434/−30 in 2 files (heliopause/src/export/reachability.rs, heliopause/src/export/capture.rs). Refs #266.
Key findings
- The head commit is still rejected.
yatesdrgave CHANGES_REQUESTED three times (2026-11-18, 2026-11-19 15:56, 2026-11-20 04:34) and the third round's blocking item is unimplemented atc3cc87e: report only argument-relative offsets divisible by 8. Verified in code:scanstill enumerates every byte offset (for (offset, bytes) in data.windows(8).enumerate(),heliopause/src/export/reachability.rs:259), so unaligned straddling windows are reported as candidates. Three smaller items from the same round are also unimplemented at head — the duplicated inactive lookup (in_free_block,reachability.rs:262-266, duplicatingcandidate()at :131-145), a straddling/live-pointer test, and reconciling the commit message with the description. The branch has not moved since 2026-11-20. - The evidence of usefulness is thin exactly where it matters. The described export (two-GPU SM120, DeepSeek-V4-Flash-Vision-Exp) produced 175,329 / 170,544 occurrences and 2,646 / 2,637 distinct addresses per rank, with all ten printed examples from b12x mHC Cutlass
MHCPostPrePartialKernelkernels — not the cuBLASLt split-K arguments of #266 nor any W4A8 MoE kernel. The description itself states this. #266's own out-of-tree checker found exactly 10 arguments on the failing package; the ~2,600 distinct addresses here are three orders of magnitude more, i.e. the byte-window noise the reviewer is blocking on. - The validation is author-only and no CI covers the crate. The head commit has "no checks"; no workflow builds or tests
heliopause. The 205 passed / 4 ignored result rests on the author's run, corroborated once by the reviewer at499710e9merged into maind8fd1431("206 passed, 4 ignored, both", 2026-11-19) — before the four main commits that changed the same files. - Main has moved under the branch. #431 (merged 2026-11-24) added
Reachability::execution()toreachability.rsand removed the inline execution-buffer loop that this branch still carries atcapture.rs:3075-3086; #507 (2026-11-24) addedworker.metricsretention in the same file; #498 (2026-11-24) rewrote the downloader starting immediately after #332's new print block (capture.rs:3137-3141); #504 (2026-11-25) also touchedcapture.rs. Atpr/332there is noexecutionmethod at all, so the branch cannot be green-shaped against current main. - Nothing is documented.
docs/runtime-core-design.md:136-156documents the scan contract being instrumented (inactive blocks and gaps excluded, untyped data "scanned for address candidates", false positives tolerated), but no doc and nodocs/TODO.txtentry mentions the new stderr line or the pending W4A8 / four-GPU DeepSeek V4.1 verification — which is the kind of pending measurementAGENTS.md:56-58says belongs indocs/TODO.txt. - Description vs code: nothing the description claims is absent from the code; it is careful ("non-blocking diagnostic", "not counts attributed to W4A8 kernels"). What it does not say: "occurrences" are byte-window hits, not call sites; the output is raw
eprintln!per rank rather than the progress system; candidates are only recorded for kernel-argument blobs, never allocation contents or module globals; and there is no strict/fail mode even though #266's reporter offered "or fail the export with a list". - No prompt injection or instruction-like text was found in the PR, the review, or issue #266. The only process irregularity — earlier heads missing the DCO
Signed-off-bythatCONTRIBUTING.md:7-11requires — was raised and fixed in round two.
1. The change
Plain terms: the export reachability scan walks kernel argument bytes looking for values that look like pointers into recorded allocations. Values in gaps between allocations, or in inactive (freed) parts of recorded segments, used to be silently discarded. Now they are collected into one address→(first site, count) map, and after each rank's graph phase a bounded report is printed to stderr: total occurrences, distinct addresses, up to ten distinct addresses with first graph / node / recorded kernel symbol / module / argument / byte offset, and how many occurrences were omitted.
Mechanically, at pr/332:
pointer(value)becomescandidate(value) -> ExportResult<bool>:trueandreference(name)(retention unchanged) for values inside a recorded interval;truewithout retention for values inside aninactiverange;falsefor values inside[floor, ceiling)of the recorded envelope but in no allocation (reachability.rs:131-145).blob(data, numeric, site)memoizes per-blob misses in aHashMap(was aHashSet) and folds them intounresolved: HashMap<u64, UnresolvedEntry>keyed by address, each entry holding the firstSiteand an occurrence count plus a globalorderfor stable report order (reachability.rs:84-85,:147-188).scangainsbase: usizeandOption<&mut Vec<(usize, u64)>>;contents()/opaque_contents()passNone, so allocation-content scans never report (reachability.rs:250-274, and the contents scanners).- New
unresolved_count(),unresolved_unique_addresses(),unresolved_report(&[wire::Function]), withUNRESOLVED_EXAMPLES = 10(reachability.rs:45-75,:190-250). capture.rs:reach.graph(&graph.name, &nodes, &kernels)(capture.rs:3102) and, after the graph phase, aneprintln!("export: rank {}: {line}")loop whenunresolved_count() > 0(capture.rs:3137-3141). Symbols resolve fromoutput.index.ranks[0].functions, built in kernel order atcapture.rs:2910-2992, which is the index spacenode.functionuses.- Ten new tests plus one renamed test (
reachability.rs:733, 751, 773, 793, 810, 845, 873, 879, 903, 919, renamed at 929):freed_interval_boundaries_report_kernel_candidates_without_retaining_storage.
Things the change does that its description does not say (all verified at head):
- No 8-byte alignment filter (
reachability.rs:259). Each stale pointer is counted at up to eight window positions, and windows straddling two adjacent parameters are reported — the author's own first printed example is "argument 0, offset 4, 0x100000000800", an offset that cannot hold a pointer field. - "Occurrences" are byte-window hits, not call sites.
unresolved_count()sums per-address occurrences (reachability.rs:190-195); becauseblobmemoizes, identical argument bytes in later graphs replay the cached misses and re-increment counts (testshared_argument_bytes_record_one_example_per_address,:793). So 175,329 occurrences cannot be mapped onto "10 stale arguments". - Output path. Raw
eprintln!insidecapture_rank, on every rank (progress output is rank-0-only atcapture.rs:2774), emitted before module/global capture, so a later export failure still leaves the report on stderr, and nothing is persisted for after-the-fact inspection. - Scope. Candidates are only recorded for kernel-argument blobs; allocation contents and module globals pass
Noneand report nothing, and values outside[first allocation start, last allocation end)are never candidates (the description's Limitations do concede the latter). - Non-retention is exact.
candidate()returns early for inactive ranges without callingreference()(reachability.rs:131-145); nothing returnsErrfor a candidate;validate_allocationsremains the only failure path. This matches the description. - No opt-out and no fail mode, although #266's reporter's request offered "either fail the export or warn".
The description says nothing that the code does not do.
2. The why
Driving defect: issue #266 (open, P1; labels area:memory/packaging/preparation, bug, model:deepseek-v4.1, triage:investigate), opened 2026-11-11 by calvarado2004, updated 2026-11-13. Four DGX Spark GB10 (SM121) nodes, TP4, deepseek-ai/DeepSeek-V4.1-Flash-1017 at 7f534bb6: a package exported with --prefill-chunk-size 8192 Xid-31s on the first prefill8192 prompt; the fault VA 0x812d3a00000 lies in a 104 MiB gap between recorded allocations and is carried by 10 kernel arguments (5 pairs): nvjet_sm121_..._splitK_TNNN (384-byte parameter, offset 256) and cublasLt::splitKreduce_kernel (argument 1). Root cause: PyTorch's cached cuBLAS workspace, created in transient storage during warmup, is baked into the first captured graph. The chunk-4096 export aliases instead of faulting.
The check this PR implements was requested in #266 by its own reporter (2026-11-11 15:28) as "a second suggestion, independent of the Ignition change": record [floor, ceiling) values inside no recorded allocation, and values inside inactive free blocks, with graph, node, function symbol, argument index and byte offset, and either fail the export or warn; handle false positives via the existing typed numeric spans; optionally narrow the scan to 8-byte-aligned offsets of parameters. The reviewer's current blocking item (aligned offsets only) originates in that comment. The reporter's out-of-tree checker listed exactly the 10 split-K arguments on the faulting package and only W4A8 MoE constants on the chunk-4096 package.
original-el8 triaged it on 2026-11-13: P1, "the next step is a focused lifetime fix and regression covering the first captured graph, plus export-time detection where pointer provenance can be established without misclassifying numeric kernel parameters."
So #332 is the export-time detection half of a two-part response; the lifetime half is #331 (merged 2026-11-20), same author. How widely wanted: a single-reporter P1 bug rather than a broad feature request — two maintainers (calvarado2004 as reporter, original-el8 as triager) plus the author.
3. Related work
- #266 (open) — the defect; this PR reports on it without fixing it. Its lifetime half #331 "Isolate cuBLAS warmup workspaces from CUDA graph capture" (merged 2026-11-20, same author) is the actual fix.
- #431 "Add Heliopause and Ignition PersistentWorker export binding and reachability" (merged 2026-11-24, original-el8) — same file, real overlap: adds
Reachability::execution()(reachability.rs:87-106on main, retainingexecution.buffersandpersistent_workers[*].stop_flag/.metrics), two tests in the samemod testsblock, and removes the inline execution-buffer loop incapture.rsthat #332 still carries (capture.rs:3075-3086,+113/−9). Verified:pr/332contains noexecution/persistent_workersinheliopause/src. - #507 "Add persistent worker counter schema, Prometheus metrics, /v1/worker telemetry…" (merged 2026-11-24, lukealonso) — +5 lines in
reachability.rs, retainingworker.metrics. - #498 "Flush PCIe D2H tails before export completion in Heliopause" (merged 2026-11-24, PCCessna) — +259/−16 in
capture.rs, rewriting the downloader immediately after #332's print block; line drift, no logical conflict. - #504 (merged 2026-11-25, yatesdr) — touches
capture.rs(lossless KV compression export). - #314 (open, schopde-nvidia) — touches
capture.rsfor diffusion tensor execution; no overlap with reachability reporting. - #517 (open, jcartu) — a different Xid-31 class (
_checkpoint_pages); explicitly distinguishes itself from #266's cuBLAS-workspace failure; does not use this diagnostic. - #395 (open, mark-yong) —
CUDAGraph.reset()freeing a workspace shared by other graphs; same author's series, not an export-scan change. - Nothing was found that competes with or supersedes #332; the overlap is refactoring, not duplication.
4. Recent activity
Branch point f9aec99 (2026-11-17, Luke Alonso). The author's last push is c3cc87e (2026-11-20); every main commit touching these files landed after that:
040f39ff2026-11-24 PCCessna (#498) —capture.rs+259/−16, rewrote the Downloader/module-global/weight paths that begin atcapture.rs:3142, just after the new print block at 3137-3141.052fbdf52026-11-24 Jason Cook (#431) —reachability.rs+113,capture.rs+1/−9; the semantic and textual conflict described above.f646bebc2026-11-24 Luke Alonso (#507) —reachability.rs+5.716df00f2026-11-25 yatesdr (#504) —capture.rsKV compression.
Historically this exact path has been Luke Alonso's: 3919c1db "Retain CUDA graph resources throughout core export" (2026-11-11), b455be5e/0f0b7626 (2026-11-09) restructured native export. #332 builds on that design (reachability pruning, typed numeric spans) and reverses nothing; the tension is sequencing — it was written against a file since refactored twice by other maintainers, and its reviewer's merge-into-main test (d8fd1431, 2026-11-19) predates all four commits.
5. People
- mark-yong — GitHub association CONTRIBUTOR, Discord
myong_acct(given in the PR description). Last 180 days: 9 merged, 18 closed, 3 open. Recent work is almost entirely the #266 family: #331 (lifetime fix, merged 2026-11-20), this PR (detection), #395 (residualCUDAGraph.resetlifetime constraint), plus earlier merge/launcher work (#185, #179, #170, #102, #94, #83, #67). Their merged PRs touchedhelios/src(7),docs(5),tests/preparation(3),ignition/preparation(2),helios(1) — this is their firstheliopausechange. They are an infrequent committer to main directly. - yatesdr — the only reviewer; three rounds, all CHANGES_REQUESTED; also a main-branch committer in this area (#504).
- Area owners:
heliopause/srccommits in the last 180 days — Luke Alonso (55), Martin Vit (10), Jason Cook (5).original-el8(Jason Cook) wrote #431, which refactored this file after the branch point;lukealonsoowns the export/reachability design and is named inAGENTS.md's priority-contributor list, but has not commented here. - calvarado2004, reporter of #266 who asked for exactly this check and offered their script ("We can share the script if it is useful"), has not commented on #332 — the one person who could confirm the diagnostic catches the 10 known arguments.
- FujitsuPolycom independently validated #331 with a four-GB10 DeepSeek V4.1 export and its own pointer scan (#331 comment 2026-11-19 04:57: "864 unaligned byte-window matches and one aligned match per rank in a CUTLASS parameter of the
vision1152graph") — the natural third-party validator here, absent.
6. Community
Four discussion entries in total: three reviews by yatesdr (2026-11-18 22:40; 2026-11-19 15:56 at 499710e9; 2026-11-20 04:34 at c3cc87e) and one author reply (2026-11-19 21:02) carrying the export numbers. No approvals, no reactions, no additional inline threads of consequence, no autobot case file or autobot review (those appear on #314, #498, #524/#525/#526, all dated 2026-11-24/25, after this PR's last update). By comparison, the sibling #331 drew 12 discussion entries, three reviewers and an independent GB10 validation. Interest level: low-to-moderate, and stalled for five days after the last round.
Review trajectory: round 1 (2026-11-18) found the CUfunction handle printed instead of the symbol, no rank label, first-hits rather than one example per address, noise unmeasured, and a missing Signed-off-by. Round 2 (2026-11-19 15:56) accepted those fixes and raised: no export run yet; a cuBLASLt example that contradicts #266's own finding; inactive ranges still dropped silently; and bookkeeping (store the function index, collapse the parallel miss lists). Round 3 (2026-11-20 04:34) accepted all of the above ("inactive ranges are reported without being retained; one map now holds each address's first site and count; symbols come from the recorded function index; the description's account of #266 is fixed") and left one blocking item (8-byte-aligned offsets, with counts to be re-taken and "one example per kernel symbol" if thousands remain) plus three minor ones.
7. Project fit
- Charter line 11: "Bring real evidence… Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)." #332 is not the root-cause fix (that is #331) and does not swallow an error, but it does add a warning path whose signal-to-noise is the reviewer's central objection.
- Charter line 35 /
AGENTS.md:137-151(contribution scope): must address a maintainer request, a demonstrated defect, a measured problem or bad docs — satisfied via #266 and original-el8's P1 triage. AGENTS.md:56-58: unresolved defects and pending measurements belong indocs/TODO.txt. Nothing about the unverified W4A8 premise or the unreproduced four-GPU DeepSeek V4.1 export is there (grep for pointer/workspace/#266/scan returns nothing on main) — the same kind of durable-tracking gap the autobot flagged on #498.AGENTS.md"Require focused, meaningful validation… Tests must exercise the affected behavior or contract": the new unit tests exerciseReachability, but not the discriminating property (that only pointer-shaped, aligned offsets are reported), and there is no end-to-end check on a known-bad package.docs/runtime-core-design.md:136-156already documents this contract: inactive blocks and allocator padding are "cleared and excluded from payload reads… stale address candidates cannot retain those unused bytes' backing segments", and untyped structs/tensor maps/globals "are scanned for address candidates. This can retain false positives." #332 adds reporting on top without changing the documented contract — but does not update the doc to describe the new line.- Roadmap/vision says nothing about export diagnostics; the change targets SM120/SM121/DGX Spark, the platforms the project claims to support.
- No core-format,
helios/manifest.md(not opened) orhelios/model-contract.md(not opened) surface is touched.
8. Claims and evidence
| Claim | Backing |
|---|---|
cargo test --locked --manifest-path heliopause/Cargo.toml (not opened) --lib → 205 passed, 4 ignored |
Author's local run only. Reviewer independently got "206 passed, 4 ignored, both" at 499710e9 and at that head merged into main d8fd1431 (2026-11-19 15:56) — the off-by-one is consistent with main gaining a test. 205/4 also matches what #431 reports for main. No CI covers heliopause (.github/workflows builds eos/selene/selene-manager/helios/flare-cli/flare and Kani for helios), so no machine-checked result exists. |
| Tests "cover distinct-address and occurrence counting, first-site order across graphs, recorded-function symbol lookup, numeric exclusions, inactive-range boundaries, and non-retention of inactive storage" | Verified: the ten tests exist at the lines cited above and cover those cases. They use only 8-byte-aligned values and never exercise an unaligned or straddling window, so the blocking item has no failing test. |
SM120 two-GPU export of local-inference-lab/DeepSeek-V4-Flash-Vision-Exp-lossless-CSF completed with the diagnostic; rank 0 175,329 occurrences / 2,646 distinct, rank 1 170,544 / 2,637; all ten examples per rank b12x mHC Cutlass MHCPostPrePartialKernel, prefill4096 node 34, argument 0, offset 4, addresses 0x100000000800 / 0x100000000900 (module-13 on rank 0, module-6 on rank 1) |
Author's comment 2026-11-19 21:02 plus the description table; reviewer accepted the numbers ("they answer the first item of the last round", 2026-11-20). Not reproduced by anyone else. The example addresses are unaligned-offset artifacts at the very start of the recorded envelope — the noise the blocking item is about. |
"The recipe configures its MXFP4 experts with A8 activations (load_mxfp4_experts)" |
Not checkable from this repository; recipes live in local-inference-lab/hyperflare-recipes. |
| The diagnostic is non-blocking and does not retain inactive storage | Verified in code (reachability.rs:131-145; nothing returns Err for a candidate; no retained inactive allocation). |
| "Numeric exclusions and allocation-content scanning retain their existing behavior" | Verified: blob() still subtracts merged numeric ranges (reachability.rs:152-165); contents scanners pass None and report nothing. One behavior change worth noting: blobs moved from HashSet to HashMap so misses are memoized, which is why occurrence counts include repeats across graphs. |
| Limitations (does not reproduce #266's four-GPU failure, no W4A8 kernel among examples, values outside the envelope and stale values aliasing live storage undetected, only three RTX PRO 6000 GPUs available) | Author-stated, consistent with the code and with what the printed report can show. |
9. Reach
- Who: anyone running
ignition exporton SM120/SM121/DGX Spark gets new stderr lines during the graph phase, on every rank, unbounded in count but bounded in length (summary + up to 10 examples + one omitted-count line per rank). There is no flag, env var or config to silence it, and no fail mode. The intended audience — #266's reporter and anyone exporting DeepSeek V4.1 on four or more GPUs — has not seen it demonstrated on the actual stale pointers. - What it cannot break: no core format, wire Protobuf, manifest or serving change; no re-export or re-signing of existing cores;
heliosuntouched; no dependency changes (Cargo.toml/Cargo.lockunchanged); retention decisions identical, so export output cannot differ. Extra memory is oneVec<(usize,u64)>per distinct (bytes, numeric) pair plus one entry per distinct candidate address (~2.6k entries per rank in the measured export) — negligible. - Documentation: nothing in
docs/ordocs/TODO.txtexplains the new line or tracks the pending verification, so an operator who sees it has only the PR text as explanation.
10. Process
- Open, marked ready for review, opened 2026-11-18 10:25, last updated 2026-11-20 04:34; branch
fix/reject-unresolved-graph-args— the branch name still says "reject", although the change deliberately does not reject (the intent changed during review). 7 days old at the time of the orientation packet. - Review state: CHANGES_REQUESTED, three rounds; at head none of the four round-3 items is implemented (no alignment filter at
reachability.rs:259;in_free_blockstill duplicated at:262-266; no straddle/aligned test among the ten; commit-message reconciliation unverified from here because the commit body was not readable). - CI: no checks on
c3cc87e; no required check can exist for this crate because no workflow builds it. - DCO:
CONTRIBUTING.md:7-11requiresSigned-off-byon every commit; earlier headf065ef1flacked it (round-1 item 5), fixed by round 2..githooks/commit-msgadditionally wants aDesign-Signed-Off-By: <name>; design-review=<hash>trailer fromdocs/design-review.md(not opened) — unverifiable from the PR view. - Description shape follows
AGENTS.md:67-107(why / what changed / claimed result / evidence) with a visible Limitations section.
Open questions / not found
- Whether the commit message body still says "outside live recorded allocations" and still lists W4A8 as untested (round-3 item 4) — the commit body was not readable from the PR view.
- Whether the branch merges cleanly into current main after #431/#507/#498/#504, and whether the full test suite (not just
heliopause --lib) still passes — the reviewer's merge check predates all four commits, and no CI runs. - Whether the diagnostic actually reports #266's ten stale cuBLASLt arguments on a four-GPU DeepSeek V4.1 export. Not demonstrated; the author has three RTX PRO 6000s.
calvarado2004(who has the failing package and a scanner) andFujitsuPolycom(who validated #331 on four GB10s) are the two people who could settle it and neither has appeared. - Whether the W4A8 MoE constant-noise premise holds: no W4A8 kernel appeared among the printed examples, and the recipe claim about
load_mxfp4_expertsis not checkable from this repository. - Whether maintainers other than
yatesdr— particularlylukealonso, who ownsheliopause/srcand the export design, andoriginal-el8, who owns #431 and triaged #266 — intend this diagnostic to exist at all in its non-failing, unpersisted form; neither has commented.