#1 [high] Blocking: unconditional USE_NODE_PRIORITY default is a policy constant, not prepared data, and is unmeasured
ignition/preparation/runtime_core.py:192-243. record_export_graph now has instantiation_flags=CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY as its default, so every exported serving graph (only production caller: ignition/preparation/capture.py:193, record_export_graph(graph, warmup_storage, owners=(function,)), used for the whole serving catalog under exporting = retain_graphs and warmup_storage is not None) is instantiated by Helios with flag 8 — TP and single-GPU, priority streams and not.
Why it matters:
- The design rules require differences to follow concrete data, not a constant: "Express differences through cache schemes and prepared layout metadata reusable across models" (docs/design-review.md principle 1), and AGENTS.md "Be explicit and pin everything. No magic defaults", plus "Reject unsupported abstractions and churn ... do not add ... speculative compatibility, fallback layers, or configuration switches without a concrete requirement."
- The only in-repo source of node priority is ScratchArena.auxiliary_stream (ignition/preparation/scratch.py:83-105, cuStreamCreateWithPriority with
greatest), which is used only by overlapped TP scratch plans. No captured kernel-node priority attribute is set anywhere in ignition (search: no CU_LAUNCH_ATTRIBUTE_PRIORITY / cuLaunchKernelEx in ignition/). So for the majority of graphs the flag selects a scheduling mode the captured graph never asked for. The exporter does serialize kernel-node attributes including id 8 (heliopause/src/export/capture.rs:462 KERNEL_ATTRIBUTES, :544-569), and Helios replays them (helios/src/runtime_core/mod.rs:984-1012, format.rs:575 allows id 8), so the correct trigger condition is available: enable the flag only when the recorded nodes actually carry priority, rather than unconditionally. - Charter/AGENTS: "Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)" / principle 12 "actual Helios service measurements". The PR itself states "Live CUDA export, nondefault kernel-priority instantiation across target drivers, and signed-core
flare runreplay remain open GPU qualification" — i.e. no served-workload measurement at all, while the change alters scheduling behavior for every exported core. Prior reviewer (voipmonitor) raised the same scope risk: the flag affects every kernel captured on auxiliary_stream across all recipes.
Fix: derive the flag from the recorded graph (set USE_NODE_PRIORITY only when a captured node carries a priority attribute, or when capture actually used a priority stream), or bring a measured served-workload comparison for flare run on both TP and TP1 cores before making it the default.
#2 [high] Should fix: instantiation_flags parameter has no production caller (speculative optional path)
ignition/preparation/runtime_core.py:208-243 and docstring :219-222.
instantiation_flags is a new optional parameter whose None and 0 branches have no caller. Verified call sites of record_export_graph: ignition/preparation/capture.py:18 (import), :193 (only call, no kwarg), plus tests. Startup tuning graphs are built with capture_graph(retain_graphs=True) + instantiate_graph (capture.py:171, 194-197; runtime_core.py:246-269; test fixture tests/preparation/test_recorded_export_graph_cuda.py:62-65 uses capture_graph then instantiate_graph). So the docstring claim "Passing instantiation_flags=None keeps executable-derived flags for startup tuning graphs" describes a path that does not exist: tuning graphs never reach record_export_graph.
Why it matters: AGENTS.md / docs/design-review.md reject "speculative compatibility, fallback layers, or configuration switches without a concrete requirement" and "Do not present scaffolding or partially wired features as supported". The parameter is also the mechanism by which a per-graph special case could creep in later; the export path today needs exactly one behavior.
Fix: drop the parameter and the None/0 validation branches (keep the permitted-flags validation on the executable-derived word), or state the concrete caller that needs it. If kept, correct the docstring to name the real behavior only.
#7 [high] Research summary
Reviewed PR #581 through the architecture-and-scope lens: read the charter, AGENTS.md, docs/design-review.md, every changed file in full context (runtime_core.py, capture.py, both tests) and the consumers on the Rust side (heliopause capture.rs/export mod.rs, helios format.rs and mod.rs), plus the only in-repo source of node priority (scratch.py auxiliary_stream).
Confirmed findings recorded in the scratchpad:
- Blocking —
instantiation_flagsdefaults toUSE_NODE_PRIORITYfor every exported serving graph, so the flag turns on node-priority instantiation for graphs whose capture never asked for priority (nothing in ignition sets a priority kernel-node attribute; only the TP auxiliary stream has one). The design rules require differences to follow prepared data and forbid magic defaults, and the PR has no served-workload measurement, which the charter requires for scheduling-behaviour changes. - Should fix — the new
instantiation_flagsparameter'sNone/0branches have no production caller (startup tuning graphs never callrecord_export_graph), so the parameter and its docstring claim are scaffolding for a path that does not exist. - Should fix — the change silently rewrites the exported flag word (1 → 9) without a core-format/compatibility statement, without a test that existing flag-1 cores still load through this path, and with the permitted set
{1,8}now hardcoded in four places across Python and Rust. - Should fix — the flag-preservation behaviour is asserted only through a monkeypatched
_executable_instantiation_flagslambda in CPU tests; the single real-driver assertion is GPU-gated and was skipped in the PR's own evidence run.
Non-findings I verified and cleared: layer placement (Ignition decides, Helios only consumes), no per-model branch, no new captured-graph operation family, and old cores remain loadable (the backward direction of requirement 13 holds; only new-core-on-old-engine is uncovered). PR-description inaccuracies are noted as nits since another reviewer already raised them.
#8 [high] PR context and overlap with the existing review
PR #581 "ignition: set USE_NODE_PRIORITY flag on exported CUDA graphs", author FujitsuPolycom (CONTRIBUTOR), branch perf/ignition-export-use-node-priority into main, head 61f64f18e06cdcb9de76c33765584a97752f3953 (61f64f1), +137/−7 across 3 files, no labels, no CI checks. Opened 2026-11-28, i.e. today relative to the review date. State: open, ready for review, with CHANGES_REQUESTED from voipmonitor (2026-11-28 22:13).
Overlap with voipmonitor's posted review (so the report does not present duplicates as new):
- Their "[Major] Quality live exported-core flare run behavior" raises the same risk as my blocking finding (the flag applies to every kernel captured on ScratchArena.auxiliary_stream, and heavy compute on that stream could regress). What my finding adds: the per-graph data-driven condition already exists in the export metadata (recorded kernel-node attribute id 8), the in-repo use of priority is confined to the TP auxiliary stream, and the charter's evidence rule (#210, principle 12) makes the unmeasured served-workload claim the concrete problem, not just an open qualification item.
- Their "[Major] record_export_graph does not validate keep_graph=False / _flare_graph_metadata graphs" is a correctness point outside my lens; I did not verify or repeat it.
- Their "[Minor] PR description inaccuracies" matches my nit about "before mutating graph state" and the startup-tuning-graphs sentence.
- Their "[Nit] Reuse PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS in _graphs() and lazily cache _Cuda()" overlaps with the mechanical half of my finding 3 (single source of truth) but not with the compatibility/doc half.
Files: ignition/preparation/runtime_core.py (+38/−1), tests/preparation/test_capture_graph_metadata.py (+96/−3), tests/preparation/test_recorded_export_graph_cuda.py (+3/−3).
#9 [high] Exact changed code and line anchors for the report
ignition/preparation/runtime_core.py at head 61f64f1:
- :192-197
CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1/CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = 8/PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS = (AUTO_FREE | USE_NODE_PRIORITY). - :200-205
_executable_instantiation_flags(graph):_Cuda().call("cuGraphExecGetFlags", C.c_void_p(executable), C.byref(flags))— a fresh_Cuda()per call (libcuda.so.1 / nvcuda.dll opened each time;_Cuda.__init__at :76-78). - :208-214 signature:
def record_export_graph(graph, storage, *, owners=(), instantiation_flags=CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY):— the default is what makes node priority unconditional. - :224-229 validation of the requested word (
type(...) is not int or < 0 or & ~PERMITTED), raising "graph instantiation flags may only select automatic free and node priority". - :236-237
graph.retain_object(...)theninstantiate_graph(graph)— both happen before the executable flags are read/validated, contradicting the PR description's "rejecting unsupported bits on either source before mutating graph state". - :238-242
prior_flags = _executable_instantiation_flags(graph); rejectprior_flags & ~PERMITTED; thengraph._flare_instantiation_flags = prior_flags | instantiation_flags. - :282-287
_graphsconsumes it:dict(name=name, graph=int(graph.raw_cuda_graph()), instantiate_flags=flags)with the literalflags & ~9at :284.
Main-branch baseline (for the before/after): runtime_core.py at main has def record_export_graph(graph, storage, *, owners=()) with no flags parameter (:192-206), and _graphs at :245-255 emits executable=<raw_cuda_graph_exec()> — i.e. the flag word was previously derived from the executable only.
Test anchors: tests/preparation/test_capture_graph_metadata.py:117 monkeypatches runtime_core._executable_instantiation_flags to lambda graph: graph.exec_flags; :204-254 extend the export test; :261-302 new test_capture_forwards_export_sets_node_priority_instantiation_flag. tests/preparation/test_recorded_export_graph_cuda.py:85-87 changed the GPU assertion to flags_by_name == {"decode": 9, "tune": 1} (was index.ranks[0].graphs[0].flags == 1).
#3 [medium] Should fix: core-format compatibility statement and single source of truth for permitted flags
ignition/preparation/runtime_core.py:238-242 (also :282-287 in _graphs, and helios/src/runtime_core/format.rs:495 graph.flags & !9 != 0).
The PR silently widens the accepted flag vocabulary of the exported core format from "executable-derived flags observed on the captured executable" (previously only AUTO_FREE_ON_LAUNCH, bit 1 — see tests/preparation/test_recorded_export_graph_cuda.py old assert flags == 1) to bits {1, 8}. Bit 8 is now emitted instead of the previously derived value, so a core exported by this branch carries flags=9 where the same graph previously carried flags=1.
Consequences to check against the compatibility rule ("Every engine version must load models supported by previous engine versions ...", AGENTS.md#model-core-compatibility, principle 13):
- Loading an older core is unaffected (old cores say 1, still accepted) and the new value is accepted by current Helios (format.rs:495 permits 9; heliopause capture.rs:589 and :2823 permit 9). That direction is fine.
- The reverse direction is not preserved: a core exported on this branch carries 9, and any previously released Helios that validated
flags & !1— the code before commit d5c2bd14/66bf6d03 lineage — would reject it. The project's own rule is "Version semantic changes without abandoning previously supported models" and "Preserve loading and serving compatibility when changing core metadata"; this PR changes the written flag word without documenting that new cores require the engine at this revision, and without a test that a revision-N engine loads a revision-N-1... no — the missing test is that a core written by this branch loads on the released engine, or an explicit statement that flag 8 requires re-export + matching engine. - Also, no Protobuf/format doc change accompanies the semantic change: docs/core-format-design.md:220 mentions "instantiation flags" generically; there is no statement of what values export may write.
helios/src/runtime_core/format.rs:495hardcodes 9 with no named constant, so the permitted set is now duplicated in three places (Python tuple at runtime_core.py:194,_graphsliteral~9at :284, Rust literal!9at format.rs:495 and capture.rs:589/2823).
Fix: name the permitted set once per layer (constant in Rust too), state the new written value and its required engine revision in the core format/design doc, and add/extend a compatibility check (existing core with flags=1 still loads and replays; new core with 9 loads on this engine).
#4 [medium] Should fix: the flag-preservation claim is verified only by a mocked query, not the real driver call
tests/preparation/test_capture_graph_metadata.py:117 (monkeypatch.setattr(runtime_core, "_executable_instantiation_flags", lambda graph: graph.exec_flags)), tests/preparation/test_capture_graph_metadata.py:261-302 (test_capture_forwards_export_sets_node_priority_instantiation_flag).
The behavior this PR adds is one driver query (cuGraphExecGetFlags) whose result is combined with a constant. The CPU tests replace the query with a lambda and assert 1 | 8 == 9; that asserts arithmetic on constants, not that the export path reads the real executable's flags. AGENTS.md: "Tests must exercise the affected behavior or contract; source-text checks and mocks that bypass the behavior cannot establish runtime correctness." The only test that exercises the real call is tests/preparation/test_recorded_export_graph_cuda.py:86 assert flags_by_name == {"decode": 9, "tune": 1}, which is skipif FLARE_RUN_CUDA_TESTS != 1 — skipped in the PR's own evidence run (46 passed, 15 skipped). Prior reviewer reported it passing on an SM120, which is useful, but the PR description does not claim it and the CI has no checks.
What would settle it: a GPU test asserting the pre-existing executable flag word is preserved for a graph instantiated without AUTO_FREE (the real _executable_instantiation_flags path) — i.e. run the check against a real CUDAGraph rather than the Graph stub.
#6 [medium] Rules cited and files read
Rules cited in this review:
- Charter (read_charter): "Solve the right problem in the right place"; "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)"; "Be explicit and pin everything. No magic defaults"; "Keep the runtime small and model-agnostic"; review standard "No per-model special cases or flags". - AGENTS.md#contribution-scope-and-rejection-criteria: "Reject unsupported abstractions and churn. Do not add frameworks, extension points, speculative compatibility, fallback layers, or configuration switches without a concrete requirement"; "Require focused, meaningful validation. Tests must exercise the affected behavior or contract; source-text checks and mocks that bypass the behavior cannot establish runtime correctness"; "Keep each PR focused on one coherent outcome".
- AGENTS.md#model-core-compatibility: "Every engine version must load models supported by previous engine versions without re-export ... Preserve loading and serving compatibility when changing core metadata".
- docs/design-review.md principle 1 ("Express differences through ... prepared layout metadata reusable across models"), principle 12 (performance claims require "actual Helios service measurements"), principle 13 (core compatibility), principle 16 (four-part description, no claims beyond evidence).
Changed files read in context: ignition/preparation/runtime_core.py (whole file), ignition/preparation/capture.py (whole file), tests/preparation/test_capture_graph_metadata.py (diff + surrounding), tests/preparation/test_recorded_export_graph_cuda.py (whole file), plus consumers: heliopause/src/export/capture.rs (executable_flags :517, record_graph :582, graph_metadata :760, validation :2820), heliopause/src/export/mod.rs:106-117 (GraphHandle), helios/src/runtime_core/format.rs:495/575, helios/src/runtime_core/mod.rs:984-1012 and :1215-1220, ignition/preparation/scratch.py:83-105, ignition/preparation/execution.py:254-322.
#5 [low] Verified non-findings and scope checks that pass
Verified non-findings (checked, not defects):
- Layer placement is right: the flag decision is made in Ignition (export) and merely consumed by Helios (
cuGraphInstantiateWithFlagsat helios/src/runtime_core/mod.rs:1216-1219 withgraph.flags), so no model computation or policy moves across the preparation/runtime boundary. Helios already accepted bits 1 and 8 (format.rs:495) and already replays kernel-node attribute id 8 (format.rs:575, mod.rs:984-1012); no Helios change is required and none was made. - No per-model special case: the change is model-agnostic, no recipe identity or allowlist.
- No hardcoded capability/batch list added; Helios still enumerates graphs from the core.
- No new captured-graph operation family, so no owner approval for a new op contract is needed.
- Existing cores remain loadable (old flag word 1 is still permitted), so the forward-compatibility direction required by principle 13 is satisfied; only the "cores written by this branch on older engines" direction is uncovered (see the compatibility note).
Prose/description issues worth listing as nits (not in my lens's blocking set, kept brief because voipmonitor already raised them):
- PR description "rejecting unsupported bits on either source before mutating graph state" is inaccurate:
graph.retain_object(...)(runtime_core.py:236) andinstantiate_graph(graph)(:237) run before_executable_instantiation_flags(:239) validatesprior_flags. AGENTS.md#required-pr-descriptions forbids claims not backed by behavior. - PR description "Passing
instantiation_flags=Nonekeeps executable-derived flags for startup tuning graphs" refers to a caller that does not exist (see the parameter note).