#1 [high] Change: what PR #683 does, file by file
PR #683 "ignition: propagate CLI prog, move image specs to recipes, and harden state.py kernels", author lukealonso (COLLABORATOR), base main, head 70e84eb, 8 files +406/-148, open, ready for review, no reviews, no CI checks.
Three logically separate changes in one PR:
- CLI prog propagation:
ignition/registry.pygains_ACTIVE_PROGContextVar +current_prog()+active_prog()contextmanager (defaults "ignition"; rejects empty/non-str with ValueError).ignition/cli/__init__.py:363-376bindsactive_prog(prog)inmain().ignition/preparation/rebuild_manifest.py:231reproduction_arguments(..., prog=None)and:288from_plan(..., prog=None)emit[current_prog(), 'export', target, ...]instead of hardcoded'ignition'. - frontend.py: deletes hardcoded per-recipe
image_settings(config, model, profile, qwen_model_type="qwen4_exp")table (padded_grid/glm/radio/moonvit/deepseek_row_major/deepseek4/qwen/mimo with literal model_type strings inkling2, inkling2_loop, glm5_next, qwen4_exp, mimo_v2 and token ids 154854/154855, 18, 151655). Replaces with newIMAGE_PROFILESfrozenset (same 8 profile names retained),_EMPTY_IMAGE_PROFILESfrozenset(padded_grid, glm, radio, moonvit, deepseek4), frozen dataclassImageProcessorSpec(ignition/preparation/frontend.py:40-67) and_validate_image_payload(profile, payload)(frontend.py:157-...). Breaking signature change:image_settings(config, model, spec: ImageProcessorSpec)andprepare_frontend(..., image_spec=...)replacesimage_profile=/qwen_model_type=. - state.py kernels: casts to tl.int64 in _gather_rows, _gather_rows_three, _scatter_rows, _save_hidden, _request_history;
scatter_rows(source, rows, destination, active, *, memory_capacity=None, allow_zero=False)(state.py:165-189);_scatter_rowsgains MemoryCapacity pointer arg + HAS_CAPACITY/ALLOW_ZERO constexpr and reads live capacity viatl.load(MemoryCapacity); null slot 0 protected by default.
Tests added: tests/cli/test_parameters.py (+7), tests/components/test_state.py (+62, incl. one CUDA test gated on FLARE_RUN_CUDA_TESTS=1), new tests/preparation/test_frontend_spec.py (104 lines).
#2 [high] Change: undeclared/incomplete details found in the diff
Undeclared behaviour changes in #683:
IMAGE_PROFILESis still a hardcoded 8-name closed set in coreignition(frontend.py:26-35), andImageProcessorSpec.__post_init__rejects any profile not in it. So core still owns the list of profile names (glm, qwen, mimo, deepseek4, etc. — recipe-derived names); only the field/validation tables moved out. The description's claim to "remove external recipe identifiers from core ignition" holds for model_type strings/token IDs but not for the profile-name set.prepare_frontendnow always readsconfig.json(frontend.py:281) when image_spec is set — previously config.json was read once for the deepseek placeholder path and again inside image_settings; behaviour-equivalent but reordered.- New
ImageProcessorSpec.requires_preprocessor(default True) suppresses readingpreprocessor_config.jsonwhen False, passing{}as the processor config. The old code special-cased onlydeepseek_row_majorby profile name; this is now recipe-controlled and applies to any profile. Not called out in the description beyond "recipe-owned spec". ImageProcessorSpec.default_preprocessor(default "preprocessor_config.json") makes the processor file name recipe-configurable — not mentioned in the description.- New
image_settingsraises TypeError for a non-spec third arg;prepare_frontendraises TypeError for a non-specimage_spec. Description mentions callers must pass ImageProcessorSpec but not the exact failure mode. IMAGE_PROFILESnow includes only 8 profiles;_EMPTY_IMAGE_PROFILES(padded_grid, glm, radio, moonvit, deepseek4) replaces the old per-profilereturn {profile: {}};_validate_image_payloadrejects any non-empty payload for those, a new validation that did not exist.
Description says but the change does not do:
- Description says "This PR keeps core ignition strictly at the 12 Helios-ABI modules in ignition/components/" — verified test_core_boundary.py lists 13 names including "init" = 12 real modules, and the PR does not modify that test or add modules; so this is a statement of an invariant that already holds, not a change in this PR.
- Description says
_scatter_rowspreviously "baked export-time SLOTS: tl.constexpr" — verified: the constexpr arg is still there (state.py:194) but is now only the fallback when HAS_CAPACITY is false. The GPU kernel-size assumption (grid = triton.cdiv(source.shape[1], 1024)) is unchanged.
#3 [high] Related work: #483 and #229 add profiles to the table #683 deletes
Two open PRs add new image profiles to the exact hardcoded table #683 deletes:
- #483 (open, rickybrent) adds
if profile == "gemma4":block at ignition/preparation/frontend.py:114-173 in its head; it validatesimage_processor.max_soft_tokensin (70,140,280,560,1120),model_type == "gemma4",vision_config.model_type == "gemma4_vision", and resolves envelope tokens by openingtokenizer.jsonvia thetokenizerslibrary plustokenizer_config.json(_expected(model, {"model_type": "gemma4"}), lines 136-167). Its payload is{"gemma4": dict(patch_size, pooling_kernel_size, max_soft_tokens, image_token, start_token, end_token)}. - #229 (open, Raydius) adds
if profile == "muse_glimmer":at ignition/preparation/frontend.py:151-166 with model_type "muse_glimmer", literal token IDs 200092/200091, and payload keys patch_size, merge_size, max_image_tokens, image_mean, image_std, image_token, start_token, end_token.
Consequences for #683 (verified against #683's code):
- Textual conflict: both PRs insert into the block #683 rewrites wholesale (frontend.py old lines 89-206). Neither is merged, so #683 cannot be a clean rebase for them.
- Structural gap, not just a conflict: #683's
IMAGE_PROFILESfrozenset (frontend.py:26-35) is a closed set of the eight profiles that existed at its base;ImageProcessorSpec.__post_init__(frontend.py:59-61) raises for any other profile._validate_image_payload(frontend.py:157+) only handles deepseek_row_major, qwen, mimo and the five empty profiles, and falls through toraise ValueError("unsupported image preprocessing profile"). So a recipe CANNOT introduce gemma4 or muse_glimmer through ImageProcessorSpec without editing coreignitionagain — the profile names and the per-profile payload schema stay in core. - #483's gemma4 needs data the new spec interface does not carry:
extractis typedCallable[[Mapping, Mapping], dict]— receives only (image, model); notokenizer_configand nosnapshotpath. #483's validation openstokenizer.jsonfrom the snapshot. So its validation cannot be expressed by an ImageProcessorSpec today. Conclusion: #683 moves per-checkpoint field tables out of core but keeps the profile registry and payload wire-schema in core, and it lands between two open PRs that extend that same table.
#4 [high] Change: core still owns IMAGE_PROFILES + payload schema; 2 of 10 wire profiles missing
helios/proto/runtime_core.proto:613-626 ImageSettings oneof has 10 profile tags: qwen=1, mimo=2, deepseek4=3, moonvit=4, step=5, radio=6, deepseek_row_major=7, glm=8, patch_merge=9 (PatchMergeImageSettings: patch_size, min_pixels, max_pixels, image_mean, image_std, image_token, start_token, end_token), padded_grid=10.
#683's IMAGE_PROFILES (ignition/preparation/frontend.py:26-35) contains 8 of those 10 — step and patch_merge are absent, and _validate_image_payload has no branch that can produce them; any spec with those profile names raises "unsupported image preprocessing profile" (frontend.py:59-61 blocks it at construction). The same 8-name limit existed in the old hardcoded image_settings (old code: if profile not in ("qwen","mimo"): raise ValueError("unsupported image preprocessing profile")), so this is not a regression introduced by #683, but it does mean the "recipe-owned" contract still cannot express two Helios-supported profiles, and the payload schemas for the three payload-bearing profiles (deepseek_row_major, qwen, mimo) remain hardcoded in core _validate_image_payload (frontend.py:157-204) — the description's "move image specs to recipes" moves only the checkpoint field tables, not the wire-payload schema or the profile registry.
#5 [high] Related work: state.py row kernels have an open TODO (gridDim.y) and #659 shares the null-row-0 invariant
docs/TODO.txt:366-367 carries an open project TODO against exactly the kernels #683 edits: "[ ] Guard or stride the 65,535 * 1024 (~64 MiB/uint8 row) gridDim.y ceiling in ignition/components/state.py row kernels." #683 changes index widths (int64) in those kernels but leaves the 2-D launch unchanged: _gather_rows grid is (output.shape[0], triton.cdiv(output.shape[1], 1024)) (ignition/components/state.py:102-103) and _scatter_rows grid is (source.shape[0], triton.cdiv(source.shape[1], 1024)) (state.py:182-184), so the second grid dimension still grows with row width; the TODO is not closed by this PR and the description does not mention it.
Related memory-side work by the same author: #659 (open) "perf(helios): alias null continuation row zero onto a single zeroed VMM granule" reserves row 0 (StateSlotId allocations start at 1; state_transfer rejects row == 0) and warns that any write to slot 0 now corrupts aliased granules. #683's allow_zero=False default in scatter_rows (state.py:165-201) reinforces exactly that invariant on the Python/Triton side, and #683's test asserts slot 0 is untouched by default (tests/components/test_state.py:90-96). The two are complementary, not conflicting; #659 is in Helios/Rust, #683 in ignition/Python.
#6 [high] Process: #683 has no comments, no reviews, no CI; evidence = one pytest run
PR #683: opened 2026-12-02 16:48 by lukealonso (COLLABORATOR), branch unify-ignition-recipe-boundary -> main, head 70e84eba, +406/-148, 8 files.
Process facts: state "open, ready for review"; zero comments, reviews or reactions ("Discussion (0)" in read_item); no CI checks on the head commit (orientation packet: "CI on the head commit: no checks"). Same-day age relative to the repo's latest merged work (#670 merged 2026-12-02).
Evidence in the description: pytest tests/preparation/test_core_boundary.py tests/preparation/test_frontend_spec.py tests/components/test_state.py tests/components/test_state_gather_fields.py tests/cli with CUDA_VISIBLE_DEVICES=0 FLARE_RUN_CUDA_TESTS=1 on RTX PRO 6000 Blackwell SM120 → 164 passed, 0 failed. Declared limitations: no Rust tests (no Rust files changed — verified true), no full ignition export + flare run, no multi-GPU TP.
Charter PR-description standard (why/what/result/evidence, design-review.md & charter "PR descriptions: Expect four parts") is satisfied structurally.
Charter rule relevant to the state.py half: docs/design-review.md:124-130 principle 14 restricts Claude Opus/Sonnet/etc. authorship of low-level CUDA/PTX/Triton kernels and GPU-optimization changes; charter also says for GPU kernel code reviewers "report concrete defects only". The PR edits four Triton kernel bodies; the description does not state who authored that half. Recorded as a fact for the reviewer to check, not as a violation.
#7 [high] People: lukealonso is a charter priority contributor and the main author in all touched areas
lukealonso: GitHub association COLLABORATOR; named in the charter as one of three priority contributors (@voipmonitor, @original-el8, @lukealonso) who "carry extra weight" (read_charter, "Respect contributors"). 38 merged PRs in the last 180 days, 3 open: #668, #659, #658. He is the dominant author in every area #683 touches: 180-day commit counts ignition/preparation 162, tests/preparation 208, ignition/components 108, tests/cli 104, ignition 272, ignition/cli 83 (orientation packet "People in these areas"). Most relevant prior work by him:
da0372842026-11-22 "Stage hyperflare_recipes separation, slim core ignition, and commit rebuild/hub updates" — the extraction that created the boundary this PR continues.- #545 (merged) "ignition: introduce compositional RecipeParameters and dynamic CLI" — the CLI/manifest machinery
reproduction_argumentsandprogbelong to; #683 is a follow-up to the same author's series. - #620 (merged), #618 (merged), #648 (merged), #670 (merged) — boundary/hardening series in the same files.
- #659 (open) null-continuation-row-0 aliasing in Helios — the Rust-side twin of #683's
allow_zero=Falseinvariant. - #658, #668 (open) — other open fixes in ignition/helios. Other people in these files: Martin Vit (52 ignition/preparation commits), Eugene Rakhmatulin (36), jasonc/Jason Cook, Nero, PCCessna, yatesdr, voipmonitor. Feature authors who touched the exact hardcoded table: yatesdr (#407 GLM), kyonjova (#239 MiMo), FujitsuPolycom (#386 Qwen3.8), nero- (#433 Inkling 2), Jason Cook (GLM images, 7fe5ac78), Martin Vit (DeepSeek V4.1 row-major, 32ace57f), malventano (#381 qwen38 vision), rickybrent (#483 gemma4), Raydius (#229 muse_glimmer). None has commented on #683.
#8 [high] Reach: prog threading, wire compatibility of reproduction_args, and the hard Python API break
Before #683, prog reached only argparse/help text: ignition/cli/__init__.py:26,31,33,83,89,92,116,134,308,316,322,333,351,364,371 thread prog through _parser/parse_args for prog= and epilogs only (tests/cli/test_recipe_injection.py:58-75 already asserted custom-ignition export MODEL --help), while reproduction_arguments hardcoded ['ignition', 'export', ...] (ignition/preparation/rebuild_manifest.py:263 before, :262-263 after). So the prog-parity gap is real and verifiable in code.
Reach of the change:
from_planis called from exactly two production sites, bothignition/cli/serve.py:237and:338, inside CLI handlers, socurrent_prog()is bound (ignition/cli/init.py:370) whenever a manifest is emitted byignition export/debug-serve. Both sites rely on the default (do not passprog=), so if a handler ever ran outsidemain()the argv[0] would silently fall back to "ignition".- Thread propagation is safe: no
ThreadPoolExecutor/copy_contextinsideignition/other thanignition/preparation/remote_weights.py:183(checkpoint reads) and the spawn-basedProcessPoolExecutorinignition/preparation/compile_pool.py:154, none of which builds manifests. reproduction_argsis consumed byflare inspect(flare-cli/src/inspect.rs:453-472 formats the argument vector), exposed inheliopause/src/export/binding.rs:1107-1108(non-empty entries) and validated inhelios/src/runtime_core/preparation.rs:105-112(count/text bounds, no argv[0] assumption) — so a non-ignitionargv[0] is wire-compatible with existing Rust readers (core/proto unchanged: helios/proto/runtime_core.proto:95,191repeated string reproduction_args). No Rust change needed; matches the PR's "no Rust files changed".- Compatibility cost is on the Python side only:
prepare_frontend(image_profile=..., qwen_model_type=...)andimage_settings(..., profile, qwen_model_type=)are removed outright, no deprecation shim (frontend.py:205-208, 263-269 raise TypeError for the old calling convention). All in-repo callers are gone (search on the PR head finds no production caller ofprepare_frontendat all), so the breakage lands on the two external recipe repos the description names (local-inference-lab/hyperflare-recipes, hyperflare-jetson-recipes) and on anyone holding a fork of them.
#9 [high] Project fit: charter/design-review alignment, and where "recipe-owned" stops short
Charter and docs mapping for #683 (facts, both directions): Aligned:
- Charter "Keep the runtime small and model-agnostic" — "Ignition writes the recipes that handle model computation ... shouldn't accumulate per-model branches (#267, #334)". #683 deletes hardcoded per-checkpoint tables (model_type inkling2/glm5_next/qwen4_exp/mimo_v2, processor classes, token IDs) from core
ignition/preparation/frontend.py, which is exactly this direction. - docs/design-review.md:42-46 principle 3 — recipes "own model composition and checkpoint mapping"; only Helios-ABI components belong in
ignition/components/. docs/core-design.md:297-309 — "One native lifecycle serves every model", model-dependent behavior through prepared metadata. #683 keepsignition/components/untouched apart from the Triton kernels, and adds no plugin discovery (noimportlib/entry-point scan — verified,ignition.recipes/hyperflare_recipesimports still forbidden and enforced by tests/preparation/test_core_boundary.py:39-63). - docs/preparation-development.md:11-43 documents
reproduction_argsas aRecipeParametershook serialized byfrom_plan; the prog change extends that path without changing its contract. Tensions / limits: - The profile registry stays in core:
IMAGE_PROFILES(frontend.py:26-35) plus_validate_image_payload's per-profile payload schemas (frontend.py:157-204) are still core-owned model knowledge, andImageProcessorSpec.__post_init__rejects anything outside the eight names. Two Helios wire profiles (step=5,patch_merge=9, helios/proto/runtime_core.proto:613-626) are not representable. So "recipe-owned" is partial. - Charter/design-review.md:124-130 principle 14 restricts Claude-authored low-level Triton changes; charter review standard says for GPU kernel code "report concrete defects only". Applies to the state.py half.
- Charter "Bring real evidence" (#210/#397) and principle 12 (docs/design-review.md:106-115: exercise affected shapes, disclose unrun checks): the PR discloses unrun items honestly but has no end-to-end export/serve run, so the overflow claim (115–215 MiB rows) is argued, not measured; no benchmark is claimed, which is appropriate for a correctness fix.
- The description claims "keeps core ignition strictly at the 12 Helios-ABI modules" — that invariant is already enforced by tests/preparation/test_core_boundary.py:61-63 (13 names incl.
__init__= 12 modules) and is not changed by this PR.
#10 [high] Claims and evidence: what is verified, what is self-reported, what is overstated
Claims vs evidence in #683 (verified in code unless marked):
- "hardcoded 'ignition' as argv[0]" — TRUE, confirmed at rebuild_manifest.py:263 before the diff; prog threaded to argparse only (ignition/cli/init.py:308-361).
- "reproduction_arguments/from_plan emit [current_prog(), 'export', ...]" — TRUE (rebuild_manifest.py:231-263, 288-336); the new test asserts jetson argv[0] and that the rest of the vector is identical (tests/cli/test_parameters.py:362-368).
- "removes external recipe identifiers from core" — PARTLY: model_type strings/token IDs/processor classes gone; profile NAME set (
IMAGE_PROFILES) and payload schema remain (frontend.py:26-35, 157-204). - "preserving the exact Protobuf ImageSettings wire format" — TRUE for the 8 profiles: payload dict shape for deepseek_row_major/qwen/mimo unchanged (compare old vs new
_validate_image_payload), and nothing under helios/proto changes in this diff. - "int32→int64 casts across all five kernels" — TRUE and complete: every row/column/slot index is
.to(tl.int64)(state.py:112-114, 140-142, 196-201, 209-214, 242-254). Overflow risk (115–215 MiB rows) is arithmetic, not measured: 2^31 / 215 MiB ≈ 10 rows; unverified end-to-end because no export+serve run. - "
_scatter_rowsbaked export-time SLOTS" — TRUE before; the constexpr is still passed as the fallback and the live limit comes fromtl.load(MemoryCapacity)when HAS_CAPACITY (state.py:181-199). - "reject writes to reserved null slot 0 by default" — TRUE (state.py:187, 200); CPU and CUDA tests (tests/components/test_state.py:90-96, 133-146).
- "dynamic memory_capacity at replay" — TRUE for the Triton path, incl. capacity bump without recompiling (tests/components/test_state.py:137-141); validation rejects wrong dtype/device (state.py:175-179).
- Test evidence "164 passed, 0 failed on SM120" — self-reported, not reproducible here; no CI checks on head 70e84eb.
- "Python callers must pass image_spec" — TRUE; hard break with TypeError (frontend.py:207-208, 268-269), no deprecation shim.
- Not in the description: new
requires_preprocessor/default_preprocessorknobs (frontend.py:55-56, 285-292);_validate_image_payloadnow rejects non-empty payloads for the five empty profiles (frontend.py:161-164);ImageProcessorSpec.extractreceives only (image, model) so #483-style gemma4 tokenizer validation cannot be expressed. - Not mentioned: docs/TODO.txt:366-367 gridDim.y ceiling on these same kernels stays open.