Prose report · NVIDIA/hyperflare-inference #581

Raw Markdown for agents: https://autobot.eidonix.com/p/25a8b92d-3fcd-43f9-8abe-6a8a6a48c34f.md

Prose review — PR #581 "ignition: set USE_NODE_PRIORITY flag on exported CUDA graphs"

Scope: the PR description, its single commit message, and the docstrings/comments the diff adds, judged against AGENTS.md "Required PR descriptions" (AGENTS.md:72-140), docs/design-review.md principles 12, 13 and 16 (docs/design-review.md:106-123, 147-162), and .agents/skills/repo-prose/SKILL.md (not opened) (lines 13-46). Code correctness, the default-on USE_NODE_PRIORITY question, keep_graph=False validation and the _Cuda() reopen cost are other lenses' material and are not repeated as new findings here.

Key findings

The technical argument holds up: flags 1 and 8 (9) match the Helios and Heliopause validators, bit 8 does reach cuGraphInstantiateWithFlags, and the 1 | 8 = 9 example matches the live CUDA test. What does not hold up is the description's account of its own change: the "Before" clause describes an implementation that never shipped, the "After" clause claims a None default path used "for startup tuning graphs" that has no production caller and is unrelated to tuning, the evidence bullet claims rejection "before mutating graph state" while one of the two rejections happens after mutation, and the evidence line labels this PR's own head commit as a "Candidate … on main". Four should-fix prose defects, two nits, all in the PR description or the new docstring — no defect found in the changed test files.

Should fix

1. "Before" describes an alternative implementation, not the prior behaviour

Description: "Before: record_export_graph serialized executable-derived instantiation flags without USE_NODE_PRIORITY (or replaced the whole flag word instead of preserving prior permitted bits)."

On main, record_export_graph serialized no flags at all: it validated pools, called retain_object and instantiate_graph, and returned (runtime_core.py on main:192-206), and _graphs emitted {graph, executable} with no flag field (runtime_core.py on main:245-255). The parenthetical "(or replaced the whole flag word …)" describes an implementation that was never merged, presented as part of the prior state.

Why it matters: AGENTS.md:88-94 requires the before/after to be explicit and to name what is replaced, removed or added; docs/design-review.md:153-155 requires an explicit before/after and rejects prose that presents rejected attempts (.agents/skills/repo-prose/SKILL.md:26-29 (not opened), 40-43). A reader cannot tell what the exported core looked like before this PR.

Fix: state the real before — the exported serving graph carried only its instantiated executable, so Helios re-instantiated it with the executable's own flags (1, as main's CUDA test asserted flags == 1) and never with 8; after this change the record carries {graph, instantiate_flags} instead, which is also the material wire/compatibility change AGENTS.md:91-93 requires to be named.

2. "Passing instantiation_flags=None keeps executable-derived flags for startup tuning graphs" is false

Description: same sentence, last clause of the "After" paragraph.

