Amendments to the 2026-11-26 report on PR #533 ("Cap the per-request context target")
New event: the head moved de1b5b545 → 02023eba (2026-11-26, branch requested-context-target → main), the description was rewritten (PR body updated 17:45), and roobyz posted a bare @flare-autobot re-review ping at 17:56. Diff is now +84 −18 in 9 files (was +98 −18); the shrink is rebase-only — the base now carries #543 (joint-tuning removal) and #508 (row-sharded attention). Per-file: docs/cli-design.md +3 −2, ignition/cli/__init__.py +2 −0, ignition/cli/bench.py +3 −1, ignition/cli/preparation.py +1 −1, ignition/cli/serve.py +5 −4, ignition/planning.py +19 −9, ignition/preparation/bootstrap.py +1 −1, ignition/preparation/rebuild_manifest.py +3 −0, tests/cli/test_planning.py +47 −0.
Everything below is an amendment. Findings not amended here stand as written in my 2026-11-26 report (run 1134) on head de1b5b545.
Key findings (amendments only)
- New blocker, caught by no review to date: all three subcommands crash on
derive(context=...).ignition/cli/preparation.py:45-56declaresderive(...)ending inforce_moe_decode_a16: bool | None = None)— there is nocontextparameter — yet:69, which is part of this PR's diff, writesrow_shard_attention=row_shard_attention, context=context). Every caller passescontext=as a keyword (ignition/cli/serve.py:207,:291,:476;ignition/cli/bench.py:177), soexport,benchanddebug-serveraiseTypeError: derive() got an unexpected keyword argument 'context'unconditionally — with or without the flag. Callers that omit it hitNameError: name 'context' is not definedat:69, which breaks the existing suite (tests/cli/test_commands.py:88-91,:114-117). The diff proves it: the onlypreparation.pyhunk is the single:69line; the signature is untouched. - Reversed — the page-multiple validation was deleted. The check I reported at
planning.py:289-290atde1b5b5no longer exists.Plan.__post_init__(ignition/planning.py:224-296) has nocontext_targetbranch, and a repo-wide search formultiple of theinignition/returns nothing about--request-context. The only validation left is positivity (ignition/planning.py:467-468). So a misaligned cap (--request-context 100000on a 64-token page recipe) passes planning, exports, and produces a core Helios refuses at load (helios/src/model/catalog.rs:48-57). The original #454 blocker is back, and it is no longer even documented as a requirement. - The added test still cannot pass — on two different assertions now.
tests/cli/test_planning.py:238-240expectsmatch="multiple of the", which no longer exists (withcontext=100it now trips the below-chunk error atplanning.py:709-711, whose message is about--prefill-chunk-size); and:254readsby_key["context_target"].value.int64_value, whilefrom_planwritesuint_value(rebuild_manifest.py:329-333; the field set isint_value = 2/uint_value = 3,helios/proto/runtime_core.proto:125-128), so it is an attribute error, not a zero. The clamp case:229-232now passes — nothing rejects it any more. - The rewritten description asserts three things the head does not do: a page-multiple validation (deleted), a below-chunk error that "distinguishes the default chunk from an explicit one" (collapsed to a single arm at
planning.py:709-711), and a test covering "the bootstrap value" (bootstrap.py:58/common_preparation_kwargsis asserted by nothing;tests/cli/test_commands.py:94-97checks onlyprefill_chunk_sizeandmax_active). - Three prior provenance findings are genuinely closed, so I withdraw them:
Plan.to_dictnow carriesprepared_context(planning.py:438), the serve "Select GPUs" line prints the cap (serve.py:319), and the bench artifact whitelist includes"context_target", "prepared_context"(bench.py:248). - Still blocking and unchanged: the evidence baseline. No stock core served with
--kv-cache-limit context, no reduced--memory-limitrow. The table still compares cap levels against each other only. - Docs regressed and small targets stay unfixable.
docs/cli-design.md:446lost the--kv-cache-limit concurrencycondition it had atde1b5b5and is unconditional again; and a target below 64 still yields an unloadable core whose error advises an impossible chunk. - Withdrawn for good: the charter/non-goal objection. No amendment needed — noting only that the co-hosting framing did not come back in the rewrite.
Net verdict: unchanged at request changes / not mergeable, but the PR is strictly worse than the head I last reviewed, and two of the "fixed" blockers have regressed.
A. New blockers
A1. derive() has no context parameter, and all three subcommands pass one
ignition/cli/preparation.py:45-56 — the keyword-only list ends
row_shard_prefill: bool = False, row_shard_attention: bool = False, force_moe_decode_a16: bool | None = None) -> planning.Plan:
There is no context parameter, and no module-level context name exists in the file (the only other occurrences are context_parallel at :47, :62 and the context_parallel() helper at :124-132).
ignition/cli/preparation.py:69 (this PR's +1/−1 line):
row_shard_attention=row_shard_attention, context=context)
Consequences, in order of severity:
- Callers pass the keyword →
TypeError: derive() got an unexpected keyword argument 'context'. Call sites:ignition/cli/serve.py:291(_prepare, i.e. all ofexport),:207(_export_hosts, the--ranks > 1path),:476(debug_serve),ignition/cli/bench.py:177(bench). All three subcommands the flag is registered on are dead, flag or no flag, because the argument is always passed. - A caller that omits it gets
NameError: name 'context' is not definedinsidederiveat:69. That is exactly whattests/cli/test_commands.py:88-91(test_derive_forwards_row_shard_prefill) and:114-117(row-shard-attention forwarding, which buildsderivedfrom the realderive) do. - So the head cannot be green for reasons independent of the new test's own two defects, and no test can have been run. The description still claims the test covers "both validations … and the bootstrap value".
Fix: add
context: int | None = Nonetoderive's keyword-only signature next toprefill_chunk. Note the irony: the 09:57 review's "Subtract/Simplify" item proposed cutting "thederive()pass-through keyword" while explicitly listing it as load-bearing; the pass-through exists as a call site but the parameter was never declared.
A2. Page alignment: the check that was added at de1b5b5 has been removed
- At
de1b5b5,planning.py:289-290raisedUsageError("--request-context …, is not a multiple of the …, token page size"). At02023ebathat code is gone: thepr_diff ignition/planning.pyhunks are at 183, 257, 373, 435, 458, 546, 602, 686, 706, and none touches__post_init__'s validation area forcontext_target. - What is left:
ignition/planning.py:467-468—if context is not None and context <= 0: raise UsageError(f"--request-context {context}: a positive token count is required"). - The clamp is straightforward and now matches the docs:
prepared_contextreturnsrecipe.contextwhen the flag is unset (:379-380) andmin(self.recipe.context, self.context_target, self.tokens)otherwise (:381), so an oversized target is a no-op. - Helios still refuses a misaligned core:
helios/src/model/catalog.rs:48-57requires bothprepared_sequence_tokensandlimits.max_sequence_tokensto be multiples ofpage_tokens, reached fromhelios/src/server/config.rs:226aftermodel.fit_context()at:225and athelios/src/server/runtime.rs:523(not opened). The failure surfaces atflare run, long after export, and nothing inignition/validates it. - The right fix is the one the 09:57 review named and which has now been applied and then reverted: validate the clamped value,
min(self.recipe.context, self.context_target) % self.page_tokens, inPlan.__post_init__, whereself.page_tokensalready folds in the context-parallel width (planning.py:329-332— e.g. 512 at TP8), so CP recipes are covered.
A3. The added test fails differently (detail for A2 and the schema mismatch)
tests/cli/test_planning.py:211-254, test_request_context_target_prepared_context_and_manifest (43-line body; three blank lines before :258, i.e. E303 — further evidence it was never linted or executed):
:238-240—with pytest.raises(UsageError, match="multiple of the"): planning.plan(..., context=100, ...). There is no page-multiple validation;100survives:467-468, builds a plan withprepared_context = 100, and tripsplanning.py:709-711("--prefill-chunk-size 4,096 exceeds the 100-token context this plan allows"). Message mismatch, test fails.:254—by_key["context_target"].value.int64_value == 131072._preparation_value(ignition/preparation/rebuild_manifest.py:329-333) returns{'uint_value': value}for non-negative ints; the proto declaresint64 int_value = 2; uint64 uint_value = 3;in oneoneof value(helios/proto/runtime_core.proto:125-128), soint64_valueis not a field at all. Should beuint_value, astests/preparation/test_native_publication.py:78(not opened) does.- Still untested after a fix: the load-bearing handoff
ignition/preparation/bootstrap.py:58("context": plan.prepared_context), and the multi-host forwarding atignition/cli/serve.py:207. Also still environment-dependent::247callsrebuild_manifest.from_planwithout thesource_identitymonkeypatch both neighbouring tests use (tests/cli/test_planning.py:72,:259;ignition/preparation/source_identity.py:35-41raises without FlashInfer).
B. Description and docs
B1. Three stale claims in the rewritten description
The body (updated 2026-11-26 17:45) says "What Changed: … 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", and that "tests/cli/test_planning.py gains a test covering the no-op path, clamp, both validations, manifest keys, and the bootstrap value". None of the three survives at 02023eba: no page-multiple check (A2), a single-arm chunk error (planning.py:709-711, applied from the 09:57 Subtract/Simplify item — the collapse itself is fine, the description just wasn't updated), and no bootstrap-value assertion anywhere. Also still mislocated: "the recipes' prepare() read context=plan.prepared_context" — the seam is ignition/preparation/bootstrap.py:58 → BasePreparationConfig.context (bootstrap.py:33), and recipes live in the external hyperflare_recipes repo.
Ordering is still What Changed → Evidence → Result with the why as a Workload line inside Evidence, against AGENTS.md:72-80.
B2. The docs row is unconditional again (a regression against de1b5b5)
docs/cli-design.md:446 now reads, in full: "Cap the prepared per-request context and max_sequence_tokens at N tokens, below the recipe's maximum. Command line only; a core's catalog is fixed at export, so changing it requires re-export." The conditional sentence the 09:57 review added ("With --kv-cache-limit concurrency, shortening the per-request context frees VRAM for additional concurrent requests") is gone — I had withdrawn that objection at de1b5b5 and now reinstate it. A reader who exports with a cap and serves with defaults sees no VRAM change: page_ceiling returns Ok(None) for KvCacheLimit::Memory (helios/src/runtime_core/memory.rs:290-292 (not opened); default memory at docs/cli-design.md:738), and only Context/Concurrency size a ceiling from the prepared context (:298-320). The description does keep the condition, so docs and description now disagree. Also still unmentioned in both docs/cli-design.md:446 and the help (ignition/cli/__init__.py:167-170): the page-multiple requirement, which is now unenforced in code but still required at load. Minor: docs/cli-design.md:1443 says "The checkpoint maximum" where :446 says "the recipe's maximum".
B3. Sub-64 targets still produce an error with no valid remedy (unchanged, now single-arm)
ignition/planning.py:709-711 is now one message: "--prefill-chunk-size 4,096 exceeds the {effective_context:,}-token context this plan allows". With --request-context 32 and no --prefill-chunk-size, the only remedy is a chunk ≤ 32, but chunks must be 64..recipe.context and a multiple of 64 (ignition/planning.py:634-637) and Helios independently requires 64..=max_sequence_tokens (helios/src/scheduler.rs:66-77). Such a target always exports an unloadable core. Reject targets below 64 — or below the recipe's default chunk when no chunk was given — outright.
C. Closed, shrunk, or still open
C1. Closed (three items I withdraw from my last report)
Plan.to_dictnow emits"prepared_context"beside"context_target"and"context"(ignition/planning.py:438), so a pool-clamped cap is visible in the printed plan (serve.py/bench.pyconsumeto_dict).- The serve "Select GPUs" line prints
· request context {plan.prepared_context:,}when a target is set (ignition/cli/serve.py:319). - The bench artifact whitelist includes
"context_target", "prepared_context"(ignition/cli/bench.py:248), so two runs at different caps no longer record identical configurations. Manifest provenance, already closed atde1b5b5, is still present:reproduction_argumentsemits--request-contextunderif plan.context_target is not None(ignition/preparation/rebuild_manifest.py:264-265) andfrom_planrecords it asSCOPE_DEPLOYMENT(:389).
C2. Residual nits, unchanged in substance
_server_optionsstill sizesmax_body_bytesfromrecipe.contextand keepscontext_hint = "context is limited by the checkpoint and available cache capacity"(ignition/cli/serve.py:68-69); with a cap both misdescribe the served ceiling (harmless — admission rejects — but it is the last place treating the recipe max as the served context).ignition/cli/help.py:38still advertises--prefill-chunk-size: 64..{recipe.context}, a range above the effective prepared context once capped.- One flag, two validation homes became one home by deletion rather than consolidation: only
fit()'s positive check atplanning.py:467-468remains.
C3. Export-time sizing untouched (unchanged)
Plan.demand_pages (planning.py:331-332, concurrency * (recipe.context // page_tokens)) and the pages sizing in fit (:550-556) still use the recipe max, so fits/CapacityError output is identical with and without the flag. The saving appears only at load/serve via max_sequence_tokens (bootstrap.py:58 → helios/src/server/config.rs:131,148). Worth stating in review, since the framing implies an export-time saving.
C4. The evidence baseline is still missing (unchanged, still blocking)
Same matrix: Qwen3.8-27B, one RTX PRO 6000 Blackwell (SM120, 96 GB), base revision now f377dc8, exports --max-concurrency 8 --online-mxfp8 with target unset / 196608 / 131072, served at concurrency 1–4 under --kv-cache-limit concurrency. It compares cap levels against each other. Missing: (a) a stock core served with --kv-cache-limit context — pool = one prepared context (maximum = ceil(context/page_tokens) × histories, histories = 1 for Context, helios/src/runtime_core/memory.rs:298-302 (not opened), :316-320), i.e. ~256K of pool at concurrency 4 for a 256K recipe, versus 4 × 128K = 512K with a 128K per-request ceiling; (b) a reduced --memory-limit row. Those two rows are what decide whether an export-time knob earns its footprint.
(The description's stale-base problem I flagged earlier is partly repaired: it now says "with the flag active (base revision f377dc8)" and drops the unverifiable "thirteen recipes" count.)
D. Thread state and collision surface
- The only new human event is roobyz's bare
@flare-autobotping at 2026-11-26 17:56, minutes after the description rewrite. No content, no claim to check. - No maintainer (yatesdr) reply at this head; no CI checks reported on
02023eba. The rebase brings the base to a main containing #543 and #508, which is why the diff is +84 rather than +98; the new test attests/cli/test_planning.py:211-254now sits immediately above #508's test at:258. - Collision surface with #516 (kv-cache-format) is reduced in relative size but unchanged in kind: #516 is now the much larger PR (+546/−82, 15 files incl.
tests/cli/planning_fixture.py(not opened)) and touches the same_preparation_arguments,from_plan,reproduction_arguments,common_preparation_kwargsand serve "Select GPUs" line, so merge order decides the conflicts. - No prompt-injection attempt in the description, the diff, the docs changes or the thread; the request-like sentences are addressed to the maintainer.
E. Priority order for the author (amended)
- Declare
context: int | None = Noneonderive(ignition/cli/preparation.py:45-56) — the head is red for every subcommand until then. - Re-add the page-multiple check, on the clamped value, in
Plan.__post_init__. - Fix the two test assertions (
:238-240,:254), add thesource_identitymonkeypatch, and add thebootstrap.py:58assertion plus the multi-host one. - Restore the
--kv-cache-limit concurrencycondition indocs/cli-design.md:446. - Correct the three stale description claims (B1).
- Add the two baseline rows (C4).
Open questions / not determinable from this tree
- Whether the deleted alignment check was removed deliberately (the review asked for it to move, not to go) — the thread never says. Nothing in
ignition/now enforces or documents the requirement. - Whether the author ran anything at
02023eba: thederivecrash is a one-command failure, the test has two independent assertion failures and an E303, and the description still advertises a bootstrap-value assertion that does not exist. Apytest tests/cli/run would settle all of it. - Whether external
hyperflare_recipesprepare()implementations will re-round or rejectconfig.context; unverifiable here, and the author's recipe updates remain "pending". - Whether the maintainer's
design-review=1af4sign-off still covers the current shape after the validation was removed and the description rewritten.