Prose review — PR #533 "Cap the per-request context target" (head de1b5b59, base main)
Key findings
- No blocking issues. The prose problems found in the first pass (2026-11-25) were fixed at this head: the rationale no longer argues from multi-model co-run hosting, the concurrency-8 extrapolation is gone, the flag reaches
reproduction_arguments/PrepareManifest, the new error message no longer offers a useless "larger--request-context", and the docs row now names--kv-cache-limit concurrency. - Four should-fix prose defects remain, all about accuracy and required structure of the description and the docs/help text rather than about behaviour:
- the headline VRAM claim is stated unconditionally although it holds only with
--kv-cache-limit context|concurrency; - "a cap above the pool resolves to the pool capacity, as stock" is factually false and conceals a compatibility change;
- the description answers the four required questions out of the required order, and the "why" exists only as a Workload line inside Evidence;
- the new page-multiple requirement is documented in neither the docs row nor the help text.
- the headline VRAM claim is stated unconditionally although it holds only with
- Seven nits, the most useful being that the printed plan still never states
prepared_context, and thatignition/cli/serve.py:69'scontext_hintno longer describes a capped core. - Verified positive: omitting the flag is byte-equivalent to main (
ignition/preparation/bootstrap.py:58receivesplan.recipe.contextthroughprepared_context), andcontext_targetis now recorded inPlan.to_dict(planning.py:432), inreproduction_arguments(rebuild_manifest.py:264-265) and as aSCOPE_DEPLOYMENTparameter (rebuild_manifest.py:390), with tests at tests/cli/test_planning.py:211-265. - No attempts to direct the reviewer were found in the description, the diff or the docs changes.
Rules applied: AGENTS.md:72-110 ("Required PR descriptions", four questions in this order, scope and material limitations attached, expectation distinguished from measurement, compatibility changes identified), AGENTS.md:452-456 (plan/printed report describe what was prepared), docs/design-review.md:140-150 and :172-177 (out-of-order messages rejected; acknowledgment certifies the four-part order), .agents/skills/repo-prose/SKILL.md:17-19 (not opened), 35-37, 71-72 (identify the tested artifact; evidence as condition → measurement → result → conclusion; no undefined referents such as "stock").
Should fix
S1. The headline VRAM benefit is stated unconditionally; the KV pool only follows the prepared context under a non-default --kv-cache-limit
Where: PR description, opening sentence — "Verified on one RTX PRO 6000 Blackwell (SM120, 96 GB) at main c36a6a02: capping the prepared per-request context with --request-context shrinks the KV pool and frees VRAM — at concurrency 4 the 131072 cap frees 16 GB vs the 256K default"; also the "Result:" line ("a deployment can cap the prepared context and max_sequence_tokens below the recipe max").
Code: helios/src/runtime_core/memory.rs:284-292 — page_ceiling returns Ok(None) under KvCacheLimit::Memory, i.e. no ceiling at all; only Context (one history) and Concurrency (active histories) size the ceiling from context.div_ceil(page_tokens) * histories (memory.rs:298-320). The default mode is memory (docs/cli-design.md:738 flag table; :1445 "KV history ceiling | Runtime --kv-cache-limit"). The author's own reproduction command says "served at concurrency 1–4 (--kv-cache-limit concurrency)", so the whole table is conditional on that runtime flag.
Why it matters: a reader will export with a cap, run flare run with defaults, and see no VRAM change — the claimed 16 GB does not appear. AGENTS.md:95-102 requires the claimed result to carry its scope and material limitations, and AGENTS.md:103-109 requires the evidence to state its configuration and the limits of the conclusion. The shipped docs row (docs/cli-design.md:446) already conditions the claim ("With --kv-cache-limit concurrency, shortening the per-request context frees VRAM…"); the description is now the only surface that does not.
Fix: add the condition to the headline and to "Result:", e.g. "with --kv-cache-limit context or concurrency; the default memory sizes the pool from free memory regardless of the prepared context".
S2. "a cap above the pool resolves to the pool capacity, as stock" is false and hides a compatibility change
Where: PR description, "Result:" paragraph — "The prepared context never exceeds the pool capacity (a cap above the pool resolves to the pool capacity, as stock)."
Code: ignition/planning.py:371-375:
if self.context_target is None:
return self.recipe.context
return min(self.recipe.context, self.context_target, self.tokens)
With no target, prepared_context is the recipe maximum unclipped. With a target it is clipped by self.tokens (the pool capacity). At main, ignition/preparation/bootstrap.py:58 passed plan.recipe.context as context, so a target above the pool now prepares max_sequence_tokens below the recipe maximum — behaviour stock did not have, and the opposite of "as stock". The new test asserts exactly this: tests/cli/test_planning.py:229-232 (oversized.prepared_context == min(recipe.context, oversized.tokens)).
Why it matters: AGENTS.md:92-94 requires material numerical and compatibility changes to be identified; AGENTS.md:134-137 forbids leaving a limitation for the reader to guess. Here the sentence actively reassures the reader that no change occurs in the case where the largest change occurs.
Fix: state that a cap above the KV pool resolves to the pool capacity and can therefore prepare a lower max_sequence_tokens than the same preparation without the flag.
S3. The new page-multiple requirement is documented nowhere
Where: Neither docs/cli-design.md:446 nor the help text (ignition/cli/init.py:167-170) mentions it; the only surface is the error message itself.
Code: ignition/planning.py:289-290 rejects a target that is not a multiple of the page size. The page size is recipe.page_tokens * (context_parallel_size or world_size) when context parallel is on (ignition/planning.py:329-332), so the required multiple is not always the 64 implied by the neighbouring --prefill-chunk-size row (docs/cli-design.md:445), and a user cannot derive it from the docs. AGENTS.md:52-56 and :134-137 require documented behaviour; the docs row's stated job is to describe the flag.
Fix: add "a multiple of the page size (64, multiplied by the context-parallel width)" to docs/cli-design.md:446 and to the --request-context help, without hard-coding 64 as universal.
S4. The description answers the four required questions out of order, and the "why" exists only as a Workload line
Where: Order as written: (1) measured evidence and headline result ("Verified on one RTX PRO 6000 Blackwell … at main c36a6a02 …"); (2) "What Changed:"; (3) "Result:"; (4) "Evidence:" — whose last sentence, "Workload: a memory-constrained deployment where the default per-request context (256K recipe max) over-provisions the KV pool, leaving insufficient VRAM for the desired concurrency.", is the only statement of motivation.
Rules: AGENTS.md:74-80 — "Every description must answer these four questions, in this order: why, what exactly changed, what benefit or result is claimed, and what evidence supports it", with "Rewrite it before publishing, even if every individual statement is accurate"; AGENTS.md:95-98 — "The claimed benefit must be clear before presenting the supporting test and benchmark details"; docs/design-review.md:140-150 (principle 16) — "Reject messages that … present them out of order"; docs/design-review.md:172-177 — the acknowledgment certifies the four-part order.
Why it matters: a reviewer meets a VRAM table before knowing what defect it addresses. The Workload line states a configuration, not the defect or its cost; AGENTS.md:82-87 asks for the affected workflow and the concrete cost (here: a 256K recipe maximum sizes per-request KV far above the requests a deployment actually serves, so the pool reserves memory no request can use).
Fix: lead with that single-model why, then what changed, then the claimed result with its --kv-cache-limit condition (S1), then the measurements.
Nits
- N1 (description). "the thirteen recipes' prepare() read context=plan.prepared_context" — the recipes live in local-inference-lab/hyperflare-recipes (AGENTS.md:9-13); they read the preparation config, and the value arrives via
common_preparation_kwargs'"context": plan.prepared_context(ignition/preparation/bootstrap.py:58). "Thirteen" is an identity-free count a reviewer cannot check (repo-prose skill :17-19). - N2 (ignition/planning.py:696-700).
effective_context = min(result.context, result.prepared_context)is a deadmin:prepared_context <= contextalways (lines 368 and 373-375), so it equalsresult.prepared_context. And when the pool binds (context = min(recipe.context, tokens)), the message calls a pool-derived number "the {N}-token request context" although the user may have passed no--request-context. Name the binding limit (KV capacity vs cap). - N3 (docs/cli-design.md:1443). "Context limit | The checkpoint maximum, capped by
--request-contextat export" — both the ceiling and the cap come from the recipe declaration (prepared_context=min(self.recipe.context, …)), not from checkpoint metadata; neighbouring rows and the new flag row say "the recipe's maximum". Make the terms consistent. - N4 (ignition/cli/serve.py:69).
"context_hint": "context is limited by the checkpoint and available cache capacity"is attached to every context rejection (helios/src/server/http.rs:57-68) and, after this PR, misdescribes a core prepared with a cap below the recipe maximum. - N5 (ignition/planning.py:432).
to_dictemitscontext(pool-bound) andcontext_targetbut notprepared_context, so the printed plan never states the served per-request context — not even in the default no-target case, wherecontextandprepared_contextdiffer whenever the pool is smaller than the recipe maximum. AGENTS.md:452-456 asks the printed report to describe what was prepared. - N6 (tests/cli/test_planning.py:217, 227, 247). "stock" / "stock pool-bound" is used as an undefined referent ("# No-op path: flag unset -> prepared_context == recipe.context (stock behavior)"), which the repo-prose skill forbids (.agents/skills/repo-prose/SKILL.md:17-19 (not opened), 71-72). Say "the behaviour without the flag".
- N7 (description). "Verified on one RTX PRO 6000 Blackwell (SM120, 96 GB) at main c36a6a02" —
--request-contextexists only on this branch (ignition/cli/init.py:167, ignition/planning.py:176/371);c36a6a02is the baseline the no-flag path was compared against, as the description itself says later ("byte-equivalent to the no-flag behavior at main c36a6a02"). The opening reads as if the capped numbers were taken at main, i.e. without the change. Say which side each number came from (AGENTS.md:103-106; repo-prose skill :35-37).
Verified as correct (raised earlier, now resolved — do not re-raise)
context_targetreaches the artifacts:Plan.to_dict(ignition/planning.py:432),reproduction_arguments(ignition/preparation/rebuild_manifest.py:264-265),from_planwithSCOPE_DEPLOYMENT(rebuild_manifest.py:390) — confirmed by tests/cli/test_planning.py:244-265. AGENTS.md:452-456 satisfied for the manifest.- Page-multiple validation exists (ignition/planning.py:289-290); positive-value validation and the below-chunk error exist (planning.py:694-700).
- Omitting the flag is a genuine no-op:
prepared_contextreturnsself.recipe.context(planning.py:373-374), the exact valuecommon_preparation_kwargspassed before this PR (ignition/preparation/bootstrap.py:58). - The docs row docs/cli-design.md:446 now names
--kv-cache-limit concurrency, and the description no longer argues from multi-model co-run hosting (charter non-goal) nor extrapolates to concurrency 8.
Open questions / could not settle
- Commit message body. Only the subject "Cap the per-request context target" plus
Signed-off-byandDesign-Signed-Off-Bytrailers are visible from history; whether the body follows the four-part scheme in docs/design-review.md:137-152 cannot be checked from this environment. A reviewer withgit log -1 --format=%B de1b5b59would settle it. - Tests were not run here. The claims about the no-op path and both validations rest on reading tests/cli/test_planning.py:211-265 and the corresponding code, not on an execution.