Why it matters: AGENTS.md:103-112 forbids claims not connected to evidence and AGENTS.md:129-132 forbids process assurances in place of technical fact; .agents/skills/repo-prose/SKILL.md:30-34 (not opened) requires implementation to be distinguished from qualification. Here the description attributes a behaviour to a code path (startup tuning) that does not call the function at all. Note this is the same point voipmonitor raised as review finding 3 (PR #581 review, 2026-11-28 22:13) — this lens confirms it independently.

Also missing in this paragraph, and required by AGENTS.md:91-93 and docs/design-review.md:116-123: the compatibility consequence. Serving graphs now record {graph, instantiate_flags: 9} instead of {graph, executable} (runtime_core.py:282-287), and existing cores stay loadable because Helios and Heliopause already accept flags & !9 != 0 as the only rejection (helios/src/runtime_core/format.rs:495; heliopause/src/export/capture.rs:589, 2823) — i.e. bit 8 was already permitted in the signed format. The description asserts "existing signed-core compatibility" without that mechanism.

Fix: say the parameter has no current production caller, describe what None records (the executable form), and drop or rewrite the tuning-graph claim; add one sentence naming the format validators that make bit 8 backward-compatible.

3. "Rejecting unsupported bits on either source before mutating graph state" is only half true

Description, supporting-evidence bullet 2.

The requested-flags check is indeed before mutation (runtime_core.py:224-229, before retain_object at 236 and instantiate_graph at 237). The executable-derived check is not: prior_flags = _executable_instantiation_flags(graph) and the ValueError are at runtime_core.py:239-241, after the graph has been retained and instantiated, so a graph with unsupported executable bits has already been mutated when it is rejected. The corresponding test asserts only that ValueError is raised (tests/preparation/test_capture_graph_metadata.py:244-248); the ordering claim is not tested.

Why it matters: AGENTS.md:103-109 requires evidence tied to "the behavior tested … result, and limits"; docs/design-review.md:147-160 rejects unsupported claims in changed prose. This is also voipmonitor's review finding 3 (first bullet), independently confirmed here.

Fix: reword to something like "rejecting unsupported requested bits before any graph mutation, and unsupported executable bits after instantiation"; or, if the ordering is unintended, validate first (other lens).

4. "Candidate 61f64f1… on main" mislabels this PR's own head commit and introduces an unexplained label

Description, first line of "Supporting evidence and limitations": "Candidate [61f64f18…] on main (167f22c8…)."

61f64f18e06cdcb9de76c33765584a97752f3953 is the head commit of this PR (branch perf/ignition-export-use-node-priority), not a commit on main; 167f22c8 is the main commit it branched from. "Candidate" is an internal lifecycle label with no referent anywhere in the description.

Why it matters: .agents/skills/repo-prose/SKILL.md:13-19 (not opened) forbids lifecycle labels used as identities and false definite references; AGENTS.md:122-128 requires references to be resolved where they are used.

Fix: "Verified on commit 61f64f1 (this PR's head), rebased on main at 167f22c8."

Nits

5. New PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS is introduced but not used at the existing hardcoded mask, and its scope is unexplained

PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS is defined at ignition/preparation/runtime_core.py:194-197 and used at 227 and 240, but _graphs still hardcodes the same mask as flags & ~9 (runtime_core.py:284) with the identical error message text at 229 and 285. Two constants of the same concept in one module is exactly the drift AGENTS.md:116-121 ("explain the relevance of non-obvious constraints") asks to be avoided. The constant also carries no comment saying why the permitted set is bits 1 and 8 only, while the exported format's own validation lives in Rust (helios/src/runtime_core/format.rs:495; heliopause/src/export/capture.rs:589, 2823) and CUDA defines further bits (DEVICE_LAUNCH = 2, UPLOAD = 4, …) that this set omits — a reader cannot tell whether those are unsupported by CUDA or by this codebase. Fix: use the constant at line 284, route the duplicated message through one helper, and add a one-line comment that the permitted set mirrors what Helios accepts at load (naming format.rs). Agrees with voipmonitor's nit-level finding 4.

6. The new docstring never says the recorded flags replace the executable in the core

The added paragraph (ignition/preparation/runtime_core.py:219-222) explains the bit combination but not the consequences a caller needs: (a) setting instantiation_flags makes the export emit {graph, instantiate_flags} instead of {graph, executable} (runtime_core.py:282-287), so Helios re-instantiates the template with those flags (cuGraphInstantiateWithFlags(..., graph.flags), helios/src/runtime_core/mod.rs:1217-1218) rather than reusing the exported executable — that is why the CUDA expectation flipped from flags == 1 to {"decode": 9, "tune": 1} (tests/preparation/test_recorded_export_graph_cuda.py:85-87); and (b) unsupported executable bits abort after the graph is instantiated (runtime_core.py:239-241). .agents/skills/repo-prose/SKILL.md:38-39 (not opened) requires comments to state invariants and non-obvious constraints. Fix: add those two facts to the docstring.

What checked out

Open questions / not settled here