PR #229 review — lens D (simplicity): what can be deleted
Base main at 66b473c3, head eebbf1d. 65 files, +5503/−232. Reviewed against the charter, AGENTS.md ("Reject unsupported abstractions and churn" at :183, "Require focused, meaningful validation" at :189), docs/design-review.md (principles 1 and 3), and .agents/skills/repo-prose/SKILL.md (not opened). Every finding below was read in place at head, not only in the diff.
Key findings
Two structural duplications should be deleted rather than deferred: the DFlash2 drafter-config parser re-implements the shared reader that another recipe already calls in 25 lines, and the 214-line Glimmer attention module duplicates Muse Spark's attention — a duplication the PR's own docs/TODO.txt entry commits to undoing later. One committed fork run output (qualify/results/glimmer-c16/summary.json) has no reader in the tree. The recipe's PreparationConfig defaults are dead in production and one of them contradicts the recipe's own declaration, and a test pins the contradiction. One added test asserts a __init__ signature instead of behaviour. Seven nits: a comment asserting the opposite of the code beneath it, a test assertion that cannot fail, run identifiers and fork measurements carried in code comments, an unused keyword default, a usage() helper copied verbatim from Muse Spark, a stream_overlap switch that is accepted and applied but never forwarded, and a four-step empty-window dance that one is_empty guard replaces.
No blocking issues. The extraction work the PR does do in the shared layer is exactly what this lens wants and is called out at the end.
Should fix
S1. ignition/recipes/muse_glimmer_nvfp4/draft_config.py:25-77 duplicates ignition/components/dflash2_geometry.py:27-101
The new module re-implements DFlash2Config:
from_dict'srequiredtable (draft_config.py:31-36) is a stricter restatement ofdflash2_geometry.py:39-43; theoptionstable (draft_config.py:39-42) restates the per-key equality loop atdflash2_geometry.py:44-50.- The target-compatibility check
draft_config.py:47-49isdflash2_geometry.py:62-64. - Every property —
layers(:52-54 / :76-78),target_layers(:56-58 / :80-82),block_size(:60-62 / :84-86),noise_token(:64-66 / :88-90),attention(:68-72 / :92-96) — andvalidate_shard(:74-77 / :98-101) are the same expressions.
The smaller version already exists in the tree: ignition/recipes/qwen38_dense/draft_config.py:10-25 is one PROFILE dict plus from_dict/load one-liners delegating to DFlash2Config. The PR itself lists the fold as a follow-up. That is ~60 deletable lines.
One real difference to resolve, not a reason to keep the module: dflash2_geometry.py:71-73 requires output_multiplier == 1. and final_logit_softcapping is None, while draft_config.py:43-46 requires both to equal the target's values (0.196… and 20.0 for this model). The shared reader already takes an expected dict (dflash2_geometry.py:38,45-50) and already special-cases dflash_config inside it — so the fix is to add output_multiplier/final_logit_softcapping to Glimmer's PROFILE (or relax the shared transform check to accept declared values), not a new 77-line module.
Fix: ignition/recipes/muse_glimmer_nvfp4/draft_config.py becomes ~20 lines in the shape of qwen38_dense/draft_config.py:10-25.
S2. ignition/recipes/muse_glimmer_nvfp4/attention.py:1-215 duplicates ignition/recipes/muse_spark/attention.py:57-194
Identical, line for line: head_norm (attention.py:61-63 / muse_spark/attention.py:57-59), _rotary (:153-157 / :129-133), the mode-driven branch tree (:110-151 / :86-127) including tuning_page_count (:142-145 / :118-122), and the commit-slot arithmetic (:206-214 / :183-189). Even the rows helper and AttentionScratch field list are the same shape (:56-58 / :52-54), as is the geometry-uniformity check (:38-39).
The genuine differences are only: per-call metadata instead of construction-bound, a separate gate projection, no head_norm before the gate (attention.py:203 vs muse_spark/attention.py:179), and caller_owned_placeholders=True.
docs/TODO.txt:514-520 states the intent outright: "Fold Muse Glimmer's attention back onto Muse Spark's … Remove the Glimmer module when Spark's attention accepts per-forward metadata." So the PR knows this code is deletable; the choice is only whether it ships two modules that must be kept in step meanwhile. They already disagree in ways that invite drift: weights.py:123-124 re-asserts a projection width that attention.py:92-93 also asserts.
docs/design-review.md principle 3 makes the target explicit — "replace the smallest coherent module needed… Reusable projections, experts, collectives, and state transfers belong in ignition/components/" — and the PR's rationale for not touching Muse Spark (its decoder, qualification driver, and CUDA tests bind metadata at construction) is an argument for making the shared module take metadata per call, which is the work this PR has already done once.
Fix: move the per-call-metadata form into muse_spark/attention.py (or ignition/components/), parameterised by the optional separate gate projection and gate-input normalisation, and delete muse_glimmer_nvfp4/attention.py plus its head_norm/_rotary copies. If that cannot land in this PR, the TODO should carry the concrete blocker, not the intention.
S3. qualify/results/glimmer-c16/summary.json:1-77 is a committed run output nothing reads
The file holds 16 request statuses and latency/draft counters from the fork-built core gb202-tp1-202611080045. A full-tree search for qualify/results and summary.json returns no match, and main has no qualify/results directory at all. Because the core was built before this branch's per-call forwards, the numbers cannot be reproduced or checked from this branch — the PR description already says so, and already quotes the numbers (16 admitted, 17 batch-16 rounds, 6.8 accepted drafts per request-round).
.agents/skills/repo-prose/SKILL.md:26-29 (not opened): "The repository keeps no … retrospectives, defect reports, or run journals into any document."
Fix: delete the file. The measurement survives in the PR description where it belongs.
What I could not settle from the tree: whether any GUI/JSON client browses qualify/results/. Nothing in the Python or Rust sources references it; if some out-of-tree consumer does, that would justify keeping a schema, not a specific run's numbers.
S4. ignition/recipes/muse_glimmer_nvfp4/bootstrap.py:50,67-69 — defaults that no caller uses, one of which contradicts the declaration, pinned by a test
CONTEXT = 1048576 (:50) feeds context: int = CONTEXT (:67), prefill_chunk_size: int = 4096 (:68), max_active: int = 4 (:69). The only production caller, recipe.py:36-37, passes context=plan.context, max_active=plan.concurrency, prefill_chunk_size=plan.prefill_chunk, so nothing reads these defaults.
The problem is what the tests then assert. tests/recipes/muse_glimmer_nvfp4/test_preparation.py:15 pins (device, context, max_active, prefill_chunk_size) == (0, 1048576, 4, 4096) and :19 pins decode_tokens == decode_samples == 4, while recipe.py:69 declares concurrency=8, max_concurrency=16. A reader is left with a test that asserts a concurrency the recipe does not declare, and that would have to be edited (as commit 3 of this PR did for token_capacity) every time the declared concurrency moves. test_image_concurrency_is_bounded_by_concurrency_when_vision_is_prepared (:24-30) depends on max_active too, and therefore tests a concurrency the model never serves at.
Note muse_spark/bootstrap.py:69 carries the same max_active: int = 4 default, so the pattern is inherited — but there the default happens to match nothing in dispute, whereas here it contradicts RECIPE.concurrency.
Fix: either make context, prefill_chunk_size and max_active required dataclass fields (no defaults) so the plan must supply them, or default them from RECIPE (RECIPE.context, RECIPE.prefill_chunk, RECIPE.concurrency) and let the tests assert against RECIPE rather than literals. MAX_WIDTH = 16 (:52) can keep its default because __post_init__ validates the widths against it.
S5. tests/recipes/muse_glimmer_nvfp4/test_functional.py:238-241 — a source-text test that proves no behaviour
def test_decoder_constructor_keeps_the_vision_hook_optional():
import inspect
assert inspect.signature(PreparedDecoder.__init__).parameters["vision_state"].default is None
AGENTS.md:189-190: "Tests must exercise the affected behavior or contract; source-text checks and mocks that bypass the behavior cannot establish runtime correctness." The behaviour is already proven two functions above by test_text_only_decoder_skips_the_vision_hook (test_functional.py:232-235), which builds a decoder with no vision_state and shows the vision hook is skipped. The keyword default is exercised by every other fixture in the file.
Fix: delete the test. Nothing is lost in coverage.
Nits
N1. helios/src/frontend/images/conditioned.rs:186-187 — comment claims the opposite of the code below it
The comment says "no default arm, so a new profile cannot inherit another's extents". The two matches above it do list every profile — pixel width at :188-194, interpolation at :196-208 — but the one at :209-212 is Profile::MuseGlimmer(_) => (…), _ => (0, 0). A new windowed profile would silently declare zero window segments and zero reverse index, and valid_processed would then accept records that carry none (:238-239).
Fix: either list every profile in that match like the two above it (Profile::MuseGlimmer(_) => (…), _ => (0, 0) → explicit arms for the other eleven), or narrow the sentence to the two matches it describes.
N2. helios/src/frontend/images/conditioned.rs:399-415 — test bookkeeping whose assertion cannot fail
After the vec![…] of 11 settings, a covered = [false; 11] array, an 11-arm match mapping each variant to an index, and assert!(covered.iter().all(|c| *c)). The exhaustive match already forces a new ImageSettings variant to be listed (that is the compiler's job, not the assertion's), and the only way the assert can fire is a duplicated index literal — a copy-paste slip, not a product behaviour.
Fix: drop :399-415 and return settings directly; the vector plus the exhaustive match in valid_processed is the coverage that matters.
N3. ignition/recipes/muse_glimmer_nvfp4/recipe.py — run identifiers and fork measurements carried in code comments
:49-50# Export VRAM inventory (gb202-tp1-202611080045 at --max-concurrency 16): graph scratch pools 2,870.81 MiB + …— a specific export run's byte breakdown, then_GRAPH_BYTES = 6_226_612_060at:51.:64-68the "18% of accepted drafts at depths 8-15" served-acceptance figure.:70-71and:59-61round-catalog yields per batch and byte accounting.
repo-prose/SKILL.md:38-39: comments explain invariants, intent and non-obvious constraints, "never change history". A run id and a fork acceptance percentage are history: they will be stale after the next export and cannot be re-derived from the code.
Fix: keep _GRAPH_BYTES with one line — "measured on one RTX PRO 6000 at --max-concurrency 16; see docs/model-preparation.md" — and move the per-pool breakdown, the acceptance figure and the catalog arithmetic into docs/model-preparation.md, which this PR already extends.
N4. ignition/recipes/muse_glimmer_nvfp4/attention.py:36 — unused keyword default
AttentionScratch.allocate(..., max_verify_width=8). The only caller is decoder.py:39-40, which always passes max_verify_width=width. A defaulted verification width that no one uses invites a caller to silently get the wrong page count.
Fix: make it a required keyword: def allocate(cls, config, shard, tokens, device, *, requests=1, examples=None, max_verify_width).
N5. ignition/recipes/muse_glimmer_nvfp4/recipe.py:44-46 is muse_spark/recipe.py:44-46 verbatim
Both are the same three-line RankUsage unpacking over memory_report. The pattern now exists twice and a third single-rank recipe will copy it again.
Fix: one helper in ignition/recipes/declaration.py (e.g. single_rank_usage(prepared)) used by both recipes.
N6. bootstrap.py:75,188 — stream_overlap is accepted and applied but never forwarded
PreparationConfig.stream_overlap: bool = True (:75) reaches ScratchArena(device, overlap=config.stream_overlap) (:188), but recipe.py:30-40 does not pass stream_overlap=plan.stream_overlap. declaration.py:248 defaults the recipe declaration's stream_overlap to False, and when a plan carries --no-stream-overlap the serving output reports serialized branches while the arena still overlaps. Every other recipe that has this field forwards it (deepseek4/recipe.py:56 (not opened), glm53/recipe.py:51 (not opened), kimi3/recipe.py:51 (not opened), qwen38/recipe.py:62 (not opened), step5/recipe.py:41 (not opened), minimax_m3/recipe.py:32 (not opened), nemotron_h/recipe.py:34 (not opened)); only muse_spark/recipe.py:30-39 omits it.
Fix: add stream_overlap=plan.stream_overlap to the PreparationConfig(...) call in recipe.py:30-40 — one keyword, and correct the declaration.
N7. helios/src/frontend/images/record.rs:27-40 — the empty-window dance
Push a zero when empty, read the last element, extend from skip(1), then clear if the length came back to 1. Clearer and shorter as a guard:
if !images.cu_window_seqlens.is_empty() {
if self.cu_window_seqlens.is_empty() { self.cu_window_seqlens.push(0); }
let offset = *self.cu_window_seqlens.last().unwrap();
self.cu_window_seqlens.extend(images.cu_window_seqlens.into_iter().skip(1).map(|n| n + offset));
}
Diagnostic only; behaviour is equivalent.
What this PR gets right (keep, don't touch)
- Moving the ModelOpt NVFP4 parser to
ignition/preparation/quantization.pyand having Gemma 4 call it (gemma4loses 25 lines, gains 4) is one parser for two recipes —docs/design-review.mdprinciple 3 satisfied, and it is the model the two duplications above should follow. helios/src/frontend/images/resize.rs'sFilterenum replaces apillow: bool, linear: boolflag pair: one value where two booleans could encode a state that does not exist.packing.rs'sbracketed_extentremoves a validation block duplicated between thebracketedandmuse_glimmerpaths.- The explicit
ImageSettingsmatch arms inconditioned.rsare exhaustiveness, not redundancy — the compiler is the check; only the runtime duplicate of that check (N2) is deletable.
Open questions and what could not be found
- Does anything out-of-tree read
qualify/results/? No Python or Rust source references it andmainhas no such directory. Only a client outside the repository would settle it; if one exists, the directory wants a schema and a README, not this run's numbers. - Is
DFlash2Config's output-transform check (dflash2_geometry.py:71-73) needed for any checkpooint other than Glimmer's? If no other DFlash2 checkpoint declares a non-unitoutput_multiplieror a softcap, deleting theexpectedroute and relaxing that check outright would shrink both sides; if one does, theexpected-entry fix in S1 is the answer. Only the other DFlash2 checkpoints'config.json(not opened) files settle this. - Scope. Maintainer triage (original-el8, 2026-11-24 on this PR) places
ignition/recipes/muse_glimmer_nvfp4/*,tests/recipes/muse_glimmer_nvfp4/*andignition/reference/muse_glimmer.pyin the separate hyperflare-recipes repository, leaving the runtime portion here. If that split happens first, S1, S2, S4, S5 and N3–N6 move with the recipe, and the shared-layer review is what remains. It does not change any finding above — those files are still duplicating code that stays in this repository — but it changes who pays for the fix. - Not verified by test: nothing in this report depends on GPU behaviour, so the PR's unrun CUDA tests and never-run export/serve do not affect these findings. The charter requirement that a new recipe "prove they export and serve cleanly from the PR branch" is a correctness/qualification matter for other lenses, not a simplicity one.