Key findings
Review through lens D (simplicity: what can be deleted). I read the full diff, then each changed function in its surrounding code: ignition/planning.py (Plan, to_dict, fit, plan), ignition/declaration.py (Recipe.__post_init__ and its sibling validation blocks), ignition/cli/__init__.py (_preparation_arguments), ignition/cli/preparation.py (derive), ignition/cli/{serve,bench}.py (all four derive(...) call sites and the bench details dict), ignition/preparation/rebuild_manifest.py (reproduction_arguments, from_plan, scope constants), both test files, and docs/cli-design.md, judged against the charter, AGENTS.md/CONTRIBUTING.md and docs/design-review.md.
The change is small and correctly scoped: core ignition stays recipe-free, the None omission in PreparationManifest is the right call (it keeps unset cores byte-identical for flare combine and --reuse-weights), and the pair of new fields on Recipe/Plan is the minimum needed to carry the declaration to the manifest. One place expresses the same behaviour with more machinery than its neighbours, and there the smaller version is strictly better.
Findings at a glance
| # | Severity | Location | Issue |
|---|---|---|---|
| 1 | should fix | ignition/planning.py:411-412 (+ ignition/cli/bench.py:250-251) |
Conditional key omission in to_dict() forces a second conditional splat in bench.py; siblings emit null |
| 2 | nit | ignition/cli/serve.py:210,278,479, ignition/cli/bench.py:170, ignition/preparation/rebuild_manifest.py:302 |
Redundant getattr(…, None) fallback at sites that always have the attribute |
| 3 | nit | ignition/declaration.py:328-329 |
Recipe-level format check is a third validation path its three sibling quantization tuples do not get |
| 4 | nit | tests/cli/test_commands.py:101-138, tests/cli/test_planning.py:210-253 |
Negatives-only assertions and a third copy of the existing protobuf round-trip block |
Finding 1 — should fix: Plan.to_dict() omits the key when unset, unlike every sibling, forcing a second conditional in bench.py
Where: ignition/planning.py:411-412, and the change it forces at ignition/cli/bench.py:243-252.
# planning.py:410-413
"force_moe_decode_a16": self.force_moe_decode_a16,
**({} if self.target_head_quantization is None else {
"target_head_quantization": self.target_head_quantization}),
"tuning_gpus": [gpu.index for gpu in self.tuning_gpus],
Every optional field in the same dict is emitted unconditionally, None and all — expert_scale_compression (planning.py:401, Optional[str]), mla_compute_mode (:402), context_parallel_size (:397 with an or default), benchmark_selection (:429, None if … else ….to_dict()). The new field is the only one whose presence in the dict changes with its value, so the plan JSON has two shapes.
Why it matters: the cost is not local. Because bench.py:237 copies selected keys out of plan.to_dict(), the conditional had to be re-tested in a second file:
# bench.py:243-252
"preparation": {
**{key: preparation[key] for key in (
"tensor_parallel", ..., "online_mxfp8", "online_mxfp8_scope", "language_model_only")},
**({} if "target_head_quantization" not in preparation else {
"target_head_quantization": preparation["target_head_quantization"]}),
}}
A flat comprehension became a two-source merge guarded by the same condition. And because to_dict() is a plain dict, preparation[key] for "target_head_quantization" raises KeyError when unset — so any future caller adding the key to such a tuple has a landmine that no other key in to_dict() has.
Smaller version: in planning.py write
"target_head_quantization": self.target_head_quantization,
and in bench.py:244-249 add "target_head_quantization" to the existing key tuple (beside "force_moe_decode_a16"), deleting the whole second splat at :250-251. Net five lines removed, one branch removed for every consumer of to_dict() (serve.py:215, serve.py:488, bench.py:182, bench.py:237), and the dict regains one uniform shape.
Is the always-present key safe? Yes, and the PR's own tests say so. tests/cli/test_planning.py:224 asserts "target_head_quantization" not in base.to_dict(); that becomes base.to_dict()["target_head_quantization"] is None. Nothing outside these paths reads the key (no Helios code reads to_dict(); the manifest reads plan.target_head_quantization directly at rebuild_manifest.py:302-303,363-364), and consumers that do .get(...) treat None and absent identically. The compatibility argument in the PR description is about the manifest, where omission is genuinely required to keep unset cores byte-identical for flare combine — that argument does not carry over to a diagnostic dict, and conflating the two is what produced the branch.
Rule: the charter asks for the smallest footprint in shared code, and AGENTS.md rejects "configuration switches … without a concrete requirement"; here the switch buys nothing that null does not already express.
Finding 2 — nit: getattr(args, "target_head_quantization", None) is a third fallback layer at four call sites
Where: ignition/cli/serve.py:210, ignition/cli/serve.py:278, ignition/cli/serve.py:479, ignition/cli/bench.py:170.
All four derive(...) call sites live in handlers registered through _preparation_arguments (ignition/cli/__init__.py:50 export, :53 bench, :60 debug-serve), which defines the flag at :212. The attribute therefore always exists in-process. The neighbouring keywords on the very same lines are read directly — args.force_moe_decode_a16, args.shard_hyperconnections, args.joint_tuning, args.row_shard_prefill — so the new line is the odd one out. derive's own target_head_quantization: str | None = None default (preparation.py:57) already covers programmatic callers, which is the reason getattr is unnecessary.
The same redundancy appears in ignition/preparation/rebuild_manifest.py:302-303, where the guard is getattr(plan, 'target_head_quantization', None) is not None but the next line reads plan.target_head_quantization directly — if the attribute were genuinely absent, that line would raise anyway, so the guard only delays the failure by one line. (The getattr on lines 304, 314, 316 are pre-existing and presumably cover duck-typed plans in tests; that is a separate, older question.)
Fix: write target_head_quantization=args.target_head_quantization in the four CLI sites and if plan.target_head_quantization is not None: at rebuild_manifest.py:302, matching the if plan.force_moe_decode_a16: immediately above at :300.
Finding 3 — nit: Recipe.__post_init__ format check is a third validation path its siblings lack
Where: ignition/declaration.py:328-329, versus the three sibling tuples declared at :277-279.
if any(name not in ("mxfp8",) for name in self.target_head_quantizations):
raise ValueError("target_head_quantizations must name supported target vocabulary head formats")
draft_head_quantizations, draft_body_quantizations and markov_head_quantizations get no equivalent format check. There are already two validators for this exact value: argparse choices=("mxfp8",) at ignition/cli/__init__.py:212 means a user cannot pass anything else, and Plan.__post_init__ (planning.py:289-293) rejects any --target-head-quantization the recipe did not declare — which also makes an unknown declared name inert. The new check therefore only catches a recipe author's typo.
That is a real but small benefit, and it is inconsistent: it is either over-validation relative to the siblings (delete it, matching :277-279) or under-application (add the same loop over the other three tuples, which is more code, not less). I flag it only because the PR introduces the asymmetry without noting it; if the intent is to start validating all four, say so in the description and do all four in one place. As written, the smaller version is to delete these two lines.
Finding 4 — nit: tests carry negatives-only assertions and a third copy of an existing block
Where: tests/cli/test_commands.py:101-138, tests/cli/test_planning.py:210-253.
test_target_head_quantization_flag_is_model_agnostic(test_commands.py:101-112) is parametrized over all three commands but the help assertion it makes isassert "Qwen" not in section— a negative. It cannot fail if the flag's help text were deleted or moved into another section, becausehelp_text.split("--target-head-quantization", 1)[1]would raiseIndexError... which, being outside thepytest.raises(SystemExit)block, would surface as an error rather than a clear failure, but more importantly the positive half (that the default isNoneand thatmxfp8parses) is already exercised at:103-104. Since one_preparation_argumentscall produces all three parsers' help (__init__.py:50,53,60), the three-way parametrization triples the cost of a check that varies by one shared string. Smaller version: keep the parametrization for the parse assertions and assert the help in a single non-parametrized test, positively (assert "--target-head-quantization" in help_textplus theQwennegative).test_derive_forwards_and_validates_target_head_quantization(test_commands.py:115-138) andtest_target_head_quantization_validation_and_preparation_manifest(test_planning.py:210-253) overlap: both drivederive/planwith a supported recipe and assert forwarding plusUsageErroron an unsupported one (test_commands.py:135-138,test_planning.py:251-253). One of the twoUsageErrorcases is sufficient — theplanning.pyone, which also pins the alias in the message.test_planning.py:231-243re-implements the manifest encode/decode/ordering assertions that already exist twice in the same file (:94,:153,:189all buildrebuild_manifest.from_plan(SimpleNamespace(directory=None), …)for the same purpose). The new loop adds a third verbatim copy ofkeys == sorted(keys) and len(keys) == len(set(keys))and theSerializeToString(deterministic=True)comparison. The only new behaviour worth pinning is the scope:param.scope == proto.PREPARATION_PARAMETER_SCOPE_TARGET_WEIGHTand the--target-head-quantizationargument pair. Smaller version: keep those four lines and drop the duplicated round-trip scaffolding, or factor the shared block into a helper the three call sites use.
What I checked and found nothing to cut
--target-head-quantizationhelp text (__init__.py:212-214): one line, model-agnostic, no per-model branches — matches the charter's "keep the runtime small and model-agnostic". Nothing to delete.Recipe.target_head_quantizations: tuple[str, ...] = ()(declaration.py:277): a tuple rather than a bool or anOptional[str]is the right shape — it mirrors the three sibling declarations and lets one recipe announce several formats. A single-format bool would have been less code but would not extend.Plan.__post_init__validation (planning.py:289-293): needed — it is the only place that ties a CLI request to the recipe's declaration and namesself.checkpoint.alias, matching the surroundingUsageErrormessages at:280-288.- Omitting
target_head_quantizationfromPreparationManifestwhenNone(rebuild_manifest.py:363-364): correct and not the same issue as Finding 1. The manifest feeds Protobuf determinism andflare combine/--reuse-weightsscope validation; adding an always-present parameter would change existing cores. TheSCOPE_TARGET_WEIGHTchoice matchesexpert_scale_compressiontwo lines above at:361-362. - Startup status fragment (
serve.py:314): onef"{…}"in an existing chain, no new variable or branch structure. Fine. docs/cli-design.md:454: one table row, follows the existing column conventions. Fine.- No dead code, no parallel export path, no new fallback in
helios/or the Protobuf schemas — the diff touches 10 files and all of them are on the direct path from flag to manifest.
Open questions
- Does anything outside this repository read
Plan.to_dict()keys by membership rather than.get()? I could only inspect this repo, where the four consumers areserve.py:215,serve.py:488,bench.py:182,bench.py:237— all in-repo. If a downstream dashboard or qualification harness asserts on key presence in the plan JSON, that would settle Finding 1 asnull-safe or not. The comment atbench.py:250("…" not in preparation) suggests the author reasoned about presence, but no such consumer is visible here. - Is the
Recipe.__post_init__check (Finding 3) intended as the first of four? The PR description does not say, and no sibling tuple got one. Somebody who owns the recipe format should decide whether validation lives inRecipe, inPlan, or in argparse — currently it lives in all three for this field alone. - Rust/Protobuf tests were not run (
cargo test) per the PR description; nothing in the diff touches them, and the manifest reload path is covered by the Python round-trip tests, so I did not treat this as a gap for this lens.