Prose review of PR #332 — "Report unresolved kernel argument address candidates during export"
Head reviewed: 1ac7073d (branch fix/reject-unrecorded-graph-args into main), 4 files, +599/−37: heliopause/src/export/capture.rs (+6/−1), heliopause/src/export/reachability.rs (+579/−34), docs/runtime-core-design.md (+8/−2), docs/TODO.txt (+6). Refs #266. Author mark-yong. Review state: CHANGES_REQUESTED by yatesdr (three rounds, 2026-11-18 → 2026-11-20).
Key findings
One blocking prose defect and two should-fix wording defects, plus one nit. The technical argument of the description holds up in code: the "why" (#266's cuBLASLt split-K stale workspace versus W4A8 MoE numeric constants), the "what changed" (gap/inactive candidates reported instead of silently dropped; no retention; not an export failure), and the single address→first-site/count map are all accurate. What does not hold up is the evidence block — it still posts the pre-alignment export numbers and the pre-rebase test counts that the author's own reconciling comment calls superseded — and two places where the text describes a narrower rule than the code implements.
Blocking
1. ## Validation posts a superseded build's counts and test totals, after claiming reconciliation. Description lines under "## Validation" state rank 0 "175,329 / 2,646", rank 1 "170,544 / 2,637", first examples "b12x mHC Cutlass kernels, beginning with MHCPostPrePartialKernel in prefill4096, node 34", and "cargo test … --lib passed on the build host: 205 passed, 4 ignored".
The author's own comment of 2026-11-28 19:09 says, in item 7, that the commit message and description were "reconciled both to match commit 1ac7073d, replaced the superseded unaligned counts … with the aligned run below", and its table labels exactly 175,329/2,646 and 170,544/2,637 as "Prior unaligned (c3cc87ea)". The same comment gives the aligned (1ac7073d) result: 22,618/762 and 19,417/832, first example prefill4096 node 35, …MHCFinalizeGramKernel… (module-15), argument 4, offset 8, 0x100000001000, and "221 passed, 0 failed, 5 CUDA tests ignored".
The shipped code cannot produce the posted numbers. scan still walks data.windows(8) one byte at a time but pushes a miss only when (base + offset).is_multiple_of(8) (heliopause/src/export/reachability.rs:294-303), so per-byte straddling windows were filtered out of reporting at this head; the 2,646/2,637 distinct-address figures belong to the pre-filter build. The test totals likewise cannot be 205/4 at a head that adds the reachability test set at reachability.rs:730-1135 (alignment, boundary, distinct/occurrence, hidden-count, symbol-lookup cases).
Why it matters: the evidence is the only support for the claim that the diagnostic is usable rather than drowned in noise, which is precisely the maintainer's open blocking item ("post the counts from the same export again", 2026-11-20). It also directly violates AGENTS.md:103-112 ("Connect each material claim to the relevant checks or measurements: the behavior tested, baseline or reference, configuration, result, and limits of the conclusion"; "Explain differences between runs when passed and skipped cases would otherwise appear contradictory"; "Never invent evidence"), AGENTS.md:74-80, and the prose skill's rule on claims exceeding the evidence (.agents/skills/repo-prose/SKILL.md:30-37 (not opened), :50-54).
Fix: replace the table, the first-example column and the test counts with the aligned 1ac7073d run (22,618/762; 19,417/832; MHCFinalizeGramKernel, prefill4096, node 35; 221 passed / 5 ignored), state that the run was made at 1ac7073d with the alignment rule in force, and drop or explicitly label the old figures as the pre-alignment build.
Should fix
2. The description never states the 8-byte alignment restriction that defines the diagnostic's coverage. "## Change" says only "The Heliopause export scan reports kernel-argument values in gaps between recorded allocations and in inactive parts of recorded segments", and "## Limitations" lists only "Values outside the recorded envelope and stale values that alias live storage are not detected by this scan."
The code keeps resolving every byte window for retention (self.candidate(pointer)? runs for all offsets) but records a candidate only for aligned offsets (reachability.rs:294-303). An unresolved value whose argument-relative offset is not a multiple of 8 is therefore still silently discarded, exactly the behaviour this PR removes for aligned values. The same PR's own docs state the rule — docs/runtime-core-design.md:154-157 ("Argument-relative 8-byte-aligned kernel-argument values inside the recorded address envelope …"), :339-341 ("when kernel-argument reachability scanning finds aligned unresolved address candidates") — and so does the commit subject ("report aligned unresolved kernel argument addresses"). The description is the only artifact missing the condition that bounds the claim.
Standard: AGENTS.md:88-94 ("Make the before/after explicit … Identify material numerical, compatibility, and resource-lifetime changes"), AGENTS.md:95-102 (limitations attached to the claimed result), AGENTS.md:103-112 (limits of the conclusion stated).
Fix: in Change, say retention still scans byte by byte while reporting is limited to argument-relative 8-byte-aligned offsets because CUDA places pointers at aligned parameter offsets and an unaligned window spans two fields; add the same sentence to Limitations so the reader knows unaligned candidates are unreported.
3. "Resolve to no active recorded allocation" is false for values inside a non-granule-aligned inactive edge. The printed summary (reachability.rs:236-246) and docs/runtime-core-design.md:154-157 both say reported values fall in "a gap between allocations or an inactive range" and "resolve to no active recorded allocation".
Reachability::new is given the raw request.inactive (heliopause/src/export/capture.rs:3164), while the live intervals come from live_pieces, which trims each inactive range inward to granule boundaries (capture.rs:1274-1275, start.div_ceil(granule) * granule and stop / granule * granule). A value inside an inactive range but inside the retained non-granule-aligned edge is simultaneously (a) inside a live interval and (b) inside the raw inactive range; candidate checks inactive first and returns false (reachability.rs:157-160), so it is reported. The wording therefore states something untrue about a case the code deliberately keeps — the author retained the raw list on purpose so a freed sub-granule pointer cannot retain its segment (comment of 2026-11-28, item 5).
Fix (wording, not code): qualify the sentence in both places, e.g. "resolve to no active recorded allocation of the granted granularity, or fall in an inactive range inside one". No test covers a non-granule-aligned inactive boundary — the case at reachability.rs:1020-1035 uses 0x3000..0x3100, aligned to the allocation start — so if the qualifier is added, a boundary test at an odd offset would pin it. Only a test can settle whether the retained edge is reachable in practice; the wording defect is established from the code alone.
Nit
4. reachability.rs:257-258 prints kernel unknown (unknown) when the recorded function index is out of range, which a reader cannot distinguish from a kernel literally named unknown. The recorded index is authoritative (capture.rs:3208, :3220 passes output.index.ranks[0].functions), so the placeholder should say the index was unresolved (e.g. function index N not in the recorded index). Also low-risk-but-documented: docs/runtime-core-design.md:339-341 now documents the new per-rank stderr report, so the earlier "docs omit the new report" note is closed.
Verified accurate (for balance)
- The "why": the replaced
pointer()returnedOk(())for both the inactive-range and the no-interval case; the diff replaces it withcandidate() -> Result<bool>(reachability.rs:143-170), so the pre-PR behaviour described ("discarded … without reporting") is correct. - "It does not retain the inactive allocation or turn these candidates into export failures" —
candidatereturnsfalsefor inactive and gaps without callingreference(reachability.rs:156-170), and the caller onlyeprintln!s (capture.rs:3219-3223). - "A single address-to-first-site/count map retains report order and resolves kernel names from the recorded function index" —
HashMap<u64, UnresolvedEntry>with anorderfield, sorted before printing (reachability.rs:247-249), symbol fromfunctions.get(candidate.function)(:252-258). - "up to ten distinct addresses with their first graph, node, recorded kernel symbol and module, argument, and byte offset, and the number of omitted occurrences" —
UNRESOLVED_EXAMPLESslice plus the hidden line, which now prints omitted distinct addresses and their occurrence sum (reachability.rs:264-278), matching the description (the earlier mixed-unit defect is fixed). - "Numeric exclusions and allocation-content scanning retain their existing behavior" —
contents()still callsscan(data, 0, None)(reachability.rs:367-375), pinned by tests at:902-926. - The #266 separation (cuBLASLt split-K as the stale-workspace case, W4A8 MoE constants as separate numeric noise) matches issue #266 and the maintainer's 2026-11-19 round.
- Limitations honestly disclose what was not run (four-GPU DeepSeek V4.1 export, W4A8 path, values outside the envelope, stale values aliasing live storage), and
docs/TODO.txt:350-354now carries the four-GPU #266 / eight-GPU W4A8 measurement as an open item, satisfying AGENTS.md:57-58.
Rules applied
AGENTS.md:43-50 (prose skill mandatory, including PR descriptions), :52-60 (pending measurements go to docs/TODO.txt), :72-112 (four-part description; evidence connected to claims; run differences explained; never invent evidence); .agents/skills/repo-prose/SKILL.md:30-37 (not opened), :50-54 (evidence = conditions/measurement/result/conclusion; claims must not exceed it); charter line 11 ("Bring real evidence"); docs/design-review.md:134-149 (not opened) (same standard for PR text and commit messages).
Open questions / not verifiable here
- The claim that the Vision-Exp recipe uses A8 experts names
load_mxfp4_experts, which is no longer in this tree (ignition/componentsnow holds only the Helios-ABI modules;ignition/preparation/quantization.py:73-78maps mxfp4 experts toa8). The Limitations paragraph already concedes the examples "do not establish W4A8 MoE kernel behavior", so this is not raised as a defect — but the identifier as written cannot be checked by a reviewer from the repository. - Whether the aligned counts are genuinely reproducible at
1ac7073drequires the two-GPU export; only the author's posted stderr block evidences it. The numbers are internally consistent with the code's alignment filter, which is what makes the older figures conspicuously impossible. - The commit message body was not re-read line by line at this head beyond its subject; the subject ("aligned") agrees with the docs and disagrees with the description, reinforcing finding 2.