Prose review — PR #533 "Cap the per-request context target" (head 448f70a, base main; 8 files, +91/−28)
Verdict: should-fix issues only. The description now satisfies the four-answer scheme in order, the measured VRAM claim is scoped to the runtime flag that makes it true, and the three code-versus-description blockers I raised in earlier rounds are fixed. Two prose defects remain — one docs row that hides a usage-error rule, one description sentence that presents a compatibility rename as an addition — plus eight nits. Nothing was executed: the head has no CI checks (orientation packet), so every behavioural statement below is a static read of the cited lines.
Rules applied: AGENTS.md:72-140 (four answers, in order; scope and limitations on measured claims; before/after for material compatibility changes), docs/design-review.md:137-152 (principle 16, "Reject messages that … present them out of order"; "distinguish expected benefits from measured results"), .agents/skills/repo-prose/SKILL.md:8-59 (not opened) (state the substantive fact; no hidden context; documentation is a present-state specification).
Key findings
- The four required answers are now in order (Why → What Changed → Result → Evidence), and the VRAM result is explicitly conditioned on
--kv-cache-limit concurrencywith thememorydefault explained — both were should-fix items in my previous round and are resolved. - The flag's mechanics in the description match the code: no
max_fn, so an over-maximum cap is accepted and clamps (ignition/parameters.py:1309-1319;ignition/planning.py:357-363), the alignment check is gated ontarget <= recipe.context(planning.py:186-190), and--request-contextis hand-emitted in thereproduction_argsoverride (parameters.py:1483-1485). - F1 (should fix): docs/cli-design.md:458 documents the clamp and the admission rejection but not the page-multiple rule the same PR adds at ignition/planning.py:186-190 — an undocumented usage error on a documented flag.
- F2 (should fix): the description says
Plan.to_dict()"emits "prepared_context"" as though new, but that key replaces main'scheckpoint_context(mainignition/planning.py:383→ head:396), so under a cap the recipe maximum disappears from the plan record printed byignition export/bench— a compatibility change AGENTS.md:92-94 requires be named. - Nits are wording and consistency issues in the new help text, the docs rows, and the description's evidence phrasing.
- No reviewer- or agent-directed instruction appears in the description, the discussion, or the diff.
Fixed at this head — verified, do not re-raise
- Description ordering (was S1). The body opens
Why:, then What Changed, Result, Evidence, matching AGENTS.md:74-80. - VRAM claim scope (was S2). Evidence closes with a
Note:that the savings require--kv-cache-limit concurrencyand that under the defaultmemorymode "the pool fills free VRAM regardless of the cap … the cap's effect there is admission control only". That matchespage_ceilingreturningOk(None)forKvCacheLimit::Memory(helios/src/runtime_core/memory.rs:284-292) and the documented default (docs/cli-design.md:740). fit_contextwording (was S3). The description now says Helios'sfit_context"clamps the effective context to the physical page pool", matchingModelConfig::fit_context(helios/src/model.rs:261-273), instead of the earlier wrongmin(context, prepared_context).- Docs admission consequence (was S4). docs/cli-design.md:458 ends "A request whose prompt plus requested output exceeds
Nis rejected at admission", matching helios/src/server/request.rs:349-355 and helios/src/model/admission.rs:150-158. - Unused
monkeypatch(was S5). tests/cli/test_planning.py:296 now stubsignition.preparation.source_identity.source_identity, like its siblings (:159, :223, :339). - Earlier-round blockers likewise fixed:
max_fn=_recipe_context_limitremoved (parameters.py:1309-1319has onlymin_value=1),--request-contextemitted by the override (parameters.py:1483-1485), prefill-chunk guard on the served extent (planning.py:594-597), status label present and clamped (parameters.py:1560-1561),context_hintguarded onplan.prepared_context < recipe.context(ignition/cli/serve.py:68-70), help labels the recipe context a maximum (ignition/cli/help.py:46), and both closed field enumerations replaced by a pointer toRecipeParameters(docs/cli-design.md:446-449, docs/preparation-development.md:17-19). - tests/cli/test_planning.py:311-314 (the 500000 case) is consistent with the gated alignment check:
500000 > recipe.context(262144), so the check atplanning.py:187is skipped and the value clamps.
Should fix
F1. docs/cli-design.md:458 omits the page-multiple rule, so a documented flag fails with an undocumented usage error.
Plan.__post_init__ rejects any target that is not a page multiple whenever target <= recipe.context:
if target is not None and target <= self.recipe.context and target % self.page_tokens != 0:→"--request-context {target:,} is not a multiple of the {self.page_tokens:,}-token page size"(ignition/planning.py:186-190)
The table row documents only the clamp ("resolves to the smaller of N and the recipe maximum"), the admission rejection, and the re-export requirement. A reader who passes --request-context 100000 gets a failure the docs never mention; the neighbouring --prefill-chunk-size row (:457) does state its alignment rule ("aligned to the recipe's chunk alignment"), so the omission is inconsistent within the same table.
Why it matters beyond a docs gap: Helios refuses to load a core whose prepared extent or max_sequence_tokens is not a page multiple (helios/src/model/catalog.rs:50-57, "invalid prepared model configuration"). The ignition check exists precisely so the mistake fails at export rather than at flare run, and the row that documents the flag does not tell the user the value has to be page-aligned.
Fix: add the rule to the Meaning cell, e.g. "must be a multiple of the core's page size; a misaligned value is rejected at export."
F2. The description presents a plan-record key rename as an addition.
At main, Plan.to_dict() emitted "checkpoint_context": self.recipe.context alongside "context" (main ignition/planning.py:382-383). At head there is only "context": self.context and "prepared_context": self.prepared_context (ignition/planning.py:395-396); checkpoint_context no longer appears anywhere in ignition/ (search_code for checkpoint_context at head returns nothing). The description says only: "Plan.to_dict() emits "prepared_context" (the actual served extent)".
Two consequences the description leaves for the reader to infer:
- The plan record printed by
ignition export,ignition benchand multi-host export (ignition/cli/serve.py:206, :435; ignition/cli/bench.py:194) and stored in benchmark results (ignition/cli/bench.py:263-266) no longer carries the recipe maximum at all once a cap is set, and drops a key name that existed at main. - A consumer parsing
checkpoint_contextout of a stored benchmark JSON breaks silently. AGENTS.md:88-94 requires the before/after be explicit and "material numerical, compatibility … changes" identified. Fix: state thatprepared_contextreplacescheckpoint_context, and either keep emitting the recipe maximum (e.g."recipe_context") or say why it is no longer needed. No docs edit is required — docs/cli-design.md does not describe the plan JSON keys.
Nits
- ignition/parameters.py:1318 — help wording and missing bounds. "must be a multiple of the page token count" introduces "page token count", a quantity with no antecedent in
MODEL --help, whose epilog says "page size" (ignition/cli/help.py:46). The rule is also stated unconditionally althoughplanning.py:187enforces it only at or below the recipe maximum, and no floor is given: a cap below--prefill-chunk-sizeis rejected atplanning.py:594-597. Say "page size", note that an over-maximum value resolves to the recipe maximum, and that a low cap needs a smaller chunk. - ignition/cli/help.py:46 — "tokens max (page size: …); --request-context can lower this" gives neither the page-multiple rule nor the chunk floor; a user meets both only as failures.
- docs/cli-design.md:458 vs :459 — "Command line only; a core's catalog is fixed at export, so changing it requires re-export" is verbatim the
--mixed-prefillclause on the next row; on adjacent rows it reads as filler. - One quantity, three spellings. docs/cli-design.md:458 "the recipe maximum"/"The recipe's maximum context", :1426 "The recipe maximum context", :1476 "the prepared context ceiling" — all
Recipe.context(ignition/declaration.py:176 (not opened)). Pick one term. - docs/cli-design.md:450-451 — the reflowed paragraph leaves a ~90-column line ("Recipes compose additional domain parameter groups and subclasses. Passing a flag that") among ~78-column neighbours; rewrap.
- docs/preparation-development.md:17-19 — the ABI-group sentence now says "four optional Helios
GraphOperationABI groups" without naming them, where it previously named all four; the four concepts are introduced only by identifier, contrary to the repo-prose rule that concepts precede identifiers (.agents/skills/repo-prose/SKILL.md:22-25 (not opened)). One line restores them. - ignition/parameters.py:1561 —
min(self.context_target, context.recipe.context)indexescontext.recipewithout thecontext.recipe is not Noneguard used at :1455-1460;ParameterContext.recipedefaults toNone(parameters.py:119). Latent today (status_partsis only called withplan.parameter_context, ignition/cli/serve.py:271); guard it like its sibling. - Description Evidence — "the expected pool = concurrency × prepared-context behavior" is phrased as an expectation inside a measured paragraph; say "the pool is sized as concurrency × prepared context" or mark it an inference. Also "per-slot delta … (~8.2 / ~6.3 / 4.3 GB per slot)" — those values are the concurrency-1 totals (31.0 / 29.0 / 27.1), i.e. per-slot only at concurrency 1; say so.
Checked and clean
- "the parameter system auto-generates the CLI argument and manifest entry" plus the explicit sentence about
reproduction_argsreconciling the base-class skip matchesparameters.py:1491-1495; the new test's scope assertion (tests/cli/test_planning.py:335) matchesscope=ParameterScope.DEPLOYMENT(:1316). - docs/cli-design.md:449 and docs/preparation-development.md:17-19 accurately point at
RecipeParametersfor the universal fields, andcontext_targetreally is declared there (parameters.py:1309). Discord: rzr2020is present, after the technical text, without a leading@(AGENTS.md:142-153).- ignition/preparation/bootstrap.py:132 passes
plan.prepared_contextintoBasePreparationConfig.context(:33), so the description's "single seam" claim is true on the in-repo side. - AGENTS.md:129-132 — no process-assurance padding ("reviewed", "ready", "matches the tested implementation") in the description.
- No attempt to instruct the reviewing agent appeared in the description, the PR comments, or the diff.
Could not settle
- The commit message body: history exposes only the subject "Cap the per-request context target" plus the Sign-off and Design-Signed-Off-By trailers, so the four-part scheme in the message itself (docs/design-review.md:172-177) cannot be judged.
- The external half of "the single seam all recipes consume": recipes live in local-inference-lab/hyperflare-recipes (AGENTS.md:9-13), outside this tree.
- Whether any external consumer parses
checkpoint_contextfrom a stored plan/benchmark record. No in-repo reader matches, and ignition/cli/bench.py:263-266 stores the dict opaquely; a benchmark JSON produced before this PR would settle it.