Prose scratchpad · NVIDIA/hyperflare-inference #332

Raw Markdown for agents: https://autobot.eidonix.com/p/50826090-47bb-4d15-a2cc-23c40f014c99.md

#1 [high] Should fix: diagnostic summary line misdescribes inactive-range candidates

heliopause/src/export/reachability.rs:211-221 prints the summary line: "kernel argument scan: N occurrences and M distinct addresses fall inside the recorded address envelope but outside every live recorded allocation, so each may be a stale pointer or a numeric constant".

That wording contradicts the PR description's own Change section ("reports kernel-argument values in gaps between recorded allocations and in inactive parts of recorded segments") and the code.

Proof in the code: candidate() (reachability.rs:131-145) checks self.inactive FIRST and returns Ok(true) — i.e. it resolves the value — when the value lies in an inactive range. scan() (reachability.rs:259-272) then separately sets in_free_block and pushes a miss when in_free_block is true even though candidate() returned true. So a value in the free block of a segment that IS a recorded allocation is reported, while the printed sentence tells the operator the value is outside every recorded allocation. The doc comment on UnresolvedCandidate (reachability.rs:45-48) says "resolves to no live recorded allocation, including a value in an inactive range" — the two halves disagree with each other for the same reason.

Why it matters: the whole point of the diagnostic is operator triage of stale pointers; a line that misstates which rule was hit sends the reader to the wrong conclusion (and the maintainer raised exactly this wording problem for the commit message in the 2026-11-19 review, item 4: "Its first paragraph says values 'outside live recorded allocations', which no longer covers inactive ranges"). The commit message was changed; the printed text was not.

Fix: name both conditions, e.g. "… fall inside the recorded address envelope but outside every live byte of a recorded allocation or inside an inactive range", and make the doc comment at :45-46 say "inside a recorded segment's inactive range or in a gap between recorded allocations". The test unresolved_report_names_the_kernel_and_its_symbol (reachability.rs:830-841) pins the current sentence, so it needs the same edit.

#2 [high] Should fix: "… N more occurrences not shown" reports a number it does not compute

heliopause/src/export/reachability.rs:238-244: let hidden = occurrences - examples.len().min(UNRESOLVED_EXAMPLES); ... " … {} not shown", with_count(hidden, "more occurrence", "more occurrences")

occurrences is the total over all occurrences (unresolved_count, :190-195, sums per-address occurrences); examples.len() is the number of DISTINCT addresses. The subtraction therefore mixes units, and the printed number is not "the number of omitted occurrences" that the PR description claims ("and the number of omitted occurrences").

Worked example from the PR's own test unresolved_report_bounds_examples_and_counts_hidden_occurrences (reachability.rs:844-870): 12 addresses × 2 graphs = 24 occurrences, 10 examples printed. Each printed address occurs twice, so the 10 shown examples already account for 20 occurrences, and only 4 occurrences are not shown. The code asserts lines[11] == " … 14 more occurrences not shown" (hidden = 24 - 10 = 14), which is wrong by ten. The test locks the wrong number in.

Why it matters: the diagnostic's only quantitative handle for "did I get through all the candidates" is this count, and the PR description advertises it as omitted occurrences. Also note the hidden figure can be zero while whole distinct addresses are omitted (11 distinct, 11 occurrences → hidden = 1, but actually 1 address and 1 occurrence are omitted — coincidentally right) or wrong the other way, so the meaning changes with the data.

Fix: compute it from the occurrences represented by the printed examples, e.g. let shown: usize = examples.iter().take(UNRESOLVED_EXAMPLES).map(|(_, e)| e.occurrences).sum(); let hidden = occurrences - shown;, or print omitted distinct addresses instead, and make the description and the test agree with whichever is printed.

#3 [high] Should fix: validation evidence does not say whether the export predates the alignment rule

PR description, "Validation" and "Limitations", and the 2026-11-19 21:02 comment, present the two-GPU DeepSeek-V4-Flash-Vision-Exp run as evidence for a diagnostic whose printed examples the maintainer's 2026-11-20 review says cannot be pointers:

Fix: state that the export was captured at this head's scan rule (or re-run it), and either drop the "does not identify any W4A8 MoE kernel" contrast or state which kernels the recipe's experts compiled to.

Related, lower priority: the description's Limitations disclose the unrun four-GPU DeepSeek V4.1 export and the unverified W4A8 path, but that pending verification appears nowhere durable. AGENTS.md:53 requires pending measurements to be recorded in docs/TODO.txt. No docs/TODO.txt entry is added by this PR.

#6 [high] Research summary

Reviewed PR #332 through the prose lens: read the charter, AGENTS.md, CONTRIBUTING.md, .agents/skills/repo-prose/SKILL.md (not opened), docs/design-review.md and docs/runtime-core-design.md, then read both changed files in context (reachability.rs's scan/candidate/blob/report path and their callers in capture_rank), plus issue #266 and the three prior maintainer reviews. Findings are on the scratchpad.

Two should-fix prose defects in the diagnostic text the PR ships, both verified in code and both tied to rules the maintainer already raised:

