#1 [high] Blocking: multi-host export silently ignores --request-context
ignition/cli/serve.py:193-206 (_export_hosts, the ignition export --ranks N path) builds its plan with an explicit planning.plan(...) call whose keyword list ends at row_shard_prefill=args.row_shard_prefill) — there is no context=args.request_context. The flag is registered on every preparation command (ignition/cli/init.py:167-170, via _preparation_arguments), so ignition export MODEL --ranks 2 --request-context 131072 accepts the value and then prepares a core at the recipe maximum, with no warning. Compare the three paths that do thread it: _prepare (serve.py:289), debug_serve (serve.py:472), bench.run (bench.py:177).
Why it matters: AGENTS.md "Be explicit and pin everything" / charter "Don't silently ignore API fields" and AGENTS.md:165-169 (explicit behavior). The whole claimed benefit is a smaller max_sequence_tokens; a multi-host deployment (a supported shape per AGENTS.md:157-163) gets a full-context core and no error, which the user only discovers when the VRAM payoff does not appear or the request ceiling is not enforced.
Fix: pass context=args.request_context in _export_hosts. Verified in code: diff touches only serve.py:286 and :469 (the _prepare and debug_serve call sites), not the _export_hosts call at :193.
#2 [high] Blocking: cap is absent from plan report and rebuild manifest
Three reporting surfaces omit the new setting, so neither the printed plan, the benchmark record, nor the rebuild manifest describes what was prepared:
Plan.to_dict(ignition/planning.py:389-442) still emits"context": self.contextand"checkpoint_context": self.recipe.context(:430) and no key forcontext_targetorprepared_context.self.contextstays stock by design (planning.py:363-366), so the plan JSON printed at serve.py:215/485, bench.py:182 reports a context the core does not serve. A core exported with--request-context 131072printscontext: 262144.rebuild_manifest.reproduction_arguments(ignition/preparation/rebuild_manifest.py:231-318) never adds--request-context, so the recorded reproduction command rebuilds a full-context core.rebuild_manifest.from_plan(rebuild_manifest.py:343-454) records no parameter for it, so nothing in the manifest distinguishes two cores that differ only in prepared context. bench.py:243-248 also selects a fixed key list fromplan.to_dict()that has no context key.
Why it matters: AGENTS.md Configuration ("A setting ... is carried through the plan into the recipe's PreparationConfig, so the plan, its printed report, and its recorded measurements describe what was prepared"), AGENTS.md 431-444 (model core compatibility, metadata describes the prepared capacities), and docs/runtime-core-design.md:389 (combine-scope parameters). A core's prepared context is now a deployment-visible capacity; today it is invisible in every artifact.
Fix: add context_target (and the resolved prepared_context) to Plan.to_dict, --request-context to reproduction_arguments when the target is set, and a parameter entry in from_plan.
#5 [high] Research summary
I reviewed all seven changed files in context (ignition/planning.py, ignition/cli/{init,bench,preparation,serve}.py, ignition/preparation/bootstrap.py, docs/cli-design.md) against the charter, AGENTS.md, and docs/cli-design.md, and followed the cap into Helios (prepared_sequence_tokens → fit_context → catalog validation) and into core export. Four findings are on the scratchpad.
Two are blocking. First, the multi-host export path (_export_hosts, ignition/cli/serve.py:193-206) never passes context=args.request_context although --request-context is registered for every preparation command, so a --ranks N export silently prepares at the recipe maximum — the exact "cap does not reach the core" failure of the earlier review, now confined to one path. Second, the new setting is invisible in every artifact the project requires to describe preparation: Plan.to_dict still reports context/checkpoint_context only, and neither reproduction_arguments nor from_plan records --request-context, so the printed plan, benchmark record, and rebuild manifest all describe a core that was not prepared.
Two should-fix items: the target is only validated as positive, never against the page size, yet prepared_context becomes max_sequence_tokens that Helios requires to be page-aligned (helios/src/model/catalog.rs:44-58) — a non-multiple target looks like it exports a core that fails to load, which only an export test can settle; and the change adds no tests for shared planning behavior, while its stated motivation (headroom for a co-run model) leans on multi-model hosting, which the charter lists as a non-goal requiring sign-off. The measured VRAM table does answer the earlier "hypothetical deployment" objection, and the --kv-cache-limit overlap the prior review raised is now reconciled by the description's measurement setup, though the description would be stronger if it said what --kv-cache-limit alone cannot do.
#6 [high] Verified clean: cap does reach the core, and omission is a no-op
Checked and found correct, so the report can say these were verified rather than assumed:
- The cap reaches the core. ignition/preparation/bootstrap.py:58 now passes
plan.prepared_contextintoBasePreparationConfig.context(bootstrap.py:33), and every recipe receives it throughcommon_preparation_kwargs. That value becomes the core'smax_sequence_tokenson load: helios/src/server/config.rs:131 reads it asprepared_sequence_tokens, :148 setslimits.max_sequence_tokens, and helios/src/model.rs:261-273 (fit_context) then min's it with physical pages. So the claim "a request that would exceed the cap is rejected" holds via server/request.rs:350 and scheduler.rs:2289/2358. This is the point the earlier review (#454, review comment 1) blocked on, and it is now fixed. - Omitting the flag is a no-op.
prepared_contextreturnsrecipe.contextwhencontext_target is None(planning.py:371-372), byte-identical to the oldplan.recipe.context;Plan.context(planning.py:363-366) is untouched.fit/plandefaults arecontext=None, so every existing caller (including_export_hosts) behaves exactly as before — which is also why finding 1 is a silent drop rather than a crash. - Pool sizing is unchanged by design.
fitstill gives the cache all free memory (planning.py:536-542); the cap reaches the pool only because the runtime sizes its pages from the core's now-smallermax_sequence_tokens(helios/src/runtime_core/memory.rs:631-635 viapage_ceiling), plus--kv-cache-limit concurrencyin the measurement. Nothing in the diff misstates this, though the description's per-slot explanation could say it explicitly. - Other consumers of the plan are unaffected: ignition/cli/serve.py:68 (
max_body_bytes) still usesrecipe.context, so the HTTP body allowance stays generous — correct, since rejection happens at admission. ignition/cli/serve.py:538-546 (diagnostic capacity clamp) and the--directpath (ignition/direct/scheduler.py:110 readsconfig["max_sequence_tokens"]) both inherit the capped value, so direct execution enforces the cap too.Plan.prepared_contextis read at exactly two sites: bootstrap.py:58 and the chunk check at planning.py:694. - Docs are consistent with the code where it is wired: docs/cli-design.md:446, :1443, :1493 correctly describe a context limit capped at export and the prepared-context-derived cache sizing; :738's "prepared context" wording still resolves correctly to the capped value.
- The positive-target validation (planning.py:459-460) is in
fit, so it fires on every planning path, not onlyplan.--request-context 0/negative yields the intended UsageError.--request-contextplacement in the "capacity and compression" argument group (cli/init.py:167-170) is the right home per AGENTS.md:452-456. - The below-chunk error (planning.py:694-700) uses
min(result.context, result.prepared_context)and its message names both remedies; with the recipe's default chunk and a low target,prefill_chunk is Noneselects the message that says to pass--prefill-chunk-sizeor a larger--request-context. Behaviour is right; only the absence of a test is a finding.
#3 [medium] Should fix: context target is not validated against page alignment
Plan.prepared_context (ignition/planning.py:368-373) returns min(recipe.context, context_target, tokens) while Plan.context (:363-366) returns min(recipe.context, tokens). tokens is pages * page_tokens and pages is sized at fit time from free memory (:541-542). Two consequences:
a) Invariant risk. prepared_context can be strictly below context when the pool is smaller than the target. Helios requires max_sequence_tokens == prepared_sequence_tokens to be a multiple of page_tokens (helios/src/model/catalog.rs:44-58). tokens is a multiple of page_tokens, and recipe.context is whatever the recipe declares, so min() of the two plus a user target N keeps that property only if N is a multiple of page_tokens. context_target is not validated for page-token alignment anywhere (fit only rejects context <= 0, planning.py:459-460), yet prepared_context is what becomes max_sequence_tokens via ignition/preparation/bootstrap.py:58. A value such as --request-context 100000 on a 64-token page recipe exports a core whose declared context is not page aligned. Whether the core then fails to load, or Helios rounds/deviates, needs a test on an exported core; the code path (validate_inner returning "invalid prepared model configuration") suggests a load-time rejection of a core that took a long preparation to produce. Fix: reject or round a target that is not a multiple of the recipe's page size in fit.
b) The resolved value is memory-dependent. prepared_context = min(..., tokens) makes the core's advertised ceiling depend on the free VRAM measured during export: two exports of the same command on differently loaded GPUs produce cores with different max_sequence_tokens, and a cap above the pool silently becomes the pool size (the description states this as intended, "as stock"). That is defensible for the pool, but it means the flag's identity is not reproducible from the manifest, which strengthens finding 2.
Also note the value is clamped by tokens rather than by Plan.guaranteed_tokens (:376-378), so --request-context N above the per-request share still admits one long request while all slots are full only in aggregate: unchanged stock behavior, worth stating in the docs row.
#4 [medium] Should fix: need/scope argument and missing tests
- Scope/justification. The charter's "What gets merged" admits "a measured performance/memory issue"; the description now carries a VRAM table (Qwen3.8-27B, RTX PRO 6000, concurrency 1-4, 16 GB freed at c=4), which answers the earlier "hypothetical deployment" objection (#454 review point 4), and AGENTS.md:165-169 is satisfied on its face. But the memory problem is a multi-model co-run ("leave no room for a second model"). Multi-model hosting is an explicit Non-Goal requiring maintainer sign-off (charter Non-Goals; AGENTS.md:171-175 "Reject unapproved scope expansion ... multi-model hosting and routing"). The flag itself is a preparation capacity, not hosting, so this is not a violation — but the stated motivation leans on a workflow the project does not support, and the description should say which single-model workflow the headroom buys (e.g. leaving free VRAM for the compositor or a later process, which
--memory-limit -30G/[memory] reservealready express at serve time per docs/cli-design.md:1414-1418, 845-855). - Overlap with existing mechanisms.
--kv-cache-limit contextalready caps useful KV history at one prepared context andconcurrencyat one per active request (docs/cli-design.md:738, 828-843), and--memory-limit/[memory] reservealready bound the pool at serve time without re-export. The PR's contribution is that the cap also lowers the core'smax_sequence_tokensand that the prepared pool shrinks at export. The description should say what--kv-cache-limitcannot do, since the earlier review raised exactly this (#454 review point 2). Evidence check: the measured table uses--kv-cache-limit concurrency(one prepared context per active request = 4 × 256K at default), so the delta is genuinely the prepared-context times concurrency product — the measurement supports the claim, but only at concurrency >= 2 and only with that limit mode; nothing isolates how much of the win comes from the smaller pool versus the smaller advertised ceiling. - No tests. The diff adds none, for a change in shared planning code that alters exported cores. AGENTS.md:194-199 requires tests that exercise the affected behavior; tests/cli/test_planning.py (e.g. :71-120) is the natural home for
prepared_contextresolution, the<=0rejection, and the below-chunk message. Note the below-chunk branch (planning.py:694-700) is untested and picks its message onprefill_chunk is None, not on whether the user set--request-context; with the recipe's own chunk (omitted flag) it tells the user to pass--prefill-chunk-size ... or a larger --request-context, which is correct, but with an explicit--prefill-chunk-sizeabove a low target it reports only the chunk mismatch — fine. The branch is reachable only when a target is set below the chunk, sincecontext >= chunkalready holds at planning.py:621-623 for the stock path. - Docs framing. docs/cli-design.md:446 calls
--request-contexta way to buy "concurrency headroom in a memory-constrained multi-model deployment", which names an unsupported workflow; the same table's Context-limit rows (:1443, :1493) are consistent with the code.docs/cli-design.md:738still describes--kv-cache-limitas bounding history by "prepared context", which is now the capped one — consistent, no edit needed.