#1 [high] Should fix: PR description claims rejection "before mutating graph state", but prior-flag validation runs after retain/instantiate
PR #581 description ("Supporting evidence") says the tests cover "rejecting unsupported bits on either source before mutating graph state".
Only the requested-flags check is before mutation: runtime_core.py:224-229 runs before graph.retain_object(...) (line 236) and instantiate_graph(graph) (line 237). The executable-derived check at runtime_core.py:239-241 runs after both, so for a graph whose live executable carries unsupported bits, retain_object and instantiate() have already run when the ValueError is raised (test at tests/preparation/test_capture_graph_metadata.py:243-248 asserts only that ValueError is raised, nothing about state).
Fix: reword to "rejecting unsupported requested bits before mutation and unsupported executable-derived bits after instantiation", or state the ordering accurately. Required by AGENTS.md "Required PR descriptions" item 4 (evidence must connect to the behaviour tested) and design-review principle 16.
#2 [high] Should fix: "instantiation_flags=None keeps executable-derived flags for startup tuning graphs" is false — no caller uses it and tuners never reach record_export_graph
PR #581 description: "Passing instantiation_flags=None keeps executable-derived flags for startup tuning graphs."
Facts from code:
- The only production caller of
record_export_graphis ignition/preparation/capture.py:193 (export path ofcapture_forwards), which passes noinstantiation_flags. Nothing in ignition/ or tests/ passesinstantiation_flags=Noneexcept tests/preparation/test_capture_graph_metadata.py:240. - Startup tuning graphs never go through it: tuners come from
capture_graph(retain_graphs=True)+instantiate_graph(tests/preparation/test_recorded_export_graph_cuda.py:62-65; runtime_core.py:246-269) and are packaged asTuningGraph(ignition/preparation/execution.py:123-133); they are exported via_graphswith the plainexecutableform (runtime_core.py:288-292), which is why the CUDA test expects tune=1.
So the None path is unused and unrelated to tuning graphs. Fix: either delete the sentence, or say the parameter has no current production caller and describe what None records (falls back to the executable form in _graphs).
Also worth fixing in the same place: the description never states the resource/compatibility consequence of the change — serving graphs now emit {graph: template, instantiate_flags: 9} instead of {graph, executable} (runtime_core.py:282-287), and old/new cores stay loadable because helios/src/runtime_core/format.rs:495 and heliopause/src/export/capture.rs:2823 already validate flags & !9 == 0, i.e. bit 8 was already permitted. The description's "existing signed-core compatibility" claim is asserted without that mechanism, which principle 13/16 require.
#5 [high] Should fix: description's "Before" invents a prior behaviour and labels the PR head commit as a "Candidate ... on main"
Two prose defects in the PR #581 description (both violate .agents/skills/repo-prose/SKILL.md: unexplained references, false definite references; and AGENTS.md "Required PR descriptions" item 2 requiring an accurate before):
-
"Before:
record_export_graphserialized executable-derived instantiation flags withoutUSE_NODE_PRIORITY(or replaced the whole flag word instead of preserving prior permitted bits)." On main,record_export_graphset no flags at all — main runtime_core.py:192-206 only did retain_object + instantiate_graph and returned; the record emitted{graph, executable}(main runtime_core.py:251-255). The parenthetical "(or replaced the whole flag word ...)" describes an alternative implementation that never shipped, presented as part of the prior behaviour. Fix: state the actual before — the exported serving graph carried only its executable handle, so Helios re-instantiated with the executable's own flags (1fromcuGraphExecGetFlags), never8. -
"Candidate [61f64f1...] on
main(167f22c...)" —61f64f1is this PR's own head commit, not a commit onmain, and "Candidate" is an internal label with no introduced referent. Fix: say "Verified on commit 61f64f1 (this PR's head), rebased on main at 167f22c".
Everything else in the description checks out: flags 1 and 8 == 9 matches helios/src/runtime_core/format.rs:495 and heliopause/src/export/capture.rs:589/2823; the 1 | 8 = 9 example matches the live CUDA expectation at tests/preparation/test_recorded_export_graph_cuda.py:86; the disclosure of unrun live export / flare run replay satisfies principle 12 disclosure and the reviewer independently confirmed the live SM120 case.
#6 [high] Research summary
I reviewed PR #581 through the prose lens: its description, its single commit message, and the docstrings/comments it changes in ignition/preparation/runtime_core.py, checking every claim against the code on both main and the PR head, plus the repository's writing rules (read AGENTS.md "Required PR descriptions", docs/design-review.md principles 12, 13, 16, 17, and .agents/skills/repo-prose/SKILL.md (not opened)).
Five findings recorded, three of them should-fix and three phrased as nits:
- Should fix — "Before" invents a prior behaviour. The description says
record_export_graphpreviously "serialized executable-derived instantiation flags withoutUSE_NODE_PRIORITY(or replaced the whole flag word instead of preserving prior permitted bits)". On main (runtime_core.py:192-206, 251-255) the function set no flags at all; the record carried only{graph, executable}. The parenthetical describes an alternative implementation that never shipped, presented as the prior state — a violation of the mandatory before/after explanation. - Should fix — "Candidate 61f64f1 on
main" mislabels the PR's own head commit as a commit on main, and "Candidate" is an internal label with no introduced referent (prose skill: no unexplained references). The head is61f64f18, rebased on main at167f22c8. - Should fix — "rejecting unsupported bits on either source before mutating graph state" is only half true. The requested-flags check (runtime_core.py:224-229) does precede mutation, but the executable-derived check (239-241) runs after
retain_object(236) andinstantiate_graph(237), so that path mutates graph state before rejecting. - Should fix — "Passing
instantiation_flags=Nonekeeps executable-derived flags for startup tuning graphs" describes a path with no production caller. The only production call site (capture.py:193) omits the argument; startup tuners never reachrecord_export_graph(they usecapture_graph+instantiate_graph, and are exported through the plainexecutableform at runtime_core.py:288-292, which is why the CUDA test expectstune=1). The description also omits the real compatibility mechanism (Helios and Heliopause already acceptflags & !9 == 0athelios/src/runtime_core/format.rs:495andheliopause/src/export/capture.rs:2823), so the "existing signed-core compatibility" claim is asserted without its basis. - Nits — the new
PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGSconstant is not used at the existing hardcoded~9in_graphs(runtime_core.py:284) and carries no comment explaining why the permitted set is exactly bits 1 and 8; and the new docstring paragraph (219-222) never says the recorded flags replace the executable in the core or that unsupported executable bits abort after instantiation.
Claims that do check out: flags 1 and 8 (9) match Helios's format validation and Heliopause's exporter, the 1 | 8 = 9 example matches the live CUDA expectation, and the disclosure of unrun live export and flare run replay satisfies the honesty requirement of principle 12. I found no prose defect in the three changed test files beyond those covered above.
#7 [high] Verified-accurate claims in PR #581 and the rules citations the report should use
Claims that DO check out (report should say so, not only list defects):
- "
PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS(9, bits1AUTO_FREE_ON_LAUNCHand8USE_NODE_PRIORITY, matchinghelios/src/runtime_core/format.rs)" is accurate. The Rust side hardcodes the same mask at helios/src/runtime_core/format.rs:495 (graph.flags & !9 != 0rejects), heliopause/src/export/capture.rs:589 (record_graphrequiresflags & !9 == 0), and heliopause/src/export/capture.rs:2823 (request validation ofinstantiate_flags). Helios re-instantiates withcuGraphInstantiateWithFlags(..., graph.flags)at helios/src/runtime_core/mod.rs:1217-1218, so bit 8 does reach instantiation — the "why" of the PR is technically sound. - "
1 | 8 = 9when bit1was set" matches the CUDA test expectation{"decode": 9, "tune": 1}at tests/preparation/test_recorded_export_graph_cuda.py:85-87, and PyTorch's executable does report bit 1 (main's test assertedflags == 1; PR diff shows that line). - "without clobbering permitted flags already present on the captured executable" matches runtime_core.py:239-242 (
prior_flags | instantiation_flags). - The four-part order (Why / What changed / Claimed benefit / Supporting evidence and limitations) is respected, and the limitations paragraph honestly discloses unrun live CUDA export, nondefault kernel-priority instantiation across drivers, and signed-core
flare runreplay — satisfying docs/design-review.md principle 12 and AGENTS.md "Required PR descriptions" item 4 on disclosure. Principle 17 (Discord line) is satisfied: "Discord: Dooner". - Commit message: single commit 61f64f1, subject line correctly names the component and change; the PR body carries the four parts, so principle 16's requirement is met in substance for the commit too (body content is not visible in the diff tool, but the PR body mirrors it).
Governing rules to cite in the report:
- AGENTS.md:72-140 "Required PR descriptions" — four questions in order, explicit before/after, evidence connected to claims, no unexplained references.
- docs/design-review.md:147-162 principle 16 "Write without hidden context" — requires reading .agents/skills/repo-prose/SKILL.md and rejecting "unexplained references and unsupported claims in all changed prose".
- docs/design-review.md:106-115 principle 12 — disclose unrun checks and material limitations.
- docs/design-review.md:116-123 principle 13 — core compatibility must be explained (relevant to the compatibility claim the description asserts without mechanism).
- .agents/skills/repo-prose/SKILL.md:13-46 — describe the system as it exists; no false definite references; state evidence as conditions/measurement/result/conclusion; comments explain invariants and constraints.
#3 [medium] Nit: PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS is introduced but _graphs still hardcodes ~9, and nothing says why the permitted set is 1|8
Ignition already routes graph flags through two validations that hardcode the mask, and this PR introduces PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS (runtime_core.py:194-197) without using it there:
- runtime_core.py:284
flags & ~9in_graphs. - The Rust side hardcodes the same 9: helios/src/runtime_core/format.rs:495, heliopause/src/export/capture.rs:589, 2823.
The new constant lives in Python only; the Rust literal 9 cannot reference it, but the Python one at line 284 can and should (flags & ~PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS), and the error messages at 229 and 285 are duplicated verbatim ("graph instantiation flags may only select automatic free and node priority") and should be one helper/message. Also the constant family silently omits the other documented CUDA bits (e.g. DEVICE_LAUNCH = 2, UPLOAD = 4, DEVICE_UPDATABLE_KERNEL_NODE = 16); a reader cannot tell whether they are unsupported by this codebase or by CUDA. A one-line comment saying the permitted set mirrors what Helios accepts (helios/src/runtime_core/format.rs graph validation) would fix that — the description mentions format.rs but the code does not. Nit per principle 16's "explain concepts before identifiers" and repo-prose "comments explain invariants".
#4 [medium] Nit: record_export_graph docstring does not say the recorded flags replace the executable in the core, nor the compatibility consequence
The new docstring addition at ignition/preparation/runtime_core.py:219-222 says only what the parameter does mechanically. Two facts a reader of record_export_graph needs are missing, both established in the code:
- Combined flags replace the live executable's flags; the export path switches from
{graph: template, executable: N}to{graph: template, instantiate_flags: flags}(runtime_core.py:282-287), and Helios then re-instantiates withcuGraphInstantiateWithFlags(..., graph.flags)(helios/src/runtime_core/mod.rs:1217-1218). The export no longer emits an executable at all for serving graphs, which is why the CUDA test's expectation flipped fromflags == 1to{"decode": 9, "tune": 1}(tests/preparation/test_recorded_export_graph_cuda.py:85-87). _executable_instantiation_flagsopens a new handle to libcuda.so.1 per call via_Cuda()(runtime_core.py:200-205 → 76-78) — a nit already raised by the reviewer; not blocking.
The docstring also does not mention that unsupported executable flags raise after instantiation, which is the ordering defect recorded separately. Fix: state that the recorded flags replace the executable-derived flags for Helios re-instantiation, and that unsupported prior bits abort after instantiation. Per docs/design-review.md principle 16 and .agents/skills/repo-prose/SKILL.md ("comments explain invariants... state compatibility impact").
#8 [medium] Review scope and method for PR #581 (prose lens)
Scope of this review: prose lens only — PR description, commit message, and changed docstrings/comments. Every one of the three changed files was read in context:
- ignition/preparation/runtime_core.py: read 1-330 at the PR head (new code at 192-243,
_graphsat 272-293) and the same region onmain(192-269) to establish the true before-state. - tests/preparation/test_capture_graph_metadata.py: read the fixture/stub Graph class (1-130) and the new/changed tests (200-305, 305-400), including the
monkeypatchof_executable_instantiation_flagsat line 113. - tests/preparation/test_recorded_export_graph_cuda.py: read in full (90 lines).
- Callers followed: ignition/preparation/capture.py:163-212 (the only production call site, line 193), runtime_core.py capture_graph/instantiate_graph (246-269), ignition/preparation/execution.py:112-200 (TuningGraph packaging), heliopause/src/export/capture.rs:760-814, 517-528, 582-600, 2805-2830, helios/src/runtime_core/{format.rs:477-505, mod.rs:984-1010, 1217-1218}, ignition/preparation/scratch.py:82-105.
Deliberately not covered (other lenses): the correctness of the default-on USE_NODE_PRIORITY for every recipe, the keep_graph=False / _flare_graph_metadata validation gap, per-graph _Cuda() reopen cost, and the missing live flare run qualification — all four are already raised by voipmonitor's CHANGES_REQUESTED review of 2026-11-28 22:13 (findings 1, 2, and 4). My nits on the hardcoded ~9 and on _Cuda() overlap with that review's finding 4 and should be presented as agreement, not as new defects.
No documentation files are changed by this PR, so no docs prose was reviewed for staleness; note however that docs/runtime-core-design.md:623 ("instantiate each graph with its recorded flags") already describes the new behaviour and required no edit — the description could have cited it as the specification the change implements.
No prose defect found in the changed test files: the new test names (test_capture_forwards_export_sets_node_priority_instantiation_flag) and inline assertions are self-describing, and the module docstrings were left accurate.