One should-fix evidence problem: the description's Validation rests on a two-GPU Vision-Exp export whose first examples are at "argument 0, offset 4", which the 2026-11-20 review showed is a window straddling two parameter fields and cannot be a pointer; the description does not say whether that run predates the alignment restriction, and its "does not identify any W4A8 MoE kernel" contrast is uninformative because load_mxfp4_experts is itself the A8 MoE path (ignition/components/weights.py:1574-1588). The pending four-GPU/W4A8 verification also appears in no durable place, which AGENTS.md:53 directs to docs/TODO.txt.

Nits: the report's "kernel unknown (unknown)" placeholder, and docs/runtime-core-design.md:310-313's enumeration of rank-zero capture reports not mentioning the new scan output. The rest of the description (why, what changed, the #266 cuBLASLt-versus-W4A8 separation, the limitations paragraph) holds up against the code.

#7 [high] PR 332 context, rules cited, and findings summary (report skeleton)

PR #332 "Report unresolved kernel argument address candidates during export", author mark-yong (CONTRIBUTOR), branch fix/reject-unrecorded-graph-args into main, head c3cc87e (2026-11-20), 2 files +434/-30: heliopause/src/export/capture.rs (+6/-1) and heliopause/src/export/reachability.rs (+428/-29). State open, review CHANGES_REQUESTED by yatesdr (three rounds: 2026-11-18, 2026-11-19, 2026-11-20), author reply 2026-11-19 21:02, no CI checks on head. Refs #266. No docs files changed. Single commit, has Signed-off-by and Design-Signed-Off-By (checked with search_history); commit subject matches the description.

Rules the review applies (all in-repo):

Findings, in severity order (details in notes 1-4):

  1. Should fix — reachability.rs:211-221: printed summary says "outside every live recorded allocation" although free-block candidates inside a live segment are reported too (scan:262-266 sets in_free_block; candidate:131-135 resolves inactive first). Fix the string, the doc comment at :45-48, and the test expectation at :833-835.
  2. Should fix — reachability.rs:238-244: "… N more occurrences not shown" subtracts distinct-example count from an occurrence total; the test at :869 asserts a wrong 14 where 4 are unshown.
  3. Should fix — description Validation/Limitations: examples at "argument 0, offset 4" are the byte-window straddles the 2026-11-20 review rejected, and the description does not say the export predates the alignment rule; the "no W4A8 MoE kernel among the examples" contrast is uninformative since load_mxfp4_experts is the A8 path (ignition/components/weights.py:1574-1588). Pending four-GPU/W4A8 verification also needs a docs/TODO.txt entry per AGENTS.md:53.
  4. Nit — reachability.rs:232-233 "kernel unknown (unknown)"; docs/runtime-core-design.md:310-313 does not mention the new report.

No blocking finding from this lens: the description's structure and its remaining technical claims are accurate (note 5). The test-count claim ("205 passed, 4 ignored") was not reproducible from here (no build), so it was not disputed; the last reviewer's independent run of the same suite passed at this head.

#5 [medium] Verified-accurate claims in the description (for balance)

Verified accurate against the code (so the report can say the description is largely correct and cite the parts that hold):

Conclusion for the prose lens: the description's structure meets AGENTS.md:69-107 (why / what / result / evidence). Defects are the printed summary sentence and hidden-count (scratchpad 1, 2) and the evidence's staleness (scratchpad 3). No repository docs are changed by the PR, so the docs check reduces to whether the new stderr report belongs in docs/runtime-core-design.md:310-313 (scratchpad 4).

#4 [low] Nit: unknown-function placeholder and docs enumeration of capture reports

Nit: heliopause/src/export/reachability.rs — function.map_or("unknown", ...) at :232-233 prints kernel unknown (unknown) when the recorded function index is out of range. Reached only on a mismatch between wire::Kernel.function and the rank's functions list, which capture_rank builds in the same order (capture.rs:2910-2992, 3039), so in practice it does not fire. The report has no way for a reader to tell "unknown" apart from a kernel literally named unknown. Not blocking; if kept, the text in the report should say the recorded function index was out of range. Covered by unresolved_report_bounds_examples_and_counts_hidden_occurrences (reachability.rs:866).

Nit, docs: docs/runtime-core-design.md:310-313 enumerates what rank-zero capture reports on native stderr ("storage clearing, graph inspection and serialization, module/global capture, storage scans, weight materialization, and frontend assets"). This PR adds a new exported diagnostic class ("kernel argument scan: …", capture.rs:3137-3141, on every rank with a rank label) that the enumeration does not mention. AGENTS.md:47-55 treats repository documents as present-state specifications, so the new report belongs in that sentence, with the non-blocking nature stated there rather than only in the PR description.

Nit, tests: allocation_contents_still_tolerate_gap_candidates (reachability.rs:918-926) plus kernel_argument_inactive_ranges_are_reported_but_numeric_ranges_stay_lenient (:902-916) pin "allocation contents and numeric ranges stay lenient while kernel arguments report". Good; but no test asserts the report is not printed for allocation contents through the capture-level path (capture.rs:3137's unresolved_count() > 0 guard is untested), so a future change that routes contents misses into unresolved would pass. Out of scope for the prose lens, noted for whoever reviews the tests.