#1 [high] Merge blocker: PR pb2 drops TERMINAL_PREFILL and downgrades gencode
Verified: on pr/483 head, TERMINAL_PREFILL has zero matches anywhere in the tree (search_code pattern TERMINAL_PREFILL on ref pr/483 → no matches), including helios/proto/runtime_core.proto (line 337-339 ends after SCORED_PREFILL = 12) and ignition/preparation/runtime_core_pb2.py.
On main: helios/proto/runtime_core.proto:338 TERMINAL_PREFILL = 14; (from #479, commit e091689b, Nov 23 "optional TerminalPrefill"), ignition/preparation/contract.py:29 lists "terminal_prefill", and runtime_core_pb2.py descriptor blob contains it (search matched main pb2).
The PR diff to runtime_core_pb2.py is +122/−120 and replaces the whole serialized descriptor; it does not touch contract.py (unchanged by PR), so a merge yields main's contract.py calling p.GraphOperation.Value("terminal_prefill") (contract.py:82) against a binding with no such enum value → preparation of any core with terminal_prefill graphs fails. tests/direct/test_scheduler.py:720 on main asserts p.TERMINAL_PREFILL == 14 → AttributeError.
Also header regressed Protobuf Python Version: 7.36.2 → 7.36.1 and ValidateProtobufRuntimeVersion arg 2→1 (pb2:5, :16) while pyproject.toml:34 pins protobuf>=7.36.2,<8; regeneration command is helios/manifest.md:468-471.
Base commit is 6d6fe0c6; PR head f2340e42 dated Nov 22, older than #479. Branch is stale.
#2 [high] No hardware-reachable path: no Gemma 4 checkpoint or recipe
Hardware: cn5 (4× RTX PRO 6000 Blackwell, amd64) has facebook/dinov2-base, local-inference-lab/GLM-5.3-Flash-NVFP4, nvidia/GLM-5.3-Flash-NVFP4, timm/vit_base_patch14_dinov2.lvd142m. cn7 (1× GB10, arm64) has incoai/Qwen3.8-27B-DFlash2, nvidia/Qwen3.8-27B-NVFP4, nvidia/Qwen3.8-Flash-Next-FP4-Local. No Gemma 4 checkpoint on either host.
No in-tree recipe selects the profile: search_code gemma-4|gemma4 over ignition/ returns only ignition/preparation/frontend.py:113-137 and the pb2 blob — no recipe registries (recipes were split out per commit 17bb3c4a/da037284 "Remove extracted hyperflare_recipes ... from core Flare"). helios/tests/support/contracts/gemma4_frontend.json:16-17,38 has image_preparation/image_layout/image_tokens all null.
So serving a Gemma 4 vision request requires a companion PR in local-inference-lab/hyperflare-recipes plus a checkpoint download that is not on the hardware. The changed logic (resize/patch interleave/positions/envelope/packing widths) is CPU-side and deterministically testable without a GPU.
#3 [high] Should-fix: count-keyed patch width table in shared packing
helios/src/frontend/images/packing.rs:16-22:
fn bracketed_patch_geometry(patches_per_feature: usize) -> Result<(i64, usize)> {
match patches_per_feature { 4 => Ok((2, 1176)), 9 => Ok((3, 768)), _ => Err(...) }
}
Patch width is 3patch_size^2 (16→768), a vision-tower property; patches_per_feature is a merge factor. Key is ambiguous in-tree: DeepSeek uses ppf=9 with 588 floats/patch (packing.rs:32-34 Deepseek arm → patches588; helios/tests/support/contracts/deepseek4.json:9 "patches_per_feature": 9). So 9→768 is model identity in a geometry name.
Three copies of 768: packing.rs:19, conditioned.rs:192 (Profile::Gemma4(_) => 768, used by valid_processed cache predicate), gemma4.rs:116 (3*self.patch_size*self.patch_size).
Load-time behavior change: model/packing.rs:92-97 calls tensor_layout from Packing::new during core load with config.contract.vision.patches_per_feature; before this PR Bracketed was fixed 2×1176. Any core declaring Bracketed with ppf != 4 or 9 now fails at load; with ppf=9 and 588-wide patches it would be silently mis-strided. Note gemma4::Processor::load (gemma4.rs:23-44) accepts any patch_size 1..=64 / pooling 1..=16, so profile/contract can disagree (e.g. patch_size=14,ppf=4 → load OK, packing slices 1176 stride over 588-float patches).
Mitigation check: class_token still asserts ppf==4 (packing.rs:527). Prompt validation cross-checks tokens*ppf==patches (prompt.rs:171, packing.rs:488).
#4 [high] Should-fix: untested shared-behaviour span fill in prompt.rs
helios/src/model/prompt.rs:137-151 (new, +15 lines) fills prepared.data.spans from conditioned_inputs token spans when prepared.data.spans.is_empty() AND config.contract.frontend.image_tokens.span is Some.
This is profile-independent shared code, not Gemma-4-only: consumers are validate_prompt_data (model.rs:420-454) and Scheduler::set_prefill_spans, i.e. it converts an image envelope into an unsplittable prefill unit.
Precedent is the layout owning spans: layouts/deepseek.rs:149 pushes spans beside tokens.extend; Bracketed's layouts/bracketed.rs:82-91 returns PromptData{vision_token_indices, ..Default::default()} (empty spans) and conditioned_inputs: vec![].
Coverage: zero. gemma4_frontend.json image_tokens is null (line 38); in-tree span fixture only deepseek4.json:56 and the synthetic spans at prompt.rs:481-487,699 (Deepseek/DeepseekRowMajor only). search_code spans|span over prompt.rs shows no new test for lines 137-151.
Known-affected existing cores: none demonstrated in-tree — no in-tree contract declares image_layout Bracketed with a non-null image_tokens (deepseek4.json image_layout 3 = Deepseek; mimo 2; qwen 1; step 5; nemotron 6; inkling 10). Minimax patch_merge fixtures are the patch_merge profile, not Bracketed. So blast radius is a recipe-repo question, unresolved.
Secondary: envelope span = max_soft_tokens+1 (gemma4.rs:11 allows 1120 → 1121) vs validate_prompt_data rejecting len > prefill_chunk_size (model.rs:422) and scheduler set_prefill_spans capacity check. Default prefill_chunk_size is 4096 (server/config.rs:149) so the default is safe; a smaller chunk is not.
#5 [high] Parity evidence is silent-skip only; no CI on head
gemma4.rs:236-334 checkpoint_tokens_expand_the_image_envelope and gemma4.rs:334-415 native_pixels_and_positions_match_the_checkpoint_processor both return early and silently:
- :238-244 needs FLARE_GEMMA4_TEST_SNAPSHOT + tokenizer.json; :253-256 needs ../.venv/bin/python; :281-283 returns if the template subprocess fails.
- :336-339 needs ../.venv/bin/python.
A silent return counts as a pass, so the description's "45 passed ... including Hugging Face checkpoint pixel/position parity" is not reproducible from the PR; no CI checks run on head f2340e4.
Parity inputs are synthetic
(x % 256) as u8rasters at 91×37, 10×3000, 3000×10 (gemma4.rs:355, 378-383) — not real photographs. geometry_matches_the_hugging_face_processor (gemma4.rs:197-216) is a hardcoded expected table, not a live comparison. The envelope test also spawns Python to build a chat template it never renders and leaks the temp file on the :281-283 return path; existing accessor crate::template_fixtures::template("gemma4", "chat_template.google") is used at jinja/tests.rs:274,822. What IS deterministically covered without any env: geometry table, pixel/position interleave (pixels_interleave_rgb_and_positions_are_xy, gemma4.rs:218-234), packing.rs:574-586 tensor_layout table test (asserts the literal mapping, not the property).
#8 [high] Confirmed: merging PR reverts #479 TERMINAL_PREFILL from proto and pb2
Decisive, verified by direct file reads at both refs:
- pr/483 helios/proto/runtime_core.proto:325-339 → GRAPH_OPERATION_UNSPECIFIED=0, INIT..MIXED=1..9, reserved 10,11,13, SCORED_PREFILL=12, then closing } at 339. No TERMINAL_PREFILL.
- main helios/proto/runtime_core.proto:337-339 → SCORED_PREFILL = 12; TERMINAL_PREFILL = 14; }.
- search_code TERMINAL_PREFILL on ref pr/483 across whole repo → No matches (also none in ignition/, tests/, helios/src/).
- main: helios/proto/runtime_core.proto:338, ignition/preparation/contract.py:29 ("terminal_prefill" accepted kind), tests/direct/test_scheduler.py:720 (
p.TERMINAL_PREFILL == 14). Conclusion: the PR branch predates #479 (merged e091689b, Nov 23, 2026; PR head f2340e42 dated Nov 22, base 6d6fe0c6). Merging the PR as written reverts TERMINAL_PREFILL from the .proto and ships a pb2 without it, so contract.py:82p.GraphOperation.Value("terminal_prefill")and tests/direct/test_scheduler.py:720 break. This is an outright regression of a just-merged feature and must be rebased/regenerated, not tested on hardware.
#9 [high] Corrected: regression is the regenerated pb2 overwriting main, not the .proto hunks
CORRECTION to entry 8's mechanism (conclusion unchanged, precise mechanism):
- pr/483 .proto text (verified: runtime_core.proto:325-339 on pr/483) has no TERMINAL_PREFILL because base 6d6fe0c6 predates #479 (merged e091689b, Nov 23). main :337-339 has SCORED_PREFILL=12; TERMINAL_PREFILL=14.
- The PR's .proto diff is +10/−0 in disjoint hunks (enum value 11 near line 386, oneof tag 11 near 522, new message near 535), so at merge git combines both changes and the merged .proto DOES retain TERMINAL_PREFILL = 14. The .proto is not the regression.
- The regression is the checked-in artifact: runtime_core_pb2.py is regenerated wholesale (+122/−120, entire serialized descriptor replaced from the stale schema), so on merge main's descriptor (containing TERMINAL_PREFILL) is overwritten by one without it. Result: checked-in pb2 disagrees with the schema, and with unchanged consumers ignition/preparation/contract.py:29+82 (
p.GraphOperation.Value("terminal_prefill")) and tests/direct/test_scheduler.py:720 (p.TERMINAL_PREFILL == 14) → AttributeError / ValueError at preparation and in the direct scheduler test. - Compounded by the gencode header regression 7.36.2 → 7.36.1 (pb2:5, :16) against pyproject.toml:34
protobuf>=7.36.2,<8; regen command helios/manifest.md:468-471. - Fix: rebase onto main and regenerate with the pinned protoc; the correct artifact then contains both GEMMA4_IMAGE_PREPARATION and TERMINAL_PREFILL at 7.36.2.
#11 [high] Report 2026-11-25 run: prior blockers verified fixed at 2b4a31e
Verified by direct reads at pr/483 head 2b4a31e:
F1 (pb2 regression) FIXED: ignition/preparation/runtime_core_pb2.py descriptor at :27 now contains BOTH GEMMA4_IMAGE_PREPARATION\x10\x0b and TERMINAL_PREFILL\x10\x0e and the new PreparationManifest/PreparationParameter messages from main 27716185. Header still "Protobuf Python Version: 7.36.1" (pb2:5, ValidateProtobufRuntimeVersion 7,36,1 at :12-19) which is IDENTICAL to main's own file (read at ref=main, same lines) — no drift vs main; the pyproject 7.36.2 pin inconsistency is pre-existing on main.
F2 (count-keyed width table) FIXED: packing.rs:16-32 now LEGACY_BRACKETED_PATCH_FEATURES=1176, bracketed_patch_features(vision) (0→legacy), square_merge_side(ppf) via isqrt+square check; tensor_layout takes &VisionCapabilities (packing.rs:34-56); callers model/packing.rs:92-97 and bracketed() packing.rs:493-518. New additive field helios/proto/runtime_core.proto:281-282 uint64 patch_features = 6, serde(default) (model.rs:51-53), validate() at model.rs:72-92.
F3 (shared span fill) FIXED: emission now in layouts/bracketed.rs:52-111 gated on an atomic_spans: bool threaded from model/prompt.rs:52-65; the prompt.rs fallback is gone; test bracketed_layout_emits_atomic_spans_only_when_contract_declares_them at model/prompt.rs:1171-1282 (2 spans, len 262, markers, 256-chunk rejection, MiniMax no-span case).
Also fixed: conditioned.rs:187 now self.processor.patch_features() (single authority, mod.rs:459-471, 11 profiles); server/config.rs:443-490 bootstrap validation (width vs patch_features, Bracketed legacy-0 actionable error, envelope vs prefill_chunk_size and span.max_tokens) with boundary tests config.rs:936-1023; ignition/preparation/frontend.py:114-173 now asserts only consumed fields + validates envelope tokens from tokenizer_config.json as single tokens; docs updated (helios/README.md:705-719, docs/runtime-core-design.md:181-197, model-contract.md:82, TODO.txt:331-337); protobuf round-trip test protobuf.rs:813.
REMAINING writer-side gap (verified, total): patch_features appears NOWHERE in ignition except the pb2 descriptor. ignition/preparation/contract.py:112 default vision dict is dict(features_per_request=0, max_images=0, patches_per_feature=0, patch_capacities=[]) with no patch_features. A recipe that passes only the historical four keys exports 0 → legacy 1176 → Gemma4 (768) rejected at flare run by config.rs:456-464. Callers can pass extra keys via **vision, so it is an ergonomic/default gap, not a functional break. One-line fix.
#12 [high] Hardware testability at 2b4a31e: still zero reachable value
Testability analysis for the re-referral decision:
- Hosts: cn5 = 4x RTX PRO 6000 Blackwell, models dinov2-base, timm vit_base_patch14_dinov2, GLM-5.3-Flash-NVFP4 (local + nvidia). cn7 = 1x GB10, models Qwen3.8-27B-DFlash2, Qwen3.8-27B-NVFP4, Qwen3.8-Flash-Next-FP4-Local. NO Gemma 4 checkpoint on either host. All model entries show 0 GiB, i.e. nothing staged.
- No in-tree recipe selects an image profile: recipes live in local-inference-lab/hyperflare-recipes; docs/TODO.txt:331-337 tracks the companion Gemma 4 vision recipe as unwritten.
- In-tree contract fixtures use image_layout 1,2,3,5,6,10 (qwen38=1, mimo_v2=2, deepseek4=3, step5=5, nemotron_h=6, inkling2=10). NONE uses 9 (Bracketed) and gemma4_frontend.json:16-17,38 still has image_preparation/image_layout/image_tokens = null. So the Bracketed upload path (packing.rs bracketed) and the new atomic-span path have no in-tree core that hardware could serve.
- Nothing GPU-side changed: no kernel, graph, numerics or precision edit. All changed arithmetic is CPU (decode/resize/patch interleave/positions/envelope/upload extents/prompt validation). No performance claim is made (#210 not engaged) → a throughput A/B is pure waste.
- The one behaviour change that reaches existing vision cores is conditioned.rs:187
valid_processedwidth. Per profile: Qwen/MiMo 1536, Radio 768, Glm 1176, PaddedGrid 1200, PatchMerge 1176, others 588. Only PatchMerge (was 588) and PaddedGrid (was 588) actually change — both were latent bugs (cache re-materialization), and neither profile exists on cn5/cn7 (MiniMax/PatchMerge and Inkling2/PaddedGrid are not hosted). GLM (hosted) is unchanged 1176. - New bootstrap rejections that could affect an existing core: square_merge_side requires a positive square patches_per_feature for Bracketed (MiniMax ppf=4 → fine); envelope bounds apply only to Profile::Gemma4. So risk to hosted cores is nil.
- Conclusion: expected value of a hardware run as the PR stands ≈ 0. Valuable evidence is CPU-only (
cargo test,pytest tests/preparation, the fixture test) and should happen in CI at no hardware cost. Still no CI status available on the head, so author-reported counts remain unverified.
#15 [high] Head ab9a432 state: prior blockers fixed, residual should-fix items
PR #483, head ab9a432, base main 27716185, 38 files +2490/−251.
Verified fixed at this head:
- ignition/preparation/runtime_core_pb2.py regenerated descriptor contains BOTH GEMMA4_IMAGE_PREPARATION (11) and TERMINAL_PREFILL (14) plus PreparationManifest; header "Protobuf Python Version: 7.36.1" matches main's pb2 line 5 exactly (read at ref=main). No #479 regression, no version drift. Prior blocker withdrawn.
- helios/src/frontend/images/packing.rs:16-22 square_merge_side (isqrt + square check) + :39-46 width from vision.bracketed_patch_features(); no 4=>1176/9=>768 table.
- helios/src/model.rs:51-53,72-80 patch_features additive with serde(default), 0 => legacy 1176; validate() requires multiple of 3 (:89).
- helios/src/frontend/images/layouts/bracketed.rs:52-111 layout-owned atomic spans gated on atomic_spans bool; prompt.rs:52-65 only derives the bool; test at helios/src/model/prompt.rs:1172-1281 (2 spans, len 262, chunk 256 rejected, no-span case empty).
- helios/src/server/config.rs:443-489 validate_loaded_image_processor (width vs contract, max_envelope <= prefill_chunk_size and <= span.max_tokens); test at :936-1022 (1122 vs 1152/1088; span_max 1121/1122).
- helios/src/model/tests.rs:1279-1452 legacy Bracketed core loads via Inputs::new, stages 16*1176, rejects 768 manifest and ppf=3.
- Parity fixture tests/frontend/gemma4_images.json + generator, consumed unconditionally by gemma4.rs:266-333 (8 cases; max_soft_tokens 280 and 1120 only). One #[ignore] live-checkpoint test left (gemma4.rs:422-503, Drop-guarded temp template at :443-448).
Residual should-fix at this head:
- ignition/preparation/frontend.py:310 resolves default processor path as preprocessor_config.json; Gemma 4 (and Inkling2) snapshots ship processor_config.json, so prepare_frontend(snapshot, image_profile="gemma4") without preprocessor= raises FileNotFoundError. All tests pass the path explicitly (tests/preparation/test_frontend_gemma4.py:88,246). Pre-existing for padded_grid.
- No in-tree contract fixture mounts the profile: helios/tests/support/contracts/gemma4_frontend.json:16,17,38 all null; no fixture uses image_layout 9 (values 3,10,2,6,1,5). Serve path unproven; tracked open in docs/TODO.txt:331-337.
- patch_features authored nowhere in-tree except the contract.py:117 default of 0 (docstring at :111-115 tells Bracketed recipes to set it). First Gemma 4 recipe gets a load-time rejection at flare run with an actionable message (config.rs:449-455).
- Soft-token allowlist duplicated: gemma4.rs:13 vs frontend.py:132; neither 70/140/560 is ever loaded by tests.
- Unreachable wire knobs patch_size/pooling_kernel_size (frontend.py:124-127,140-141 pin 16/3 and :168-173 write literals).
#16 [high] Hardware testability and zero-blast-radius proof for #483
Hardware hosts (given): cn5 = 4x RTX PRO 6000 Blackwell, models facebook/dinov2-base, timm/vit_base_patch14_dinov2.lvd142m, local-inference-lab/GLM-5.3-Flash-NVFP4, nvidia/GLM-5.3-Flash-NVFP4 (GPU0 at 86C, not taking runs). cn7 = GB10 arm64, models incoai/Qwen3.8-27B-DFlash2, nvidia/Qwen3.8-27B-NVFP4, nvidia/Qwen3.8-Flash-Next-FP4-Local. No Gemma 4 checkpoint on either host, and no in-tree recipe selects image_profile="gemma4" (recipes live in local-inference-lab/hyperflare-recipes). A GPU run today cannot exercise anything the PR adds.
Nothing GPU-side changes: decode -> area-bounded bicubic resize -> interleaved (y,x,c) patch pack -> (x,y) positions -> envelope expansion -> upload extent arithmetic -> prompt/span validation. No kernel, graph, numerics or precision path. No performance claim in the PR, so no A/B is warranted.
Zero blast radius on hosted cores: helios/src/frontend/images/conditioned.rs:187 now calls ImageProcessor::patch_features() (main:187-193 had a literal match). Per-profile values at helios/src/frontend/images/mod.rs:459-471: Qwen/MiMo 1536 (same as main), Radio 768 (same), Glm 1176 (same), PatchMerge 1176 (was 588 — MiniMax bug fix, not hosted), PaddedGrid 1200 (was 588 — Inkling2 bug fix, not hosted), DeepSeek*/Moonvit/Step 588 (same). So GLM-5.3 and Qwen3.8 cache validation is bit-identical to main. Load-time narrowings do not bite hosted cores: tensor_layout's square_merge_side runs only for ImageLayoutKind::Bracketed (packing.rs:39-46, model/packing.rs:92-97) and no hosted core is Bracketed; config.rs:464-487 envelope bounds require processor.max_image_envelope_tokens() == Some, only Profile::Gemma4 (mod.rs:473-478); model.rs:89 patch_features%3 only fires when nonzero and no checked-in fixture sets it (search of helios/tests for "patch_features" returns nothing).
CI facts: .github/workflows/native-serving.yml:63,68 run cargo test for helios with --features runtime-core,server (server includes images) on Linux and Windows, so the new Rust Gemma 4 tests do run in CI. No workflow runs pytest at all (searched .github/workflows; only workflows are helios-lifecycle, native-serving, release), so tests/preparation/test_frontend_gemma4.py (257 lines) never runs automatically — the author's claim that the fixture-provenance test runs "in CI" is not supported. No CI status recorded on head ab9a432.
#17 [high] Correction: only MiniMax patch width changes; PaddedGrid was already 1200 on main
Correction to entry #16. helios/src/frontend/images/conditioned.rs:187-193 at ref=main reads:
Profile::Qwen(_) | Profile::MiMo(_) => 1536,
Profile::Radio => 768,
Profile::Glm => 1176,
Profile::PaddedGrid => super::padded_grid::FEATURES, // = 20*20*3 = 1200
_ => 588,
So on main PaddedGrid was ALREADY 1200, not 588. The only per-profile pixel width that changes at head is PatchMerge (MiniMax): 588 -> 1176 (helios/src/frontend/images/patch_merge.rs patch_features() = 3214^2 = 1176). That is a genuine bug fix (MiniMax cached prepared-image records were being re-materialised every request), and MiniMax is not served on cn5 or cn7. Every other profile, including GLM (1176) and Qwen/MiMo (1536) which ARE hosted, is numerically identical to main, so valid_processed cache behaviour for hosted cores is unchanged.
Several supplied summaries say PaddedGrid was "was 588" and credit the PR with fixing it; that is wrong and should not be repeated. What the PR fixes there is only that the width now comes from one accessor (helios/src/frontend/images/mod.rs:459-471) instead of a literal match.
#18 [high] Residual defects + CI facts at ab9a432 (no hardware relevance)
Facts checked directly at head ab9a432 (all read-only; no cargo test or pytest was run by me — that remains true, so the author's pass counts are unverified).
- CI wiring: .github/workflows/native-serving.yml:63 (Linux) and :68 (Windows) run
cargo test --manifest-path helios/Cargo.toml --features runtime-core,server; helios/Cargo.toml:25server = [..., "images", ...], so the new Gemma 4 Rust tests (gemma4.rs fixture parity, prompt.rs span test, packing.rs bracketed tests, config.rs envelope bounds, protobuf round-trip, model/tests.rs legacy core-load) DO run in CI. No workflow invokes pytest anywhere (.github/workflows has only helios-lifecycle.yml, native-serving.yml, release.yml), so tests/preparation/test_frontend_gemma4.py (257 lines) never runs automatically. No CI check recorded on head ab9a432. - Bug: ignition/preparation/frontend.py:310
path = snapshot / "preprocessor_config.json" if preprocessor is None else Path(preprocessor). Gemma 4 (and Inkling2) snapshots ship processor_config.json; the checked-in fixture tests/frontend/gemma4_images.json is a processor dump written to processor_config.json by the tests (tests/preparation/test_frontend_gemma4.py:76). Both gemma4 prepare_frontend calls pass preprocessor= explicitly (:88, :246), soprepare_frontend(snapshot, image_profile="gemma4")— the documented shape — raises FileNotFoundError. Pre-existing for padded_grid, so consistency bug + missing default test. - Serve path unproven: helios/tests/support/contracts/gemma4_frontend.json:16,17,38 are all null; no contract fixture uses image_layout 9 (values in tree: 3, 10, 2, 6, 1, 5); profile is inert until a recipe declares it. Open in docs/TODO.txt:331-337.
- patch_features authored by nobody in-tree: contract.py:117 defaults it to 0 with a docstring at :111-115 telling Bracketed recipes to set it; no recipe exists here (they live in local-inference-lab/hyperflare-recipes). First Gemma 4 recipe that omits it gets the actionable load error at server/config.rs:449-455.
- Soft-token allowlist duplicated: helios/src/frontend/images/gemma4.rs:13 [70,140,280,560,1120] vs ignition/preparation/frontend.py:132 (70,140,280,560,1120); fixture covers only 280 and 1120 (tests/frontend/generate_gemma4_image_fixtures.py:31-40), so 70/140/560 geometry is never exercised in either language.
- Unreachable wire knobs: gemma4.rs:27-40 accepts patch_size 1..=64 / pooling 1..=16 but frontend.py:124-127,140-141 pin 16/3 and :168-173 write literals, so no producer can emit another pair.
- Envelope length is max_soft_tokens + 2 (gemma4.rs:90-92; config.rs:990-1021 asserts 1122 at 1120 and 282 at 280). Summaries saying +1 are off by one.
- Everything the diff changes is CPU-side: decode -> bicubic resize -> (y,x,c) interleave * 1/255 -> (x,y) positions -> Envelope expansion -> tensor_layout/upload extents -> prompt/span validation. No kernel, graph, numerics or precision path; no perf claim in the PR.
#6 [medium] Preparation gaps: single-checkpoint pin, unchecked token strings, no pytest
ignition/preparation/frontend.py:113-137 (new gemma4 branch): pins processor_class Gemma4Processor, image_processor type/patch_size 16/pooling 3/do_resize/do_rescale/do_normalize False/mean 0/std 1, optional resample 3/rescale_factor 1/255/do_convert_rgb, max_soft_tokens in (70,140,280,560,1120), and vision_config {gemma4_vision, 16, 3, 27 layers, 1152 hidden, 16 heads, head_dim 72, 4304 FFN}. Returns hardcoded tokens "<|image|>", "<|image>", "<image|>" with no check that each encodes to exactly one added token (contrast _native_image_placeholder at frontend.py:231-245 which does that for DeepSeek).
Docs (repo lists all five Gemma 4 variants): docs/model-preparation.md:345 (gemma-4-e2b/e4b/12b/26b-a4b/31b + NVFP4); docs/api.md:749 links the 26B-A4B-it card; docs/model-development.md:79-83 covers e2b-e4b and 26B-A4B templates. So the vision-tower pin excluding 26B-A4B (and #74 more-than-one-checkpoint rule) is a real charter gap, but a doc/preparation-guard issue, not a hardware-testable runtime defect.
No pytest for image_settings(profile="gemma4"): search_code gemma4 over tests/ → no matches.
Shared constant duplicated: SUPPORTED_SOFT_TOKENS gemma4.rs:11 vs frontend.py:123.
#7 [medium] Checked clean and lower-severity items
Checked clean / lower severity:
- Proto additions additive: GEMMA4_IMAGE_PREPARATION = 11 appended (runtime_core.proto:386), ImageSettings.gemma4 tag 11 (:522), new message :535-542; ImageLayoutKind untouched. Rust: contract.rs:68 Gemma4 = 11 appended; protobuf.rs:167-171 decode arm; describe.rs:442-444. No existing tag renumbered.
- Envelope extraction (patch_merge.rs:10-81 Envelope + thin Processor wrapper :83-129) preserves the old validation (empty/duplicate marker checks moved verbatim; error text changed to "invalid image envelope tokens") and expand_prompt delegates. Genuine de-duplication, not churn.
- gemma4.rs geometry is self-consistent: checked_mul/checked_add/try_fold for overflow (:109-122), check_batch before/after geometry, degenerate-side clamps return a named error (:65-76), tokens = patches/(pooling^2) by construction, area bound :77-81.
- resize::resize reuse (uint8 antialiased bicubic) matches patch_merge/qwen — no new kernel.
- rerun: prewarm/gemma4 profile naming in describe.rs:442 mirrors other arms.
- Docs not updated (helios/README.md image-profile list, docs/runtime-core-design.md image settings, helios/model-contract.md) — doc-only, does not gate hardware testing.
- Nits: packing.rs:494-502 reformatting churn, redundant h%merge_side check (:486), duplicated soft-token list, Envelope doc comment self-referential, no protobuf round-trip test for tag 11 (precedents protobuf.rs:726,749).
#13 [medium] Residual should-fix items at 2b4a31e (none hardware-relevant)
Independent grading of what remains at head 2b4a31e, after re-reading the code:
A. ignition/preparation/contract.py:112 — default vision dict = dict(features_per_request=0, max_images=0, patches_per_feature=0, patch_capacities=[]), no patch_features. patch_features appears nowhere else in ignition except the pb2 descriptor. This is the in-repo authoring helper recipes call (cf. helios/tests/collective_core_fixture.py:33-40 passing the same four keys); **vision allows an explicit key, so it is a default/ergonomics gap with a serve-time symptom (config.rs:456-464 "re-export the core with vision.patch_features"), not a functional break. One-line fix. Should-fix before merge, but no hardware test can reach it.
B. server/config.rs:449-455 vs :456-464 — the first width check is subsumed by the Bracketed check whenever patch_features != 0 (bracketed_patch_features returns it verbatim); produces a second, vaguer message for the same defect. Cosmetic.
C. gemma4.rs:30-38 — one message invalid Gemma 4 image settings covers 6 conditions (patch_size 0/>64, pooling 0/>16, soft-token allowlist, pooling²!=ppf, patch budget). Diagnostic quality only.
D. gemma4.rs:132 re-inlines 3*patch_size*patch_size next to the patch_features() accessor at :54. Nit.
E. packing.rs:41-100 (ImageLayoutKind→width) and mod.rs:459-471 (Profile→width) remain two matches linked only by the 11-row test at packing.rs:695-824. Nit (test-covered).
F. patch_size/pooling_kernel_size remain configurable on the wire though ignition/preparation/frontend.py:124-127,140-141 pin 16/3 and :168-173 writes 16/3 literally. Dead flexibility, not incorrect.
G. Docs: helios/README.md:721-728 still presents Qwen's "1536 / temporal copy / 2×2 merge" as the shared process contract directly under the new Gemma 4 paragraph; docs/runtime-core-design.md:233-240 still omits Gemma 4 from the per-profile enumeration; image-fixture provenance at helios/README.md:772-789 names only the Qwen fixtures. Documentation only.
H. tests/frontend/gemma4_images.json processor/model blocks (lines 2-125) are written by generate_gemma4_image_fixtures.py:86 but never read (gemma4.rs:273 reads cases only). Dead data; envelope/token parity rests on the two #[ignore]d tests plus the pytest checkpoint cases that skip without HF_HOME.
I. Value delivered beyond the new profile: conditioned.rs:187 valid_processed previously used _ => 588 (confirmed at main:192), which is wrong for PatchMerge (1176) and PaddedGrid/padded_grid::FEATURES (1200) — the PR replaces it with ImageProcessor::patch_features() (mod.rs:459-471), fixing a per-request cache-invalidation bug. Also fixes a span-declaring Bracketed core being rejected at validate_prompt_data.
#19 [medium] Review-summary reliability at ab9a432: stale claims to discard
Review-summary accuracy pass for PR #483 at head ab9a432, for the final report.
Stale in the supplied summaries (do not repeat):
- "packing.rs:16-22 maps patches_per_feature 4=>1176/9=>768" — deleted; now square_merge_side (isqrt) + vision.bracketed_patch_features() (packing.rs:16-46).
- "prompt.rs:137-151 fills data.spans" — deleted; layout-owned at layouts/bracketed.rs:52-111, prompt.rs:52-65 only derives atomic_spans.
- "gemma4.rs:30-38 one opaque 'invalid Gemma 4 image settings'" — now per-condition messages naming field and both values (gemma4.rs:25-83).
- "three/four spellings of 768" and "conditioned.rs:192 literal" — gone; ImageProcessor::patch_features() (mod.rs:459-471) is the single authority and conditioned.rs:187 uses it.
- "gema4.rs:394-413 leaks a temp Jinja file on early return" — the remaining #[ignore] test Drop-guards it (gemma4.rs:443-448, dropped :469).
- "native_pixels_and_positions_match_the_checkpoint_processor superseded test" — deleted at this head.
- "pb2 downgrades protobuf 7.36.2 -> 7.36.1" — main's own pb2:5 is 7.36.1 too (read at ref=main); diff is descriptor-only and contains both GEMMA4_IMAGE_PREPARATION=11 and TERMINAL_PREFILL=14.
- "PaddedGrid width fixed 588 -> 1200" — wrong; main already had padded_grid::FEATURES = 1200 (conditioned.rs:191 at main).
- "envelope is 1121 tokens at max" — it is max_soft_tokens + 2 = 1122 (gemma4.rs:90-92).
Accurate and load-bearing:
- No Gemma 4 checkpoint on cn5/cn7 and no in-tree recipe selects the profile; docs/TODO.txt:331-337 tracks end-to-end qualification as open.
prepare_frontend(snapshot, image_profile="gemma4")without preprocessor= fails: frontend.py:310 looks for preprocessor_config.json while Gemma 4 snapshots ship processor_config.json; both tests pass the path explicitly.- Soft-token allowlist duplicated Rust/Python with only 280 and 1120 ever loaded; patch_size/pooling_kernel_size are wire knobs no producer can vary.
- No CI on head; no workflow runs pytest.