Prose review of PR #483 — Gemma 4 image prep profile, bracketed 3x3 packing, atomic spans
Lens E (prose): PR description, commit messages, and the docs and comments the change touches, judged against AGENTS.md (required prose review, required PR descriptions) and .agents/skills/repo-prose/SKILL.md (not opened). Head f2340e42, base 6d6fe0c6, 13 files, +732/−164.
Key findings
- The headline parity claim is not supported by the evidence as reported. Both Hugging Face comparison tests return silently when their inputs are missing, and silent returns count as passes, so "45 passed" cannot show that any parity comparison ran (
helios/src/frontend/images/gemma4.rs:236-241, 253-256, 281-283, 335-339). This contradictsAGENTS.md:107-112and:304-307. - The compatibility assurance is a process assurance with no check behind it ("Existing cores and non-Gemma image profiles remain wire-compatible and unaffected"), and the evidence bullet cites
Execution.persistent_workers, which is #430's field and not in this diff. - Two of the strongest claims —
Bracketedstride derivation and atomic-span population — actually change behaviour outside Gemma 4, and the description never says so.helios/src/model/prompt.rs:137-151fillsdata.spansfor any layout declaring anImageSpan, andhelios/src/frontend/images/packing.rs:16-22, 479-491now rejects anypatches_per_featureother than 4 or 9 where it previously assumed 2×2. A reviewer reading the description would think both are Gemma 4-only. - No repository documentation was updated for a new image preparation kind, a new
ImageSettingsoneof tag, or the new Bracketed stride rule, though three documents enumerate exactly those (helios/README.md:698-704,docs/runtime-core-design.md:226-233,helios/model-contract.md:224-254). - The regenerated Python protobuf bindings went backwards in version (7.36.2 → 7.36.1) while
pyproject.toml:34pinsprotobuf>=7.36.2,<8; the description calls the schema changes "additive" without mentioning this.
Angle 1 — PR description: the four required parts
AGENTS.md:72-80 requires why, what exactly changed, claimed result, and evidence, in that order; AGENTS.md:140 says the four parts are mandatory even though headings are not. The description has all four, in order, under headings — that part passes. Content issues follow.
Blocking — the evidence does not establish the claimed result
PR #483 "Claimed result": "Helios natively decodes, resizes, normalizes, packs, and validates Gemma 4 images with exact f32 pixel and (x, y) position parity against Hugging Face's Gemma4ImageProcessor". Evidence: "45 passed (tested against google/gemma-4-31B-it snapshot 842da379, including Hugging Face checkpoint pixel/position parity...)".
In the code:
checkpoint_tokens_expand_the_image_envelope(helios/src/frontend/images/gemma4.rs:236-244) returns early unlessFLARE_GEMMA4_TEST_SNAPSHOTis set andtokenizer.json(not opened) exists, then returns again if../.venv/bin/pythonis absent (:253-256) and again if the template export subprocess fails (:281-283).native_pixels_and_positions_match_the_checkpoint_processor(:334-339) returns early when../.venv/bin/pythonis absent; it compares only three sizes,(91, 37),(10, 3000),(3000, 10)(:355).geometry_matches_the_hugging_face_processoris a fixed expected table, not a live comparison.
A silent return is a pass in the harness, so the reported "45 passed" is identical whether the Hugging Face comparison executed or was skipped. AGENTS.md:107-109 requires that "skipped checks ... remain visible" and that "test counts and labels ... cannot stand in for the tested contract and result"; AGENTS.md:306-307 says "Report a skipped test as an unrun check." The repo-prose skill (:35-37) requires evidence stated as "conditions, measurement, result, and conclusion" with missing inputs disclosed.
Fix: state which of the 45 exercised the live Gemma4ImageProcessor comparison and on what inputs (FLARE_GEMMA4_TEST_SNAPSHOT path, .venv present), and report the checkpoint-parity tests separately from the pure-Rust ones. Better, make the skip visible in the test (#[ignore] or an eprintln!("skipping: ...")), as other suites in this repo do per AGENTS.md:304-307. Only a test run with the snapshot present can settle whether the parity claim is true; the description alone cannot.
Should fix — unsupported compatibility assurance
"Claimed result": "Existing cores and non-Gemma image profiles remain wire-compatible and unaffected." No evidence item loads a previously exported core or exercises a non-Gemma profile; the list contains cargo test, cargo check, and Python preparation tests only. Given that packing.rs:16-22 newly rejects patches_per_feature values outside {4, 9}, the claim is not merely unproven but is exactly the claim a reviewer would want checked. AGENTS.md:129-132: "Remove process assurances that add no technical evidence... Report the actual checks and their scope." Fix: cite the core-loading check, or say the compatibility has not been exercised beyond the unit suites.
Should fix — evidence bullet references an unrelated field
The bullet "plus Python runtime_core_pb2 round-trip verification for ImageSettings.gemma4 and Execution.persistent_workers" names Execution.persistent_workers, which arrives from #430 (66bf6d03, "Add Execution.persistent_workers green-context lifecycle") and is not part of this diff. The repo-prose skill (:17-19) forbids unexplained references; a reader cannot tell whether the author verified someone else's field or copied a stale line. Fix: drop Execution.persistent_workers or explain why it is in this PR's evidence.
Should fix — "Why" describes absences, not causality
"Why": "Previously, Helios lacked a Gemma 4 image preparation profile, ... and prepare_image_inputs did not populate data.spans for layouts declaring an atomic ImageSpan." AGENTS.md:82-87 requires the affected workflow and "the concrete defect, cost, or missing capability", plus why the chosen approach is valid. The text says what was missing, not what breaks: without the profile Helios cannot serve a Gemma 4 multimodal request at all; without spans, the prefill packer rejects the request at serve time with "prefill splits an atomic image span" (helios/src/model/packing.rs:624). The design argument reviewers actually need — that Bracketed can absorb 3×3 because patches_per_feature is prepared contract metadata rather than model identity — is asserted in "What changed" as "orthogonal" without saying why that keeps the runtime model-agnostic (read_charter line 12; docs/runtime-core-design.md:206-210). Fix: name the failing workflow and the serve-time error, and state the dataflow that makes the stride derivation model-agnostic.
Should fix — "What changed" hides a behaviour change that is not Gemma 4-specific
The bullet "helios/src/model/prompt.rs: populated prepared.data.spans from prepared.conditioned_inputs when ImageTokenLayout declares an atomic ImageSpan" is bundled inside the Gemma 4 story, but the condition at prompt.rs:137-151 is profile-independent: any core whose layout declares span now gets spans it previously did not. AGENTS.md:88-94 requires the before/after to be explicit — which layouts previously produced no spans and what happened to them. Also note the guard is prepared.data.spans.is_empty(), i.e. it only fills spans when nothing else did; that precedence is worth one sentence because it decides whether recipe-supplied spans win. Fix: split this into its own paragraph with the before/after and the list of affected layouts.
Should fix — undisclosed generated-artifact downgrade
ignition/preparation/runtime_core_pb2.py:5 goes from Protobuf Python Version: 7.36.2 to 7.36.1, and the ValidateProtobufRuntimeVersion minor argument from 2 to 1 (:13-18 of the diff). pyproject.toml:34 pins protobuf>=7.36.2,<8. AGENTS.md:92-93 asks the description to identify material compatibility changes; a checked-in artifact regenerated with an older compiler is one. helios/manifest.md:465-472 documents the regeneration command, so the artifact is intentionally checked in. Fix: say which protoc version regenerated the file and either bump it back to 7.36.2 or state that 7.36.1 is compatible with the pinned runtime.
Nit — duplicated logistics
"Branch logistics" repeats repository/branch/commit/base; the base commit 6d6fe0c6 also appears in "Verified on base 6d6fe0c6". AGENTS.md:120-121 puts merge logistics last, so keeping the block is fine; the duplicated base commit is not.
Angle 2 — Documentation the change should have updated
Should fix — the new profile is documented nowhere
helios/README.md:702-704: "Profiles cover Qwen, MiMo, patch-merge, DeepSeek, DeepSeek row-major, Moonvit, Step, RADIO, and GLM inputs." Gemma 4 is missing.docs/runtime-core-design.md:226-233: enumerates the image settings ("Qwen image settings contain ... MiMo ... DeepSeek's image profile has fixed geometry validated by Ignition") — no Gemma 4 entry, and nothing aboutBracketedderiving patch width frompatches_per_feature.helios/model-contract.md:224-254: "Frontend implementations" states that layout data declares feature IDs and atomic spans; a new preparation kind and its geometry/pooling settings belong here.
AGENTS.md:52-56 treats documents as specifications and requires support stated as present qualification; the repo-prose skill (:26-29) says "Documentation is a present-state specification". Since parallel text already lists every other profile, the omission reads as "Gemma 4 is not supported", which is wrong after this merge. Also nothing was added to docs/TODO.txt, where AGENTS.md:57-59 says unrun checks and pending measurements go — the description's own limitation ("end-to-end multimodal serving requires the companion ... recipe PRs") is exactly such an entry. Fix: add Gemma 4 to the three enumerations with its 16×16 patch, 3×3 pooling, and soft-token set, and record the recipe dependency in docs/TODO.txt.
Angle 3 — Commit messages
The single commit f2340e42 ("Add Gemma 4 image preparation profile, bracketed 3x3 packing, and atomic spans") names the three behaviours and matches the diff; it states no compatibility impact or validation, which the repo-prose skill (:40-43) asks commits to carry, but the PR description holds that detail. Nothing found worth reporting beyond the description issues above.
Angle 4 — Changed comments and code prose
Should fix — new frontend.py branch explains nothing
ignition/preparation/frontend.py:113-137 adds the gemma4 branch with no docstring or comment, while its siblings do explain themselves: :99 says why size is not a resize target for padded_grid, and the surrounding branches document consumed-value intent. image_settings' docstring (:92-97) mentions only the Qwen profile. The hard-coded tokens "<|image|>", "<|image>", "<image|>" and the fixed vision dimensions at :126-137 are checkpoint-canonical values validated by _expected, not console defaults, and a reader cannot tell that from the code. Repo-prose skill (:38-39): "Comments explain invariants, intent, and non-obvious constraints". Fix: one sentence saying these are the checkpoint's canonical processor values, with the _expected checks below as the guard against other checkpoints.
Nit — unexplained constants duplicated across languages
helios/src/frontend/images/gemma4.rs:11 (SUPPORTED_SOFT_TOKENS) and :26-27 (patch_size > 64, pooling_kernel_size > 16) reject settings without saying where the bounds come from (the checkpoint's allowed max_soft_tokens set; the processor's supported patch/pooling sizes). The same five-value set is re-listed in ignition/preparation/frontend.py:123, so the two can drift. Fix: one comment naming the source of the set and noting that preparation enforces the same list.
Nit — layout name used as prose
helios/src/frontend/images/packing.rs:491 renames the error to "invalid bracketed patch-merge image extent". bracketed is the ImageLayoutKind name (packing.rs:16, 106, 479), while helios/README.md:703 calls this layout "patch-merge". Naming the enum value in an error is defensible (docs/runtime-core-design.md:206-210 treats enums as the identity), but the drift is worth one consistent choice.
Nit — self-referential docstring
helios/src/frontend/images/patch_merge.rs:10: "Start/feature/end token envelope shared by enveloped image layouts." "Enveloped ... envelope" says nothing the type name does not. Fix: say which layouts use it and what the three fields mean.
Nit — unexplained width in a match
helios/src/frontend/images/conditioned.rs:192 adds Profile::Gemma4(_) => 768 beside the pre-existing undocumented widths (1536/768/1176/1200). The pattern is pre-existing, so this is consistency, not a new defect; a short comment on the match arm ("3×3 pooling over 16×16×3 = 768 floats per feature") would fix it.
Checked and acceptable
gemma4.rs:6 module doc names the three behaviours concisely; gemma4.rs:134 ("Gemma 4 patch vectors interleave RGB per pixel: (y, x, channel)") states a real invariant; error strings at gemma4.rs:30, 57, 78 and packing.rs:20, 498 say what failed and name the field involved.
Open questions
- Did the live
Gemma4ImageProcessorcomparison actually run for the reported "45 passed"? Only a run withFLARE_GEMMA4_TEST_SNAPSHOTand.venv/bin/pythonpresent, plus the per-test skip made visible, settles it. - Which
protoc/grpcio-toolsversion regeneratedruntime_core_pb2.py, and does 7.36.1 satisfy theprotobuf>=7.36.2pin? - Whether
patches_per_featurevalues other than 4 and 9 are in use by any existing core:packing.rs:16-22newly rejects them, and the description asserts they are unaffected without saying what the previous code assumed. - Whether a previously exported non-Gemma core still loads and serves — nothing in the evidence list exercises it.
Not in this lens and left to others: correctness of the 4→1176 / 9→768 mapping and the 3×3 pool arithmetic, span population semantics in the scheduler, protobuf oneof wire compatibility.