#1 [high] Blocking: --request-context is silently ignored on multi-host export
ignition/cli/serve.py:193-206: _export_hosts calls planning.plan(...) with the full flag set but ends at row_shard_prefill=args.row_shard_prefill) — no context=args.request_context, while the same PR added it at serve.py:289 (_prepare), serve.py:472 (debug_serve) and bench.py:177.
Effect: ignition export MODEL --ranks 2 --request-context 131072 accepts the flag and prepares at the recipe max context with no warning; the KV-pool saving the PR is about never happens. The charter ("Don't silently ignore API fields", charter line 13) and AGENTS.md:452-456 make a silently accepted setting a defect. Fix: pass context=args.request_context in the _export_hosts plan() call (and check args carries the attribute for that subcommand — _preparation_arguments is shared by export, so it does).
#2 [high] Blocking: capped context is not page-aligned, so the exported core fails to load in Helios
ignition/planning.py:368-373 Plan.prepared_context returns min(recipe.context, context_target, tokens). fit() validates only context > 0 (planning.py:459-460) and plan() validates only the prefill chunk (planning.py:694-700). Nothing requires the result to be a multiple of the page size.
ignition/preparation/bootstrap.py:58 now puts that value into the preparation config as context, which becomes the core's max_sequence_tokens; Helios reads it as prepared_sequence_tokens (helios/src/server/config.rs:131-148) and helios/src/model/catalog.rs:44-71 rejects a core unless BOTH prepared_sequence_tokens and limits.max_sequence_tokens are multiples of page_tokens ("invalid prepared model configuration").
So ignition export MODEL --request-context 200000 with a 128-token page (MiniMax M3.1 Flash page_tokens=128, per tests/server/test_minimax_m3_cache.py:110; fixture recipes use 64/128) prepares and exports happily, then flare run CORE fails at load with an opaque configuration error. 200000/128 = 1562.5. Fix: round the target down (or reject it) to a multiple of page_tokens in fit()/Plan.__post_init__, and say so in the error message, e.g. "--request-context 200000: must be a multiple of the 128-token page".
#3 [high] Should fix: the cap is invisible in the printed plan and in reproduction arguments
ignition/planning.py:389-442 Plan.to_dict() reports "context": self.context (stock: min(recipe.context, tokens)) and "checkpoint_context": self.recipe.context, but never prepared_context/context_target. ignition/cli/serve.py:215,485 and bench.py:182 print plan.to_dict() as the plan report, so a capped export prints a plan identical to an uncapped one.
Likewise ignition/preparation/rebuild_manifest.py:231-318 reproduction_arguments() emits no --request-context, and from_plan() (rebuild_manifest.py:343-395) records no key for it. AGENTS.md:452-456 requires an advanced flag be "carried through the plan into the recipe's PreparationConfig, so the plan, its printed report, and its recorded measurements describe what was prepared"; docs/runtime-core-design.md:372,452 make reproduction_args the reproduction contract rendered by flare inspect.
Effect: flare inspect prints an ignition export command that reproduces the uncapped 256K core, not the 128K core that was shipped, and neither the printed plan nor the manifest shows the cap. Fix: emit the capped value in to_dict (e.g. a prepared_context/request_context key) and add if plan.context_target is not None: args.extend(['--request-context', str(plan.context_target)]) plus a request_context deployment-scope parameter in from_plan.
#6 [high] Research summary
Reviewed PR #533 (cap the per-request context) through the correctness lens: read the full diff, then the changed functions in context (planning.py Plan/fit/plan, bootstrap.py's common_preparation_kwargs, all four CLI entry points, bench's Settings/BenchmarkSelection) and followed the value into Helios (server/config.rs, model/catalog.rs, model.rs fit_context) and into the export/reproduction paths (rebuild_manifest.py). Four confirmed findings plus verification notes are in the scratchpad:
- Blocking —
_export_hosts(serve.py:193–206) never forwardscontext=args.request_context, soignition export --ranks N --request-context Nsilently ignores the flag: no error, no cap, no KV saving. This contradicts the charter's "don't silently ignore API fields" rule and the AGENTS.md rule that an advanced flag be carried through the plan. - Blocking —
prepared_context = min(recipe.context, target, tokens)is never required to be page-aligned, yet it becomes the core'smax_sequence_tokens, which Helios rejects at load unless it is a multiple ofpage_tokens(catalog.rs:44–71). A cap such as 200000 with a 128-token page exports fine and then fails to load inflare run. - Should fix —
Plan.to_dict()andrebuild_manifest.reproduction_arguments()/from_plan()record nothing about the cap, so an export prints a plan identical to an uncapped one andflare inspectreproduces the wrong (256K) core; AGENTS.md and the runtime-core design doc both require the opposite. - Should fix — bench's
required_contextcheck (planning.py:248) compares against the stockPlan.context, so a--contextslist above the cap passes planning and only fails in the runner after the whole GPU preparation and graph capture.
Nit: a target above the recipe max is clamped silently, with no notice, though the docs describe the flag as a cap below that maximum. Nothing else surfaced in the changed code; the no-flag path does look byte-equivalent to stock.
#9 [high] Research summary
Verdict: blocking (two defects in the test this PR adds; the earlier code blockers are fixed, and two nits remain). Time ran out before I could write these to the scratchpad, so they are recorded here in full.
Fixed since my last review (verified in code at head de1b5b5)
ignition/cli/serve.py:206now forwardscontext=args.request_contexton the multi-host_export_hosts()path (and:289,:472for_prepare/debug_serve), so--ranks Nno longer drops the flag.ignition/planning.py:289-290adds the page-multiple validation inPlan.__post_init__againstself.page_tokens(recipe page tokens × DCP), closing the "exports, then Helios rejects" hole (helios/src/model/catalog.rs:43-57requiresmax_sequence_tokensbe a page multiple).ignition/preparation/rebuild_manifest.py:264-265emits--request-contextinreproduction_arguments(), and:390recordscontext_targetasPREPARATION_PARAMETER_SCOPE_DEPLOYMENT, plusplanning.py:432addscontext_targettoPlan.to_dict()— AGENTS.md:452-456 satisfied.ignition/planning.py:248now compares benchmarkrequired_contextagainstprepared_context, so a--contextsvalue above the cap is rejected at planning instead of after GPU preparation.- The no-flag no-op path, the pool clamp (
min(recipe.context, target, tokens)), the positive-target check infit()(planning.py:461-462), and the new default-vs-explicit prefill-chunk error (planning.py:696-700) all read correctly.
Blocking: the added test cannot pass — tests/cli/test_planning.py:229-232 contradicts the new validation
The test plans with context=500000 and asserts a plan with prepared_context == min(recipe.context, oversized.tokens). The fixture recipe has page_tokens=64 and RankCosts.page_tokens is unset, so Plan.page_tokens == 64 (planning.py:329-332), and 500000 % 64 == 32. Plan.__post_init__ (planning.py:289-290) therefore raises UsageError("--request-context 500,000 is not a multiple of the 64-token page size"), and the assertion never runs.
Fix: use an aligned over-size target (e.g. 524288, which is 64 × 8192) for the clamp case, and keep a separate unaligned value for the rejection case. Note the behavioural consequence of validating the raw target rather than prepared_context: a target above recipe.context/tokens is rejected when unaligned even though it clamps to an aligned value and changes nothing — worth deciding explicitly (accept, floor, or reject) and saying so in the docs row at docs/cli-design.md:446.
Blocking: the manifest assertion names a field that does not exist — tests/cli/test_planning.py:257
assert by_key["context_target"].value.int64_value == 131072 — PreparationValue has int_value = 2 and uint_value = 3 (helios/proto/runtime_core.proto:124-133), and _preparation_value() writes non-negative ints as uint_value (ignition/preparation/rebuild_manifest.py:333). Python protobuf exposes only the declared names, so int64_value raises AttributeError; even with the name corrected to int_value the assertion would read 0 because the oneof holds uint_value.
Fix: assert by_key["context_target"].value.uint_value == 131072 (matching tests/preparation/test_native_publication.py:78 (not opened)).
Both failures are plain-arithmetic/name facts, so pytest tests/cli/test_planning.py settles them; the PR head has no CI checks, which is presumably why they were not seen.
Nits
ignition/planning.py:375: a target above the recipe maximum is still silently clamped tomin(recipe.context, ...)with no notice, whiledocs/cli-design.md:446describes the flag as a cap "below the recipe's maximum". Reporting the effectiveprepared_contextin the plan line (serve.py:302-316) would make the clamp visible.ignition/cli/serve.py:68:max_body_bytesstill sizes the image budget fromrecipe.context, notprepared_context, so a capped core accepts HTTP bodies for prompts the engine will reject at admission. Harmless, but it is the one remaining place that still reads the recipe max as if it were the served context.
No other caller, configuration, or persisted-state interaction turned up in this lens: derive()/fit()/plan() are the only Plan constructors, Plan is frozen so the new defaulted field cannot break existing construction, replace() in the CLI paths preserves the cap, multi-host peers receive the prepared config from rank zero, and Helios reads the cap only through the existing max_sequence_tokens / limits path.
#10 [high] Blocking: the PR's new test cannot pass — clamp case violates the new page-multiple validation
Verified at head de1b5b5 on PR #533.
tests/cli/test_planning.py:229-232:
# Clamp: target > recipe max -> prepared_context == min(recipe.context, tokens)
oversized = planning.plan(recipe, recipe.checkpoints[0], gpus, context=500000, **base)
assert oversized.context_target == 500000
assert oversized.prepared_context == min(recipe.context, oversized.tokens)
- Fixture
_recipe()(tests/cli/test_planning.py:36-54) setscontext=262144, page_tokens=64;RankCostsin the fixture leavespage_tokensunset (declaration.py:167-174), soPlan.page_tokensreturnsrecipe.page_tokens= 64 (ignition/planning.py:329-332). 500000 % 64 == 32, soPlan.__post_init__at ignition/planning.py:289-290 raisesUsageError("--request-context 500,000 is not a multiple of the 64-token page size")and the test fails before its assertion.- The test's own rejection case (line 241-242,
context=100) is the only unaligned value the new validation is meant to catch; 500000 belongs in the same bucket. - Fix: use an aligned over-size target (524288 = 64 × 8192) for the clamp case; keep 100 for the rejection case.
- Related design point to settle: the validation checks the raw
context_target, not the clampedprepared_context(planning.py:375). A target aboverecipe.context/tokensthat is unaligned is rejected although it changes nothing. Decide accept/floor/reject and state it in docs/cli-design.md:446. - The head commit has no CI checks, so this was not exercised.
pytest tests/cli/test_planning.pysettles it.
#12 [high] Blocking: derive() has no context parameter — NameError/TypeError breaks export, debug-serve, bench
HEAD 02023eba. ignition/cli/preparation.py:45-56 — derive(...) signature lists gpus, concurrency, speculation, prefill_chunk, context_parallel, context_parallel_size, stream_overlap, roce_ring, roce_chain, mixed_prefill, prompt_logprobs, expert_scale_compression, online_mxfp8, online_mxfp8_scope, language_model_only, compile_workers, tuning_gpus, autotune_effort, image_concurrency, mla_compute_mode, lock_gpu_clocks, native_dense_activations, shard_hyperconnections, row_shard_prefill, row_shard_attention, force_moe_decode_a16. There is NO context parameter (grep context: int|^context|context = in that file: no match).
But :69 (inside derive, in the planning.plan(...) call) reads row_shard_attention=row_shard_attention, context=context) — context is an undefined name, so derive() raises NameError whenever it is reached. And its callers pass context=args.request_context, which is an unexpected keyword → TypeError:
- ignition/cli/serve.py:207 (
_export_hosts, multi-host export) - ignition/cli/serve.py:291 (
_prepare, the ordinaryignition exportpath) - ignition/cli/serve.py:476 (
debug_serve) - ignition/cli/bench.py:177 (
ignition bench)
So every preparation command is broken at this head regardless of whether the flag is used, and tests/cli/test_commands.py:88,114 (preparation.derive(...)) fail with NameError too. Diff context: preparation.py hunk only changed :69, adding context=context — the parameter was never added (diff shows row_shard_attention=row_shard_attention, context=context) as the only change in that file, +1/-1).
Fix: add context: int | None = None to the derive signature (threading it to planning.plan(..., context=context)). Blocking: no CI checks ran on the head.
#13 [high] Blocking: the page-multiple validation the test expects does not exist at head; test's two assertions still fail
HEAD 02023eba, tests/cli/test_planning.py:211-254 (test_request_context_target_prepared_context_and_manifest).
(a) Page-multiple validation is absent from the code. Repo-wide grep for multiple of the matches ONLY tests/cli/test_planning.py:239; page size matches nothing in ignition/. In ignition/planning.py the only context_target uses are :186 (field), :260 (bench compare), :379-381 (prepared_context), :438 (to_dict), :549 (context_target=context); the only alignment-ish check is the prefill-chunk % 64 at :635. Plan.__post_init__ (:224-296) contains no context_target validation, and fit (:467-468) only rejects context <= 0.
→ with pytest.raises(UsageError, match="multiple of the") at :239-240 fails ("DID NOT RAISE"), so the new test still cannot pass. The clamp case at :230 then runs: min(262144, 500000, tokens) = 262144 = min(recipe.context, tokens), so :231-232 would pass.
→ The PR description ("a page-multiple validation") and the test's "Valid target/non-page-multiple target rejected" comments do not match the code.
→ Real consequence of the missing check: --request-context 100 (or any non-multiple of Plan.page_tokens) exports a core whose max_sequence_tokens = 100; helios/src/model/catalog.rs:50-57 rejects a core unless both prepared_sequence_tokens and limits.max_sequence_tokens are multiples of page_tokens (is_multiple_of), so the export succeeds and the core fails to load at serve time. Note prepared_context = min(recipe.context, target, tokens) — tokens (pages*page_tokens) and recipe.context are aligned, so the check belongs on min(self.recipe.context, self.context_target) % self.page_tokens (an over-max target then still resolves to the aligned recipe max, matching the documented clamp).
(b) tests/cli/test_planning.py:254 — by_key["context_target"].value.int64_value. helios/proto/runtime_core.proto:124-133 declares PreparationValue{bool_value=1, int_value=2, uint_value=3, float_value=4, string_value=5, list_value=6}; there is no int64_value field → AttributeError. Even with the right name, ignition/preparation/rebuild_manifest.py:329-333 _preparation_value writes non-negative ints as uint_value, so int_value would read 0. Fix: assert .value.uint_value == 131072.
#14 [high] Correctness lens, head 02023eba: what is fixed, nits, verified-clean
HEAD 02023eba (all verified in the code).
FIXED since my last round (do not re-raise):
- Multi-host export forwards the flag: serve.py:207 (
_export_hosts). - Cap recorded in
Plan.to_dict(:438 emitscontext_targetandprepared_context) and in the printed "Select GPUs" line (serve.py:319· request context Nonly whencontext_target is not None). - Bench compares against the cap: planning.py:260
selection.required_context > self.prepared_context; bench.py:248 now whitelistscontext_target,prepared_context. - Manifest: rebuild_manifest.py:264-265 emits
--request-context Ninreproduction_args; :389add('context_target', SCOPE_DEPLOYMENT, plan.context_target)(add() skips None at :350-352, so the unset path stays byte-equivalent). - Omitting the flag:
prepared_contextreturnsrecipe.context(:379-380) which is exactly what bootstrap.py:58 passed before this PR → byte-equivalent. - Chunk error: planning.py:709-711 now compares against
min(result.context, result.prepared_context).
NITS remaining (each verified):
- ignition/cli/serve.py:68
max_body_bytesstill sizes the HTTP body fromrecipe.context, and :69context_hintsays "context is limited by the checkpoint and available cache capacity". With a cap, both overstate the served ceiling (a body accepted for a prompt the engine rejects at admission). Useplan.prepared_context. - ignition/cli/help.py:38 advertises
--prefill-chunk-size: 64..{recipe.context}, a range above the effective bound once capped. - docs/cli-design.md:1443 says "The checkpoint maximum" while the new row (:446) and :1493 say "the recipe's maximum"; and while the docs/helptext call it a cap below the recipe maximum, a target above the maximum is silently clamped with no notice (planning.py:381).
- ignition/cli/init.py:167-168 helptext says "cap the prepared context and max_sequence_tokens at N tokens" without stating the alignment requirement (which the code currently does not enforce at all — see the blocking note).
Verified-clean through this lens: Plan frozen + context_target default None keeps every existing Plan(...) construction valid (only planning.py:535 constructs it); derive's other call sites in tests; bench Selection validation (selection.py:76-77 required_context) uses the prepared context now; helios/src/model.rs:268-272 narrows max_sequence_tokens to the pool, catalog.rs:26-71 validates the load.
#15 [high] Research summary
Reviewed PR #533 at head 02023eba through the correctness lens: read the full diff, then each changed function in context (planning.py Plan/prepared_context/fit/plan, bootstrap.py, rebuild_manifest.py, serve.py and bench.py call sites, the new test) plus the consumers in Helios (model.rs fit_context, model/catalog.rs load validation, proto schema).
Verdict: blocking. Three defects, two of them new this round:
derive()has nocontextparameter (ignition/cli/preparation.py:45-56) yet line 69 passescontext=context(undefined name → NameError) and all four callers passcontext=args.request_context(TypeError): serve.py:207, serve.py:291, serve.py:476, bench.py:177. Every preparation command is broken at this head with or without the flag, and tests/cli/test_commands.py:88 (not opened),114 fail too. The diff for that file is +1/−1: the call site was updated, the signature was not.- The page-multiple validation the test asserts does not exist. Repo-wide,
multiple of theoccurs only in the test (tests/cli/test_planning.py:239);Plan.__post_init__has nocontext_targetcheck andfitonly rejects<= 0. So the new test'spytest.raisesfails, and the unguarded path ships a core whosemax_sequence_tokensis unaligned — which helios/src/model/catalog.rs:50-57 rejects at load, i.e. long after export. - tests/cli/test_planning.py:254 reads
value.int64_value, a field that does not exist (proto declaresint_value/uint_value), and_preparation_valuewrites non-negative ints asuint_value(rebuild_manifest.py:329-333), so even the right name would read 0.
Fixed since my last round and verified in the code: the flag reaches all four entry points, to_dict/printed plan line/reproduction args/manifest scope, bench compares against prepared_context, and omission is byte-equivalent to main. Remaining nits: serve.py:68-69 still sizes the body and the context hint from recipe.context; help.py:38 (not opened) advertises a chunk range above the effective bound; docs:1443 says "checkpoint maximum" where the new row says "recipe's maximum", and an over-maximum target is silently clamped with no notice. Details in scratchpad entries #12-14.
#16 [high] Report input: verdict, settling checks, and description-vs-code mismatches (head 02023eba)
Verdict for PR #533 at head 02023eba: blocking (3). No CI checks on the head; nothing was executed in this environment, so every claim below is a static reading of the code and one grep settles each.
BLOCKING 1 — derive() has no context parameter.
- ignition/cli/preparation.py:45-56 signature (26 keywords, no
context); :69... row_shard_attention=row_shard_attention, context=context)→contextis an undefined name insidederive. - Callers passing the keyword: ignition/cli/serve.py:207 (
_export_hosts), serve.py:291 (_prepare— the ordinaryignition export/servepath), serve.py:476 (debug_serve), bench.py:177 (bench.run). - Consequence: every preparation command raises before planning (NameError inside the callee, or TypeError for the unexpected keyword, depending on binding order), with or without
--request-context. tests/cli/test_commands.py:88,114 callpreparation.derive(...)directly. - Diff basis: pr_diff for ignition/cli/preparation.py is +1/-1 — only the
planning.plan(...)call was edited; the signature change the description claims ("threaded to derive()/fit()/plan()") is absent. - Fix: add
context: int | None = Noneto the signature. - Settle:
python -c "from ignition.cli.preparation import derive; import inspect; print('context' in inspect.signature(derive).parameters)"→ False at this head; orpytest tests/cli/test_commands.py.
BLOCKING 2 — the page-multiple validation does not exist.
multiple of thematches only tests/cli/test_planning.py:239 in the whole repository;page sizematches nothing under ignition/.- ignition/planning.py: all
context_targetuses are :186 (field), :260 (bench compare), :377-381 (prepared_context), :438 (to_dict), :549 (context_target=context).Plan.__post_init__(:224-296) validates nothing aboutcontext_target;fit(:467-468) only rejectscontext <= 0. - So tests/cli/test_planning.py:239-240
with pytest.raises(UsageError, match="multiple of the")fails with DID NOT RAISE — the new test cannot pass at this head. - Real defect, not just a test defect:
--request-context 100prepares a core withmax_sequence_tokens= 100 (bootstrap.py:58 → helios/src/server/config.rs:131,147-148), and helios/src/model/catalog.rs:50-57 requires bothprepared_sequence_tokensandlimits.max_sequence_tokensto satisfyis_multiple_of(page_tokens). Export succeeds, load fails. - Correct home for the check:
min(self.recipe.context, self.context_target) % self.page_tokens(Plan.page_tokens, planning.py:335-338), becausemin(recipe.context, tokens)is always page-aligned — an over-maximum target then resolves to the aligned recipe maximum and keeps the documented clamp, while100is still rejected (100 % 64 = 36). - Settle:
pytest tests/cli/test_planning.py::test_request_context_target_prepared_context_and_manifest.
BLOCKING 3 — tests/cli/test_planning.py:254 reads a nonexistent proto field.
.value.int64_value: helios/proto/runtime_core.proto:124-133 declaresPreparationValue{bool_value=1,int_value=2,uint_value=3,float_value=4,string_value=5,list_value=6}→ AttributeError.- Even renamed to
int_valueit would be 0: ignition/preparation/rebuild_manifest.py:329-333_preparation_valuewrites non-negative ints asuint_value. Fix:.value.uint_value == 131072.
DESCRIPTION vs CODE (worth one line in the report; the description is material, not instruction):
- "a page-multiple validation" — absent (blocker 2).
- "threaded to derive()/fit()/plan()" —
fit/planacceptcontext(planning.py:461,605) butderivedoes not (blocker 1). - Everything else in the description checks out at this head:
Plan.context_target(:186),prepared_context(:377-381), positive-target validation (:467-468),Plan.contextstays stock (:372-374), recipes readplan.prepared_contextvia bootstrap.py:58, reproduction arg (rebuild_manifest.py:264-265), SCOPE_DEPLOYMENT parameter (:389), serve progress line (serve.py:319), bench record (bench.py:248).
Rule basis cited: charter line 42 (check compatibility across supported targets, state and graph transitions, and that existing artifacts still load — blocker 2 is exactly a load-time incompatibility); charter line 13 / AGENTS.md "don't silently ignore" (a flag that errors out on every command, and a documented validation that does not exist).
#17 [high] Correction to entry #10: the clamp case now PASSES; do not repeat the old 500000 claim
Entry #10 and #11 recorded that tests/cli/test_planning.py:230 (context=500000 on a 64-token page fixture) would be rejected by a new page-multiple validation, so the clamp assertions never ran. That is no longer true at head 02023eba: there is no such validation anywhere in ignition/ (see entry #13). planning.plan(..., context=500000) therefore succeeds, context_target == 500000 (:231) and prepared_context == min(262144, 500000, tokens) == min(262144, tokens) (:232), so the clamp case passes and is the one part of the new test that works.
Consequence for the report: the blocking item is the missing validation (test assertion at :239 is what fails), not a spurious rejection. The earlier "500000 % 64 == 32 is rejected" reasoning should not be repeated.
#19 [high] Blocking: above-maximum --request-context is rejected, not clamped; the PR's own test fails
Head 9118addd.
ignition/parameters.py:1309-1321 declares context_target with min_value=1, max_fn=_recipe_context_limit, and _recipe_context_limit (:1268-1269) returns context.recipe.context. ParameterGroup.validate_fields (:522-545) raises when a value exceeds a resolved max: "… must be 1 through {max}". RecipeParameters.validate calls validate_fields (:1440-1463), and Plan.__post_init__ calls self.parameters.validate(...) first (ignition/planning.py:184-190), as does fit (:456).
Consequence 1 (test fails): tests/cli/test_planning.py:310-313 builds replace(base_params, context_target=500000) on a recipe with context=262144 (fixture, :139) and asserts oversized.prepared_context == recipe.context. planning.plan reaches fit → params.validate → UsageError "--request-context for fixture-alias must be 1 through 262,144", so the assertion never runs. The clamp branch in Plan.prepared_context (planning.py:363, min(self.recipe.context, target)) is therefore unreachable through any validated path, since validate always runs before it.
Consequence 2 (doc/description vs code): docs/cli-design.md:468 says "--request-context N … resolves to the smaller of N and the recipe maximum", and the PR description repeats "min(recipe.context, N) otherwise" and "a cap above the pool still shrinks the export artifact…" — but the flag actually rejects N above the recipe max instead of resolving to it.
Fix: pick one. Either drop max_fn=_recipe_context_limit (keeping min_value=1) so N > recipe max clamps as documented and the test passes, or keep the bound and change tests/cli/test_planning.py:310-313 plus docs/cli-design.md:468 to say values above the recipe maximum are rejected. Settling command: pytest tests/cli/test_planning.py -k request_context.
#20 [high] Blocking: a cap below the recipe's prefill chunk exports a core Helios refuses to load
Head 9118addd.
ignition/planning.py:594-596 still compares the chunk against the stock context:
if params.prefill_chunk > result.context: # result.context == min(recipe.context, tokens)
raise UsageError(f"--prefill-chunk-size … exceeds the {result.context:,}-token context …")
and RecipeParameters.validate only bounds the chunk by the recipe context (ignition/parameters.py:1457-1462: 64 <= self.prefill_chunk <= ctx.recipe.context). Neither knows about context_target.
Preparation then hands plan.prepared_context to every recipe (ignition/preparation/bootstrap.py:132, "context": plan.prepared_context), which becomes the exported core's max_sequence_tokens, and Helios requires prefill_chunk_size <= max_sequence_tokens:
helios/src/scheduler.rs:66-77validate_prefill(): "prefill_chunk_size must be divisible by 64 and within 64..=context".helios/src/model/catalog.rs:42calls it during core validation, so the core fails to load.
Reproduction from documented defaults: Qwen3.8-27B's recipe chunk is 4096 (docs/cli-design.md:244), and --request-context 2048 is legal (page-aligned, >= 1, <= recipe max). The plan check compares 4096 against result.context (e.g. 262144), passes, the export succeeds, and flare run rejects the core with the prefill error. Same for --request-context 64/128/… below the chunk.
Fix: in planning.plan (and/or Plan.__post_init__), compare the chunk against min(plan.context, plan.prepared_context) and name the cap in the message — e.g. --prefill-chunk-size 4096 exceeds the 2048-token context --request-context allows. Note the bench check was already moved to prepared_context (planning.py:212), so this is the one remaining stock-context comparison in the same file.
Settling command: pytest tests/cli/test_planning.py plus a unit assertion that planning.plan(..., parameters=replace(base, context_target=2048)) raises for a recipe with prefill_chunk=4096.
#21 [high] Nits and verified-clean paths, head 9118addd
Head 9118addd (also true at 02023eba).
-
ignition/cli/serve.py:67now sizesmax_body_bytesfromplan.prepared_context, butignition/cli/help.py:46still printsContext: {recipe.context:,} tokens (page size: {recipe.page_tokens})forMODEL --help, anddocs/cli-design.md:468's row is the only place--request-contextbounds the chunk. When the cap is set, the dynamic help advertises an uncapped context and an uncapped--prefill-chunk-sizeupper bound that preparation then rejects (see the chunk/cap finding). Fix: not fixable from help alone (help is recipe-static and has no plan), so at minimum keep--request-context's own help text saying the cap also bounds--prefill-chunk-size. -
ignition/planning.py:395-396:to_dict()records"context": self.context(stillmin(recipe.context, tokens), the stock pool-derived bound) and"checkpoint_context": self.recipe.context, but nothing recordsprepared_context— the value now actually exported asmax_sequence_tokens. The{"plan": …}JSON printed by export/debug-serve/bench (serve.py:204,433,bench.py:194) therefore cannot show the served context. Fix: add"prepared_context": self.prepared_contexttoto_dict. (context_targetitself does appear viaparameters.to_dict, so the cap value is recorded; the effective per-request context is not.) -
ignition/parameters.py:1320help text says the cap "must be a multiple of the page token count", but page size is world-size dependent (Plan.page_tokensatplanning.py:324-325viaadjust_page_tokens), and the check lives inPlan.__post_init__(:186-190) rather than beside the otherplan()flag checks (contrastprefill_chunk's check at:1457). Behaviour is correct; the split just means--request-contextalone can pass validation inresolve_parametersand fail later in planning. Nit. -
ignition/preparation/rebuild_manifest.py:270-283_preparation_valuewrites non-negative ints asuint_value; the new test only asserts scope (tests/cli/test_planning.py:329), so it does not cover the value field. Nit. -
tests/cli/test_planning.py:300-303calls the uncapped plan "stock" without defining it.
Verified clean at this head: prepare/resolve_parameters funnel (ignition/cli/preparation.py:45-59) now has no undefined context — the old blocker is genuinely gone; derive (:62-81) takes parameters=; common_preparation_kwargs (bootstrap.py:123-137) passes plan.prepared_context as the single seam; the page-multiple validation now exists (planning.py:186-190) with the "multiple of the" wording the test matches; repro_always=True makes --request-context appear in reproduction_args (parameters.py:1519-1520), which the test asserts; omitting the flag leaves prepared_context == recipe.context (planning.py:361-362), byte-identical to main.
#22 [high] Research summary
Reviewed PR #533 at head 9118addd through the correctness lens: full diff, then each changed function in context (planning.py Plan/prepared_context/plan/fit, parameters.py RecipeParameters validate/reproduction_args/manifest_parameters, bootstrap.py, serve.py, rebuild_manifest.py, the new test) and the Helios side each value reaches (scheduler.rs validate_prefill, model/catalog.rs, model.rs fit_context, server/config.rs).
The previous round's three blockers are genuinely fixed: derive() takes parameters=, the page-multiple validation exists in Plan.__post_init__ with the "multiple of the" wording the test matches, and the test no longer reads a nonexistent proto field. Two new blockers, both about the interaction of the new cap with other validated bounds:
-
--request-contextabove the recipe maximum is rejected, not clamped —parameters.py:1309-1321setsmax_fn=_recipe_context_limit,validate_fields(:522-545) raises, andPlan.__post_init__/fitrun that validation beforeprepared_contextis ever computed. So the PR's clamp branch (planning.py:363) is unreachable andtests/cli/test_planning.py:310-313(context_target=500000 on a 262144-token fixture) fails. It also contradictsdocs/cli-design.md:468and the PR description, which both say the flag resolves to the smaller of N and the recipe maximum. -
A cap below the recipe's prefill chunk exports a core Helios refuses to load.
planning.py:594-596still compares the chunk to the stockresult.context, andparameters.py:1457-1462bounds it only by the recipe context; but preparation handsplan.prepared_contextto recipes asmax_sequence_tokens(bootstrap.py:132), andhelios/src/scheduler.rs:66-77(called frommodel/catalog.rs:42) requiresprefill_chunk_size <= max_sequence_tokens. With the documented Qwen3.8-27B chunk of 4096,--request-context 2048is accepted and the export succeeds, thenflare runrejects the core. The bench check in the same file was already moved toprepared_context(:212), so this is the one remaining stock-context comparison.
Nits (recorded with lines): cli/help.py:46 (not opened) still advertises the uncapped recipe context and chunk bound; Plan.to_dict records context and checkpoint_context but never prepared_context, so the printed plan JSON cannot show the served context; the page-multiple check lives in Plan.__post_init__ rather than beside the other flag checks; the test asserts manifest scope only, not the value field. Omitting the flag is byte-equivalent to main, and the common_preparation_kwargs seam is the right shape.
Full detail is in scratchpad entries #19-#21; the run is also reflected in the note history from prior rounds.
#23 [high] Report input, head 9118addd: verdict, settling checks, stale-entry index
Verdict at head 9118addd: blocking issues (two). Written from entries #19-#21; do not re-report anything in entries #1-#18 — they review earlier heads.
Blocking 1 — above-maximum --request-context is rejected, not clamped; the PR's own test fails.
ignition/parameters.py:1309-1321:context_targetdeclaresmin_value=1, max_fn=_recipe_context_limit;_recipe_context_limit(:1268-1269) returnscontext.recipe.context.ParameterGroup.validate_fields(ignition/parameters.py:522-545) raises when value > resolved max → "--request-context for {alias} must be 1 through {recipe.context}".RecipeParameters.validate(:1440-1463) callsvalidate_fields;Plan.__post_init__callsparameters.validate(ignition/planning.py:184-190) andfitdoes too (:456). Both run beforeprepared_contextis read, so the clamp atplanning.py:363(min(self.recipe.context, target)) is unreachable.tests/cli/test_planning.py:310-313(context_target=500000on a fixture recipe withcontext=262144,:139) therefore raises instead of asserting; the test fails.- Contradicts
docs/cli-design.md:468and the PR description ("min(recipe.context, N) otherwise"). - Fix: drop
max_fn=_recipe_context_limit(keepmin_value=1), or keep the bound and rewrite the test and the docs row to say values above the recipe maximum are rejected. - Settle:
pytest tests/cli/test_planning.py -k request_context.
Blocking 2 — a cap below the recipe prefill chunk exports a core Helios refuses to load.
ignition/planning.py:594-596compares the chunk to the stockresult.context;ignition/parameters.py:1457-1462bounds the chunk only byctx.recipe.context. Neither seescontext_target.- Preparation passes
plan.prepared_contextas the context (ignition/preparation/bootstrap.py:132), which becomes the core'smax_sequence_tokens;helios/src/scheduler.rs:66-77(validate_prefill) requiresprefill_chunk_size <= max_sequence_tokensandhelios/src/model/catalog.rs:42calls it at load, so the core is rejected. - Concretely: Qwen3.8-27B's recipe chunk is 4096 (
docs/cli-design.md:244);--request-context 2048is page-aligned, ≥1 and ≤ recipe max, so export succeeds andflare runfails with the prefill error. - Fix: compare against
min(plan.context, plan.prepared_context)inplan()(and/orPlan.__post_init__) and name the cap in the message. Noteplanning.py:212(bench) already usesprepared_context, so this is the last stock-context comparison in that file. - Settle:
pytest tests/cli/test_planning.py, plus a unit assertion thatplanning.plan(..., parameters=replace(base, context_target=2048))raises for a recipe withprefill_chunk=4096.
Nits (details in entry #21): cli/help.py:46 uncapped context/chunk bound in MODEL --help; Plan.to_dict (planning.py:395-396) has no prepared_context key so the printed plan JSON cannot show the served context; the page-multiple check sits in Plan.__post_init__ (:186-190) instead of beside the other flag checks; the new test asserts manifest scope but not the value field (uint_value at rebuild_manifest.py:270-283).
Verified clean at this head (entry #21): resolve_parameters/derive funnel intact (cli/preparation.py:45-81), common_preparation_kwargs seam, page-multiple validation present with the expected wording, repro_always=True puts --request-context in reproduction_args, and no flag ⇒ prepared_context == recipe.context (byte-equivalent to main).
Superseded prior entries (do not repeat): #1 (multi-host flag dropped — _export_hosts now calls resolve_parameters(..., multi_host=True)), #2/#5/#10/#13 (no page validation — it exists now), #3 (manifest/repro silence — repro_always and manifest_key now cover it), #12 (missing derive(context=) — gone), #17 (old 500000 claim — re-evaluated as blocker 1 above, on a different ground).
#25 [high] Research summary
Correctness review — PR #533 "Cap the per-request context", head e6239855
The three blockers I raised at the previous head (9118addd) are fixed at this head and are not repeated: max_fn=_recipe_context_limit is gone so the clamp branch is live, reproduction_args hand-emits --request-context, plan() bounds the prefill chunk by min(result.context, result.prepared_context), and _export_hosts now receives parameters resolved from args so the multi-host path sees the flag. One new blocking defect in the added test, and one behaviour regression I can show in the code.
Blocking
tests/cli/test_planning.py:295-329 — the new test calls rebuild_manifest.from_plan without stubbing source_identity. from_plan (ignition/preparation/rebuild_manifest.py:286, used at :312) calls source_identity(), which imports flare_heliopause, requires FlashInfer's native sources and raises RuntimeError when flashinfer is absent (ignition/preparation/source_identity.py:39-41, :78-81). Every sibling test that reaches from_plan stubs it — test_planning.py:159, :223, :333 and test_parameters.py:296 (not opened) all do monkeypatch.setattr("ignition.preparation.source_identity.source_identity", lambda: "test-source"). The new test takes monkeypatch and never uses it, so pytest tests/cli/test_planning.py fails in any environment without FlashInfer/native build (head has no CI checks, so this was not observed). Fix: add the same one-line monkeypatch.setattr at the top of the test.
Should fix
ignition/planning.py:212 — the bench context check got looser on the uncapped path. It was selection.required_context > self.context, where context = min(recipe.context, tokens) (planning.py:353-355); it is now > self.prepared_context, which with no cap equals recipe.context (planning.py:361-362) and is therefore ≥ the old bound whenever the KV pool cannot hold the full recipe context — the common case. A bench --contexts list that exceeds the pool-derived context now passes planning and fails only after the full GPU download, tuning and graph capture, at ignition/bench/runner.py:388 ("benchmark case exceeds prepared capacities"). The fix is the same shape the chunk check already uses at planning.py:594: compare against min(self.context, self.prepared_context).
ignition/planning.py:395-396 — to_dict() still records no served context. It reports "context": self.context (stock, pool-derived) and "checkpoint_context": self.recipe.context, but not prepared_context, so the {"plan": …} JSON printed by export (serve.py:206, :435) and bench (bench.py:194) cannot show the value actually exported as max_sequence_tokens. The raw target does appear via parameters.to_dict.
ignition/parameters.py:1318 — status_label reports the raw target, not the effective context. With --request-context 500000 on a 262144-context recipe the "Select GPUs" line (serve.py:270-274 → parameters.py:1555-1560) prints "request context 500,000 tokens" while the served context is 262,144. The label only receives the value, so this needs to move to Plan (or clamp in the label against the recipe maximum).
Nits
- parameters.py:1319 help says the cap "must be a multiple of the page token count", but page size is world-size dependent (
Plan.page_tokens, planning.py:324-325) and the check lives inPlan.__post_init__(planning.py:186-190), so--request-contextcan passresolve_parameters(preparation.py:55-58) and only fail later in planning — unlikeprefill_chunk's check at parameters.py:1457. - tests/cli/test_planning.py:301, :303, :307, :312-313 restate the input, the field default and the untouched
Plan.context; :329 asserts only the manifest parameter's scope, not its value (_preparation_valuewrites non-negative ints touint_value, rebuild_manifest.py:270-274), so a wrong recorded value would not fail. - Orphan note for reviewers:
docs/preparation-development.md:18anddocs/cli-design.md:449now list the field, consistent with the code.
Verified clean
prepared_context is exact no-flag equivalent (recipe.context, the value common_preparation_kwargs passed before); the clamp and the oversized (500000) case now work because the page-alignment check is gated on target <= self.recipe.context (planning.py:187) — an above-maximum, unaligned target resolves to the aligned recipe context; min_value=1 yields "--request-context must be a positive integer" and :100 % 64 yields "…not a multiple of the 64-token page size", matching both pytest.raises patterns; manifest_key/DEPLOYMENT scope and the reproduction-arg emission match the test's assertions; serve.py:67-70 sizes max_body_bytes from the cap and names it in context_hint only when active; the Helios side is coherent — catalog.rs:42,49,54-57, scheduler.rs:66-77 and model.rs:268 (fit_context = min(prepared, pages × page)) mean a cap cannot make the exported core invalid now that chunk ≤ cap is enforced at export.
Nothing in the PR text attempted to direct my behaviour. Settling checks: pytest tests/cli/test_planning.py -k request_context for the blocking item; a plan whose tokens < recipe.context plus a bench selection above it for the regression.
#26 [high] Report of 2026-11-27, run ~1500 — head e6239855: verdict, findings, verified-clean
Correctness review — PR #533 "Cap the per-request context", head e6239855 (commit message "Cap the per-request context", pushed 2026-11-26)
Verdict: blocking (one blocking defect, in the PR's own new test)
Supersedes entry #24 (head 9118addd). All three old blockers are FIXED at this head and must not be repeated:
max_fn=_recipe_context_limitremoved fromcontext_target→ parameters.py:1309-1320 now only hasmin_value=1, soPlan.prepared_context's clamp branch (planning.py:363) is live and theoversized500000 case in tests/cli/test_planning.py:310-313 works.--request-contextnow hand-emitted inRecipeParameters.reproduction_args(parameters.py:1484-1485), inside the override before the base-class-field skip at :1492-1496.repro_alwaysis not set.plan()prefill-chunk bound now useseffective = min(result.context, result.prepared_context)(planning.py:594-597).- Multi-host
_export_hostsnow gets parameters fromresolve_parameters(model, args, ...)(serve.py:180) so the flag reaches plan() at serve.py:193-201.
Blocking
tests/cli/test_planning.py:295-329 — the new test calls rebuild_manifest.from_plan (line 323) without stubbing source_identity.
from_plan → reproduction_arguments/from_plan call source_identity() (ignition/preparation/rebuild_manifest.py:286, :312, imported :290). source_identity() imports flare_heliopause, requires FlashInfer's native sources, and raises RuntimeError when flashinfer is missing (ignition/preparation/source_identity.py:39-41 for the import check; :78-81 for FlashInfer native source directory is unavailable).
Every sibling test that reaches from_plan stubs it: tests/cli/test_planning.py:159, :223, :333 and tests/cli/test_parameters.py:296, all with monkeypatch.setattr("ignition.preparation.source_identity.source_identity", lambda: "test-source"). The new test takes monkeypatch as a parameter and never uses it — a tell that the stub was dropped. Head has no CI checks (PR state: "CI on the head commit: no checks"), so this was not observed.
Fix: one line at the top of the test, identical to :223.
Should fix
-
ignition/planning.py:212 — the bench check got looser on the uncapped path. Was
selection.required_context > self.context(context=min(recipe.context, tokens), planning.py:353-355); now> self.prepared_context, which with no cap returnsrecipe.context(planning.py:361-362) and is therefore >= the old bound whenever the KV pool is smaller than the recipe maximum — the common case. A bench--contextslist above the pool-derived context passes planning and fails only after download + tuning + graph capture, at ignition/bench/runner.py:388 (benchmark case exceeds prepared capacities). Fix mirrors planning.py:594: compare againstmin(self.context, self.prepared_context). -
ignition/planning.py:395-396 —
to_dict()records no served context. Reports"context": self.context(stock) and"checkpoint_context": self.recipe.context, neverprepared_context. The{"plan": …}JSON printed by export (serve.py:206 and :435) and bench (bench.py:194) therefore cannot show the value exported asmax_sequence_tokens. The raw target does appear throughparameters.to_dict. Note: the previous Autobot review suggested deletingcheckpoint_contextinstead; either wayprepared_context(the served extent) is what is missing. -
ignition/parameters.py:1318 —
status_labelprints the raw target, not the effective context.status_label=lambda v: f"request context {v:,} tokens" if v else Nonerenders viastatus_parts(parameters.py:1555-1560) into the "Select GPUs" line (serve.py:270-274). With--request-context 500000on a 262144-context recipe it prints "request context 500,000 tokens" while the served context is 262,144. Fix: clamp in the label against the recipe maximum (label has no ParameterContext) or move the label toPlan.
Nits
- ignition/parameters.py:1319 — help says the cap "must be a multiple of the page token count", but page size is world-size dependent (
Plan.page_tokens, planning.py:324-325 viaadjust_page_tokens) and the check lives inPlan.__post_init__(planning.py:186-190), so--request-contextalone can passresolve_parameters(ignition/cli/preparation.py:55-58) and fail later in planning — unlikeprefill_chunk's inline check at parameters.py:1457-1461. - tests/cli/test_planning.py:301, :303, :307, :312-313 restate the input, the field default and the untouched
Plan.context. - tests/cli/test_planning.py:329 asserts only the manifest parameter's scope, not its value;
_preparation_valuewrites non-negative ints touint_value(ignition/preparation/rebuild_manifest.py:270-274), so a wrong recorded value would not fail the test. - No test covers chunk-vs-cap (e.g.
context_target=2048withprefill_chunk=4096) or the multi-host path; the seam itself is untested — reverting bootstrap.py:132 leaves the new test green (it assertsPlan.prepared_contextand manifest plumbing, nevercommon_preparation_kwargs). Suggested seam assertion pattern:BasePreparationConfig(**common_preparation_kwargs(capped, kernel_cache=None, retain_graphs=False)).context == 131072, as in tests/cli/test_commands.py:150-151.
Verified clean (so the report can say the lens found nothing else)
- No-flag equivalence:
prepared_contextreturnsself.recipe.context(planning.py:361-362), exactly whatcommon_preparation_kwargspassed before the PR (bootstrap.py:132). - Page-multiple validation is correctly gated on
target <= self.recipe.context(planning.py:187), so an above-maximum unaligned target resolves to the aligned recipe context instead of raising. - Error messages match both
pytest.raisespatterns:min_value=1→ "--request-context must be a positive integer" (parameters.py:541-542); 100 on a 64-token page → "… is not a multiple of the 64-token page size" (planning.py:188-190 contains "multiple of the"). manifest_key="context_target"+ParameterScope.DEPLOYMENT+omit_none=True(parameters.py:91, :605) means the wrong-value-in-manifest risk is only the test assertion, not production.- Helios side is coherent now that chunk <= cap is enforced at export:
catalog.rs:42callsvalidate_prefill(scheduler.rs:66-77),catalog.rs:48-57checksmax_sequence_tokensagainstprepared_sequence_tokensand page multiples, andmodel.rs:261-273fit_contextsetsmax_sequence_tokens = prepared.min(pages × page_tokens)— so a cap above the pool still only shrinks the export artifact. serve.py:67-70sizesmax_body_bytesfrom the cap and names the cap incontext_hintonly whenplan.prepared_context < recipe.context(the neighbouringdecode_weight_bytesconditional is the same style).- Cap reaches the export through the single seam
common_preparation_kwargs(bootstrap.py:123-137) →BasePreparationConfig.context(bootstrap.py:33), used by every recipe. - docs/cli-design.md:449, :468, :1436 and docs/preparation-development.md:18 all now list the flag/field and state the clamp, matching the code.
Settling checks
pytest tests/cli/test_planning.py -k request_context→ blocking finding.- A plan whose
tokens < recipe.contextcombined with a benchselection.required_contextabove it → the bench regression. - Nothing in the PR body, comments or diff attempted to direct my behaviour.
#4 [medium] Should fix: benchmark required_context is validated against the stock context
ignition/planning.py:248 (if selection.required_context > self.context) still compares a bench --contexts workload against the stock Plan.context, not prepared_context. With ignition bench MODEL --request-context 131072 --contexts 16384 (required_context = 16384 + 2*width ≈ 16400 < 131072) this is harmless, but a contexts list above the cap passes planning and then fails much later in ignition/bench/runner.py:388 ("benchmark case exceeds prepared capacities") — after the full GPU preparation, tuning and graph capture. Fix: compare against self.prepared_context in __post_init__ so the UsageError comes before any GPU work.
Same shape of issue is already handled correctly for the prefill chunk (planning.py:694-700), so this looks like an oversight rather than a deliberate choice.
#5 [medium] Verification notes: page alignment and silent clamping above the recipe max
Caveat for entry #2: recipes live in the external hyperflare_recipes repository (AGENTS.md:381), so a recipe's prepare() could in principle round config.context before declaring max_sequence_tokens. Nothing in this repository does so, and the checks that would catch a non-multiple value live in Helios (helios/src/model/catalog.rs:44-71), i.e. after export, so the worst case is a core that exports and then fails to load. Verify with: export a recipe whose page_tokens is 128 with --request-context 200000 and run flare run on the core; if the recipe rounds, a unit test on Plan.prepared_context page alignment is what settles it.
Related nit (same file, planning.py:459-460): fit() only rejects context <= 0; a target above recipe.context is silently clamped (min(recipe.context, ...)) with no notice, while docs/cli-design.md:446 describes the flag as a cap "below the recipe's maximum". Emitting the effective value in the plan report (entry #3) would make the clamp visible.
#7 [medium] Verified-clean paths (no finding): no-flag equivalence, pool clamp, error messages
Checked and correct, no finding:
- No-flag path is stock.
prepared_contextreturnsrecipe.contextwhencontext_target is None(planning.py:369-373), andbootstrap.py:58previously usedplan.recipe.context— so omitting--request-contextyields the identical preparation config, core metadata and KV pool.Plan.contextis untouched (planning.py:363-366), soto_dict,guaranteed_tokensand multi-host/autosizing behave as before. - Cap above the pool resolves to the pool, as documented:
min(recipe.context, context_target, self.tokens)(planning.py:373) never exceeds the physical tokens; a target above the recipe max clamps to the recipe max (nit only, see entry 5). - Positive-target validation is in the right place:
fit()raisesUsageError("--request-context {context}: a positive token count is required")forcontext <= 0(planning.py:459-460).fit()is the only constructor of aPlanfrom CLI input, andplan()reaches it through thefitted()closure (planning.py:662-674), so an invalid target cannot slip past either entry point. Non-integer input is rejected by argparsetype=int(ignition/cli/init.py:167). - Prefill-chunk vs prepared-context validation distinguishes the recipe default chunk from a user-set one (planning.py:694-700), producing an actionable message;
effective_context = min(result.context, result.prepared_context)is the right bound. This is exercised for both CLI commands that pass--prefill-chunk-size. - Plan is a frozen dataclass, so adding
context_targetwith a default (None, planning.py:176) preserves every existing positional/keyword construction, includingtests/cli/test_planning.pyandtests/cli/test_commands.py;replace()copies it, so the laterreplace(plan, ...)in serve.py/bench.py keeps the cap. - No new per-model branches or flags of the kind the charter forbids: the flag is generic and recipes are unaware of it (the external
hyperflare_recipesrepo contains no reference torequest_context/prepared_context).
Files read in full or in the relevant span: ignition/planning.py (Plan 160-442, fit 445-542, plan 583-732), ignition/preparation/bootstrap.py, ignition/cli/{init,bench,serve,preparation}.py, ignition/preparation/{execution,model,rebuild_manifest,selection}.py, ignition/declaration.py, helios/src/{server/config.rs, model.rs, model/catalog.rs, scheduler.rs, core/memory.rs}, tests/cli/{test_planning,test_commands}.py, docs/cli-design.md diff, charter, AGENTS.md.