#1 [high] Research summary
I reviewed PR #533 (--request-context) through the prose lens: the description against AGENTS.md's four-part PR requirement and .agents/skills/repo-prose/SKILL.md (not opened), the changed docs row and help text, and the new error messages, tracing the flag from ignition/cli through planning.fit/plan into ignition/preparation/bootstrap.py:58 and the core's max_sequence_tokens. Note: I ran out of time before writing the scratchpad; the findings are below in full and are cited by file and line.
Verified behaviour. Unlike closed PR #454, the cap now does reach the core: plan.prepared_context (ignition/planning.py:369-373) flows into common_preparation_kwargs context (ignition/preparation/bootstrap.py:58), which lands in max_sequence_tokens (helios/src/runtime_core/memory.rs:631, server config). The positive-value check exists (ignition/planning.py:459-460), and omitting the flag is a no-op because prepared_context returns self.recipe.context, the value bootstrap used before.
Should fix — the declared benefit depends on an undisclosed runtime flag. Both the PR's headline ("capping the prepared per-request context with --request-context shrinks the KV pool and frees VRAM") and docs/cli-design.md:446 ("the per-request cache allocation is sized from the prepared context") are stated unconditionally. The KV pool is bounded by the prepared context only under --kv-cache-limit context|concurrency (helios/src/runtime_core/memory.rs:284-331); the default is memory, which fills free VRAM (docs/cli-design.md:738, 1445). The author's own evidence command uses --kv-cache-limit concurrency, so the table measures the flag conditioned on that runtime setting, which the prose never says. As written, a reader will expect the cap alone to free VRAM and will not see it. Fix: state the condition in the description and in the docs row.
Should fix — the "why" argues from a charter non-goal. The rationale is "a memory-constrained deployment where the default per-request context … could over-provision the KV pool and leave no room for a second model", and the result paragraph closes with "the headroom a co-run needs". AGENTS.md and the charter list multi-model hosting/routing as a non-goal needing explicit maintainer sign-off before work starts. A single-model context knob is fine, but the description should give a single-model rationale (or cite the maintainer decision) rather than a co-run one.
Should fix — an unlabelled hypothesis inside the evidence. "At concurrency 8 at the 256K max, the model would consume most of the 96 GB VRAM and leave no room for a co-run model" is an extrapolation next to measured rows, with no marker separating it. AGENTS.md §3 requires distinguishing expectation from measurement.
Should fix — the flag is not recorded in the plan report or the export manifest. Plan.to_dict (ignition/planning.py:389-442) emits "context" and "checkpoint_context" but never prepared_context or context_target, and reproduction_arguments (ignition/preparation/rebuild_manifest.py:231-318) and from_plan (343-454) never add --request-context. So the printed plan, the PreparationManifest parameters, and flare inspect cannot describe or reproduce a core exported with a cap — at odds with AGENTS.md "the plan, its printed report, and its recorded measurements describe what was prepared" and with docs/cli-design.md:446's own point that changing the cap "requires re-export".
Should fix — the new default-chunk error misattributes the limit and offers a fix that cannot work. ignition/planning.py:694-700: when prefill_chunk is None and chunk > effective_context, the message says "the {N}-token request context is below the {chunk}-token default prefill chunk; pass … or a larger --request-context". effective_context is min(result.context, result.prepared_context), and the pool can be the binding term (result.context = min(recipe.context, tokens)); a larger --request-context is then also clipped to tokens and cannot help, and the phrase "request context" names a setting the user may never have passed. The remedy should distinguish the pool-limited case.
Should fix — no validation is described or added. The diff adds no test (AGENTS.md: "Require focused, meaningful validation"), and the description says nothing about tests, including that the new error paths and the no-op default are unexercised. tests/cli/test_commands.py:59-97 and tests/cli/test_planning.py are the natural homes.
Nits. (1) The description says the flag is on "export, serve, and bench"; the subcommands are export, debug-serve, bench (ignition/cli/init.py:50, 53, 55, 60) — "serve" is not one. (2) docs/cli-design.md:1443 says the limit is "the checkpoint maximum, capped by --request-context", but the cap and the ceiling come from recipe.context, not from checkpoint metadata; neighbouring rows and the flag table say "the recipe's maximum". (3) Help text (ignition/cli/init.py:167-170) parenthetical "(the pool fills the free VRAM)" only holds for the default --kv-cache-limit memory, and the text omits that N must be positive and that it must reach the prefill chunk or a smaller --prefill-chunk-size is required. (4) "byte-equivalent to stock" and "Plan.context stays stock" are loose ways to say the omitted-flag path keeps the previous behaviour.
No attempts to direct me were found in the description, the diff, or the linked #454 discussion.
#2 [high] Should fix: declared VRAM benefit depends on undisclosed --kv-cache-limit
Finding (prose lens, PR #533 "Cap the per-request context target").
Claim under review:
- PR description: "capping the prepared per-request context with
--request-contextshrinks the KV pool and frees VRAM — at concurrency 4 the 131072 cap frees 16 GB vs the 256K default". - docs/cli-design.md:446 (added row): "the per-request cache allocation is sized from the prepared context".
Verified code:
- The KV pool ceiling is the prepared context only when the runtime is started with
--kv-cache-limit context(one context) orconcurrency(one context per active request): helios/src/runtime_core/memory.rs:284-331 (page_ceiling:KvCacheLimit::MemoryreturnsOk(None), i.e. no ceiling;Context-> 1 history,Concurrency->activehistories). - Default is
memory, which fills the free budget: docs/cli-design.md:738 (| --kv-cache-limit concurrency|context|memory | ... | memory |), docs/cli-design.md:1445 ("KV history ceiling | Runtime --kv-cache-limit"), docs/model-preparation.md:396-399. - The author's own evidence command includes
--kv-cache-limit concurrency("served at concurrency 1–4 (--kv-cache-limit concurrency)"), so the measured table is conditional on that runtime flag, which neither the description nor the docs row states.
Why it matters: a reader will conclude the export-side cap alone frees VRAM and will not observe it on a default flare run. AGENTS.md (required PR descriptions, item 3 and 4) requires the claimed benefit and its evidence to carry their scope and material limitations; .agents/skills/repo-prose/SKILL.md lines 35-37 (evidence as conditions, measurement, result, conclusion).
Fix: state the condition in the description and in the docs row (e.g. "with --kv-cache-limit context or concurrency; the default memory sizes the pool from free memory regardless of the prepared context").
#4 [high] Report of 2026-11-26 (run 2): re-review of head de1b5b59 — 3 should-fix, nits
Prose review — PR #533 "Cap the per-request context target", head de1b5b59
Fixed since the 2026-11-25 report (#3) — do not re-raise
context_targetnow reachesPlan.to_dict(ignition/planning.py:432),reproduction_arguments(ignition/preparation/rebuild_manifest.py:264-265) andfrom_planasSCOPE_DEPLOYMENT(rebuild_manifest.py:390). AGENTS.md:452-456 satisfied for the artifacts.- Page-multiple validation added: ignition/planning.py:289-290 (
% self.page_tokens). - Multi-host export now forwards the flag: ignition/cli/serve.py:206 (
_export_hosts). - Tests added: tests/cli/test_planning.py:211-265 (no-op, clamp, both validations, to_dict, manifest keys).
- Description no longer argues from multi-model co-run hosting ("leaving insufficient VRAM for the desired concurrency"); charter non-goal finding (AGENTS.md:171-175) resolved.
- "serve" subcommand nit fixed ("export, debug-serve, and bench").
- The concurrency-8 extrapolation sentence is gone from the description.
- planning.py:694-700 no longer suggests "a larger --request-context".
- docs/cli-design.md:446 now names
--kv-cache-limit concurrency.
Should fix
S1. Description headline states the VRAM benefit unconditionally (docs row does not)
Quote: "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".
Code: helios/src/runtime_core/memory.rs:284-292 page_ceiling returns Ok(None) under KvCacheLimit::Memory (the default, docs/cli-design.md:738, :828); only Context/Concurrency size the ceiling from context.div_ceil(page_tokens) * histories (memory.rs:298-320). The author's own command includes --kv-cache-limit concurrency. The shipped docs row conditions the claim; the description summary and "Result:" ("a deployment can cap the prepared context and max_sequence_tokens below the recipe max") do not. AGENTS.md:95-102 (scope and material limitations attached), :134-137. Fix: add "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
Code: ignition/planning.py:373-375 — with no target prepared_context returns self.recipe.context unclipped; with a target it returns min(recipe.context, target, tokens). At main, ignition/preparation/bootstrap.py:58 passed plan.recipe.context. So a target above the KV pool prepares max_sequence_tokens below the recipe maximum, which stock did not do — the opposite of "as stock". The test asserts this: tests/cli/test_planning.py:229-232 (oversized.prepared_context == min(recipe.context, oversized.tokens)). AGENTS.md:92-94 requires identifying material compatibility changes; :134-137 forbids leaving a limitation to be guessed. Fix: state that a cap above the KV pool resolves to pool capacity and can therefore lower the prepared context below the recipe maximum, unlike a preparation without the flag.
S3. The new page-size requirement is documented nowhere
Code: ignition/planning.py:289-290 rejects a target that is not a multiple of page_tokens; page_tokens is recipe.page_tokens * (context_parallel_size or world_size) when context parallel (planning.py:329-332), so the required multiple is not always 64. Neither docs/cli-design.md:446 nor the help text (ignition/cli/init.py:167-170) states the multiple; the only surface is the error. AGENTS.md:52-56/134-137 (documented behaviour) and the docs row's job of describing the flag. Fix: add "a multiple of the page size" to the row and help, without hard-coding 64.
Nits
- N1. Description: "the thirteen recipes' prepare() read context=plan.prepared_context". The recipes live outside this repository (AGENTS.md:9-13) and read the preparation config; the value arrives through
common_preparation_kwargs'"context": plan.prepared_context(ignition/preparation/bootstrap.py:58). Name that path; the count "thirteen" is an identity-free attribute a reader cannot check. - N2. ignition/planning.py:696-700 names the limit loosely and computes a dead local.
prepared_context ≤ contextalways (lines 368 and 373-375), soeffective_context = min(result.context, result.prepared_context)is alwaysresult.prepared_context; and when the pool binds (context = min(recipe.context, tokens), line 368) the message calls a pool-derived number "the … 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" — the ceiling and the cap both come from the recipe declaration (prepared_context=min(self.recipe.context, …)); the neighbouring rows and the new flag row say "the recipe's maximum". Rewrite both terms. - N4. ignition/cli/serve.py:69
context_hint("context is limited by the checkpoint and available cache capacity") is appended to every context rejection (helios/src/server/http.rs:57-68) and no longer describes a capped core. - N5. ignition/planning.py:432 prints
context(pool-bound) andcontext_targetbut notprepared_context; the printed plan therefore never states the served context when the flag is omitted. AGENTS.md:452-456 asks the printed report to describe what was prepared. - N6. tests/cli/test_planning.py:217,227,247 use "stock"/"stock pool-bound" as an undefined referent (repo-prose skill, .agents/skills/repo-prose/SKILL.md:17-19, 71-72).
Could not settle
- The commit message body: only the subject "Cap the per-request context target" plus Signed-off-by and Design-Signed-Off-By trailers are visible from history; whether the body follows the four-part scheme (docs/design-review.md:137-152) cannot be checked from here.
- No instructions addressed to an agent were found in the description, the diff, or docs changes.
#5 [high] Research summary
Re-reviewed PR #533 at head de1b5b59 through the prose lens; findings recorded as scratchpad entry #4.
The earlier blocking item and most should-fix items are resolved: context_target now reaches Plan.to_dict (ignition/planning.py:432), reproduction_arguments (rebuild_manifest.py:264-265) and from_plan as SCOPE_DEPLOYMENT (:390); the page-multiple check exists (planning.py:289-290); the multi-host export path forwards the flag (cli/serve.py:206); tests were added (tests/cli/test_planning.py:211-265); and the description no longer argues from multi-model hosting, no longer extrapolates to concurrency 8, and no longer offers a useless "larger --request-context".
Three should-fix items remain, all prose: the description's headline VRAM claim is still unconditional while the KV pool only tracks the prepared context under --kv-cache-limit context|concurrency (memory.rs:284-292; default memory, docs:738, :828) — the docs row now says so but the description does not; "a cap above the pool resolves to the pool capacity, as stock" is false and hides that a target above the pool prepares a lower max_sequence_tokens than no flag at all (planning.py:373-375 vs bootstrap.py:58 at main; asserted by the new test); and the new page-size requirement is in neither the docs row nor the help text. Six nits follow, including the dead min at planning.py:696 and the stale context_hint at cli/serve.py:69. The commit message body could not be checked from here.
#6 [high] Should fix: description order and "Verified at main c36a6a02" phrasing (PR #533, head de1b5b59)
PR #533 description-level prose defects (head de1b5b59)
S4 (should fix): the four required answers are out of the required order, and "why" is only a Workload line
Description order as written: (1) "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"; (2) "What Changed: …"; (3) "Result: …"; (4) "Evidence: … 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."
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"; 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: the opening paragraph is the measured evidence and the claimed result, so a reviewer meets a VRAM table before knowing what problem it solves. The nearest thing to a "why" is the "Workload:" sentence buried in the Evidence section, and it states the configuration, not the defect: it does not say what goes wrong today (an over-provisioned per-request context consumes KV pages that a lower context would leave available). AGENTS.md:82-87 requires the affected workflow and the concrete cost, not just the setup.
Fix: lead with the single-model why (a preparation whose 256K recipe maximum sizes per-request KV far above the requests a deployment actually serves, so the pool reserves memory no request can use), then what changed, then the claimed result with its --kv-cache-limit condition (see entry #4, S1), then the measurements.
N7 (nit): "Verified on one RTX PRO 6000 Blackwell (SM120, 96 GB) at main c36a6a02"
--request-context exists only on this branch (grep of the head: ignition/cli/init.py:167, planning.py:176); c36a6a02 is the baseline the no-flag path was compared against, which the description itself says later ("byte-equivalent to the no-flag behavior at main c36a6a02"). As written, the first line reads as if the capped measurements were taken at main, i.e. without the change. Fix: "measured on the branch at de1b5b59 against main c36a6a02", or state which side each number came from. AGENTS.md:103-106 requires the configuration and reference for each claim; repo-prose skill (.agents/skills/repo-prose/SKILL.md:35-37) requires identifying the tested artifact.
#8 [high] Report of 2026-11-26 (run 3, head 02023eba): description misdescribes the diff — 1 blocking, 4 should-fix, nits
PR #533, head 02023eba ("Cap the per-request context target"), base main. Previous report: scratchpad #7 (head de1b5b59).
Verdict: blocking issue (description + test vs code).
BLOCKING — The description advertises a "page-multiple validation" that is not in the diff, and the test still asserts it, so tests/cli/test_planning.py cannot pass.
- ignition/planning.py contains no page-alignment check on context_target: the only
%uses are planning.py:227 (dcp divide), :272 (expert width), :635 (prefill chunk vs 64) — verified by search_code%(result 46) andmultiple of(result 9). - tests/cli/test_planning.py:238-240 still does
with pytest.raises(UsageError, match="multiple of the"): planning.plan(..., context=100, ...). With the check gone, context=100 reaches planning.py:709-711 and raises "--prefill-chunk-size 4,096 exceeds the 100-token context this plan allows", which does not match "multiple of the". So the assertion fails on the head. - Fix: either restore a documented check or, preferably, correct the description (drop "a page-multiple validation") and change/remove the :238-240 case. Say what settles it:
pytest tests/cli/test_planning.py.
SHOULD FIX — description overstates the chunk error: "distinguishes the default chunk from an explicit one" — planning.py:709-711 contains one branch and one message (effective_context = min(result.context, result.prepared_context)); no default-vs-explicit distinction exists. Verified at planning.py:704-712.
SHOULD FIX — "with --kv-cache-limit concurrency, a cap above the pool is a no-op: the prepared context resolves to the pool-bound value, matching stock behavior" is still false. With a target, prepared_context = min(recipe.context, target, tokens) (planning.py:377-381) and stock passed recipe.context unclipped (bootstrap.py:58 at main, result 22). A cap above a small pool therefore prepares a lower max_sequence_tokens than the same export with no flag — a compatibility change (AGENTS.md:92-94) the description presents as a no-op.
SHOULD FIX — description order: evidence and results lead; the "why" exists only as a "Workload:" line inside Evidence. AGENTS.md:74-80 and docs/design-review.md:140-150 (read at :137-152) require why → what → result → evidence, and explicitly reject out-of-order messages.
SHOULD FIX — the headline VRAM claim is unconditional, but the KV pool tracks the prepared context only under runtime --kv-cache-limit context|concurrency; page_ceiling returns Ok(None) for the default memory mode (helios/src/runtime_core/memory.rs:284-292; default documented docs/cli-design.md:738, semantics :826-843). The author's own commands use --kv-cache-limit concurrency. AGENTS.md:95-102 requires the scope and limitations attached to the claim.
NITS
- docs/cli-design.md:446 does not say that a request above the cap is rejected (the description claims it); the row only says "below the recipe's maximum". One clause.
- Description lists changed files but omits docs/cli-design.md (+3/−2 in this PR, result 1/4) — AGENTS.md:88-94 asks for the components changed.
- tests/cli/test_planning.py:217,227 use "stock" without naming the baseline; say "the behaviour with no flag".
- ignition/planning.py:438 is now a three-key line well past the file's line width; split context_target/prepared_context onto their own lines.
CLEAN (verified): omitted flag is byte-equivalent to main (bootstrap.py:58 receives recipe.context via planning.py:379-380); context_target reaches Plan.to_dict (:438), reproduction_arguments (rebuild_manifest.py:264-265) and SCOPE_DEPLOYMENT (rebuild_manifest.py:389); entries forwarded at serve.py:206, :289, :473 and bench.py:177; bench compares against prepared_context (planning.py:260); all four entry points; no reviewer-directed text found in description, comments or diff.
#10 [high] Research summary
Reviewed PR #533 at head 02023eba through the prose lens; full findings are in scratchpad entry #8.
Verdict: one blocking issue, four should-fix, four nits.
Blocking: the description advertises a "page-multiple validation" that no longer exists in the diff (planning.py has no alignment check on context_target — the only % uses are :227, :272, :635), while tests/cli/test_planning.py:238-240 still expects UsageError, match="multiple of the" for context=100; that now raises the chunk error at planning.py:709-711, so the added test cannot pass. pytest tests/cli/test_planning.py settles it.
Should fix, all description-level: the claimed "distinguishes the default chunk from an explicit one" error does not exist (one branch, one message at planning.py:709-711); "a cap above the pool is a no-op, matching stock" remains false, since stock passed recipe.context unclipped (bootstrap.py:58 at main) and the cap now prepares a lower max_sequence_tokens; the four required answers are out of order (AGENTS.md:74-80, docs/design-review.md:137-152); and the VRAM headline is stated without its --kv-cache-limit context|concurrency condition (helios/src/runtime_core/memory.rs:290-292, docs/cli-design.md:738).
Nits: docs/cli-design.md:446 never says a request over the cap is rejected; the changed-file list omits docs/cli-design.md; undefined "stock" in the test comments; an over-long to_dict line at planning.py:438.
Verified clean: omission is byte-equivalent to main, the setting reaches to_dict, reproduction_arguments and a SCOPE_DEPLOYMENT manifest entry, and all four entry points (serve.py:206, :289, :473; bench.py:177) forward it. No reviewer-directed text in the description, comments or diff.
#11 [high] Supporting citations for the run-3 report: description quotes, resolved earlier findings, source lines
Companion to scratchpad #8 (full report) and #9 (scope). Everything below was read at head 02023eba unless marked main.
A. Description phrases the findings quote (from the PR body):
- "ignition/planning.py gains the Plan.context_target field, the Plan.prepared_context accessor ... a positive-target validation, a page-multiple validation, and a below-chunk error that compares the chunk against prepared_context and distinguishes the default chunk from an explicit one" — the page-multiple validation and the default/explicit distinction do not exist in the diff.
- "with --kv-cache-limit concurrency, a cap above the pool is a no-op: the prepared context resolves to the pool-bound value, matching stock behavior".
- "Omitting the flag is a no-op: prepared_context resolves to the recipe max and context to min(recipe.context, tokens), byte-equivalent to stock at base revision f377dc8." (this part is accurate).
- "Workload: a memory-constrained deployment where the default per-request context (256K recipe max) over-provisions the KV pool" — the only statement of the "why", placed inside Evidence.
- Evidence table header: "Three packages, one per prepared context — ... served at concurrency 1–4 (--kv-cache-limit concurrency)"; the VRAM table and "At concurrency 4 the 131072 cap frees 16 GB vs the default".
- "What Changed" file list names ignition/cli/init.py, bench.py, preparation.py, serve.py, planning.py, rebuild_manifest.py, tests/cli/test_planning.py — docs/cli-design.md is missing though it is in the PR (docs/cli-design.md, +3/−2).
B. Earlier-round findings now resolved at this head (so the report can say what was fixed, and must not re-raise):
- prepared_context is now in Plan.to_dict — planning.py:438 ("context", "context_target", "prepared_context", "checkpoint_context").
- bench configuration whitelist now carries the setting — bench.py:245-248 ("row_shard_prefill", "row_shard_attention", "context_target", "prepared_context").
- serve "Select GPUs" line now prints it — serve.py:317-319 (
· request context {plan.prepared_context:,}guarded on context_target is not None). - multi-host export forwards the flag — serve.py:206 (
context=args.request_contextin _export_hosts); the other entry points at serve.py:289, :473 and bench.py:177. - The page-alignment check that earlier rounds asked for was removed rather than corrected: this is what creates the new inconsistency with the description and the test.
C. Exact code lines cited:
- ignition/planning.py:186 context_target field; :377-381 prepared_context (early return recipe.context when target is None, else min(recipe.context, target, tokens)); :383-386 context stays min(recipe.context, tokens); :224-296 post_init (no alignment check); :467-468 the only
--request-contextUsageError (positive count, in fit); :704-712 the chunk-vs-effective_context block; :260 bench compares prepared_context; :635 the unrelated chunk-multiple-of-64 check. - ignition/preparation/bootstrap.py:58
"context": plan.prepared_context; at main the same line readplan.recipe.context(verified via read_file ref=main). - ignition/preparation/rebuild_manifest.py:264-265 reproduction arg; :389 SCOPE_DEPLOYMENT
context_target. - ignition/cli/init.py:167-168 the help string ("cap the prepared context and max_sequence_tokens at N tokens (default: recipe max)").
- tests/cli/test_planning.py:211-254 the new test; :238-240 the "multiple of the" case.
- docs/cli-design.md:446 the new flag row; :1440 "Context limit" owner row; :1490 prepared-context row; :738
--kv-cache-limitdefault memory; :826-843 the kv-cache-limit semantics. - helios/src/runtime_core/memory.rs:284-292 page_ceiling returns Ok(None) for KvCacheLimit::Memory.
- helios/src/model/catalog.rs:43-70 load-time page alignment of prepared_sequence_tokens and max_sequence_tokens; helios/src/model.rs:268-272 fit_context narrows to the pool.
- AGENTS.md:74-80 four required answers in order; :88-94 name components and material compatibility changes; :95-102 attach scope and limitations to a measured claim; docs/design-review.md:137-152 restates and adds "Reject messages that ... present them out of order".
D. How each finding is settled:
- Blocking (test cannot pass):
python -m pytest tests/cli/test_planning.py -k request_context— expected failure at :239 with the chunk-error text instead of a match on "multiple of the". No CI checks exist on the head. - "No page-multiple check" claim: search_code over ignition/planning.py for
%andmultiple ofreturns only :227, :272, :635, :636 — mechanical, no test needed. - kv-cache-limit scoping and the stock-comparison claim: settled by the cited source lines; no test can bind the VRAM table.
E. Not verifiable from this environment: the commit message body for 02023eba (whether it follows the four-part scheme); the recipe-side change (the recipes live in local-inference-lab/hyperflare-recipes, AGENTS.md:9-13, :379-392), so the description's "the recipes' prepare() read context=plan.prepared_context" cannot be checked here — the in-repo seam is bootstrap.py:58.
#13 [high] Blocking: oversize cap is rejected, not clamped — PR's own test fails (PR #533 head 9118add)
PR #533, head 9118add, prose lens — blocking.
(i) Code: context_target is declared with max_fn=_recipe_context_limit (ignition/parameters.py:1309-1321); _recipe_context_limit returns context.recipe.context (parameters.py:1268-1269). ParameterGroup.validate_fields (parameters.py:505-545) raises for a value above the resolved max: f"{flag} for {alias} must be {min} through {max}" (parameters.py:536-540). RecipeParameters.validate calls super().validate(ctx) (parameters.py:1463) → ParameterGroup.validate (parameters.py:547-551) → validate_fields. Plan.parameter_context supplies recipe (planning.py:224-232), so the bound is live on every planning call.
(ii) The PR's own new test contradicts that: tests/cli/test_planning.py:310-313
oversized_params = replace(base_params, context_target=500000)
oversized = planning.plan(..., parameters=oversized_params)
assert oversized.parameters.context_target == 500000
assert oversized.prepared_context == recipe.context
with recipe.context = 262144 (tests/cli/test_planning.py:139). planning.plan calls params.validate(pre_context) (planning.py:540) before sizing, so the call raises UsageError instead of returning a plan: the test fails at :311.
(iii) Documentation is wrong the same way: docs/cli-design.md:468 says "--request-context N | Cap the prepared per-request context and max_sequence_tokens at N tokens; resolves to the smaller of N and the recipe maximum". Above-maximum is rejected, not resolved. The --prefill-chunk-size row right above it (:467) and the parameter help (parameters.py:1320) do not mention an upper bound either, though the help renders one from max_fn ("(1..262,144)").
(iv) The description's "Result" repeats it: "a cap above the pool still shrinks the export artifact without changing the serve-time pool bound" — true only for caps above the pool but below the recipe maximum; a cap above the recipe maximum cannot be passed at all.
Fix: pick one and make test, docs and description agree — either accept above-maximum values and clamp (drop max_fn or clamp in resolve) or state the 1..recipe-maximum bound in the docs row, the help string, the description, and rewrite :310-313 to assert the UsageError. Settled by pytest tests/cli/test_planning.py -k request_context (no CI checks on this head).
#14 [high] Blocking: --request-context is absent from reproduction_args (description says auto-generated)
PR #533, head 9118add — blocking (which lens: prose, because the description's central mechanism claim is false).
Description: "a context_target field on RecipeParameters ... with ... manifest_key="context_target" — the parameter system auto-generates the CLI argument, manifest entry, and reproduction arg."
Code: RecipeParameters.reproduction_args (ignition/parameters.py:1469-1528) overrides ParameterGroup.reproduction_args (parameters.py:618-655) and never calls super(). It emits --gpus/--ranks/--roce-* (:1472-1481), then hardcodes --max-concurrency and --prefill-chunk-size (:1483-1484), then --no-mtp (:1486-1487), then recurses into sub-groups (:1488-1489), then iterates its own fields while skipping every base-class field:
base_field_names = {f.name for f in fields(RecipeParameters)} # :1491
if dc_field.name in base_field_names or not spec.cli or ...: # :1494
context_target is a base-class field (parameters.py:1309), so it is skipped by name. There is no other emitter: search_code "request-context|context_target" path=ignition returns only parameters.py:1309/1311/1317, planning.py:186/189/360, and the serve.py:68 hint. rebuild_manifest.reproduction_arguments just splats params.reproduction_args(context) (ignition/preparation/rebuild_manifest.py:261), so the manifest records the flag nowhere as a reproduction argument. repro_always=True on the field (parameters.py:1319) is therefore dead for this flag.
The PR's own test asserts the opposite: tests/cli/test_planning.py:323-325
manifest = rebuild_manifest.from_plan(SimpleNamespace(directory=None), capped, compiled_forwards=True)
assert "--request-context" in manifest["reproduction_args"]
assert "131072" in manifest["reproduction_args"]
:324 fails. (The :326-329 manifest parameters assertions do pass: manifest_parameters (parameters.py:596-616) walks all fields including base ones, keyed by manifest_key.)
Consequence beyond the test: an exported core cannot be reproduced from its manifest — the recorded command silently rebuilds with the unclipped recipe maximum. Earlier rounds (head 02023eba) had an explicit guarded emitter in rebuild_manifest; the rebase onto the #545 parameter system dropped it.
Fix: emit base-class CLI fields with values differing from the defaults (or call super().reproduction_args(ctx) and de-duplicate the hardcoded --max-concurrency/--prefill-chunk-size), and drop repro_always=True on context_target or use it — repro_always would force --request-context 262144 on every export, which is noise. Settled by pytest tests/cli/test_planning.py -k request_context.
Doc claim also affected: docs/cli-design.md:485 "Every resolved RecipeParameters value serializes directly into PreparationManifest (parameters and reproduction_args)" — only the first half is true for this flag.
#15 [high] Should fix: remaining prose defects at head 9118add (PR #533)
PR #533, head 9118add — should fix.
-
tests/cli/test_planning.py:295declaresmonkeypatchbut never uses it. Unlike the three sibling tests (:159, :223, :333) it does notmonkeypatch.setattr("ignition.preparation.source_identity.source_identity", lambda: "test-source"), yet it callsrebuild_manifest.from_plan(:323), which callssource_identity()(ignition/preparation/rebuild_manifest.py:327; imported at :290).source_identityimportsflare_heliopauseand raisesRuntimeError("the preparation environment requires FlashInfer")when FlashInfer is absent (ignition/preparation/source_identity.py:36-41). So the test either fails for a reason unrelated to the feature or silently depends on a GPU/FlashInfer environment for a pure planning check. Fix: add the monkeypatch line like its siblings, or drop the unused fixture if the environment is guaranteed. -
Description order (AGENTS.md:74-80; docs/design-review.md:137-152 "Reject messages that ... present them out of order"). Still: the body opens with "What Changed", then "Result", then "Evidence", and the why exists only as the "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" sentence inside Evidence. Lead with one sentence of why, then What Changed, then Result, then the table.
-
The VRAM claim is still unconditional (AGENTS.md:95-102: attach scope and material limitations to a measured claim). The table's benefit needs
--kv-cache-limit context|concurrency;page_ceilingreturnsOk(None)forKvCacheLimit::Memory(helios/src/runtime_core/memory.rs:284-292), andmemoryis the documented default (docs/cli-design.md:740). Only the evidence command line says--kv-cache-limit concurrency. The "Result:" sentence ("a cap above the pool still shrinks the export artifact without changing the serve-time pool bound") also carries no condition. Add it to the Result line and to docs/cli-design.md:468. -
docs/cli-design.md:468 omits the operational consequence: the description says "a request that would exceed the cap is rejected", and Helios enforces it at admission (helios/src/server/request.rs:349-363 rejects a prompt over
max_sequence_tokens; model/admission.rs:150-158). The neighbouring--prefill-chunk-sizerow states its consequence, so add one clause: "a request whose prompt plus output exceeds N is rejected at admission". -
Description still does not name the seam precisely: "ignition/preparation/bootstrap.py passes plan.prepared_context as the context key in common_preparation_kwargs()" is accurate (bootstrap.py:132), and "the single seam all recipes consume" is an unverifiable claim about packages that live outside this repository (AGENTS.md:9-13) — either cite the in-repo contract (
BasePreparationConfig.context, ignition/preparation/bootstrap.py:33) or drop "all recipes". -
Test-comment referent:
tests/cli/test_planning.py:300names a variablestock_planand :303assert stock_plan.context == min(...); "stock" is undefined here (skill: no false definite references). Say "flag omitted".
Resolved since my previous report (do not re-raise): docs/cli-design.md is now listed in What Changed; the page-multiple validation now exists (planning.py:186-190) and the chunk error still compares against result.context at planning.py:594-596 rather than prepared_context — note: the bench pre-check now uses prepared_context (planning.py:212), so that part is fixed.
#16 [high] Should fix: prefill-chunk guard ignores prepared_context, can prepare an unloadable core (planning.py:594)
PR #533, head 9118add — should fix (the description's invariant claim does not hold at the prefill-chunk guard).
Description: the description advertises a "bench check that compares required_context against prepared_context" (planning.py:212 — correct) and says the prepared context and max_sequence_tokens are capped. But the sibling guard for --prefill-chunk-size still compares against the unaudited context, not prepared_context:
if params.prefill_chunk > result.context: # ignition/planning.py:594
raise UsageError(f"--prefill-chunk-size {params.prefill_chunk:,} exceeds the {result.context:,}-token context ...")
Plan.context = min(recipe.context, self.tokens) (planning.py:353-355); Plan.prepared_context = min(recipe.context, context_target) (planning.py:357-363). --prefill-chunk-size is itself bounded only by recipe.context (parameters.py:1458: not 64 <= self.prefill_chunk <= ctx.recipe.context). So --prefill-chunk-size 262144 --request-context 131072 on the fixture recipe passes both checks and prepares max_sequence_tokens = 131072 with prefill_chunk_size = 262144, which Helios refuses at load: SchedulerLimits::validate_prefill requires prefill_chunk_size <= max_sequence_tokens (helios/src/scheduler.rs:66-77), reached from catalog.rs:42 on validate_max_sequence_tokens/model load. Result: an exported core that cannot serve, discovered only after a full preparation run.
Fix: use result.prepared_context in the guard at planning.py:594 (and print the prepared context in the message), so the failure surfaces before tuning; the "prepared context" wording in the description then matches the code. Worth an assertion next to tests/cli/test_planning.py:305-308 (chunk 262144 + context_target 131072 must raise).
Settled by a unit test on planning.plan, or end-to-end by loading such a core with flare run.
#18 [high] Research summary
Verdict: blocking issues (prose lens, PR #533 at head 9118add, rebased onto #545 — so most of the change now lives in ignition/parameters.py; earlier notes #8/#12 describe the pre-rebase head and are partly obsolete).
Blocking (both contradict the description and the PR's own new test):
- The description's central mechanism claim — "the parameter system auto-generates the CLI argument, manifest entry, and reproduction arg" — fails for the third item.
RecipeParameters.reproduction_args(parameters.py:1469-1528) never callssuper()and skips every base-class field by name (:1491-1494), which is wherecontext_targetis declared (:1309); no other emitter exists, so a capped core's manifest records a command that rebuilds uncapped,repro_always=True(:1319) is dead, andtests/cli/test_planning.py:324fails. context_targetdeclaresmax_fn=_recipe_context_limit(:1309-1321, :1268-1269), so a cap above the recipe maximum is rejected (:505-545) rather than clamped.tests/cli/test_planning.py:310-313passes 500000 against a 262144-token recipe and expects a plan — it fails;docs/cli-design.md:468("resolves to the smaller of N and the recipe maximum") and the description's "cap above the pool" sentence repeat the error.
Should fix: the new test takes monkeypatch but never stubs source_identity, so it needs FlashInfer/flare_heliopause unrelated to the feature; the description still runs What Changed → Result → Evidence with the "why" buried in the Evidence block (AGENTS.md:74-80, design-review.md:146-147); the VRAM benefit is stated unconditionally though it needs --kv-cache-limit context|concurrency (memory.rs:284-292, default memory at cli-design.md:740); the docs row omits the admission rejection the description claims; "the single seam all recipes consume" is unverifiable for out-of-repo recipes; and the --prefill-chunk-size guard still compares against Plan.context, not prepared_context (planning.py:594), letting a chunk between the cap and the recipe maximum prepare a core Helios refuses to load (scheduler.rs:66-77).
Nits (6) on the help string, a copied re-export clause, "recipe maximum" vs "checkpoint maximum", an unconditional context_hint, and two description numbers.
Clean: page-multiple validation now exists and matches its test; prepared_context no longer depends on the export host's free memory; bootstrap, bench and serve consume it; manifest parameters entries do carry context_target with DEPLOYMENT scope. All findings are recorded in scratchpad entries #13–#17 (the combined report text was saved as #14–#17 after the notebook rejected the final consolidated write). Nothing was executed: the head has no CI checks, and pytest tests/cli/test_planning.py -k request_context settles both blockers.
#19 [high] Report of 2026-11-26, run 4 (head 9118add) — 2 blocking, 6 should-fix, 6 nits
Prose review — PR #533 "Cap the per-request context target", head 9118add (base main; now 6 files, +69/−5)
Verdict: blocking issues. Rules applied: AGENTS.md:72-140 (four required answers in order; name components and material compatibility changes; attach scope and limitations to a measured claim), docs/design-review.md:137-152 (principle 16), .agents/skills/repo-prose/SKILL.md:8-59. The head has no CI checks, so the two failing test assertions below were never executed.
Reader's note: this PR was rebased onto #545 (compositional RecipeParameters), so most of the diff now lives in ignition/parameters.py. Scratchpad notes #8 and #12 describe the pre-rebase head 02023eba and are partly obsolete. Items resolved at this head are listed at the end and must not be re-raised. Findings #13–#17 hold the detail.
Blocking
B1. --request-context never reaches reproduction_args, so a capped core cannot be reproduced from its manifest — ignition/parameters.py:1469-1528, tests/cli/test_planning.py:324.
The description's central mechanism claim: context_target's declaration makes "the parameter system auto-generate the CLI argument, manifest entry, and reproduction arg". Two of the three are true. RecipeParameters.reproduction_args overrides the base method (parameters.py:618-655) and never calls super(); it hardcodes --max-concurrency/--prefill-chunk-size (:1483-1484) and then skips every base-class field by name (:1491-1494), which is exactly where context_target is declared (:1309). A search_code "request-context|context_target" over ignition/ finds no other emitter. So rebuild_manifest.reproduction_arguments (rebuild_manifest.py:261) records a command that silently rebuilds with the unclipped recipe maximum, and the field's repro_always=True (:1319) is dead. tests/cli/test_planning.py:324 (assert "--request-context" in manifest["reproduction_args"]) fails. Pre-rebase the guarded emitter lived in rebuild_manifest (notes #11, previous report S5); the rebase dropped it. Fix: emit base-class fields whose value differs from the default (or call super() and drop the duplicated hardcoded flags); drop repro_always here, since it would force --request-context 262144 on every export. This also qualifies docs/cli-design.md:485 ("Every resolved RecipeParameters value serializes directly into PreparationManifest (parameters and reproduction_args)") — only half true for this flag.
B2. A cap above the recipe maximum is rejected, not clamped — ignition/parameters.py:1309-1321 + :505-545, tests/cli/test_planning.py:310-313, docs/cli-design.md:468.
context_target declares max_fn=_recipe_context_limit, which returns context.recipe.context (:1268-1269); validate_fields raises "... must be 1 through 262,144" above it (:536-540), and planning.plan validates before sizing (planning.py:540). So tests/cli/test_planning.py:310-313, which passes context_target=500000 against a recipe with context=262144 (:139) and asserts a plan comes back, fails at :311. The docs row (:468) says the same wrong thing: "resolves to the smaller of N and the recipe maximum". The description's Result repeats it ("a cap above the pool still shrinks the export artifact without changing the serve-time pool bound") — true only above the pool but below the recipe maximum. Fix: accept and clamp, or state the 1..recipe-maximum bound in the row, the help string, the description, and change :310-313 to assert the error.
Should fix
tests/cli/test_planning.py:295takesmonkeypatchand never uses it, unlike its three siblings (:159, :223, :333) which stubignition.preparation.source_identity.source_identity. This test callsrebuild_manifest.from_plan(:323), which callssource_identity()(rebuild_manifest.py:327), which importsflare_heliopauseand raisesRuntimeError("the preparation environment requires FlashInfer")without it (source_identity.py:36-41). A pure planning check now depends on a GPU/FlashInfer environment. Add the stub line.- Description order (AGENTS.md:74-80; design-review.md:146-147 "Reject messages that ... present them out of order"): "What Changed" → "Result" → "Evidence", and the why survives only as the "Workload: a memory-constrained deployment ..." sentence inside Evidence.
- The VRAM claim is unconditional (AGENTS.md:95-102): the pool follows the prepared context only under
--kv-cache-limit context|concurrency;page_ceilingreturnsOk(None)for the defaultmemorymode (helios/src/runtime_core/memory.rs:284-292; default documented docs/cli-design.md:740). Put the condition on the Result sentence and on docs/cli-design.md:468. - docs/cli-design.md:468 omits the rejection consequence. The description says "a request that would exceed the cap is rejected", and Helios does reject it at admission (helios/src/server/request.rs:349-363; model/admission.rs:150-158). The neighbouring
--prefill-chunk-sizerow states its consequence, so this row should too. - "the single seam all recipes consume" is unverifiable as written: the recipes live outside this repository (AGENTS.md:9-13). The in-repo contract is
BasePreparationConfig.context(ignition/preparation/bootstrap.py:33), set fromplan.prepared_contextat :132. Cite that or drop the quantifier. - The prefill-chunk guard ignores the cap —
ignition/planning.py:594. It comparesparams.prefill_chunk > result.context(min(recipe.context, tokens)), notresult.prepared_context(min(recipe.context, context_target)), while--prefill-chunk-sizeis bounded only byrecipe.context(parameters.py:1458). So--prefill-chunk-size 262144 --request-context 131072preparesmax_sequence_tokens = 131072withprefill_chunk_size = 262144, which Helios refuses at load (prefill_chunk_size <= max_sequence_tokens, helios/src/scheduler.rs:66-77, reached from model/catalog.rs:42). Useresult.prepared_contextthere so preparation fails before tuning, and add an assertion beside :305-308.
Nits
- parameters.py:1320 help: "must be a multiple of the page token count" uses an internal name with no antecedent in
--help, and never says the range is enforced. - docs/cli-design.md:468 copies the "--mixed-prefill ... fixed at export ... requires re-export" clause from :469 verbatim.
- "recipe maximum context" (:468, :1436) vs the "checkpoint maximum" term this PR replaced — one term; both come from
Recipe.context(ignition/declaration.py:176). ignition/cli/serve.py:68prints "--request-context cap" incontext_hinteven when the flag is absent; name the resolved number instead (plan.prepared_context).- Description: "192k"/"128k" in table headers vs 196608/131072 in the command; state the token count once.
- Description: "Total VRAM (GB)" does not say per GPU or process-wide, nor the measurement source.
Checked and clean (do not re-raise)
Page-multiple validation now exists (planning.py:186-190) and agrees with its test (:319-321); prepared_context no longer carries the export host's free-memory term (planning.py:357-363), so "above the pool" holds below the recipe maximum; bootstrap.py:132 passes plan.prepared_context; the bench pre-check compares prepared_context (planning.py:212); serve.py:67 sizes max_body_bytes from it; docs/cli-design.md:1436 and the new :468 row agree with the flag name; manifest parameters entries do emit context_target with SCOPE_DEPLOYMENT (parameters.py:596-616; rebuild_manifest.py:303-323); docs/cli-design.md is now listed among the changed files. No reviewer- or agent-directed instruction was found in the description, discussion, or diff.
Could not settle
The commit message body (history shows only the subject and the Signed-off-by / Design-Signed-Off-By trailers) and the external recipe side of the seam claim.
pytest tests/cli/test_planning.py -k request_context settles both blockers.
#9 [medium] Research summary — run 3 prose review of PR #533 at head 02023eba
Re-reviewed PR #533 at head 02023eba (up from de1b5b59). Files read in context: ignition/planning.py (Plan fields, post_init, context/prepared_context, to_dict, fit, plan, chunk error), ignition/cli/{init,bench,serve,preparation}.py, ignition/preparation/{bootstrap,rebuild_manifest}.py, docs/cli-design.md (flag table, context-limit rows, kv-cache-limit section), docs/design-review.md:137-152, AGENTS.md:1-115 and :375-460, tests/cli/test_planning.py, helios/src/runtime_core/memory.rs:284-330, helios/src/model/catalog.rs:43-70, helios/src/model.rs:260-273.
Change since the last report: the page-multiple validation was removed from planning.py, but the description and the test at tests/cli/test_planning.py:238-240 still assume it. That is the blocking finding; full report in scratchpad entry #8.
#17 [medium] Nits: help wording, docs term consistency, context_hint, table units (PR #533)
PR #533, head 9118add — nits.
ignition/parameters.py:1320help says only "cap the prepared per-request context at N tokens; must be a multiple of the page token count". The rendered help appends the range frommax_fn("1..262,144") and the default ("default: none"), but the sentence never says above-maximum is rejected, and "page token count" is an internal name with no antecedent in--help. Say "page size" or drop the clause and let validation speak. Compare--prefill-chunk-size, whose help is also silent about its upper bound (parameters.py:1307) — the same gap, pre-existing.- docs/cli-design.md:468 reuses the
--mixed-prefillsentence "a core's catalog is fixed at export, so changing it requires re-export" (copied verbatim from :469). Accurate but redundant; one of the two rows could carry it. - docs/cli-design.md:1436 and :468 use "the recipe maximum context" / "the recipe's maximum context" while the same file elsewhere says "checkpoint maximum" (the row this PR replaced). Both the ceiling and the cap come from the recipe declaration (
Recipe.context, ignition/declaration.py:176) — one term. ignition/cli/serve.py:68context_hint now reads "context is limited by the checkpoint, cache capacity, and --request-context cap" — it names three limits but not which binds, and it is printed even when the flag is absent, so it advertises a flag the deployment did not use. Consider appending the resolved number, e.g.f"context is limited to {plan.prepared_context:,} tokens ...".- Description: "Three packages, one per prepared context ...
--request-contextunset / 196608 / 131072" — the table's headers say "256K", "192k", "128k" while the command uses decimal 196608/131072; both are exact, but state once that 128k = 131072 tokens so the row and the flag agree. - Description: "Verified on one RTX PRO 6000 Blackwell (SM120, 96 GB)" — good; but "Total VRAM (GB)" does not say whether it is per GPU or process-wide, nor which measurement (
nvidia-smivs reserved). One clause would make the table reproducible.
Clean, verified: page-multiple validation exists (ignition/planning.py:186-190) and agrees with the test (:319-321); Plan.prepared_context no longer carries the export host's free-memory term (planning.py:357-363), so "a cap above the pool does not shrink the artifact" now matches; bootstrap.py:132 passes plan.prepared_context; bench pre-check compares prepared_context (planning.py:212); serve.py:67 sizes max_body_bytes from plan.prepared_context; docs/cli-design.md:1436 and the new :468 row agree with the flag name; no reviewer-directed or agent-directed instruction was found in the description, discussion, or diff.