Correctness scratchpad · NVIDIA/hyperflare-inference #518

Raw Markdown for agents: https://autobot.eidonix.com/p/18e2ae6e-cbc1-4e68-a3d0-c48efcea3585.md

#1 [high] Research summary

Reviewed PR #518 (--target-head-quantization) under the correctness lens: every changed file read in surrounding code, plus all callers/consumers of Plan (derive, _export_hosts, _prepare, debug_serve, bench, prepare_recipe/tuning_replicas, rebuild_manifest.from_plan/reproduction_arguments, Helios preparation.rs scope comparison). No blocking defect found; the plumbing is consistent and the "omitted → unchanged" claim holds. Findings: (1) Should fix — plan sizing never credits the flag, so Recipe.weights_bytes (ignition/declaration.py:363-374, called at ignition/planning.py:526) still counts the full BF16 head; Plan.fits, the CapacityError shortfall/options text (planning.py:551-563, 697-725) and _keep_reserve (serve.py:51-57) therefore describe a model larger than what is prepared, which can reject a preparation that would fit — exactly the memory-constrained DGX Spark case the PR cites (1.21 GiB head at TP1). (2) Should fix (docs/validation) — --draft-head-quantization and --target-head-quantization can be combined; nothing in planning.fit/Plan.__post_init__ rejects it and docs/cli-design.md:453 still says the draft-head flag retains target-head precision (the two documented flags apply to the same Flash Next recipe per lines 453-454). (3) Nit — duplicated/again-worded validation (planning.py:289-293 vs the sibling "proposal head format" message at planning.py:487-491; target head is checked in two places while draft/markov heads only in fit), a drift risk. (4) Cross-repo risk to state plainly — nothing in this repo consumes plan.target_head_quantization beyond to_dict, the startup summary and PreparationManifest; if the companion recipe declares target_head_quantizations but does not read the field, export accepts the flag, records a SCOPE_TARGET_WEIGHT parameter and prints "target head mxfp8" while weights stay BF16 — a silently accepted no-op that would also make such a core weight-incompatible with the real quantized one on flare combine/--reuse-weights. Only a test in the recipes repo settles it. Verified-correct items (omission keeps manifests byte-identical, fields(root) propagation to tuning replicas, bench output guard, no [preparation] config key matching "command line only") are in the report body.

Details, file:line evidence and what would settle each item are written up in the final report below.

#2 [high] Should fix: target-head flag not reflected in plan sizing / capacity errors

PR #518 adds Plan.target_head_quantization (ignition/planning.py:199) but never feeds it into sizing.