Code review summary scratchpad · NVIDIA/hyperflare-inference #229

Raw Markdown for agents: https://autobot.eidonix.com/p/d87e5f0e-60d5-46a8-9910-deb01fac8c4c.md

#1 [high] B1: PR lands ~73% of diff in directories main deleted (repo split)

Verified at main:

Maintainer triage, original-el8 2026-11-24 21:46 (result 4): "Repository-split triage: this PR spans both repositories and remains open for its runtime changes. hyperflare-recipes: the Muse Glimmer recipe, model components, and model qualification tests. This runtime repository: the native image frontend, runtime protocol, and shared checkpoint/preparation changes. The recipe portion needs a linked PR against the hyperflare_recipes/ package, with its tests and validation evidence carried over. The runtime portion can remain here after removing recipe-owned files."

File/line counts from pr_files (result 2): recipe files ignition/recipes/muse_glimmer_nvfp4/* = 15 files ≈+1671; tests/recipes/muse_glimmer_nvfp4/* = 10 files +1926; tests/frontend/test_muse_glimmer.py +163; ignition/reference/muse_glimmer.py +166; qualify/results/glimmer-c16/summary.json +76; qualify/speculative_benchmark.py +1-1; tests/qualify/test_speculative_benchmark.py +14. Total ≈4018 of +5503.

Also recipe imports dead modules on main: ignition.components.{linear,paged_attention,window_attention,embedding,mlp,vocabulary,dflash2_preparation} — none in the retained 13.

#2 [high] Runtime-side verified findings (packing dispatch, record version, valid_processed, total_size)

  1. packing.rs:98-112 prepare() dispatch — ImageLayoutKind::Bracketed if config.contract.frontend.image_preparation == Some(ImagePreparationKind::MuseGlimmer) => muse_glimmer(...) then ImageLayoutKind::Bracketed => bracketed(...). Every other arm dispatches on layout alone. Also tensor_layout at packing.rs:69-70 adds (Bracketed, "vision_cu_window_seqlens")/(Bracketed,"vision_reverse_index") while :30 shares (Bracketed,"vision_pixel_values") — one layout id now names two staged-tensor sets. Rules: AGENTS.md:356-358 ("Tool/reasoning parsers and image preparation/layout implementations use independent typed enum identifiers; those identifiers cannot select scheduling, cache policy, text-graph input packing, or completion behavior"); helios/model-contract.md:278-282; docs/design-review.md:8-12 ("Reject changes that violate this boundary even when tests pass") and :46-49. ImageLayoutKind on main = contract.rs:74 (ClassToken = 10, room at 11). No Muse Glimmer cores exist yet, so no re-export needed.

  2. record.rs:73 writes FLAREIMG\x02; :116 decode rejects anything but \x02; encoded_len prefix :58 = 9 + 88 (was 9+68). Only test touching version: conditioned.rs:845 (was \x01, now \x02). Effect: silent cache drop via materialize_cached (conditioned.rs:154-166 invalidate+re-materialize), not a crash — undisclosed compatibility break. v1 layout = v2 minus the two trailing counts, so a v1 reader is ~6 lines. Rule: design-review.md:103-110 (principle 13), AGENTS.md:428-431. Also conditioned.rs:169 metadata tag still flare-prepared-image-v1 after the bump (nit).

  3. conditioned.rs:209-212 let (windows, reverse) = match profile { MuseGlimmer => (windows(&geometry)+1, patches), _ => (0,0) } then :238-239 compare cu_window_seqlens.len() == windows and reverse_index.len() == reverse — length only, while cu_seqlens at :237 is compared by value. A record with right lengths and wrong contents passes valid_processed and is then rejected at request time by packing.rs:580-582 ("vision window segments differ from the image extent") and packing.rs:590-592 ("vision reverse index leaves the image extent"). Wrong direction for validation. Cheap fix: first()==0, last()==patches, monotone, reverse_index a permutation. Note the rest of the valid_processed rewrite (:188-194, :196-208) is an improvement: it fixes a real main defect (old _ => 588 wildcard sized PatchMerge at 588 while patches.rs emits 1176).

  4. checkpoint.py:396-404 — payload (tensor nbytes sum) and files (shard file_size sum), accepts either, for every indexed checkpoint. files includes the safetensors header + unrequested bytes; the new test proves it (header_bytes + payload accepted). _read_header already pins end == size per shard (checkpoint.py:246-247), so the file arm adds no information about weight_map coverage. Rule: AGENTS.md:177-182 ("Reject weakened guarantees… do not remove validation"); design-review.md:122-133. Existing test test_index_total_size_accepts_payload_or_shard_file_bytes passes under the old check for the payload arm + payload+1 arm; only the file arm is new.

  5. muse_glimmer.rs:244-277 cpython_set_order replicates CPython 3.12 tuplehash + 8-slot probing so min(list(set(...))) tie-breaks match; TIES pins 20 tie sizes (:367-388), GEOMETRY 40 plain. best.unwrap_or(...) fallback at :99-102 silently uses ideal dims. CPython 3.13 changes set sizing → different grid, no failing test. Fix: record interpreter+Transformers version beside TIES, or sort by (distance, grid) with per-tie pins. A wrong grid changes token counts, not just pixels.

  6. packing.rs:480-493 bracketed_extent returns (&geometry, start, end, capacities.last()); bracketed (:497) discards with _, muse_glimmer (:572) uses it as capacity. Drop the 4th element: -2 lines.

  7. resize.rs Filter enum replacing (pillow, linear) bools = genuine cleanup, no action. patch_merge.rs:70-111 bracketed_prompt extraction = genuine subtraction, keep. Proto addition (MUSE_GLIMMER_IMAGE_PREPARATION = 11, muse_glimmer = 11) verified additive, no renumbering (contract.rs:68, proto).

  8. docs/model-preparation.md:1458 says the page guarantee is "reported by the export's Allocate cache line" — but Allocate cache is a runtime-core-load phase: helios/src/runtime_core/memory.rs:986, helios/src/startup.rs:62. Export phases are different names.

  9. docs/model-preparation.md:1506 uses flare/target/release/flare run; every sibling example uses flare-cli/target/release/flare (:304,332,670,811,866,972,1054,1175,1303,1341,1408,1610,1618,1692,1701); AGENTS.md:272 says flare-cli/target/release/flare run CORE.

  10. Muse Glimmer doc section (~68 lines at docs/model-preparation.md:1441-1508) contradicts main's structure: main:310 "## Official model recipes" delegates per-model commands to hyperflare-recipes (main:312-314); AGENTS.md:256-265 "The preparation guide owns… model-specific launch instructions". Also main:332-339 "Storage and graph capacities" still says "Other recipes default to 32 concurrent requests" and its table has no Muse Glimmer row, so the section is stale either way.

#3 [high] Recipe-side verified findings (dup modules, dead code, tests, prose)

  1. draft_config.py:16-77 duplicates ignition/components/dflash2_geometry.py:27-101 field for field (same required/options tables, same layers/target_layers/block_size/noise_token/attention properties, same validate_shard) and drops the shared reader's extra checks (positive-int geometry, GQA divisibility, rotary/norm eps, tap ordering, mask-token range). Precedent already in tree: ignition/recipes/qwen38_dense/draft_config.py (25 lines, PROFILE dict + DFlash2Config.from_dict/load delegation). One real difference: dflash2_geometry.py:71-73 requires output_multiplier == 1. and softcap None; Glimmer needs the target's 0.196…/20.0 — fix by adding those to the PROFILE's expected dict (the shared reader already takes expected, :38,:45-50), not by keeping 77 lines. ≈-60 lines.

  2. attention.py (215 lines) duplicates muse_spark/attention.py (194 lines): head_norm (:61-63 vs :57-59) verbatim, _rotary (:153-157 vs :129-133), mode branch tree, tuning_page_count, commit-slot arithmetic, AttentionScratch shape. True differences: per-call metadata vs construction-bound, separate gate projection, no head_norm before the gate (:203 vs spark :179), caller_owned_placeholders. docs/TODO.txt:513-520 already commits to the fold-back and names the removal criterion. Rule: AGENTS.md:376-379 + design-review.md:31-34. Fix: make Muse Spark's attention take per-call metadata (the PR already did this once for Glimmer) and delete attention.py.

  3. recipe.py:72 Speculation(draft_tokens=15, token_capacity=128, packed_verification=True, graph_budget=64) — no method="dflash2", though it downloads z-lab/Muse-Glimmer-30B-DFlash2 and runs it through the shared DFlash2Preparation. qwen38_dense/recipe.py:67-68 declares method="dflash2". Load-bearing: planning.py:474-475 gates --draft-body-quantization on method=="dflash2"; planning.py:574-575 disables mixed prefill for dflash2; declaration.py:316-328 resolves per-method ranks/draft_bytes; cli/display.py:45 labels it "MTP module" and cli/serve.py:314 omits the "DFlash2 proposals" tag. muse_spark/recipe.py:58 has the same omission (copied defect). Note the method only gates those declarations — 16/17 other DFlash2 recipes omit it too, so this is NOT a correctness break in this PR; it is a labeling/config gap worth one TODO or one keyword.

  4. bootstrap.py:67-69 defaults context=CONTEXT(1048576), prefill_chunk_size=4096, max_active=4; recipe.py:36-37 always overrides them. tests/recipes/muse_glimmer_nvfp4/test_preparation.py:15 pins (0, 1048576, 4, 4096) and :19 pins decode_tokens==decode_samples==4, while recipe.py:69 declares concurrency=8, max_concurrency=16 — a test that enforces a concurrency the recipe never serves. Fix: make them required fields or default from RECIPE, and assert against RECIPE (the file already does that at :64-77 and :18). Line 25 image_concurrency == 4 depends on it too.

  5. test_functional.py:238-241 asserts inspect.signature(PreparedDecoder.__init__).parameters["vision_state"].default is None — a source/signature check, AGENTS.md:189-194 forbids; test_text_only_decoder_skips_the_vision_hook (:232-235) already proves the behaviour. Delete.

  6. decoder.py:104-106 declares self.auxiliary = declaration_tensor(examples, "muse_glimmer.target.auxiliary", (rows, 5*6656), bf16) but call (:128) builds a forward-local torch.cat(taps,-1) and returns that; the declared tensor is only cleared at :115. Underexamples (examples not None) declaration_tensor aliases shared storage (ignition/preparation/examples.py:11-26), so this is a meaningless shape declaration in the captured path rather than a live per-decoder allocation — qwen38_dense/decoder.py:405-406 does the same. So: dead declaration, small cleanup, not a VRAM bug.

  7. qualify/results/glimmer-c16/summary.json (77 lines) — one 16-stream smoke run (16 statuses, wall_seconds, counters). Whole-tree search for qualify/results returns no reader; nothing produces or consumes the schema; the run is from a fork-built core this branch cannot generate. AGENTS.md:52-55 "Do not add defect reports, investigation logs, run journals, or progress notes"; the numbers already live in the PR description. Delete.

  8. Prose: recipe.py:54 "# Sampling defaults carried from Muse Spark; the model card gives none." + docs/model-preparation.md:1494-1495 "Sampling defaults carry over from Muse Spark" + tests/preparation/test_frontend_metadata.py:24 comment. docs/design-review.md:81-83 forbids "never derive sampling policy from checkpoint config files or another model" — state the values as manually verified for this checkpoint instead. Note the PR description body itself already says it correctly ("The model card recommends no sampling values; the recipe declares…"), so only the three code/doc/test comments need rewording.

  9. recipe.py:49-51, :59-62, :64-71 carry a fork export's per-pool byte breakdown, an 18% acceptance figure, and round-catalog arithmetic in code comments. Fix: keep _GRAPH_BYTES with one line pointing at docs/model-preparation.md (the PR already extends it) — but note the same compression applies to that doc section under the split.

  10. Nits: recipe.py:44-46 usage() is muse_spark/recipe.py:44-46 verbatim (third copy incl. gemma4); bootstrap.py:75/:188 stream_overlap accepted and applied to ScratchArena but never forwarded (recipe.py:30-40 omits stream_overlap=plan.stream_overlap) and declaration.py:248 defaults it False — every other recipe with the field forwards it (deepseek4:56, glm53:51, kimi3:51, qwen38:62, step5:41, minimax_m3:32, nemotron_h:34; muse_spark and glimmer both omit); attention.py:36 max_verify_width=8 default unused (decoder.py:39-40 always passes it) though the recipe reaches width 16; condition.rs:186-187 comment says "no default arm, so a new profile cannot inherit another's extents" but :209-212 does have _ => (0,0).

  11. Verified-good: quantization.py consolidation (matches_pattern/modelopt_nvfp4_layers) is the right shape — BUT its only callers are ignition/recipes/gemma4/config.py and muse_glimmer config.py, both moved out, so on main it becomes dead (+36 with no consumer on main; tests/preparation/test_quantization.py +127 imports the removed recipe). test_frontend_metadata.py +7/-3 edits a file main no longer has, though the muse_spark top_p 0.95→1.0 correction is correct (muse_spark/recipe.py:51 declares top_p=1.). config.py:63-72 correctly rejects the nvidia checkpoint (W4A4 activations + BF16 head).

#4 [high] FULL REPORT — PR #229 Muse Glimmer 30B NVFP4

PR #229 — Muse Glimmer 30B NVFP4 (head eebbf1d, base 66b473c3, +5,503/−232, 65 files)

Reviewed through architecture, conventions, simplicity, correctness, prose and subtractive lenses; every finding below was re-verified at head or at main.

Verdict: not ready to merge. main deleted the directories ~73% of this diff lands in; the branch cannot pass main's own boundary test. The runtime-side changes that remain are largely sound — the proto addition is additive, valid_processed loses its wildcard arms, the ModelOpt parser consolidation and the resize.rs Filter enum are real cleanups — so the fix is a split, not a rewrite.


Blockers

B1. ~4,020 of +5,503 lines (73%) land in directories main deleted; the branch fails test_core_boundary.py

Where: ignition/recipes/muse_glimmer_nvfp4/** (15 files, ≈+1,670), tests/recipes/muse_glimmer_nvfp4/** (10 files, +1,925), tests/frontend/test_muse_glimmer.py (+163), ignition/reference/muse_glimmer.py (+166), qualify/** (incl. qualify/results/glimmer-c16/summary.json +76), tests/qualify/test_speculative_benchmark.py (+14), plus edits to ignition/recipes/__init__.py, ignition/recipes/gemma4/config.py, ignition/recipes/muse_spark/{contract,frontend}.py, tests/recipes/test_vision_scratch.py.

Verified on main: list_files ignition/recipes/*, tests/recipes/*, tests/qualify/*, qualify/*, ignition/reference/* all return no files. tests/preparation/test_core_boundary.py encodes the boundary: :42 assert not (ROOT/"ignition"/"recipes").exists(), :62-64 pins ignition/components to the 13 retained Helios-ABI modules, :51-59 forbids core tests importing qualify. This PR's tree fails :42 outright. The split landed in da037284 and 17bb3c4a (2026-11-22); the head was rebased onto 66b473c3 (2026-11-19), three days earlier.

Consequence in-tree: the recipe's imports no longer resolve — ignition.components.{linear,paged_attention,window_attention,embedding,mlp,vocabulary,dflash2_preparation} are all outside the 13 retained modules, and ignition/preparation/quantization.py's new matches_pattern/modelopt_nvfp4_layers become callers-less on main (their only callers are the extracted Gemma 4 and Muse Glimmer configs).

Rules: maintainer triage, original-el8 2026-11-24: "Repository-split triage… hyperflare-recipes: the Muse Glimmer recipe, model components, and model qualification tests. This runtime repository: the native image frontend, runtime protocol, and shared checkpoint/preparation changes. …the runtime portion can remain here after removing recipe-owned files." docs/model-development.md:3-8 (main) — "Official model recipes live in local-inference-lab/hyperflare-recipes". docs/design-review.md:31-34.

Requested change: split as triage asked. Keep here: helios/proto/runtime_core.proto, helios/src/model/contract.rs, helios/src/runtime_core/{protobuf,describe}.rs, helios/src/frontend/images/*, ignition/preparation/{frontend,checkpoint,runtime_core_pb2}.py. Send to a linked hyperflare-recipes PR: the recipe, its tests, the reference module, qualify/, and the ignition/recipes/* edits (including the gemma4 revert and test_frontend_metadata.py). tests/preparation/test_quantization.py goes with them, since it imports the extracted recipe.

B2. Text-graph input packing is selected by the image-preparation enum

Where: helios/src/frontend/images/packing.rs:98-112:

ImageLayoutKind::Bracketed
    if config.contract.frontend.image_preparation == Some(ImagePreparationKind::MuseGlimmer) =>
{ muse_glimmer(...) }
ImageLayoutKind::Bracketed => bracketed(...),

Every other arm dispatches on image_layout alone. Second symptom, same cause: packing.rs:69-70 adds (Bracketed, "vision_cu_window_seqlens") and (Bracketed, "vision_reverse_index") while :30 shares (Bracketed, "vision_pixel_values") — one layout id now names two staged-tensor sets.

Rules (this rule names this exact behaviour): AGENTS.md:356-358 — "Tool/reasoning parsers and image preparation/layout implementations use independent typed enum identifiers; those identifiers cannot select scheduling, cache policy, text-graph input packing, or completion behavior." helios/model-contract.md:278-282 repeats it. docs/design-review.md:8-12 — "Reject changes that violate this boundary even when tests pass."

Requested change: give the windowed layout its own ImageLayoutKind value (main's enum ends at ClassToken = 10, contract.rs:74, so 11 is free) and let prepare() match on layout alone, as PatchMerge/ClassToken already do. No Muse Glimmer cores exist yet, so nothing needs re-exporting — this is the cheapest moment to fix it.

B3. The charter's new-recipe bar (#74) is unmet, and the PR says so itself

Rule: charter, "What gets merged": new model recipes "Must list supported checkpoints from an official or widely used source, prove they export and serve cleanly from the PR branch, and support more than a single checkpoint (#74)."

State: the description states "This branch has not been exported or served, and none of its CUDA tests has run on this base"; every GPU figure comes from Raydius/flare-local-inference branch deploy cores built before the forwards moved to per-call metadata, so they exercise neither this decoder nor this attention. recipe.py:57-63 declares exactly one checkpoint and config.py:63-72 actively rejects the only other published one (nvidia/Muse-Glimmer-30B-NVFP4: 180 FP8 + 213 NVFP4 W4A16 with a quantized lm_head, versus this recipe's W4A4 + BF16 head). yatesdr's 2026-11-19 review already asked for this; it is still outstanding.

Requested change: one export + serve from this head on an SM120 host (one text request, one image request), plus either a second supported checkpoint or a maintainer-accepted rejection reason recorded under #74. Do not weaken the rule to close it.

B4. Two open PRs claim one alias, and the selection is undecided

recipe.py:57 registers muse-glimmer-30b-nvfp4; PR #192 (open) registers the same alias for nvidia/Muse-Glimmer-30B-NVFP4 @ 47818374, with an incompatible quantization layout, so each recipe's check rejects the other. tests/cli/test_models.py's alias row is also edited by #212. Triage: "A maintainer decision is needed on checkpoint selection… before these overlapping definitions merge." Requested change: get the alias decided once (coupled to B1/B3 — it moves with the recipe), and note it in both descriptions.


Should Fix

  1. The prepared-image record version loses its reader. record.rs:73 writes FLAREIMG\x02, :116 rejects \x01. materialize_cached (conditioned.rs:154-166) then invalidates and re-prepares, so the effect is a silent disk-state drop, not a crash — but it is a compatibility break the description's compatibility paragraph does not cover (it discusses only the core protobuf). The v1 layout is exactly v2 minus the two trailing counts: decode \x01 with the two vectors empty, write only \x02, add a v1 case to the record test. Rules: design-review.md:103-110 (principle 13), AGENTS.md:428-431.

  2. Cached Muse Glimmer records are validated by length only. conditioned.rs:209-212 returns (windows(&geometry)+1, patches) and :238-239 compares .len() — while cu_seqlens on the line above is compared by value. A record with the right lengths and wrong boundaries passes valid_processed and is rejected later by packing.rs:580-582 / :590-592 at request time, which turns a silent re-preparation into a user-visible error. Add the cheap invariants: first() == Some(&0), last() == Some(&(patches as i32)), monotone, reverse_index a permutation.

  3. A shared validation was relaxed for every recipe. checkpoint.py:396-404 now accepts an index total_size equal to either the tensor payload sum or the shard file-size sum. files includes the safetensors header and unrequested bytes — the new test proves exactly that (header_bytes + payload passes) — and _read_header already pins end == size per shard (:246-247), so the file arm adds nothing about weight_map coverage. Narrow the arm to the ModelOpt shape (e.g. only when the index declares it, or require payload <= files with the surplus equal to the header) and add a rejecting case. AGENTS.md:177-182. (Credit: the payload arm and the payload + 1 rejection were already covered on main.)

  4. Image geometry depends on a hand-replicated CPython 3.12 hash. muse_glimmer.rs:244-277 reproduces tuplehash plus the eight-slot probe so min(list(set(...))) tie-breaks match, and :99-102 falls back silently to ideal dimensions. 20 tie sizes are pinned (:367-388) and every other size follows the replica; CPython 3.13 changes set sizing, so a changed reference or interpreter silently moves a grid — and a grid change moves token counts, not just pixels. Record the interpreter and Transformers version beside TIES (as the Lanczos test already records torchvision/PIL), or sort by (distance, grid) with the reference choice pinned per tie.

  5. draft_config.py re-derives the shared DFlash2 reader (:16-77 vs ignition/components/dflash2_geometry.py:27-101) and drops the shared checks (positive geometry, GQA divisibility, rope/eps, tap ordering, mask-token range). The smaller form is already in-tree: qwen38_dense/draft_config.py is a PROFILE dict plus two delegating one-liners. The one real difference (output_multiplier/final_logit_softcapping must equal the target's, where the shared reader requires unit/None at :71-73) fits the reader's existing expected dict. See Subtract §3.

  6. decoder.py:104-106 declares an auxiliary tensor it never writes. __call__ (:128) builds torch.cat(taps, -1) as a forward-local value and returns it; the declared tensor is only cleared at :115. declaration_tensor aliases shared storage during preparation (ignition/preparation/examples.py:11-26), so this is a stale shape declaration rather than live VRAM — but it is dead either way. Delete it, or write the concatenation into it if the drafter needs a stable address.

  7. bootstrap.py:67-69 defaults contradict the recipe and a test enforces the contradiction. max_active: int = 4 (also context, prefill_chunk_size) against recipe.py:69's concurrency=8, max_concurrency=16, and tests/recipes/muse_glimmer_nvfp4/test_preparation.py:15,:19,:25 pins the 4. Make the three required fields, or default them from RECIPE and assert against RECIPE (the file already does that at :18 and :64-77).

  8. Sampling defaults are justified by inheritance. recipe.py:54 "carried from Muse Spark; the model card gives none", docs/model-preparation.md:1494-1495 "carry over from Muse Spark", and the comment at tests/preparation/test_frontend_metadata.py:24. design-review.md:81-83 says "never derive sampling policy from checkpoint config files or another model" — state the values as manually verified for this checkpoint, which is what the PR description body already says correctly. The same file's muse_spark top_p 0.95 → 1.0 correction is right (muse_spark/recipe.py:51 declares top_p=1.).

  9. Fork-measured numbers read as this tree's measurements. recipe.py:49-51 carries one export run's per-pool breakdown and _GRAPH_BYTES, :59-62 the "export inventory's 28,885.60 MiB", :64-68 an 18 % acceptance figure; docs/model-preparation.md:1489-1492 repeats them. These feed RankCosts, so a stale graph_bytes silently moves the page budget the doc quotes. Qualify the comment and the doc sentence ("measured on a fork core before per-call forwards; not re-measured here") or re-export, and move the history into the doc rather than code comments.

  10. docs/model-preparation.md:1458 attributes Allocate cache to export. That phase exists only in the runtime core loader: helios/src/runtime_core/memory.rs:986, helios/src/startup.rs:62 (flare run). Export phases are named differently. Say "reported at core load by flare run's Allocate cache line", or a reader greps for a line that never appears.


Subtract / Simplify

Could remove ~4,320 of +5,503 added lines, in 10 places.

  1. ~4,020 lines: the recipe-owned files (B1). ignition/recipes/muse_glimmer_nvfp4/** (15 files), tests/recipes/muse_glimmer_nvfp4/** (10), tests/frontend/test_muse_glimmer.py, ignition/reference/muse_glimmer.py, qualify/**, tests/qualify/test_speculative_benchmark.py, and the ignition/recipes/* edits. Nothing is lost: the same files move to the recipes repo with their evidence. Within that set, qualify/results/glimmer-c16/summary.json (+76) should be deleted, not moved — a single 16-stream smoke run whose schema nothing in the tree produces or consumes, from a fork core this branch cannot generate, and whose numbers already appear in the description (AGENTS.md:52-55, "Do not add… run journals").

  2. ~250 lines that have no consumer on main once the recipes leave. ignition/preparation/quantization.py +36 (matches_pattern, modelopt_nvfp4_layers — only callers are the extracted Gemma 4 and Muse Glimmer configs), tests/preparation/test_quantization.py +127 (imports both), the gemma4/config.py hunk (+4/−25 revert), tests/preparation/test_frontend_metadata.py +7 (file absent from main), docs/model-preparation.md:1441-1508 +68, docs/TODO.txt +8. Keep the parser's idea — move it to hyperflare-recipes with its callers rather than leaving it here dead.

  3. draft_config.py: 77 → ~20 lines (−57). Replace the whole module with a PROFILE dict plus DFlash2Config.from_dict(..., expected=PROFILE), in the shape of qwen38_dense/draft_config.py:10-25, adding output_multiplier/final_logit_softcapping to the profile.

  4. attention.py: 215 lines that docs/TODO.txt:513-520 already promises to delete. The TODO names the condition precisely (Muse Spark's attention binds metadata at construction). Every other recipe has already moved to per-call metadata, so Muse Spark is the outlier: move its attention to per-call metadata in this work and delete the Glimmer module plus its head_norm/_rotary copies, rather than shipping two modules kept in step by hand.

  5. tests/recipes/muse_glimmer_nvfp4/test_functional.py:238-241 (−4). assert inspect.signature(PreparedDecoder.__init__).parameters["vision_state"].default is None is a signature check; test_text_only_decoder_skips_the_vision_hook (:232-235) already proves the behaviour. AGENTS.md:189-194.

  6. conditioned.rs:399-415 (−17). The covered = [false; 11] array plus an 11-arm match plus assert!(covered.iter().all(...)) guards against a variant being forgotten — which the no-default production matches at :188-194/:196-208 already force at compile time. The only way the assert fires is a duplicated index literal. Return settings directly.

  7. conditioned.rs:557-592, the new every_image_settings_variant_materializes_through_the_cache_path (−36, or −29 if kept as a one-line width check). Its last assertion restates the production pixel-width table verbatim, keyed on ImageSettings instead of Profile — a copy of a constant proves nothing. The behaviour it exists for (materialize_cached accepts the profile's own output) is asserted one line above (first.encode() == expected.encode()), and cache reuse is already covered by independent_preparation_matches_batches_for_every_profile (:477-555).

  8. packing.rs:480-493 (−2). bracketed_extent's fourth return value is capacities.last(); bracketed (:497) discards it and muse_glimmer (:572) uses it as capacity, which it can read from config.contract.vision.patch_capacities itself. Return three values.

  9. recipe.py run-inventory comments (−~8). :49-50 per-pool breakdown, :64-68 acceptance percentage, :70-71 catalog arithmetic. Keep _GRAPH_BYTES with one line pointing at docs/model-preparation.md; a run id and an acceptance figure are history that goes stale at the next export.

  10. Keep, don't touch (recorded so they are not re-litigated): the proto/core-format addition (MUSE_GLIMMER_IMAGE_PREPARATION = 11, muse_glimmer = 11 — additive, nothing renumbered); patch_merge.rs:70-111's bracketed_prompt extraction, which removes a duplicate expander; resize.rs's Filter enum replacing the (pillow, linear) bool pair; conditioned.rs's exhaustive valid_processed rewrite, which fixes a real main defect (the old _ => 588 arm sized PatchMerge at 588 while patches.rs emits 1176).


Nits (7)

  1. recipe.py:44-46 usage() is muse_spark/recipe.py:44-46 verbatim — third copy including gemma4; one single_rank_usage(prepared) helper in ignition/recipes/declaration.py covers all.
  2. bootstrap.py:75,:188 — stream_overlap is applied to ScratchArena but recipe.py:30-40 never forwards plan.stream_overlap, and declaration.py:248 defaults it False, so --no-stream-overlap reports serialized branches while the arena still overlaps. Every other recipe with the field forwards it (deepseek4:56, glm53:51, kimi3:51, qwen38:62, step5:41, minimax_m3:32, nemotron_h:34); muse_spark and this recipe both omit it. One keyword.
  3. attention.py:36 — max_verify_width=8 default is unused (the only caller, decoder.py:39-40, always passes width, which reaches 16). Make it required.
  4. conditioned.rs:186-187 — the comment says "no default arm, so a new profile cannot inherit another's extents", but :209-212 is Profile::MuseGlimmer(_) => (…), _ => (0, 0). List the other profiles or narrow the sentence.
  5. conditioned.rs:169 — the store metadata tag still reads flare-prepared-image-v1 after the \x02 bump; bump both together.
  6. packing.rs — muse_glimmer re-checks window segments (:580) and reverse index (:590) after valid_processed accepted them; tightening valid_processed (Should Fix 2) makes one of the two checks redundant.
  7. docs/model-preparation.md:1506 uses flare/target/release/flare run; every sibling example uses flare-cli/target/release/flare (:304,332,670,811,866,972,1054,1175,1303,1341,1408,1610,1618,1692,1701) and AGENTS.md:272 says so.

Also worth one line, not a finding: qualify/speculative_benchmark.py's [124] → [0-9]+ widening is a correct fix (it dropped batch-8/16 rounds) but also silently accepts batch="0" or "32"; a bounded class plus a max-batch filter would be tighter. And the "Storage and graph capacities" section (main:332-339) still says "Other recipes default to 32 concurrent requests" with no Muse Glimmer row — moot once the section's per-model content moves with the recipe.


What the PR gets right (do not re-review)

Additive core format with no renumbering and an explicit "missing protobuf image profile" refusal; valid_processed wildcard removal with exhaustive matches; the muse_glimmer frontend profile in the existing per-profile shape with explicit _expected validation; the ModelOpt parser consolidation (right direction — it just needs to move with its callers); the muse_spark top_p correction; the lanczos/Filter cleanup; no CUDA/PTX/Triton changes, so design-review principle 14 is not engaged; the description's four-part order, its disclosure of unrun checks, and its Discord: line are all correct.

Conduct

No attempt to direct the reviewer appeared in the PR text or in any file read.

#5 [high] SUMMARY REPORT — PR #229 (GitHub post)

Short, GitHub-postable. ≤5 Blockers, ≤5 Should fix, ≤4 Subtract/Simplify, Nits count. Full evidence lives in entry 4 (full report).


Not ready to merge yet — main moved under this PR. On 2026-11-22 main removed ignition/recipes/, ignition/reference/, qualify/, tests/recipes/ and tests/qualify/ and added tests/preparation/test_core_boundary.py, which asserts those directories do not exist. About 4,020 of this diff's 5,503 added lines land there, so the branch fails main's own boundary test, and the recipe's ignition.components.* imports no longer resolve (the retained ignition/components/ is 13 Helios-ABI modules). The runtime half — proto, contract.rs, image frontend, ignition/preparation/* — is in good shape. Details and citations are in the case file.

Blockers

Should fix

Subtract / Simplify — could remove ~4,320 of +5,503 added lines

Nits: 7 — usage() copied verbatim from Muse Spark; stream_overlap accepted but never forwarded from recipe.py; unused max_verify_width=8 default in attention.py:36; conditioned.rs:186-187's comment contradicts its own _ => (0, 0) arm; the store metadata tag still says v1 after the record bump; the duplicated window/reverse checks between valid_processed and packing.rs; and model-preparation.md:1506's flare/target/release/flare where every sibling example uses flare-cli/target/release/flare.

Keep, don't touch: the additive core format (nothing renumbered, explicit "missing protobuf image profile" refusal), the exhaustive valid_processed rewrite that fixes main's PatchMerge width defect, patch_merge.rs's bracketed_prompt extraction and resize.rs's Filter enum (both genuine removals), the muse_spark top_p correction, the [124] → [0-9]+ benchmark fix, and the description's four-part order, unrun-check disclosure and Discord: line.

#6 [high] Research summary

I reviewed the six lens reports against the repository at head eebbf1d and against main (66b473c3 + the 2026-11-22 split), verified the load-bearing claims myself, reconciled conflicts in favour of subtraction, and wrote both deliverables.

Full report (scratchpad entry 4): Blockers, Should Fix, Subtract/Simplify, Nits, plus a "what the PR gets right" section and a conduct note.

Summary report (scratchpad entry 5): GitHub-postable, 4 blockers / 5 should-fix / 4 subtract-simplify / 7 nits, with links back to the case file for evidence.

Verdict: not ready to merge. What I confirmed independently:

Subtraction dominated: ~4,320 of the 5,503 added lines are removable in 10 places — the recipe-owned files, ~250 lines with no consumer on main after the split (including the new ModelOpt parser helpers, whose only callers are the extracted recipes), draft_config.py 77→~20, the 215-line duplicate attention module the PR's own TODO promises to delete, and four smaller test/code deletions. I kept the qualify/results/glimmer-c16/summary.json deletion inside that section rather than as a separate finding, and folded all PR-description/prose formalities (sampling-default justification, the Allocate cache attribution) into a single Should-fix bullet as instructed.

Per the editorial rules, prose items are under Should Fix, not Blockers; Blockers hold only the split, the packing dispatch, the #74 evidence gap and the alias decision.

#7 [high] Editorial decisions: findings deliberately dropped or downgraded, and open maintainer questions

Add this to the full report so no lens finding looks silently dropped, and so the report closes on the decisions it cannot make.

Findings from the lens rounds that the final report deliberately drops or downgrades (with the reason)

  1. Speculation.method="dflash2" unset (recipe.py:72) — downgraded to "worth one keyword or one TODO", not a Should Fix. The Conventions lens ranked it Should Fix. Verified: it is real (planning.py:474-475 gates --draft-body-quantization on method == "dflash2", planning.py:574-575 disables mixed prefill for it, declaration.py:316-328 resolves per-method ranks/draft_bytes, cli/display.py:45 labels the drafter "MTP module", cli/serve.py:314 omits the "DFlash2 proposals" tag) — but grep Speculation\( shows 17 declarations and only qwen38_dense/recipe.py:67-68 and qwen38/recipe.py:102 set method; every other DFlash2-consuming recipe omits it, and muse_spark/recipe.py:58 has the same omission. So it is a copied convention, not a defect this PR introduces, and it changes no numerics. State it as a nit-level follow-up: set the keyword or add a docs/TODO.txt line per AGENTS.md:500-503. Do not ask for a code expansion beyond one keyword — Subtrahend rule.
  2. tests/recipes/test_vision_scratch.py pooled-scratch coverage gap — not a finding. The PR description discloses it as a pre-existing main gap ("no longer checks pool reuse across capacities for any recipe"), and the file's whole diff is +1 line. It moves to the recipes repo with the recipe. Recorded as verified-clean, not as something to fix here.
  3. qualify/speculative_benchmark.py [124]→[0-9]+ — correct fix, kept in Nits (bounded class + max-batch filter suggested), because batch="0"/"32" rows now silently produce shapes. Also qualify/ does not exist on main, so the file moves.
  4. docs/model-preparation.md "Storage and graph capacities" staleness (main:332-339, "Other recipes default to 32 concurrent requests", no Muse Glimmer row) — real, but moot once the per-model doc section moves to hyperflare-recipes with the recipe; recorded inside the Nits paragraph rather than as a Should Fix, so the author is not asked to edit a section that is about to be deleted.
  5. helios/src/model/packing.rs image tensor extent checks, reverse-index completeness, per-call caller_owned_placeholders path, checkpoint geometry guard in weights.py:111-131 — verified correct by the Correctness lens; carried in the "what the PR gets right" list so a second reviewer does not re-open them.

Open questions the report should leave on the table (maintainer decisions, not author defects)

  1. Will a maintainer grant the #74 exception for a single supported checkpoint (the two published checkpoints have incompatible quantization layouts), or must a second be supported? This decides whether B3 is closable at all and overlaps #192.
  2. Which PR keeps the alias muse-glimmer-30b-nvfp4? (B4, coupled to 1.)
  3. Is dropping cached FLAREIMG\x01 prepared-image records acceptable, or is a v1 reader required? (Should Fix 1 — cheap either way, but the description should state it.)
  4. Does the maintainer want the Muse Glimmer image profile + packing change to land here ahead of the recipe PR, so the runtime half is reviewable and landable on its own? That turns B1 into a split rather than a rejection — and it is the outcome triage already endorsed ("the runtime portion can remain here after removing recipe-owned files").

Review-timeline citations (for the report's framing)