#1 [high] Blocking: multi-host export silently ignores --request-context
ignition/cli/serve.py:193-206 (_export_hosts, the export --ranks > 1 path) calls planning.plan(...) with row_shard_prefill=args.row_shard_prefill at :206 but never context=args.request_context. The single-host export path _prepare passes it at serve.py:289, debug_serve at serve.py:472, bench.run at bench.py:177. So ignition export MODEL --ranks 2 --request-context 131072 accepts the flag and drops it: the cap never reaches Plan.context_target, preparation/bootstrap.py:58 passes the recipe max, and the exported core keeps full context. grep for request_context returns only serve.py:289, :472, bench.py:177, planning.py:460, :699, plus the two doc hits — no other site.
Why it matters: AGENTS.md bans silent ignores (charter line 13 "Don't silently ignore API fields… Never accept it and quietly drop it (#417)"), and this is a preparation setting whose whole point is the exported core; the multi-host path is the supported path for multi-host serving. The precedent is unambiguous: every preparation flag in _prepare appears in _export_hosts (mixed_prefill, prompt_logprobs, row_shard_prefill at :201-206, joint_tuning/shard_hyperconnections via the replace at :207-211).
Fix: add context=args.request_context to the planning.plan call at serve.py:206.
Settle-by-test: a parametrized test in tests/cli/test_commands.py (like test_row_shard_prefill_flag_is_model_agnostic, :59-70) that drives the export parser path and asserts the resulting plan's context_target for both ranks=1 and ranks>1; or a GPU-free unit test on the _export_hosts plan construction.
#2 [high] Should fix: cap is not recorded in plan JSON or the preparation manifest
The established convention for a new preparation setting is three-fold, and the PR does none of it:
Plan.to_dict()— ignition/planning.py:389-442 lists every plan field (mixed_prefill:401,prompt_logprobs:402,joint_tuning:407,shard_hyperconnections:408,row_shard_prefill:409,force_moe_decode_a16:412, plus"context": self.context, "checkpoint_context": self.recipe.contextat :430). There is nocontext_target/prepared_context/request_contextkey, so the{"plan": …}JSON printed by export (serve.py:215, :485), debug-serve (serve.py:485) and bench (bench.py:182), and copied into bench resultconfiguration.preparation(bench.py:243-248), does not describe the cap.prepared_contextis the value actually handed to the recipe (bootstrap.py:58,"context"), yetto_dict()["context"]keeps reportingmin(recipe.context, tokens), so the recorded plan misreports the prepared context.ignition/preparation/rebuild_manifest.py:343-454from_plan— adds oneSCOPE_DEPLOYMENTparameter per plan-level preparation option (prefill_chunk:387,max_concurrency:380,row_shard_prefill:392,context_parallel:370). Norequest_context/contextentry, andPlanhas no hook forcing it, so nothing validates it.reproduction_arguments(rebuild_manifest.py:231-318) — emits a--flagper recorded setting (--prefill-chunk-size:263,--row-shard-prefill:306). A core exported with--request-context 131072therefore records reproduction args that re-export the recipe max; the manifest cannot reproduce the core it belongs to.
Rule: AGENTS.md "Configuration" (~lines 452-456): "A setting … is an advanced flag carried through the plan into the recipe's PreparationConfig, so the plan, its printed report, and its recorded measurements describe what was prepared." That sentence is exactly the contract violated here, and the sibling flags it names as precedent all satisfy it.
Fix: add "request_context": self.context_target (or "prepared_context") to to_dict(), plus add('request_context', SCOPE_DEPLOYMENT, plan.context_target) in from_plan and args.extend(['--request-context', str(plan.context_target)]) in reproduction_arguments, guarded by if plan.context_target is not None. Note from_plan's add() skips None, matching the existing optional entries.
Settle-by-test: extend tests/cli/test_planning.py:92-106 (the for candidate in (ordinary, sharded, fitted) loop) with a capped plan and assert the manifest key, its scope, and that --request-context appears in reproduction_args — that test already asserts exactly this shape for --row-shard-prefill.
#5 [high] Research summary
Reviewed PR #533 through the conventions-and-duplication lens: read every changed file in context (ignition/planning.py Plan/fit/plan, ignition/cli/{init,bench,preparation,serve}.py, ignition/preparation/bootstrap.py, docs/cli-design.md), plus the precedents they should follow — Plan.to_dict, rebuild_manifest.from_plan/reproduction_arguments, Configuration, the bench argument reuse, and the repo rules (AGENTS.md, docs/design-review.md, charter). Four findings recorded in the scratchpad.
-
Blocking — multi-host export silently drops the cap:
_export_hosts(serve.py:193-206) buildsplanning.plan(...)withoutcontext=args.request_context, unlike_prepare(:289),debug_serve(:472) andbench(bench.py:177). Every neighbouring preparation flag is forwarded there; the charter/AGENTS.md ban accepting a field and quietly dropping it. -
Should fix — the cap is unrecorded: no
context_target/prepared_contextkey inPlan.to_dict(planning.py:389-442, which lists every other plan field and still reports the uncappedcontextat :430), noSCOPE_DEPLOYMENTparameter infrom_plan, and no--request-contextinreproduction_arguments(rebuild_manifest.py:231-318, :343-454) — the exact "plan, printed report, and recorded measurements describe what was prepared" contract in AGENTS.md, which all sibling flags satisfy. -
Nit — duplication:
prepared_context(planning.py:368-373) iscontextplus one term and could be folded;effective_context = min(result.context, result.prepared_context)(:694) is provably a no-op. -
Should fix — placement: the flag is added to the shared capacity group so
benchinherits it, though bench has its own--contextscontract and the adjacent flags (--mixed-prefill,--prompt-logprobs) are explicitly rejected there (bench.py:115-116); and the cap bypassesConfigurationentirely, unlike--prefill-chunk-size/--max-concurrency/--force-moe-decode-a16, with nothing recording that choice.
No issue with the docs row's wording or the bootstrap.py retarget itself: plan.prepared_context is the right seam and the flag is threaded through derive/fit/plan in the conventional keyword style.
#6 [high] Review coverage: what was checked with no finding
Scope: every changed file was read in its surrounding code, not only the diff.
Checked and found consistent with precedent (no finding):
ignition/preparation/bootstrap.py:58("context": plan.prepared_contextinstead ofplan.recipe.context) is the right seam:common_preparation_kwargsis the single place a plan setting becomesBasePreparationConfig(bootstrap.py:24-65), and every other kwarg there is plan-derived the same way. This is what makes the cap reach the core (max_sequence_tokens), which was the blocking objection in the earlier closed PR #454 (review by yatesdr, 2026-11-21: "Preparation passesplan.recipe.contextto every recipe… so a core exported with--context Nstill serves the recipe's full context").- Flag threading follows the established keyword style:
derive(..., context=None)(preparation.py:56) →planning.plan(..., context=context)(:68) →fit(..., context=context)(planning.py:674) →Plan(context_target=context)(:535), matching howrow_shard_prefill/online_mxfp8_scopeare threaded in the same functions. - Positive-value validation is placed in
fit()(planning.py:459-460) rather thanPlan.__post_init__; neighbouring validations that depend only on plan fields live in__post_init__(planning.py:212-289), butcontextis pre-Plan here, and the error text matches the house style (UsageError(f"--flag {value}: …"), cf. planning.py:468-469, 501-502). - The chunk-vs-context error split (planning.py:694-700) preserves the stock message for an explicit
--prefill-chunk-sizeand offers a fix for the default chunk; the_shortfall/optionsmachinery (:703-731) was not touched, correctly — the cap is not a capacity remedy. - docs/cli-design.md: the new row (:446) matches the table's shape and the sibling
--mixed-prefillrow's "Command line only; a core's catalog is fixed at export" clause (:447); the two derived-owner table edits (:1443 "Context limit | The checkpoint maximum, capped by--request-contextat export"; :1493 "The smaller of the prepared context ceiling, capped by--request-context, …") correctly attach the cap to the existing owner rows rather than adding new owners. No wording finding from this lens. - Nothing else in
ignition/duplicates this mechanism: no existing prepared-context cap exists (grep forrequest_context/prepared_context/max_sequence_tokensreturns only this PR's sites plus doc hits). The nearest existing mechanism is the runtime--kv-cache-limit context|concurrency(docs/cli-design.md:738, :828-833), which bounds loaded KV history at serve time and needs no re-export; PR #533 is genuinely a distinct lever because it changes the exported core, so it does not duplicate it. Worth stating in the report so the overlap with #454's objection 2 is not re-raised.
Tests: the PR adds none. The precedents that would pin findings 1-3 already exist and are cheap: tests/cli/test_commands.py:59-70 (parametrized over ["export", "debug-serve", "bench"], asserts the flag is model-agnostic and appears in help) and tests/cli/test_planning.py:71-139 (asserts to_dict()["row_shard_prefill"], reproduction_args membership, and the manifest key/scope for each candidate plan).
#7 [high] Summary: findings index and PR metadata
PR #533 "Cap the per-request context target", author roobyz (CONTRIBUTOR), open, base main, head 1a006c6, 7 files +35/−15, no reviews, no CI checks. Supersedes closed PR #454 (same author, same title, closed 2026-11-23 after CHANGES_REQUESTED from yatesdr).
Findings by severity (details in the individual notes):
- Blocking —
_export_hosts(serve.py:193-206) never passescontext=args.request_context, soexport --ranks Naccepts and silently drops the cap. Note "Blocking: multi-host export silently ignores --request-context". - Should fix — the cap is absent from
Plan.to_dict(),rebuild_manifest.from_planandreproduction_arguments, so the printed plan, the recorded preparation manifest and the exported reproduction args all misdescribe the core. Note "Should fix: cap is not recorded in plan JSON or the preparation manifest". - Nit —
Plan.prepared_contextduplicatesPlan.contextwith one extra term andeffective_context = min(result.context, result.prepared_context)(planning.py:694) is a no-op. Note "Nit: prepared_context/effective_context duplicate Plan.context". - Should fix — the flag is placed in the shared
capacitygroup sobenchinherits a contract it cannot honour (bench has--contextsand never exports a core), and it bypassesConfigurationunlike every sibling preparation flag, with nothing recording that decision. Note "Should fix: flag placed in the shared capacity group reaches bench, and has no Configuration home".
Rules cited across the findings: AGENTS.md "Don't silently ignore API fields"/charter line 13 (#417); AGENTS.md "Configuration" (a plan-carried setting must be described by the plan, its printed report and its recorded measurements); AGENTS.md "A setting has one of three homes: the recipe declaration, the configuration file, or a command-line flag"; docs/design-review.md principle 10 (explicit configuration); AGENTS.md "Require focused, meaningful validation" for the missing tests.
Recommendation: request changes — fix 1 and 2, decide 4 (reject the flag in bench / add a config key or say it is command-line only), and add the two precedent tests.
#3 [medium] Nit: prepared_context/effective_context duplicate Plan.context
Two constructs duplicate existing ones:
-
Plan.prepared_context(ignition/planning.py:368-373) is a near-copy ofPlan.context(planning.py:363-366):min(self.recipe.context, self.tokens)vsmin(self.recipe.context, self.context_target, self.tokens). The whole difference is one added term, andcontext_targetis already validated positive at fit() (planning.py:459-460), somin(recipe.context, context_target, tokens) == min(recipe.context, context_target or recipe.context, tokens)would fold into one property. The precedent in this file is the opposite: variant accessors express a real change of quantity (guaranteed_tokens:375-378 gates bypages // concurrency), and callers reduce over the base property rather than keeping a parallel one — e.g. the new code itself writeseffective_context = min(result.context, result.prepared_context)at planning.py:694 inplan(), andplan()otherwise only ever returnsresult(planning.py:692-701). Threading the cap intocontextand deletingprepared_contextwould let bootstrap.py:58, the chunk check at :694-700 and to_dict()'s"context"key (:430) all agree on one number with no extra identifier. -
effective_context = min(result.context, result.prepared_context)(planning.py:694) is a no-op: with a target set,prepared_context <= contextby construction, and with no targetprepared_context == recipe.context >= context. Somin(result.context, result.prepared_context) == prepared_contextwhen a target is set and== contextotherwise — i.e. the line is dead and the "never exceeds the pool capacity" claim in the PR description holds forprepared_contextalone. Prefer one term (result.prepared_contextafter folding, or keep both and drop the min) so the reader does not look for a case where they differ.
Both are nits on their own; recorded together because the fix is the same edit — make context carry the cap and delete the second property and the redundant min.
#4 [medium] Should fix: flag placed in the shared capacity group reaches bench, and has no Configuration home
--request-context is added to the shared capacity argument group in _preparation_arguments (ignition/cli/init.py:156-170), which is applied to every subcommand that has a model: export, bench, debug-serve. Two departures from precedent:
benchcannot honour the "prepared per-request context" contract. Bench exports no core (docs/cli-design.md:212-216) and expresses its own context vocabulary already —--contexts LIST("consumed context lengths before each measured graph", docs/cli-design.md:239) with the existing validationif selection.required_context > self.context: raise UsageError("benchmark workload and output allowance exceed the prepared context")at planning.py:248-249. With the cap applied,Plan.contextstays stock so that check still uses the uncapped context, while the recipe receives the capped one via bootstrap.py:58; the meaningful check (required_context <= prepared_context) is missing. The flag's docs row (docs/cli-design.md:446) and help text (cli/init.py:167-170) speak only of export ("a core's catalog is fixed at export, so changing it requires re-export"), the same wording the neighbouring--mixed-prefillrow (:447) uses — butbenchrejects--mixed-prefill/--prompt-logprobsexplicitly instead of accepting them (bench.py:115-116: "ignition bench measures speculative rounds or unscored prefill; --mixed-prefill and --prompt-logprobs do not apply"). That is the established pattern for a preparation flag bench cannot use.- No config-file home. AGENTS.md "A setting has one of three homes: the recipe declaration, the configuration file, or a command-line flag";
--prefill-chunk-size,--max-concurrency,--image-concurrencyand--compile-workersall readconfiguration.get(...)/configuration.max_concurrency(...)(ignition/cli/config.py:25-41, 162-176; preparation.py:58-94), and--force-moe-decode-a16haspreparation.force_moe_decode_a16. The cap bypassesConfigurationentirely: every call site passescontext=args.request_contextstraight through (serve.py:289, :472, bench.py:177) and the default literalNoneinstead of a_DEFAULTSentry. That may be intentional (the docs say "Command line only"), but the row does not say a config key is deliberately absent while its neighbours do state their configuration home, and nothing in the PR records that decision.
Suggested fix: drop --request-context from bench's parser (or reject it in bench.Settings.from_args, as bench.py:115-116 does for the neighbouring flags) unless the benchmark-plan path is taught to compare required_context against prepared_context; and either add a [preparation] request_context key through Configuration or state in the docs row that it is command-line only.