#1 [high] PR #533 state, diff shape, and what is verified clean
PR #533 "Cap the per-request context target", author roobyz, head 1a006c6, +35/−15, 7 files, no reviews, no CI. Supersedes closed #454 (CHANGES_REQUESTED by yatesdr, 2026-11-23). Discord line present ("Discord: rzr2020"), so no Discord finding.
Load-bearing change: ignition/preparation/bootstrap.py:58 "context": plan.prepared_context (was plan.recipe.context) in common_preparation_kwargs (bootstrap.py:47-65) — the single funnel to BasePreparationConfig.context (bootstrap.py:33). Everything else (+34 lines) is plumbing to that datum.
Verified: cap reaches the core — helios/src/server/config.rs:131 reads max_sequence_tokens as prepared_sequence_tokens, :148 sets limits.max_sequence_tokens, enforced at helios/src/server/request.rs:350 and scheduler.rs:2289/:2358.
Verified no-op when unset: planning.py:369-373 returns recipe.context; Plan.context untouched (planning.py:363-366).
Other paths that do thread the flag: serve.py:289 (_prepare), serve.py:472 (debug_serve), bench.py:177; derive() at ignition/cli/preparation.py:56,68 → planning.plan(..., context=) :591,674 → fit(..., context=) :453 → Plan(context_target=context) :535.
Plan is a frozen dataclass, context_target default None (planning.py:176) so all existing constructions still work.
Positive-target check: planning.py:459-460 inside fit.
Chunk check: planning.py:692-701 with effective_context = min(result.context, result.prepared_context).
Reproduction/manifest paths with no cap: rebuild_manifest.py:231-318 (reproduction_arguments), :343-395 (from_plan), planning.py:389-442 (to_dict, "context" at :430).
No test anywhere: grep of tests/ for request_context|prepared_context|context_target → no matches.
Flag registration + help: ignition/cli/init.py:167-170, group "capacity and compression" (shared by export/bench/debug-serve).
Docs: docs/cli-design.md:446 new row; also rewords :1443 and :1493.
#2 [high] Blocker 1: --request-context silently dropped on multi-host export
ignition/cli/serve.py:193-206 — _export_hosts calls planning.plan(...) with mixed_prefill/prompt_logprobs/expert_scale_compression/online_mxfp8/mla_compute_mode/row_shard_prefill and no context=; the last keyword is row_shard_prefill=args.row_shard_prefill (:206). Reached from export() at serve.py:153-156 when args.ranks > 1.
Because plan() defaults context=None (planning.py:591), context_target stays None, prepared_context returns recipe.context (:371-372), so the core is prepared at the recipe maximum with no warning. Violates charter "Don't silently ignore API fields … Never accept it and quietly drop it (#417)"; multi-host export is a supported shape (AGENTS.md:157-163) and is where the pool is largest.
Fix: add context=args.request_context to the call.
Test that would pin it: a planning-level assertion that a 1-host and 2-host plan of the same recipe produce the same prepared_context, or a check that common_preparation_kwargs(plan)["context"] honours the flag.
#3 [high] Blockers 2-5: page alignment, unreported setting, bench check, conditional VRAM claim
BLOCKER 2 — the cap is never required to be page-aligned, so an exported core can fail to load.
Producer: ignition/planning.py:369-373 min(recipe.context, context_target, tokens), consumed at bootstrap.py:58 → BasePreparationConfig.context → the core's server config max_sequence_tokens (helios/src/server/config.rs:131 prepared_sequence_tokens, :148 limits.max_sequence_tokens).
Helios rejects a core unless BOTH values are exact multiples of the page size: helios/src/model/catalog.rs:50-57 (is_multiple_of(page_tokens.max(1)), is_multiple_of(page_tokens)), error at :70 "invalid prepared model configuration". Also model.rs:268 fit_context.
Only validation today: positivity at planning.py:459-460, and the chunk check at :694-700. Nothing in ignition/ checks a multiple-of-page rule (grep for "% page_tokens"/is_multiple → only the prefill-chunk multiple-of-64 check at :621-623).
Consequence: ignition export MODEL --request-context 200000 with a 128-token page = 1562.5 pages → prepare/tune/export succeed, flare run dies with "invalid prepared model configuration" naming neither the flag nor the page size.
Fix (smallest, one home): validate/floor in Plan.__post_init__ (planning.py:212-289, where plan-field invariants already live) against self.page_tokens — either reject with the nearest lower multiple, or floor the way guaranteed_tokens floors (planning.py:378). This also absorbs the <=0 check at :459-460, so the two checks become one and cannot be bypassed by a direct Plan construction. Caveat: pages are 0 before fit's replace (:541), so validate context_target % self.page_tokens, not prepared_context % ....
BLOCKER 3 — the cap is absent from the plan report and the rebuild manifest.
- Plan.to_dict (planning.py:389-442) publishes
"context": self.context, "checkpoint_context": self.recipe.context(:430) and nothing about the target.self.contextis deliberately stock, so a core exported with --request-context 131072 printscontext: 262144— the printed plan actively misreports what was prepared. Printed at serve.py:215, serve.py:485, bench.py:182; bench copies a hand-picked key list into details["configuration"]["preparation"] (bench.py:243-248). - reproduction_arguments (rebuild_manifest.py:231-318) emits --max-concurrency (:257), --prefill-chunk-size (:263), --row-shard-prefill (:306) etc. and never --request-context, so
flare inspectprints an export command that rebuilds the uncapped core. - from_plan (rebuild_manifest.py:343-395) has a SCOPE_DEPLOYMENT parameter per sibling option (prefill_chunk :387, max_concurrency :380, row_shard_prefill :392) and none for the cap, so nothing distinguishes two cores that differ only in prepared context.
Note the core's own catalog IS correct (flare-cli/src/inspect.rs:263/805/993 read max_sequence_tokens from the core), so this is a report/manifest gap, not a core defect.
AGENTS.md:452-456 requires exactly this: "the plan, its printed report, and its recorded measurements describe what was prepared".
Fix: add
"prepared_context"(and/or"context_target") to to_dict; append--request-contextin reproduction_arguments behindif plan.context_target is not None; addadd('request_context', SCOPE_DEPLOYMENT, plan.context_target)in from_plan (add() skips None at :348-350, so uncapped packages stay byte-compatible). Scope question left to maintainer: prepared context changes the exported contract, which reads like SCOPE_COMBINE, but prefill_chunk — also contract-shaping — is SCOPE_DEPLOYMENT, so follow that precedent unless told otherwise.
BLOCKER 4 — benchmark validation still measures against the uncapped context.
planning.py:248 if selection.required_context > self.context: — self.context is untouched by this PR (planning.py:363-366), so with a cap set the check compares the workload with a context larger than the core serves, and the real failure lands in ignition/bench/runner.py:388 ("benchmark case exceeds prepared capacities") after the whole GPU preparation, tuning and graph capture. Fix: compare self.prepared_context (works there because bench sets benchmark_selection via replace at bench.py:178, after pages exist), and mention the cap in the message; alternatively reject the flag in bench like --mixed-prefill (bench.py:115-116).
BLOCKER 5 — the claimed VRAM benefit is stated unconditionally in the description and docs/cli-design.md:446, but the mechanism and the measurement are the runtime --kv-cache-limit.
page_ceiling (helios/src/runtime_core/memory.rs:284-331): KvCacheLimit::Memory returns Ok(None) — no ceiling; context gives one history, concurrency one history per active request. Default is memory (docs/cli-design.md:738, :828). The author's own table was produced with --kv-cache-limit concurrency. The pool in memory mode is filled from free memory and only bounded by the prepared virtual extent (memory.rs:403, :435 pages.iter().map(|s| s.maximum)), whose page maximum comes from recipe code outside this repo (AGENTS.md:379-381), so the unconditional claim cannot be verified from this tree.
Fix: state the condition in the docs row and the description, or add one default-mode measurement row. AGENTS.md:134-137 forbids publishing a claim whose material limitations must be guessed.
#4 [high] Should fix, Nits, and open questions
SHOULD FIX S1 — justification argues from a charter non-goal. docs/cli-design.md:446 says "buys concurrency headroom in a memory-constrained multi-model deployment"; description says "leave no room for a second model" / "the headroom a co-run needs". AGENTS.md:171-175 lists multi-model hosting/routing as requiring an explicit maintainer decision; none is cited. Fix: give the single-model rationale (a lower prepared context leaves more of the budget for prefix-cache snapshots or a higher --max-concurrency on the same GPU) or cite the sign-off. Do not restate a co-run use as the purpose.
S2 — no test touches any of this. grep of tests/ for request_context|prepared_context|context_target → no matches; the diff adds none. AGENTS.md:194-199 requires tests for affected behaviour. One test in tests/cli/test_planning.py using the existing fixture (_recipe at :22-54: context 262144, page_tokens 64, prefill_chunk 4096; _gpu at :57-59) covers everything cheaply:
- unset target → prepared_context == recipe.context (the no-op claim, asserted not narrated);
- target 65536 → prepared_context == 65536; target above the pool → == tokens;
- context=0 / negative → UsageError "a positive token count is required";
- non-page-multiple target → the new alignment rejection;
- common_preparation_kwargs(plan, ...)["context"] == prepared_context (the one line that carries the cap);
- to_dict/manifest keys and the reproduction arg, following the existing row_shard_prefill loop at :92-106. Add one forwarding assertion for the multi-host path so serve.py:206 cannot drift again.
S3 — measurement boundary and naming in the description. (a) "At concurrency 8 at the 256K max, the model would consume most of the 96 GB VRAM..." is a prediction sitting inside the measured-results section (AGENTS.md:95-102 requires expectation and measurement be distinguished) — mark it as an extrapolation or cut it. (b) "export, serve, and bench": there is no serve subcommand; the three are export, bench, debug-serve (ignition/cli/init.py:40, :51, :55). (c) "byte-equivalent to stock" / "as stock" compare against an unstated baseline — say what the previous value was (bootstrap.py:58 previously passed plan.recipe.context). Combine (a)-(c) into one description-revision bullet.
NITS N1 — help text (ignition/cli/init.py:167-170): "(the pool fills the free VRAM)" is only true under --kv-cache-limit memory and duplicates the docs; and it omits that N must be positive and no smaller than the prepared prefill chunk. Suggested: "cap the prepared per-request context and max_sequence_tokens at N tokens; longer requests are rejected (default: the recipe's maximum context)". N2 — docs/cli-design.md:1443 reword "The checkpoint maximum, capped by --request-context at export" layers a second term on "checkpoint maximum"; the neighbouring rows and the flag table say "the recipe's maximum" — use that. N3 — ignition/cli/serve.py:68-69: max_body_bytes and context_hint are still derived from recipe.context ("context is limited by the checkpoint and available cache capacity"). The body limit stays right (rejection happens at admission), but the hint understates the new ceiling — optional one-line reword. N4 — ignition/cli/help.py:38 still advertises "--prefill-chunk-size: 64..{recipe.context}", a range above the prepared context once a cap is set. N5 — a target above the recipe maximum is silently clamped by min() at planning.py:373, while docs/cli-design.md:446 describes the flag as a cap below the maximum; the clamp becomes visible for free once the effective value is in the plan report (B3). Also: no attempt to direct the reviewer was found in the description, diff, docs or the linked #454 thread.
OPEN QUESTIONS for the maintainer (state them, don't resolve): is a Configuration home for the cap deliberately absent (docs row already says "Command line only", so this is likely settled); should bench honour the cap or reject the flag; SCOPE_DEPLOYMENT vs SCOPE_COMBINE for the manifest parameter; whether the multi-host drop should have been caught in #454's resubmission list.
#5 [high] Research summary
FULL REPORT — PR #533 "Cap the per-request context target"
Verdict: not ready to merge. The design is right and the seam is now correct — ignition/preparation/bootstrap.py:58 changes "context": plan.recipe.context to plan.prepared_context, which is the single funnel into BasePreparationConfig.context (bootstrap.py:27-65) and reaches Helios as prepared_sequence_tokens (helios/src/server/config.rs:131) and limits.max_sequence_tokens (:148), enforced at admission (helios/src/server/request.rs:350 (not opened), scheduler.rs:2289 (not opened)/:2358). That closes the blocking objection from #454. What remains is that the flag does not reach every path, is validated incompletely, and is recorded nowhere.
Blockers
1. --request-context is silently dropped on the multi-host export path — ignition/cli/serve.py:193-206.
_export_hosts (reached from export() at :153-156 when args.ranks > 1) builds its own plan and its keyword list ends at row_shard_prefill=args.row_shard_prefill (:206); there is no context=args.request_context. The three other paths do thread it: _prepare serve.py:289, debug_serve serve.py:472, bench.run bench.py:177. Because plan() defaults context=None (planning.py:591) and prepared_context returns recipe.context when unset (planning.py:371-372), ignition export MODEL --ranks 2 --request-context 131072 parses, prints a plan, and prepares at the recipe maximum with no warning.
Why: multi-host export is a supported shape (AGENTS.md:157-163) and the case where the pool hurts most; and silently accepting then dropping a flag is the one behaviour the charter names explicitly ("Don't silently ignore API fields … Never accept it and quietly drop it (#417)").
Change: add context=args.request_context to the planning.plan(...) call at serve.py:206 — one keyword.
2. The cap need not be page-aligned, so the exported core can fail to load — ignition/planning.py:369-373.
prepared_context is min(recipe.context, context_target, tokens) with no alignment requirement. The only validations are positivity (:459-460) and the prefill-chunk check (:694-700). Helios rejects a core unless both the prepared length and limits.max_sequence_tokens are exact multiples of the page size (helios/src/model/catalog.rs:50-57, error at :70 "invalid prepared model configuration"). With a 128-token page, --request-context 200000 is 1562.5 pages: preparation, tuning and export all succeed, then flare run fails with an error that names neither the flag nor the page size.
Why: stock is safe only because recipe.context is a declared page multiple; a user value is the first unaligned input on this path. Every alignment check lives after export.
Change (smallest home): validate in Plan.__post_init__ (planning.py:212-289), where plan-field invariants already live — reject with the nearest lower multiple, or floor the way guaranteed_tokens floors (:378). Validate context_target % self.page_tokens (pages are still 0 before fit's replace at :541). This also absorbs the <= 0 check at :459-460 into the invariant that every Plan must satisfy, so a direct construction cannot bypass it.
3. The cap is absent from the plan report and the rebuild manifest — ignition/planning.py:389-442, ignition/preparation/rebuild_manifest.py:231-318 and :343-395.
Plan.to_dict publishes "context": self.context, "checkpoint_context": self.recipe.context (:430) and no key for the target; because Plan.context is deliberately stock, a core exported with --request-context 131072 prints context: 262144 — the printed plan misreports what was prepared. That dict is printed at serve.py:215, serve.py:485 and bench.py:182, and bench republishes a hand-picked subset as details["configuration"]["preparation"] (bench.py:243-248). reproduction_arguments emits --max-concurrency (:257), --prefill-chunk-size (:263), --row-shard-prefill (:306) and never --request-context, so flare inspect prints an export command that rebuilds the uncapped core; from_plan records a SCOPE_DEPLOYMENT parameter for every sibling option (prefill_chunk :387, max_concurrency :380, row_shard_prefill :392) and none for the cap, so two cores differing only in prepared context are indistinguishable.
Why: AGENTS.md:452-456 requires a new preparation setting to be "carried through the plan into the recipe's PreparationConfig, so the plan, its printed report, and its recorded measurements describe what was prepared". The core's own catalog is right, but the artifact that is supposed to describe and reproduce it is not.
Change: add "prepared_context" (and the requested "context_target" when set) to to_dict; in reproduction_arguments add if plan.context_target is not None: args.extend(['--request-context', str(plan.context_target)]); in from_plan add add('request_context', SCOPE_DEPLOYMENT, plan.context_target) — add() already skips None (:348-350), so uncapped packages stay byte-compatible.
4. The headline VRAM claim is stated unconditionally; the measurement and the sizing both depend on a runtime flag it never names — description and docs/cli-design.md:446.
The shipped docs row says shortening the context "buys concurrency headroom in a memory-constrained multi-model deployment, since the per-request cache allocation is sized from the prepared context", and the description reads "capping … shrinks the KV pool and frees VRAM". The pool ceiling that the cap controls comes from page_ceiling (helios/src/runtime_core/memory.rs:284-331), which returns Ok(None) — no ceiling — under the default KvCacheLimit::Memory; only context (one history) and concurrency (one per active request) apply it (docs/cli-design.md:738, :828-833). The table was produced with --kv-cache-limit concurrency, and the author's evidence line says so, but neither artifact states the condition. Under memory the pool is bounded by available memory and by the prepared virtual extent (memory.rs:403, :435), whose page maximum is set by recipe code living outside this repository (AGENTS.md:379-381), so the unconditional claim cannot be verified from this tree.
Why: AGENTS.md:134-137 forbids publishing a claim whose material limitations must be guessed, and this one ships in main's docs.
Change: state the condition in the docs row and the description ("with --kv-cache-limit context or concurrency; the default memory sizes the pool from free memory"), or add one memory-mode row to the table.
Should Fix
5. Benchmark validates against the uncapped context — ignition/planning.py:248. if selection.required_context > self.context still compares against min(recipe.context, tokens) (:363-366), which this PR deliberately leaves stock, so with a cap set a --contexts selection can exceed what the prepared core serves and pass planning; the failure then lands in ignition/bench/runner.py:388 (not opened) ("benchmark case exceeds prepared capacities") after the whole GPU preparation, tuning and graph capture. The PR already handles the analogous case for the chunk (:694-700), so this reads as an oversight. Change: compare self.prepared_context (one word; works there because bench attaches benchmark_selection via replace at bench.py:178, after pages exist) and name the cap in the message. Smaller than the alternative of rejecting the flag in bench.Settings.from_args the way --mixed-prefill is rejected (bench.py:115-116).
6. Nothing in the tree tests any of this — tests/ has no match for request_context, prepared_context, context_target. Given finding 1 (a forwarding bug) and finding 2 (an unvalidated input), AGENTS.md:194-199's requirement is not met. One test in tests/cli/test_planning.py using the existing fixture (_recipe :22-54 — context 262144, page_tokens 64, prefill_chunk 4096; _gpu :57-59) covers it: unset target → prepared_context == recipe.context; target 65536 → 65536; target above the pool → tokens; context=0 → UsageError; a non-page-multiple target → the new rejection; common_preparation_kwargs(plan, …)["context"] == prepared_context (the one line that carries the cap); and the to_dict/manifest/reproduction-arg assertions modelled on the existing row_shard_prefill loop at :92-106. Add one assertion that the multi-host path forwards the target.
7. Prose boundary and naming in the description (one bullet, mechanical): (a) "At concurrency 8 at the 256K max, the model would consume most of the 96 GB VRAM…" is a prediction inside the measured-results section — mark it an extrapolation or cut it (AGENTS.md:95-102); (b) there is no serve subcommand — the three are export, bench, debug-serve (ignition/cli/init.py:40, :51, :55); (c) "byte-equivalent to stock" and "as stock" compare against an unstated baseline — say that preparation previously passed plan.recipe.context (bootstrap.py:58).
8. The stated justification argues from a charter non-goal — description ("leave no room for a second model", "the headroom a co-run needs") and docs/cli-design.md:446 ("multi-model deployment"). AGENTS.md:171-175 makes multi-model hosting/routing require an explicit maintainer decision; none is cited. The flag itself is a preparation capacity and is in scope. Change: give the single-model rationale (a lower prepared context leaves more of the fixed budget for prefix-cache snapshots or a higher --max-concurrency on the same GPU), or cite the sign-off.
Subtract / Simplify
Could remove ~7 of +35 added lines, and roughly half of the new docs row, without losing behaviour:
- Collapse
prepared_contextontocontext(planning.py:368-373, −2 lines).min(recipe.context, target, tokens)is exactlymin(self.context, target); the five-line body becomesreturn self.recipe.context if self.context_target is None else min(self.context, self.context_target). - Delete the dead
min(planning.py:694, −1 line).effective_context = min(result.context, result.prepared_context)can never selectcontext—prepared_context ≤ contextalways, in both branches. Useresult.prepared_contextin both arms and the reader no longer has to prove an invariant. - Shorten the two chunk messages (planning.py:696-700, −2 lines). Keep the default/user-set distinction (the maintainer asked for it in #454), but drop "(a multiple of 64)" — it restates
--prefill-chunk-size's own help (cli/init.py:163-166) — and drop "or a larger --request-context" when the pool, not the target, is binding (result.prepared_context < result.tokens). - Shorten the help text (cli/init.py:167-170, −1 line). "(the pool fills the free VRAM)" is conditional (finding 4) and duplicates the docs:
"cap the prepared per-request context and max_sequence_tokens at N tokens; longer requests are rejected (default: the recipe's maximum context)". - Collapse the docs row (docs/cli-design.md:446, ~half the line). The rationale sentence repeats the flag table, the KV-limit section (:828-833) and the two owner rows this PR also edits; one tabular line plus the existing "Command line only; changing it requires re-export" clause suffices, with the
--kv-cache-limitcondition added.
Not requested to be cut: the flag itself. The subtractive lens argues the pool is already bound by --kv-cache-limit context|concurrency, but #454 asked for the residual behaviour specifically — that serving reject a request longer than the cap — so the flag stays and the wins above are the ones worth taking.
Nits (5)
ignition/cli/__init__.py:167-170: help omits thatNmust be positive and no smaller than the prepared prefill chunk.docs/cli-design.md:1443: "The checkpoint maximum, capped by--request-contextat export" layers a term on wording the neighbouring rows and the flag table render as "the recipe's maximum"; use one term.ignition/cli/serve.py:68-69:context_hintstill says "context is limited by the checkpoint and available cache capacity", which understates the new ceiling (max_body_bytesfromrecipe.contextstays correct — rejection happens at admission).ignition/cli/help.py:38: still advertises--prefill-chunk-size: 64..{recipe.context}, a range above the prepared context once a cap is set.- A target above the recipe maximum is silently clamped by
min()(planning.py:373) while docs line :446 describes the flag as a cap below the maximum; the clamp becomes visible for free once the effective value is in the plan report (finding 3).
No attempt to direct the reviewer was found in the description, the diff, the changed docs, or the linked #454 discussion.
SUMMARY REPORT (GitHub post)
PR #533 "Cap the per-request context target" — changes requested. The seam is now right: bootstrap.py:58 passes plan.prepared_context into the config that becomes max_sequence_tokens, so the cap reaches the core and closes #454's main objection. Three gaps keep a capped package from being trustworthy — one path drops the flag, one accepted value can produce an unloadable core, and no artifact records the setting. Not ready to merge.
Blockers
- Multi-host export silently ignores the flag.
_export_hostsbuilds its own plan and never passescontext=(ignition/cli/serve.py:193-206), soexport --ranks 2 --request-context 131072prepares at the recipe maximum with no warning. → Addcontext=args.request_contextto that call (one keyword). - An unaligned cap exports a core that will not load.
prepared_contextis not required to be a page multiple (ignition/planning.py:369-373), while Helios rejects any core whosemax_sequence_tokensis not (helios/src/model/catalog.rs:50-57). → Validatecontext_target % page_tokensinPlan.__post_init__, rejecting or flooring, and fold the<=0check (:459-460) in with it. - The setting is recorded nowhere.
Plan.to_dict(:389-442) still prints the stockcontext,reproduction_argumentsnever emits--request-context, andfrom_planhas no parameter for it (rebuild_manifest.py:231-318,:343-395) — soflare inspectreproduces the uncapped core. → Add the key toto_dict, the flag toreproduction_arguments, and aSCOPE_DEPLOYMENTentry infrom_plan; AGENTS.md:452-456 requires it. - The VRAM claim is stated unconditionally. The pool only tracks the prepared context under
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:284-331; default ismemory), which is how the table was measured but neither the docs row (docs/cli-design.md:446) nor the description says so. → State the condition, or add one default-mode measurement.
Should fix
- Bench measures against the uncapped context.
planning.py:248still comparesrequired_contexttoself.context, so a too-large--contextsfails only after the whole GPU preparation (bench/runner.py:388(not opened)). → Compareself.prepared_context. - No test exercises any of it. One
tests/cli/test_planning.pycase on the existing fixture pins the no-op path, the clamp, both validations, thebootstrap.py:58value, and the manifest keys — plus one assertion that the multi-host path forwards the flag. - Description mechanics (one bullet): the concurrency-8 sentence is a prediction inside the measured section — mark it or cut it; there is no
servesubcommand (export,bench,debug-serve); "byte-equivalent to stock" needs its baseline named. - Rationale argues from a charter non-goal. "Second model" / "multi-model deployment" needs a maintainer decision (AGENTS.md:171-175). → Give the single-model rationale, or cite the sign-off.
Subtract / Simplify — could remove ~7 of +35 added lines, plus half the new docs row:
- Collapse
prepared_contexttomin(self.context, target)(planning.py:368-373, −2) and delete the deadeffective_context = min(...)(:694, −1) — it can never selectcontext. - Shorten the two chunk messages (
:696-700, −2): keep the default/user-set split #454 asked for, drop "(a multiple of 64)" and the--request-contextadvice when the pool is what binds. - Shorten the help text (
cli/__init__.py:167-170, −1) — "(the pool fills the free VRAM)" is conditional and duplicates the docs. - Collapse
docs/cli-design.md:446to one tabular line; its rationale repeats the KV section and the two owner rows this PR edits.
Nits (5): help omits the positivity and chunk constraints; docs:1443 mixes "checkpoint maximum" with "recipe's maximum"; serve.py:69 context_hint understates the ceiling; help.py:38 still advertises a chunk range above the cap; an over-large target is clamped silently.
#6 [high] Subtract / Simplify findings with line-savings
Subtract / Simplify — "Could remove ~7 of +35 added lines", plus roughly half of the new docs row (docs/cli-design.md:446). Report this section verbatim in both reports.
- Collapse
prepared_contextontocontext— ignition/planning.py:368-373 (−2 lines).min(recipe.context, target, tokens)==min(self.context, target)sinceself.contextis alreadymin(recipe.context, tokens)(:363-366). Body becomesreturn self.recipe.context if self.context_target is None else min(self.context, self.context_target). - Delete the dead min — ignition/planning.py:694 (−1).
effective_context = min(result.context, result.prepared_context)can never selectcontext: prepared_context ≤ context in both branches. Useresult.prepared_contextin both arms of :695-700. - Shorten the two chunk messages — ignition/planning.py:696-700 (−2). Keep the default vs user-set split (explicitly requested in #454), but drop "(a multiple of 64)" (restates --prefill-chunk-size help at cli/init.py:163-166) and drop "or a larger --request-context" when the pool binds (
result.prepared_context < result.tokens). - Shorten the help text — ignition/cli/init.py:167-170 (−1). "(the pool fills the free VRAM)" is conditional (see blocker 4) and duplicates the docs. Suggested: "cap the prepared per-request context and max_sequence_tokens at N tokens; longer requests are rejected (default: the recipe's maximum context)".
- Collapse the docs row — docs/cli-design.md:446 (~half the line). The rationale sentence repeats the flag table, the KV-limit section (:828-833) and the two owner rows this PR also edits (:1443, :1493). One tabular line plus the existing "Command line only; changing it requires re-export" clause, with the --kv-cache-limit condition added.
Do NOT ask for the flag to be deleted: the subtractive lens argues --kv-cache-limit context|concurrency already bounds the pool (docs/cli-design.md:738, :828-833; memory.rs:284-331), but #454's maintainer asked for the residual behaviour — serving must reject a request longer than the cap. Keep the flag; take the line savings above. Also do not ask for expansion of anything on this list.
#9 [high] Adjudications: which lens findings I overruled (do not re-raise)
Head de1b5b5, 9 files +98/−18, no CI checks.
REJECTED 1 — Subtractive's "drop the flag, --kv-cache-limit already does it". --kv-cache-limit (helios/src/runtime_core/memory.rs:284-331, default memory = docs/cli-design.md:738, :828) sizes loaded KV at serve time; it cannot lower the exported max_sequence_tokens (helios/src/server/config.rs:131,147-148 from BasePreparationConfig.context, ignition/preparation/bootstrap.py:33,58). #454 asked for exactly the residual behaviour. Flag stays; subtract only the scaffolding listed in the Subtract section.
REJECTED 2 — Conventions #3 / Simplicity #1 / Subtractive #4: "collapse prepared_context to min(self.context, target) and delete effective_context = min(result.context, result.prepared_context) (planning.py:696)". FALSE: with context_target is None, prepared_context returns recipe.context (planning.py:373-374) which EXCEEDS pool-bound context = min(recipe.context, tokens) (:365-368) when pages are short. Folding to self.context would lower the declared max_sequence_tokens on a pool-constrained host with no flag → breaks the PR's headline no-op claim, and the PR's own test (tests/cli/test_planning.py:220 prepared_context == recipe.context) asserts the current semantic. So the min at :696 is load-bearing for the no-target case, and the property body must keep its early return. Both stay; do not ask for them.
REJECTED 3 — Subtractive #6: remove derive(context=...) (ignition/cli/preparation.py:56,68). derive is the single funnel all four entry points use (serve.py:206, :289, :472; bench.py:177); removing the keyword removes the capability. Conventions verified it matches the row_shard_prefill/online_mxfp8_scope threading style. Keep.
REJECTED 4 — Architecture's "drop the self.tokens term from prepared_context". Correctness verified the pool clamp as correct, and dropping it would make the new early bench check (planning.py:248) accept workloads the pool cannot serve. Keep the clamp; instead make it visible by reporting prepared_context (blocker-fix / should-fix S1) and by correcting the description's false "as stock" sentence.
ALREADY FIXED at this head, not re-raised: multi-host _export_hosts forwards the flag (serve.py:206); page-multiple validation exists (planning.py:289-290); to_dict/reproduction_arguments/from_plan record context_target (planning.py:432, rebuild_manifest.py:264-265, :390); bench compares against prepared_context (planning.py:248); description no longer argues multi-model co-run; docs row names --kv-cache-limit concurrency.
#10 [high] Report of 2026-11-26 run 2 — full report PR #533 (blockers, should fix, subtract, nits)
FULL REPORT — PR #533 "Cap the per-request context target" (head de1b5b5, base main, 9 files +98/−18, no CI checks, supersedes closed #454)
Verdict: Changes Requested. Design and seam are right: bootstrap.py:58 passes plan.prepared_context → BasePreparationConfig.context (bootstrap.py:33) → Helios prepared_sequence_tokens (helios/src/server/config.rs:131,147-148) → limits.max_sequence_tokens, bounded at load (helios/src/model.rs:268-272) and validated (helios/src/model/catalog.rs:43-70). Omission path is a true no-op (planning.py:373-374). What is left: the added test cannot pass, one validation checks the wrong quantity, and the cap is missing from the three surfaces the plan otherwise reports.
Blockers
B1. tests/cli/test_planning.py:229-232 cannot pass. planning.plan(..., context=500000) dies in the PR's own check planning.py:289-290: fixture page_tokens=64 (test:38; RankCosts at :43 leaves page_tokens None so Plan.page_tokens = recipe.page_tokens, planning.py:329-332) and 500000 % 64 == 32. __post_init__ runs via Plan(...) in fit (planning.py:528-537). No CI on the head, so it was never executed. Fix: see B2 (validating the resolved value makes this case pass as written and turns it into the proof of the documented clamp); else use 524288.
B2. Validation targets the requested value, not the served one — planning.py:289-290. The core receives prepared_context = min(recipe.context, target, tokens) (:371-375), so a target above the recipe max resolves to an aligned value yet is rejected (500000 → 262144 is fine; 262145 is refused). Contradicts docs/cli-design.md:446 ("below the recipe's maximum", default "the recipe's maximum context") and the description's "a cap above the pool resolves to the pool capacity". Fix (1 expression): validate min(self.recipe.context, self.context_target) % self.page_tokens. 100 still rejected (100 % 64 = 36), so the existing match="multiple of the" case keeps working.
Should Fix
S1. The cap is absent from the plan's printed line and recorded measurements — AGENTS.md:452-456. Plan.to_dict (planning.py:432) has context_target but not prepared_context, so with a cap set the pool clamp is silent and context (pool-bound) reads as the served ceiling. Serve's "Select GPUs" f-string (serve.py:302-316) enumerates every sibling preparation choice (row-shard-prefill at :316) and omits this one. Bench's details["configuration"]["preparation"] whitelist (bench.py:243-248, 17 keys) omits both, so two runs at different caps record identical configurations. Fix: "prepared_context": self.prepared_context in to_dict; · request context {plan.prepared_context:,} guarded in the f-string; add "context_target", "prepared_context" to the bench tuple. Three one-liners following adjacency precedent; also makes the pool clamp visible, which is what Architecture's "silent under-delivery" asked for.
S2. Description evidence: (a) the headline VRAM claim is unconditional but the pool only tracks the prepared context under --kv-cache-limit context|concurrency (memory.rs:290-302 returns no ceiling under memory, the default per docs:738, :828); the author's own commands use it and docs:446 says so — the description must too. (b) "a cap above the pool resolves to the pool capacity, as stock" is false: stock passed recipe.context unclipped (bootstrap.py:58 before this PR), so a cap above the pool can prepare a LOWER max_sequence_tokens than no flag; that is a material compatibility change (AGENTS.md:92-94, :103-109).
S3. Description structure/mechanics (one bullet in the summary): the four required questions are out of order (AGENTS.md:74-80, docs/design-review.md:140-150) — evidence leads, the "why" appears only as a Workload line; "Verified … at main c36a6a02" reads as if capped numbers came from main (the flag exists only on this branch); "thirteen recipes" is an unverifiable count (recipes are external, AGENTS.md:9-13); there is no serve subcommand.
Subtract / Simplify
Could remove ~17 of the +98 added lines (≈9 of the +57 test hunk, ≈8 of the +41 code/docs), plus about half of the new docs row:
- Test duplicates:
context=0andcontext=-1hit one branch (test:235-238, −2);assert d["context"] == capped.contextrestates :227 (−1); the 7-line "no context_target when unset" block (:259-265, −6) re-proves from_plan's genericadd()None skip (rebuild_manifest.py:350-352) already covered by the sibling manifest test (:92-106). Keep the clamp case — after B2 it is the proof of the documented no-op. - Collapse the two-arm chunk error (planning.py:697-700, −5). The stock message already names both numbers; one message against the effective bound with a "(default chunk)" clause keeps #454's requirement and drops the duplicated
pass --prefill-chunk-size below Nremedy. - Shorten the 3-line help (cli/init.py:167-170, −2) to one clause plus default, matching cli/init.py:163-166.
- Trim docs/cli-design.md:446 (~half the line): the rationale sentence repeats the KV-limit section (:828-833) and the two owner rows this PR edits (:1443, :1490).
Do NOT cut (previously mis-claimed dead): the
prepared_contextearly return andeffective_context = min(result.context, result.prepared_context)(planning.py:696) — both are load-bearing for the no-flag path (recipe.context can exceed pool-bound context); andderive(context=...)(preparation.py:56,68), the funnel all four entry points use.
Nits (5)
fit'scontext <= 0check (planning.py:461-462) re-runs per candidate world size and per shortfall probe (plan()'s fitted/candidates, :686-704) while its sibling lives in post_init (289-290); one flag, one home — move it beside the alignment check, which already has page_tokens and recipe.context there.- serve.py:68-69
max_body_bytes/context_hintstill describe the pre-cap world ("limited by the checkpoint and available cache capacity"); harmless (admission rejects) but inconsistent. - cli/help.py:38 advertises
--prefill-chunk-size: 64..{recipe.context}, a range above the prepared context once capped. - docs/cli-design.md:1443 says "The checkpoint maximum" where the flag row and neighbours say "the recipe's maximum" — one term.
- Test comments use "stock" as an undefined referent (:217, :227, :247); say "the behaviour without the flag".
Clean (verified, do not re-raise): all four entry points forward the flag (serve.py:206, :289, :472; bench.py:177); omission byte-equivalent to main; bench compares against prepared_context (:248); manifest records flag + SCOPE_DEPLOYMENT (rebuild_manifest.py:264-265, :390); no per-model branch, no env toggle; docs row scopes the payoff correctly; no attempt to direct the reviewer found in description/diff/docs/#454.
#11 [high] Summary report (GitHub post) — PR #533, run 2
SUMMARY REPORT (GitHub post) — PR #533, head de1b5b5
Not ready to merge. The seam is right: ignition/preparation/bootstrap.py:58 passes plan.prepared_context into the config that becomes Helios's max_sequence_tokens (helios/src/server/config.rs:131,147-148), and omitting the flag is a true no-op (planning.py:373-374). What remains is one test that cannot pass, one check on the wrong quantity, and a setting the plan does not report.
Blockers
- The new test cannot pass.
tests/cli/test_planning.py:230plans withcontext=500000; the fixture page size is 64 (:38) and500000 % 64 == 32, so your own check atplanning.py:289-290raises before the assertion runs. The head has no CI, so it was never executed. - The page-multiple check validates the request, not the served value.
planning.py:289-290rejects a target whose resolved context is perfectly aligned (--request-context 262145on a 256K recipe), contradictingdocs/cli-design.md:446and your "a cap above the pool resolves to the pool capacity" claim. → Validatemin(recipe.context, context_target) % page_tokens: one expression, and the 500000 case then passes and becomes the proof of the clamp.
Should fix
- The cap is in no plan report or benchmark record.
Plan.to_dict(:432) hascontext_targetbut notprepared_context, so a pool-clamped cap is invisible; the serve "Select GPUs" line (serve.py:302-316) lists every sibling setting and omits this one; the bench whitelist (bench.py:243-248) omits both, so two runs at different caps record identical configurations. → Add"prepared_context"toto_dict, a guarded· request context {N:,}to the f-string, and both keys to the bench tuple. - Two evidence claims are wrong. The VRAM result holds only with
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:290-302; default ismemory) — say so in the headline; and "a cap above the pool resolves to the pool capacity, as stock" is false, since stock passed the recipe maximum unclipped, so the flag can prepare a lowermax_sequence_tokensthan no flag (a compatibility change worth stating). - Description mechanics (one bullet): the four required questions are out of order (evidence leads, why arrives last as a Workload line —
AGENTS.md:74-80); "at main c36a6a02" reads as if capped numbers were measured on main; "thirteen recipes" is uncheckable; noservesubcommand exists.
Subtract / Simplify — could remove ~17 of +98 added lines, plus half the docs row
- Drop the duplicated test cases (
−9):0and-1hit one branch (:235-238),d["context"] == capped.contextrestates:227, and the 7-line no-key block (:259-265) re-provesadd()'s genericNoneskip already covered at:92-106. Keep the clamp case — with the blocker fixed it proves the documented no-op. - Collapse the two-arm chunk error (
planning.py:697-700,−5): the stock message already names both numbers; one message against the effective bound with a "(default chunk)" clause keeps #454's requirement without the duplicated remedy. - Shorten the help (
cli/__init__.py:167-170,−2) to one clause plus default, matching:163-166. - Trim
docs/cli-design.md:446(~half the line): the rationale repeats the KV-limit section (:828-833) and the owner rows you already edit (:1443,:1490).
Nits (5): move the context <= 0 check beside the alignment check so one flag has one home; serve.py:69 context_hint still describes an uncapped core; cli/help.py:38 advertises a chunk range above the cap; docs:1443 says "checkpoint maximum" where neighbours say "recipe's maximum"; test comments use "stock" as an undefined referent.
#12 [high] Correction to notes 10 and 11 (description-mechanics bullet)
SUPERSEDES #10 and #11 — only change: the "there is no serve subcommand" item is removed from both (unverifiable against the current description text; ignition/cli/init.py:40 registers export, debug-serve, bench, run). Everything else in #10 and #11 stands as written. Read #10 and #11 and substitute this bullet list where they mention the description:
S3 (full report): Description structure/mechanics (one bullet in the summary): the four required questions are out of order (AGENTS.md:74-80, docs/design-review.md:140-150) — evidence and headline result lead, the "why" arrives only as a Workload line; "Verified … at main c36a6a02" reads as if the capped numbers were measured on main, though the flag exists only on this branch (AGENTS.md:103-106); "thirteen recipes" is a count a reviewer cannot check, since recipes live in the external repository (AGENTS.md:9-13).
Summary bullet: Description mechanics (one bullet): the four required questions are out of order (evidence leads, the why arrives last as a Workload line — AGENTS.md:74-80); "at main c36a6a02" reads as if the capped numbers were measured on main; "thirteen recipes" is uncheckable.
All other bullets, citations, ordering and the "do not cut" list are unchanged from #10 (full report) and #11 (summary).
#13 [high] Research summary
Reviewed all five lens outputs against the code at head de1b5b5 and prepared both reports: the full report is scratchpad note #10, the GitHub-post summary is note #11, and note #12 is a small correction that replaces the description-mechanics bullet in both (I dropped the "no serve subcommand" item because I could not verify it against the current description text; the registered subcommands are export, debug-serve, bench, run at ignition/cli/__init__.py:40).
Verdict: Changes Requested (not ready to merge). The seam is correct and the omission path is a true no-op, so the flag stays. Two blockers: the PR's own new test cannot pass (context=500000 with a 64-token page is rejected by the PR's own check at planning.py:289-290; no CI ran on the head), and that check validates the requested value rather than the served one, contradicting the docs and the "cap above the pool resolves to the pool capacity" claim — both are fixed by validating min(recipe.context, context_target) % page_tokens, which also makes the 500000 case pass as written. Should-fix items cover the cap being absent from to_dict/the serve plan line/the bench record (AGENTS.md:452-456), and two incorrect evidence claims (the VRAM result is conditional on a non-default --kv-cache-limit; "as stock" is false because stock passed the recipe maximum unclipped). Subtraction removes ~17 of the +98 added lines plus half the docs row, and keeps its own section in both reports.
Four cross-lens claims I overruled after checking the code, recorded in note #9 so they are not re-raised: (1) do not drop the flag as a duplicate of --kv-cache-limit — the runtime flag cannot lower the exported max_sequence_tokens, which is exactly what #454 asked for; (2) the prepared_context early return and effective_context = min(result.context, result.prepared_context) are not dead — with no target, prepared_context returns recipe.context, which exceeds pool-bound context on a short-pool host, and the PR's own test asserts that semantic, so collapsing it would break the headline no-op claim; (3) derive(context=...) is the funnel all four entry points use and cannot be removed; (4) do not drop the self.tokens clamp — keep it and make it visible in the plan report instead.
#14 [high] Verification ledger: what I confirmed in code vs what is inferred
Head de1b5b5 (PR #533), base main c36a6a02. No CI checks on the head. pytest was NOT executed in any round — every behavioural claim below is from reading code, and is either arithmetic over constants or a schema lookup.
CONFIRMED BY DIRECT READ (safe to state plainly):
- tests/cli/test_planning.py:37-38 fixture context=262144, page_tokens=64; RankCosts at :43 leaves page_tokens unset (ignition/declaration.py:174 default None) so Plan.page_tokens falls back to recipe.page_tokens (planning.py:329-332). 500000 % 64 == 32 → plan() raises before the assertions at test:231-232. Test survives an aligned fix unchanged.
- helios/proto/runtime_core.proto:124-133 — PreparationValue oneof has bool_value=1, int_value=2, uint_value=3, float_value=4, string_value=5, list_value=6. No int64_value. rebuild_manifest.py:329-342
_preparation_valuereturns uint_value for int >= 0, so test:257 (int64_value == 131072) is wrong twice: AttributeError as written, 0 if renamed to int_value. Correct assertion:uint_value == 131072. - planning.py:289-290 validation in post_init runs for every Plan construction, including the one in fit (:528-537) built with pages=0, because page_tokens depends only on recipe/costs/context_parallel (:329-332) — so page_tokens is valid there and Architecture's "cannot validate in post_init" is wrong for the target form.
- planning.py:320-336: page_tokens = recipe.page_tokens * (context_parallel_size or world_size) when context parallel is on; minimum_pages = concurrency * (MINIMUM_REQUEST_TOKENS 8192 // page_tokens) (:32, :335-336).
- helios/src/model.rs:268-272 fit_context sets max_sequence_tokens = prepared_sequence_tokens.min((pages - draft_pages) * page_tokens); helios/src/model/catalog.rs:43-70 requires prepared_sequence_tokens and limits.max_sequence_tokens both multiples of page_tokens, max_sequence_tokens <= prepared_sequence_tokens, else "invalid prepared model configuration". So the alignment requirement is real and the runtime narrows to the physical pool itself.
- helios/src/server/config.rs:131,137,147-148: prepared_sequence_tokens and limits.max_sequence_tokens both come from BasePreparationConfig.context.
- helios/src/runtime_core/memory.rs:290-302: page_ceiling returns Ok(None) under KvCacheLimit::Memory; histories = active under Concurrency else 1. docs/cli-design.md:738 default is
memory; :828 says memory mode uses the remaining budget. So the VRAM payoff is conditional — verified. - ignition/cli/bench.py:243-248 whitelist of 17 preparation keys has no context key at all; plan.to_dict (planning.py:432) has context, context_target, checkpoint_context but no prepared_context.
- serve.py:302-316 f-string lists every sibling preparation choice (row-shard-prefill at :316) and no context.
- Four entry points forward the flag: serve.py:206, :289, :472, bench.py:177 (grep of ignition/ returns only these plus planning.py).
- No test/utility precedent break: tests/cli/test_commands.py:88-91 closes the loop from plan → common_preparation_kwargs → BasePreparationConfig; bootstrap.py:33 default context 262144; :47-65 is the single funnel.
UNVERIFIED / must stay qualified in the report:
- No pytest run, so "the test fails" is arithmetic + control flow, not an observed failure. Say it is one command to confirm (
pytest tests/cli/test_planning.py). - Whether external recipes (hyperflare_recipes, AGENTS.md:381) re-round config.context before declaring max_sequence_tokens — not in this tree, not checked.
- The VRAM table (RTX PRO 6000 Blackwell, Qwen3.8-27B, concurrency 1-4) is the description's claim; nothing in this tree pins it.
- The current PR description text was not re-read in this round; the "at main c36a6a02" and "thirteen recipes" items come from the Prose lens, which quotes the description. Treat as described-but-not-reverified: frame as wording risk, not a verified error. The
servesubcommand item was dropped for this reason.
#17 [high] Run 3 verdict: head 02023eba regressed the derive() funnel and lost the alignment check
Head reviewed: 02023eba (base f377dc85). PR #533, 9 files, +84/-18 (docs/cli-design.md +3/-2, cli/init.py +2, cli/bench.py +3/-1, cli/preparation.py +1/-1, cli/serve.py +5/-4, planning.py +19/-9, preparation/bootstrap.py +1/-1, preparation/rebuild_manifest.py +3, tests/cli/test_planning.py +47). No CI checks on head.
Delta vs previous review at de1b5b5 (important: do NOT re-raise fixed items):
- FIXED at this head:
Plan.to_dictnow emits context_target AND prepared_context (planning.py:438); bench preparation whitelist has "context_target","prepared_context" (bench.py:248); serve printed line shows· request context {prepared_context}guarded on context_target (serve.py:319); manifest reproduction arg (rebuild_manifest.py:264-265) and SCOPE_DEPLOYMENT parameter (:389). - REGRESSED/NEW: (a)
derive()has nocontextparameter (cli/preparation.py:45-56) yet :69 passescontext=context; (b) the page-multiple validation is GONE from planning.py (grep "multiple of" in ignition/ → only planning.py:636 prefill-chunk, help.py:38, cli/init.py:165); (c) test_planning.py:254 reads.value.int64_value, a field the proto does not have.
B1 (blocker): cli/preparation.py:45-56 signature ends row_shard_prefill: bool = False, row_shard_attention: bool = False, force_moe_decode_a16: bool | None = None — no context; line 69 row_shard_attention=row_shard_attention, context=context). No module-level context exists (search on the file: only :69 and prose at :125-131). Callers with context=args.request_context: serve.py:207 (_export_hosts), :291 (_prepare), :476 (debug_serve), bench.py:177 → TypeError unexpected keyword. Callers without it (tests/cli/test_commands.py:88 derive call, :114 row-shard-attention test) → NameError. Every preparation entry point is dead, flag or no flag. Fix: add context: int | None = None to the signature before force_moe_decode_a16.
B2 (blocker): no page-alignment validation exists. Plan.post_init (planning.py:224-296) validates row-shard/hyperconnections/MXFP8/bench but not context_target; fit() only checks context <= 0 (planning.py:467-468). Test asserts it: tests/cli/test_planning.py:238-240 pytest.raises(UsageError, match="multiple of the") with context=100. Actual outcome: no alignment error; chunk 4096 > effective 100 → UsageError "--prefill-chunk-size 4,096 exceeds the 100-token context this plan allows" (planning.py:709-711) → pytest fails with DID NOT MATCH. Load-time consequence: Helios rejects non-page-multiple prepared_sequence_tokens / max_sequence_tokens ("invalid prepared model configuration", helios/src/model/catalog.rs:50-57); reachable with --request-context 1000 --prefill-chunk-size 64 (1000 % 64 = 40, chunk fits), so export succeeds and flare run fails. Fix: validate min(recipe.context, context_target) % page_tokens (Plan.page_tokens at planning.py:335-338 is world-size dependent) and keep the "multiple of the" wording.
B3 (blocker): tests/cli/test_planning.py:254 .value.int64_value → AttributeError; proto declares bool/int/uint/float/string/list_value only (helios/proto/runtime_core.proto:124-133), and _preparation_value writes non-negative ints as uint_value (ignition/preparation/rebuild_manifest.py:329-333). Fix: uint_value.
#18 [high] Run 3 report: full report text (PR #533 @ 02023eba)
Full report — PR #533 "Cap the per-request context target" (head 02023eba, base main, 9 files, +84/−18, no CI checks)
Key findings: the shape is right (one optional frozen Plan field planning.py:186, one accessor :377-381, one keyword through fit/plan, one consumer line preparation/bootstrap.py:58, one flag in the shared "capacity and compression" group cli/init.py:167-168); omission is a true no-op; the reporting gaps from the last round are fixed. Three defects stop it: the derive() funnel no longer accepts the keyword (B1), the advertised page-multiple validation is absent while the test asserts it (B2), and the new test reads a proto field that does not exist (B3). Nothing was executed; pytest tests/cli/test_planning.py tests/cli/test_commands.py settles all three.
Blockers
B1 — derive() lost its context parameter. cli/preparation.py:45-56 vs :69. TypeError at all four CLI call sites (serve.py:207/291/476, bench.py:177); NameError for tests/cli/test_commands.py:88 and :114. Fix: add context: int | None = None. Cover it with one line in the existing test_derive_forwards_row_shard_prefill (pass context=131072, assert plan.context_target == 131072) — that line would have caught this twice-returning regression; no new test needed.
B2 — page-multiple validation absent. See note 1. Fix: validate min(recipe.context, context_target) % self.page_tokens with a "multiple of the" message; page_tokens is world-size dependent (planning.py:335-338).
B3 — .value.int64_value does not exist; use uint_value (proto :124-133, rebuild_manifest.py:329-333).
Should Fix
S1 — prepared_context bakes export-host free memory: return min(self.recipe.context, self.context_target, self.tokens) (planning.py:381), where tokens = pages*page_tokens from free_bytes (planning.py:360-369, 550-556 for pages). The same recorded flags (--request-context N) then reproduce a different core on a host with different free VRAM, and reproduction_args record only N (rebuild_manifest.py:264-265). It is also redundant: Helios applies exactly this clamp at serve time (helios/src/model.rs:268-272 fit_context). Fix (deletes a term): return min(self.recipe.context, self.context_target) (None arm unchanged), which also makes the description's "a cap above the pool is a no-op, matching stock" true by construction and keeps the chunk check's min at :709 load-bearing. Consequences to update: test_planning.py:226 → min(recipe.context, 131072); :232 → recipe.context; and the docs/description stop needing the "can prepare lower than stock" caveat.
S2 — description evidence: (a) the VRAM table holds only under --kv-cache-limit context|concurrency; page_ceiling returns Ok(None) for the default memory mode (helios/src/runtime_core/memory.rs:290-292; default docs/cli-design.md:738), and the author's own command line says so — attach the condition to the headline/Result, not just the command. (b) "a cap above the pool is a no-op, matching stock" is false at this head: stock passed recipe.context unclipped (bootstrap.py:58 before this PR) whereas the capped path returns min(recipe.context, target, tokens) → strictly lower max_sequence_tokens; either fix per S1 or state the compatibility change. (c) state the workload --kv-cache-limit/--max-concurrency cannot serve (a single request longer than N is now rejected at admission before it loads pages) — that is what #454 asked for.
S3 — two stale bounds still describe the pre-cap world: serve.py:68 max_body_bytes from recipe.context and :69 context_hint "limited by the checkpoint and available cache capacity" (a body sized for the checkpoint max is accepted by HTTP then rejected at admission); cli/help.py:38 advertises --prefill-chunk-size: 64..{recipe.context}, an upper bound preparation rejects once capped (planning.py:709-711). Use prepared_context (serve) and say the range follows the prepared context (help).
S4 — description mechanics (single bullet): the four questions are out of order (measurements lead, the "why" arrives last as a Workload line — AGENTS.md:74-80); "Verified … at main c36a6a02" reads as if the capped numbers were measured on main though the flag exists only here; "the thirteen recipes' prepare() read context=plan.prepared_context" names an uncheckable external count and misplaces the seam (bootstrap.py:58); docs/cli-design.md is missing from the changed-file list; and the description still advertises "a page-multiple validation" and a two-arm chunk error that the head does not have (reconcile after B2; the head has one message, planning.py:711).
Subtract / Simplify — could remove ~10 of the +84 added lines (~7 in the test hunk, ~3 in docs), plus half the new docs row
- tests/cli/test_planning.py:
assert capped.context == min(recipe.context, capped.tokens)(:227) restates :221;d["context_target"] == 131072(:242-244) restates :225; the 4-line proto round-trip (:250-253) re-proves from_plan's generic value/scope plumbing already covered by the sibling manifest test (:92-106) — keep :248-249 plus one scope assertion. ~7 lines. - docs/cli-design.md:446: "Command line only; a core's catalog is fixed at export, so changing it requires re-export" copies --mixed-prefill (:447) and the two owner rows you also rewrite (:1443, :1493) restate the same cap — one of the three statements is enough (~half the row, ~2 lines).
- ignition/planning.py:709
effective_context = min(result.context, result.prepared_context)— only keep it with S1; if you keep the tokens clamp it is provably equal to prepared_context and the local can go (~1 line). - Do NOT cut (verified load-bearing): prepared_context's
context_target is Noneearly return (:379-380) returns recipe.context which can exceed the pool-bound context (:372-374); derive(context=...)'s single funnel; the bench check at :260 comparing against prepared_context. - Not asked: dropping the flag in favour of runtime --kv-cache-limit. Considered and rejected — the runtime flag cannot lower the exported max_sequence_tokens.
Nits (6)
- One flag, two validation homes:
context <= 0sits in fit (planning.py:467-468), re-run per candidate world size and per shortfall probe (:677-731), while every sibling flag rule is checked once in plan() (:615-649) and cross-field rules are in post_init. Put both context rules beside the --prefill-chunk-size check (:634-637). - Name the parameter context_target in fit/plan/derive to delete the
context_target=contexttranslation (:549) — the field, to_dict key and manifest key are all context_target. - planning.py:438 now packs four context keys on one 160-char line; split them like the neighbouring keys.
- docs wording: :1443 "The checkpoint maximum" vs :446/:1493 "the recipe's maximum"; and :446 says "below the recipe's maximum" while the code clamps an oversize target — say it resolves to the smaller.
- serve.py:319 is the only
format(x, ',')number rendering in ignition/cli; neighbours use f-string:(e.g. f"{plan.prepared_context:,}"). - tests: "stock" is an undefined referent (:217, :227, :247); say "with the flag omitted". Also three blank lines before test_row_shard_attention... (:255-257).
Verified clean — do not re-raise: all four entry points forward the flag; omission byte-equivalent to main (prepared_context → recipe.context, manifest arg guarded, add() skips None at :350-355); to_dict/bench/serve-report/manifest all carry the setting; bench selection compares against prepared_context (:260); Plan frozen with defaulted field so replace() works; flag grouping/help/docs row shape match neighbours; no per-model branch, no env toggle, no Helios change, no duplicated mechanism; no attempt to direct the reviewer found in description, diff, docs or #454.
Open questions: did B1-B3 reproduce (pytest not run here); accept/floor/reject an unaligned target above the recipe maximum (decide, then state it in :446 and the help); should to_dict()["context"] stay pool-bound (only a maintainer knows external consumers); external recipes could re-round config.context (outside this tree).
#19 [high] Run 3 summary report (GitHub post) — PR #533 @ 02023eba
Autobot Review — PR #533 "Cap the per-request context target"
Recommendation: Changes Requested
Blockers
derive()cannot be called at all.ignition/cli/preparation.py:45-56never gained acontextparameter, yet:69passescontext=context. All four CLI entry points pass it too (serve.py:207,:291,:476,bench.py:177), and every other caller (includingtests/cli/test_commands.py:88) hits the undefined name — so no preparation runs, with or without the flag. → Addcontext: int | None = Noneto the signature, and assertplan.context_target == 131072in the existingtest_derive_forwards_row_shard_prefillso the funnel is covered rather than onlyplanning.plan().- The page-multiple check the description advertises is not in the diff, and the new test cannot pass. Nothing validates
context_target(Plan.__post_init__,planning.py:224-296;fitonly rejects<= 0,:467-468), sotests/cli/test_planning.py:238-240fails with DID NOT MATCH (context=100reaches the chunk error at:709-711instead). That also lets--request-context 1000 --prefill-chunk-size 64export a core Helios rejects at load (helios/src/model/catalog.rs:50-57). → Validatemin(recipe.context, context_target) % self.page_tokenswith a "multiple of the" message, and readuint_valueinstead of the non-existentint64_valueat:254(helios/proto/runtime_core.proto:124-133,rebuild_manifest.py:329-333).
Should fix
- Drop the export-host memory clamp from
prepared_context.planning.py:381returnsmin(recipe.context, context_target, tokens), wheretokenscomes from the free VRAM on the export host (:360-369,:550-556), so the same recorded flags produce a different core elsewhere; Helios already applies that clamp at serve time (helios/src/model.rs:268-272). →return min(self.recipe.context, self.context_target). This deletes a term, makes "a cap above the pool is a no-op, matching stock" true by construction, and keeps the chunk check'sminload-bearing. - Three evidence claims need adjusting. The VRAM table holds only under
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:290-292; defaultmemoryatdocs/cli-design.md:738) — put that on the headline, not only in the command; "a cap above the pool is a no-op, matching stock" is false at this head because stock passedrecipe.contextunclipped (bootstrap.py:58before the PR); and state the workload--kv-cache-limit/--max-concurrencycannot serve — a single request longer than N, rejected at admission before it loads pages (what #454 asked for). - Two bounds still describe the pre-cap world.
serve.py:68-69sizesmax_body_bytesfromrecipe.contextand hints "limited by the checkpoint and available cache capacity";cli/help.py:38advertises--prefill-chunk-size: 64..{recipe.context}, an upper bound preparation rejects once capped (planning.py:709-711). → Useplan.prepared_contextfor both. - Description mechanics (one bullet). Lead with the why before the measurements (
AGENTS.md:74-80); "Verified … at main c36a6a02" reads as if the capped numbers came from main; drop the uncheckable "thirteen recipes" count and name the seam (bootstrap.py:58); listdocs/cli-design.mdamong the changed files; and remove the "page-multiple validation" / "distinguishes the default chunk" clauses once the code matches.
Subtract / Simplify
Could remove ~10 of +84 added lines (~7 in the test hunk, ~3 in docs), plus about half the new docs row:
tests/cli/test_planning.py:227restates:221;:242-244restates:225; the four-line proto round-trip:250-253re-provesfrom_plan's generic value/scope plumbing already covered at:92-106— keep:248-249plus one scope assertion (~7 lines).docs/cli-design.md:446— drop the "core's catalog is fixed at export…" clause (copied from--mixed-prefill,:447) and revert one of the two owner-row rewrites (:1443,:1493) that restate the same cap (~half the row).ignition/planning.py:709— theeffective_contextlocal is only needed if thetokensclamp stays; with the fix above keep it as the clamp that pins the no-flag path (~1 line if you keep:381).- Do not cut:
prepared_context'scontext_target is Noneearly return (:379-380),derive(context=...), and the bench check againstprepared_context(:260).
Nits
6 nits: the <= 0 check lives in fit while its sibling belongs with plan()'s flag checks; rename the parameter to context_target; split the four-key to_dict line (:438); "checkpoint maximum" vs "the recipe's maximum" and the undocumented clamp in :446; format(x, ',') at serve.py:319 is the odd one out; and "stock" in the test comments is undefined.
#20 [high] Research summary
Reviewed all six lens outputs against the code at head 02023eba and rewrote both reports for the new head, which changed materially from the last round (de1b5b5): the reporting gaps are now fixed, but the derive() funnel regressed and the advertised page-multiple check was dropped.
The GitHub-post summary is scratchpad entry #19; the full report is entry #18; the head-delta and per-blocker evidence are entry #17.
Verified against the code at this head:
- B1 (new):
ignition/cli/preparation.py:45-56has nocontextparameter but:69passescontext=context; all four CLI call sites pass it (serve.py:207,:291,:476,bench.py:177) andtests/cli/test_commands.py:88hits the undefined name — every preparation entry point is dead, flag or no flag. - B2 (new, a regression from the previous head): no page-alignment validation anywhere (
planning.py:224-296,:467-468hold only positivity), sotests/cli/test_planning.py:238-240fails with DID NOT MATCH —context=100reaches the chunk error at:709-711— and a misaligned export still dies at load (helios/src/model/catalog.rs:50-57). - B3 (new):
tests/cli/test_planning.py:254reads.value.int64_value, which the proto does not declare (helios/proto/runtime_core.proto:124-133);_preparation_valuewrites non-negative ints asuint_value. - Should fix: the
prepared_contextclamp still bakes export-host free memory into the artifact (planning.py:381vs Heliosmodel.rs:268-272), which subtraction fixes by deleting a term and makes the "no-op, matching stock" claim true; three evidence claims still need scoping/correction;serve.py:68-69andcli/help.py:38still advertise the uncapped ceiling; one combined description-mechanics bullet.
Subtraction is preserved as its own section: ~10 of the +84 added lines plus about half the new docs row, with the three load-bearing items (prepared_context's early return, derive(context=...), the bench check) explicitly marked do-not-cut. Blockers are limited to correctness; the mechanical prose items are a single Should-fix bullet. Nothing was executed here and the head has no CI; pytest tests/cli/test_planning.py tests/cli/test_commands.py settles all three blockers.
#21 [high] Run 3 adjudications: lens claims dropped, kept, or rewritten (head 02023eba)
Reconciliation decisions for the run-3 report (notes 18/19), so the report never carries two contradictory asks:
- Diff count: the round's "what they changed" block is mostly base-branch churn (main gained #543 joint-tuning removal and #508 row-sharded attention between
de1b5b5and02023eba). The PR itself is 9 files, +84/−18 (pr_files), not the +98/−18 of the previous round. Use +84/−18 in both reports; do not describe the #543/#508 hunks as the author's changes. - Subtractive's headline "drop the flag entirely (~70 of 84 lines), the VRAM table is
--kv-cache-limit's behaviour" — overruled. The runtime flag sizes loaded KV at serve time and cannot lower the exportedmax_sequence_tokens; that datum is what #454 asked for. Kept as a one-line "considered and rejected" in the Subtract section (note 18, item 5) so the reasoning is visible without inviting the author to delete the feature. - Simplicity's fold suggestion — re-scoped. Its
return self.context if self.context_target is None else min(self.context, self.context_target)is only sound if thetokensterm is dropped too; taken literally withmin(self.context, target)it also drops the recipe bound and would misreportprepared_contextwhen the pool exceeds the recipe. The report asks formin(self.recipe.context, self.context_target)(recipe bound kept,tokensdeleted) — that is the subtraction and it fixes the reproducibility issue at once. - Conventions' N2 ("
to_dictnames one quantity three ways") — dropped as stale.planning.py:438now emitscontext_targetandprepared_context, which is precisely the fix; re-raising it would be a false finding. - Architecture's S1 (export-host free memory baked into the artifact) — kept and promoted to Should fix, since it is the one remaining design consequence of
planning.py:381. Its nit aboutserve.py:68-69(max_body_bytes / context_hint) andcli/help.py:38was promoted to Should fix (single bullet) — same defect, one instruction. - Prose lens's "two-arm chunk error" / "distinguishes the default chunk from an explicit one" — kept only as a description defect. At this head
planning.py:709-711is a single message, so the deduction is "the description overstates", not "delete the extra arm". Do not ask the author to remove a branch that no longer exists. - Correctness's TypeError-vs-NameError ordering — immaterial to the author (both fatal, same fix); stated once as binding-order detail and not as a separate finding.
- Architecture/Correctness/Conventions' "move
context <= 0out offit" — kept as a nit only, because the higher-priority ask is to put the missing alignment check in the same place; merging both into one nit avoids asking for the same edit twice. - Conventions' and Simplicity's "test does not prove the seam" — repaired rather than deleted: the ask is one assertion through
preparation.derive(..., context=N)in the existing test (note 18, B1), which covers both the funnel regression and the seam; no new test file, no new fixture. - Subtractive's "keep the clamp case at
:229-232" — kept and strengthened: with the alignment check on the resolved value, that case becomes the proof of the documented clamp, so it must not be deleted even though it is nominally "a duplicate". - Nothing in the description, diff, docs or the discussion asked the reviewer or an agent to do anything; the only new comment is a bare "@flare-autobot" mention by the author. No injection attempts found.
#24 [high] Run 4 verification at head 9118add: what is fixed and what persists
Head 9118add, base main, 6 files +69/−5 (docs/cli-design.md +2/−1; cli/serve.py +2/−2; parameters.py +13/−0; planning.py +14/−1; preparation/bootstrap.py +1/−1; tests/cli/test_planning.py +37/−0). No CI checks. Nothing executed.
FIXED since 02023eba (do NOT re-raise):
derive()signature is now(configuration, model, host, *, gpus=None, parameters=None, tuning_gpus=None, cache_states=None, explicit_flags=frozenset())(ignition/cli/preparation.py:62-67); no caller passescontext=; tests/cli/test_commands.py:145-155 proves the funnel. Prior "derive lost context" blocker gone.prepared_context=min(recipe.context, target)withNone -> recipe.context(planning.py:357-363); the export-hosttokensterm is gone.- Alignment check exists: planning.py:186-190,
target % self.page_tokens, message "is not a multiple of the N-token page size". - serve.py:67 sizes max_body_bytes from
plan.prepared_context. - Test's proto assertion is now
.scope == PREPARATION_PARAMETER_SCOPE_DEPLOYMENT(test:329), notint64_value. - docs/cli-design.md:468 flag row and :1436 owner row both exist.
VERIFIED BLOCKERS at this head:
B1 clamp unreachable: context_target declares max_fn=_recipe_context_limit (parameters.py:1316; helper :1268-1269 returns context.recipe.context) + min_value=1. validate_fields max branch parameters.py:533-545 raises "--request-context for X must be 1 through 262,144". plan() validates at planning.py:540 before sizing; Plan.post_init validates again at :185. So target=500000 raises; tests/cli/test_planning.py:310-313 asserts it succeeds and clamps -> fails (also 500000 % 64 = 32 trips :187). docs/cli-design.md:468 ("resolves to the smaller of N and the recipe maximum"), accessor docstring (planning.py:359), and the PR description ("min(recipe.context, N)") all describe unreachable behaviour. Dead min at planning.py:363.
B2 flag never in reproduction_args: RecipeParameters.reproduction_args (parameters.py:1469-1528) hand-emits only --max-concurrency (:1483) and --prefill-chunk-size (:1484), then skips every base field via base_field_names = {f.name for f in fields(RecipeParameters)} (:1491-1494). context_target is a base field (:1309) so it is skipped; repro_always=True (:1319) is dead metadata. tests/cli/test_planning.py:324-325 ("--request-context" in manifest["reproduction_args"]) fails. grep confirms no other emitter in ignition/.
B3 chunk-vs-cap: planning.py:594-596 compares params.prefill_chunk > result.context (min(recipe.context, tokens)), not prepared_context; parameters.py:1458-1462 bounds the chunk only by recipe.context. So --request-context 2048 --prefill-chunk-size 4096 passes all export checks, bootstrap.py:132 writes context=2048 as max_sequence_tokens, and Helios rejects at load: helios/src/scheduler.rs:66-73 "prefill_chunk_size must be divisible by 64 and within 64..=context". Bench check at planning.py:212 already uses prepared_context, so :594 is the inconsistent sibling.
SHOULD FIX (verified):
- No status_label on context_target (parameters.py:1309-1321) so the printed "Select GPUs." line never shows the cap: status_parts renders only specs with status_label (parameters.py:694-707, 1554-1559), called at serve.py:269.
- context_hint (serve.py:68) unconditionally names --request-context even when unset; sibling decode_weight_bytes is conditional (:70).
- docs closed enumerations omit the field: docs/cli-design.md:448-451 (universal RecipeParameters fields) and docs/preparation-development.md:17-19.
- help.py:46
Context: {recipe.context:,} tokensand--prefill-chunk-sizeupper bound still advertise the uncapped world; help/model_epilog has no Plan. - Evidence: VRAM table only under --kv-cache-limit concurrency (helios/src/runtime_core/memory.rs:290-292 returns Ok(None) for Memory; default
memoryat docs/cli-design.md:740). model.rs:268 fit_context confirms the pool clamp, so "cap above the pool shrinks only the artifact" is now true. - Prose (one bullet): four answers out of order, "Verified ... at main c36a6a02", uncheckable "thirteen recipes", table labels, changed-file list missing docs/cli-design.md.
SUBTRACTION (estimate ~14 of +69):
- tests/cli/test_planning.py: :301, :303, :307 restate inputs/Plan.context (3); :310-313 cannot pass (4); :326-328 proto round-trip setup duplicates the sibling manifest test (:92-106 region) (3). Keep :302, :308, :315-321, :324-325, and one scope assertion. Replace five accessor assertions with two seam assertions through common_preparation_kwargs -> BasePreparationConfig.context (bootstrap.py:123-137; pattern at tests/cli/test_commands.py:150-153). ~10 lines.
- parameters.py :1317 manifest_key (= field name; fallback at :607-612), :1318 scope (ParamSpec default :89), :1319 repro_always (dead per B2; :1516-1520 needs a non-None value anyway). 3 lines, with the caveat that prefill_chunk spells them out too.
- planning.py:363 the
minis dead under B1's rejection option (1 line) — resolves B1 in the subtractive direction only if rejection is chosen. - docs/cli-design.md:468 trailing "a core's catalog is fixed at export..." copied from :469; 0 lines but shorter.
- Do not cut:
context_target is None -> recipe.contextarm (:361-362), bootstrap.py:132, benchmark check :212, alignment check :186-190, serve.py:67-68.
NITS: alignment check placed in post_init (re-runs per candidate in fit's loop; siblings' rules are in plan()); docs:468 duplicate clause; help text says "page token count" and never states the range; to_dict emits context + checkpoint_context (:395-396, checkpoint_context has no reader anywhere — delete it rather than add prepared_context); demand_pages still uses recipe.context (:321); unused monkeypatch arg in the new test (:295) although from_plan calls source_identity (rebuild_manifest.py:290,327 -> RuntimeError without FlashInfer, source_identity.py:36-41) and sibling tests patch it (:159, :223, :333).
No reviewer-directed instruction found in description, diff, docs, or discussion.
#25 [high] Run 4 adjudications: which lens claims I kept, merged, or dropped
Head 9118add. Decisions applied to notes #20 (new verification note) when writing the run-4 reports:
KEPT, verified in code: Architecture B1/B2, Conventions B1/B2, Simplicity B1, Correctness B1/B2, Prose B1/B2, Subtractive findings 2-5, Architecture S1-S4 (S4 = evidence condition), Conventions S2 (status_label), Conventions S3 (doc enumerations), Simplicity finding 2 (test proves accessor not seam), Subtractive nit 3 (spec lines).
MERGED to avoid double asks:
- Architecture S1 ("help and the chunk bound describe the uncapped world"), Correctness nit 3 (model help) and Conventions N1 (unconditional hint) -> one Should-fix bullet: model_epilog Context line (help.py:46) + context_hint (serve.py:68).
- Architecture B2, Correctness B2, Prose S6 -> one blocker (chunk vs cap).
- Architecture/Conventions/Simplicity nits about post_init placement -> one nit.
- Conventions N2 ("to_dict names one quantity three ways") -> kept, but rewritten subtractively: delete
checkpoint_context(no reader in the tree; grep finds only planning.py:396) instead of addingprepared_contextas Correctness/Simplicity proposed. Subtraction wins. - All PR-description/prose items -> exactly one bullet.
DROPPED (stale or wrong at this head):
- Prior round's "derive() lost context" blocker and "int64_value" blocker: both fixed (preparation.py:62-67; test:329).
- Subtractive's headline "drop the whole --request-context flag (~68 of 69 lines), --kv-cache-limit already does this": overruled as an ask. The runtime flag bounds loaded KV at serve time and cannot lower the exported max_sequence_tokens, which is the one datum this PR exists to produce. Recorded as one "considered and rejected" line in the Subtract section so the reasoning is visible without inviting deletion.
- Correctness's "add
prepared_contextto to_dict" and Simplicity's "add alignment test for chunk-vs-cap pair": replaced by subtraction / an assertion inside the existing test. - Prose's "help string never states the range": kept as nit only (argparse renders 1..262,144 from max_fn — but see B1, that bound is the bug).
- Subtractive's suggestion that
ignition/cli/help.py:46should show the cap: not possible (help has no Plan) and it correctly describes the recipe; recorded as Should-fix "say the value is an upper bound", not "print the capped number".
CONFIDENCE: every blocker is a static read of cited lines; B1 is settled by pytest tests/cli/test_planning.py -k request_context (line 311), B2 by the same file (line 324), B3 by an assertion that plan(context_target=2048) raises on a 4096-chunk recipe. Nothing was executed.
#26 [high] Run 4 full report: PR #533 @ 9118add
Full report — PR #533 "Cap the per-request context target"
Head 9118add, base main, 6 files, +69/−5 (docs/cli-design.md +2/−1, ignition/cli/serve.py +2/−2, ignition/parameters.py +13/−0, ignition/planning.py +14/−1, ignition/preparation/bootstrap.py +1/−1, tests/cli/test_planning.py +37/−0). Open, ready for review, no reviews, no CI checks on the head. Supersedes the same author's closed #454.
Key findings
The shape of the change is right and should be kept — it is now stable across the last two heads and needs no rework. One optional field declared once on the universal RecipeParameters base (parameters.py:1309-1321), which the dynamic CLI, the manifest and reproduction-arg plumbing generate without per-model code; one Plan.prepared_context accessor (planning.py:357-363); one consumer line in common_preparation_kwargs (preparation/bootstrap.py:132); two serve-side bounds (serve.py:67). No Helios change, no per-model branch, no env toggle, and omitting the flag is byte-equivalent to main (prepared_context returns recipe.context). The size the PR set out to cut is now genuinely small.
Two behaviours are still wrong at this head, one is a load-time export defect, and they are all reachable with documented defaults. Nothing was executed: the head has no CI checks, so every claim below is a static read of the cited lines, and pytest tests/cli/test_planning.py settles all three blockers in one run.
Blockers
B1 — The declared upper bound makes the documented clamp unreachable; the PR's own test fails
Where: ignition/parameters.py:1309-1321 (declaration), :1268-1269 (_recipe_context_limit), :533-545 (enforcement); contradicted by ignition/planning.py:357-363, tests/cli/test_planning.py:310-313, docs/cli-design.md:468.
# ignition/parameters.py:1309-1321
context_target: int | None = param(
None, flag="--request-context", group="capacity and compression", metavar="N",
value_type=int, min_value=1,
max_fn=_recipe_context_limit, # :1268-1269 -> context.recipe.context
manifest_key="context_target", scope=ParameterScope.DEPLOYMENT, repro_always=True,
help="cap the prepared per-request context at N tokens; must be a multiple of the page token count")
validate_fields rejects a value above the resolved maximum with --request-context for <alias> must be 1 through 262,144 (parameters.py:536-540), and the bound is live on every path: plan() validates at planning.py:540 before sizing, fit validates again, and Plan.__post_init__ validates a third time (:185).
So the clamp at planning.py:363 can never fire, and the PR's only new behavioural test asserts exactly that unreachable branch:
# tests/cli/test_planning.py:310-313, fixture recipe context=262144, page_tokens=64 (:139-140)
oversized_params = replace(base_params, context_target=500000)
oversized = planning.plan(recipe, recipe.checkpoints[0], gpus, selected=(0, 1), parameters=oversized_params)
assert oversized.parameters.context_target == 500000
assert oversized.prepared_context == recipe.context
:311 raises UsageError ("1 through 262,144"), and even without the bound 500000 % 64 = 32 would trip the alignment check at :187.
Three public surfaces describe the behaviour the code forbids: docs/cli-design.md:468 ("resolves to the smaller of N and the recipe maximum"), the accessor docstring (planning.py:359), and the PR description ("min(recipe.context, N)"). A user who follows the docs and passes a large cap gets a hard usage error where the docs promise a reduction.
Requested change (one decision, then make all three agree): drop max_fn=_recipe_context_limit and keep min_value=1, so an oversize target clamps as documented and planning.py:363 becomes live; and run the alignment check on the served value (min(recipe.context, target)) rather than the raw target, so the check tests what reaches max_sequence_tokens. Keeping the rejection instead means deleting the test case, the min branch and the "smaller of" wording — a larger edit that contradicts the description's stated result. This is also a subtraction (see Subtract item 3).
B2 — --request-context never reaches reproduction_args, so a capped core is not reproducible
Where: ignition/parameters.py:1469-1528, especially :1483-1484, :1491, :1494.
RecipeParameters.reproduction_args overrides the generic loop, hand-emits --max-concurrency and --prefill-chunk-size (:1483-1484), and then skips every base-class field by name:
base_field_names = {f.name for f in fields(RecipeParameters)} # :1491
if dc_field.name in base_field_names or not spec.cli or not _is_enabled(...): continue # :1494
context_target is declared on RecipeParameters itself (:1309), so it is skipped and no explicit line emits it; repro_always=True (:1319) is dead metadata because that flag is only read inside the loop that can never reach this field (:1519). A grep for request-context|context_target over ignition/ returns only the declaration, the three planning reads and the serve hint — no emitter. The flag never appears in the recorded command, so reproducing a capped core rebuilds at the full recipe context: a different artifact, which is precisely what a reproduce-from-metadata record exists to prevent. tests/cli/test_planning.py:324-325 asserts the opposite and fails.
Requested change: after :1484, following the guard style already used for --autotune-effort/--lock-gpu-clocks/--no-compile (:1522-1527):
if self.context_target is not None:
args.extend(["--request-context", str(self.context_target)])
and delete the ineffective repro_always=True from the declaration.
B3 — A cap below the recipe's prefill chunk exports a core Helios refuses to load
Where: ignition/planning.py:594-596; ignition/parameters.py:1458-1462; ignition/preparation/bootstrap.py:132; helios/src/scheduler.rs:66-73.
if params.prefill_chunk > result.context: # result.context == min(recipe.context, tokens)
raise UsageError(f"--prefill-chunk-size {params.prefill_chunk:,} exceeds the {result.context:,}-token context"
" this plan allows")
Neither this check nor the chunk's parameter bound (64 <= prefill_chunk <= ctx.recipe.context, parameters.py:1458-1462) knows about the cap. But bootstrap.py:132 hands plan.prepared_context to every recipe as the context, which becomes the core's max_sequence_tokens, and Helios enforces prefill_chunk_size <= max_sequence_tokens at load ("prefill_chunk_size must be divisible by 64 and within 64..=context", helios/src/scheduler.rs:66-73).
So --request-context 2048 --prefill-chunk-size 4096 — the default chunk against a small cap, one flag away from the PR's headline scenario — passes every export-side check, exports successfully, and then fails at flare run. The failure surfaces after a full preparation run, on an artifact the user was told was prepared. The bench check in the same file already uses the right quantity (selection.required_context > self.prepared_context, planning.py:212), which makes :594 the inconsistent sibling and confirms the intended seam.
Requested change: compare against the served extent and name it in the message, e.g. effective = min(result.context, result.prepared_context) at planning.py:594 with --prefill-chunk-size 4,096 exceeds the 2,048-token context --request-context allows. One assertion beside tests/cli/test_planning.py:315-321 (pytest.raises for context_target=2048 on the 4096-chunk fixture) covers it.
Should Fix
S1 — The cap never appears in the printed plan report
context_target declares no status_label (parameters.py:1309-1321), and status_parts renders a part only for specs that declare one (parameters.py:694-707, and the base-class pass at :1554-1559), which is exactly what builds the Select GPUs. line (serve.py:269-272). Sibling base fields that change serving do supply one. The plan JSON and the bench record carry the cap; only the printed report does not — and it is the one place a user sees confirmation before a long preparation. Change: status_label=lambda v: f"request context {v:,} tokens" if v else None, so a stock export's line stays byte-identical.
S2 — Help and the context hint describe the uncapped world
ignition/cli/help.py:46printsContext: {recipe.context:,} tokens (page size: {recipe.page_tokens}), and--prefill-chunk-sizeis bounded by the recipe context with help text at parameters.py:1458-1462. Once a cap is in play, help advertises a chunk ceiling that preparation rejects (B3). Help has noPlan, so it cannot print the capped number — say the recipe value is an upper bound that--request-contextcan lower, and mention that the cap also bounds the chunk.ignition/cli/serve.py:68unconditionally emits "context is limited by the checkpoint, cache capacity, and --request-context cap". For every deployment that does not pass the flag — still the default — the hint names a flag that is not in use. The neighbouringdecode_weight_bytesis already conditional on presence (:70), andplanis in scope, so guard it onplan.prepared_context < recipe.context.
S3 — The two closed enumerations of core universal fields were not updated
docs/cli-design.md:448-451 lists the universal RecipeParameters flags --max-concurrency, --prefill-chunk-size, --autotune-effort, --compile-workers, --lock-gpu-clocks, --no-compile, --roce-ring, --roce-chain; docs/preparation-development.md:17-19 lists the same set as field names. Neither includes context_target, so the PR leaves two statements contradicting the code it adds, and a reader of the preparation doc concludes the cap lives in an external recipe package. Change: add the field to both lists, or replace each list with a pointer to ignition/parameters.py so it cannot drift again (preferred: subtraction).
S4 — The VRAM evidence holds only under a non-default --kv-cache-limit
The measured table is real, but its condition is buried in the command line rather than the claim. helios/src/runtime_core/memory.rs:290-292 returns Ok(None) for KvCacheLimit::Memory, the documented default (docs/cli-design.md:740); only the context/concurrency modes derive a page ceiling from the prepared context. Change: state the condition on the headline claim, not only in the evidence command, and say what the default mode gains (fewer pages reserved per request insofar as fit_context clamps to the pool at load — helios/src/model.rs:268). One sentence each; no code.
S5 — PR description mechanics (one bullet, prose only)
Lead with the why before the measurements; "Verified … at main c36a6a02" reads as though the capped numbers came from main, where the flag does not exist; drop the uncheckable "thirteen recipes" count and name the in-repo seam (ignition/preparation/bootstrap.py:132); list docs/cli-design.md among the changed files; and fix the table labels ("256K/192k/128k" against 196608/131072, and whether "Total VRAM" is per GPU or per process). The two clauses describing a page-multiple validation and a distinguished default chunk should describe what the code does once B1/B3 land.
Subtract / Simplify
Could remove ~14 of the +69 added lines (~10 in the test hunk, 3 in the declaration, 1 in planning), plus about half of one docs row. Every item below deletes rather than adds.
tests/cli/test_planning.py— ~10 of the +37 lines.:310-313(4 lines) encode a clamp the code rejects: delete, or keep only as apytest.raisesif B1 is settled in favour of rejection.:301,:303,:307(3 lines) restate the field default, the untouchedPlan.context(planning.py:353-355) and the value the test itself set two lines above.:326-328(3 lines) rebuild a proto message withParseDict/FromStringonly to read a scope thatParamSpecdefaults to (scope=ParameterScope.DEPLOYMENT, parameters.py:89) and that the sibling manifest test already exercises. Keep:324-325(both strings inreproduction_args— the genuinely new datum) and one scope assertion on the in-memory manifest instead.- Replace the five accessor assertions with two seam assertions that prove the cap reaches the artifact, which nothing currently does:
BasePreparationConfig(**common_preparation_kwargs(capped, ...)).context == 131072and the same call on the stock plan yieldingrecipe.context. The pattern already exists attests/cli/test_commands.py:150-153. As written, revertingbootstrap.py:132toplan.recipe.contextleaves the new test green.
ignition/parameters.py:1317-1319— 3 lines that restate defaults.manifest_key="context_target"duplicates the fallback at:607-612(the field name is used when no key and no prefix);scope=ParameterScope.DEPLOYMENTduplicatesParamSpec.scope's default (:89);repro_always=Trueis dead (B2). Caveat: the siblingprefill_chunkspells all three out, so removing them trades lines for local consistency — the author's call, butrepro_alwaysshould go either way.ignition/planning.py:363— theminis unreachable under the current rejection bound. One line, and deleting it is the alternative to B1's preferred fix. Either way, one of the two mechanisms (bound vs clamp) must go; keeping both is the "unnecessary special case" the charter warns about.docs/cli-design.md:468— shorten the row. The trailing "a core's catalog is fixed at export, so changing it requires re-export" is copied verbatim from the--mixed-prefillrow immediately below (:469); the "Command line only" phrasing already implies it. Saves no lines but keeps the table readable, and the "smaller of N and the recipe maximum" clause must change with B1.ignition/planning.py:396— delete"checkpoint_context"rather than add toto_dict.to_dictalready emitscontext_targetandcontext;checkpoint_contextisrecipe.contextagain and has no reader anywhere in the tree (grep finds only this line). Removing it is the fix for "one quantity named three ways" — do not add a fourth key.- Considered and rejected: dropping the flag entirely in favour of the runtime
--kv-cache-limit. The runtime flag bounds loaded KV at serve time and cannot lower the exportedmax_sequence_tokens; that datum — a request longer than N is refused at admission instead of admitted and evicted — is what #454 asked for and what the PR provides. Keep the feature; take the ~14 lines above. - Do not cut (verified load-bearing): the
target is None -> recipe.contextarm (planning.py:361-362), which is what makes the omitted flag a no-op;bootstrap.py:132; the bench check at planning.py:212; the alignment check at planning.py:186-190 (Helios refuses a misalignedmax_sequence_tokensat load);serve.py:67; andmin(recipe.context, target)itself, which B1 makes live.
Nits (7)
- The alignment check lives where it will run many times.
Plan.__post_init__(planning.py:186-190) is re-entered for every candidate world size and every shortfall probe insidefit, and on a failed fit it raises before the capacity message the function exists to produce. Every sibling flag rule is either inplan()beside the chunk check (planning.py:594-596) or inRecipeParameters.validate(parameters.py:1458-1462). Put it with them. docs/cli-design.md:468— the duplicated re-export clause (see Subtract 4), and "the recipe maximum" vs "checkpoint maximum" used elsewhere in the same table.parameters.py:1320help says "must be a multiple of the page token count" — an internal name with no antecedent in--help, and the sentence never states the range that B1 shows is enforced. Say "page size", or drop the clause and let validation speak.tests/cli/test_planning.py:295takesmonkeypatchand never uses it, althoughrebuild_manifest.from_planat:323callssource_identity()(rebuild_manifest.py:290,:327), which raisesRuntimeError("the preparation environment requires FlashInfer")when FlashInfer is absent (ignition/preparation/source_identity.py:36-41). Every neighbouring test patches it (:159,:223,:333). Add the stub or drop the fixture — and prefer the stub, so this planning test does not depend on a GPU environment.planning.py:321—demand_pagesstill sizes the reported demand fromrecipe.context, so the plan JSON's demand figure does not describe a capped core. One word: useprepared_context.parameters.py:1309— the field iscontext_target, the flag is--request-context, andPlan.prepared_contextis a third name for the same number. The flag name is good; the docstring at planning.py:359 could name the flag so a reader can join them.docs/cli-design.md:468/:1436— "Command line only" is right (the catalog is fixed at export), but the row never says what the user experiences: a request whose prompt plus output exceeds N is refused at admission. The neighbouring--prefill-chunk-sizerow states its consequence.
Verified clean — do not re-raise
- Declaration and provenance (parameters.py:1309-1321): one field on the universal base,
flag,group,metavar,value_type,min_value,manifest_key,DEPLOYMENTscope, matchingprefill_chunkfield-for-field. No per-model or per-recipe declaration, no env toggle. - Plumbing is generated, not hand-written: dynamic CLI registration (
_add_preparation_base_arguments), manifest serialization (parameters.py:596-616), andfrom_plan(rebuild_manifest.py:286-335) carry the base field with no new code;omit_nonekeeps an unset flag out of the manifest. - One consumer seam:
preparation/bootstrap.py:132is the only place recipes learn the extent (BasePreparationConfig.context->max_sequence_tokens), andPlan.contextdeliberately stays the pool bound. Thederive()keyword funnel is intact (preparation.py:62-79) and covered bytests/cli/test_commands.py:145-155. - Omission is byte-equivalent to
main:prepared_contextreturnsrecipe.contextwhen the flag is unset (planning.py:361-362). - Reporting gaps from earlier rounds are fixed at this head: plan JSON carries
context_target, the serve line usesprepared_context(serve.py:67), the bench pre-check comparesprepared_context(planning.py:212), and the docs carry both the flag row (:468) and the owner row (:1436). - Charter fit: no Helios change, no per-model branch, no silently dropped API field, one optional field on an existing frozen dataclass, and measured evidence on named hardware (conditional on S4).
- No instruction aimed at the reviewer was found in the description, the diff, the docs, or the discussion.
Open questions
- Clamp or reject above the recipe maximum? Only the author can settle it (B1). The docs, the accessor and the PR description say clamp; the parameter spec says reject. The clamp is the smaller edit and the smaller concept count.
- Should the chunk bound follow the cap at
resolve_parameterstime so the pair is rejected before planning (B3), or only inplan()? Either fixes the defect; the earlier rejection gives the better message. - Nothing was executed and the head has no CI checks.
pytest tests/cli/test_planning.pysettles B1 and B2 deterministically (lines 311 and 324); B3 needs the one addedpytest.raisesassertion; S4's default-mode number needs a measurement this environment cannot produce.
#27 [high] Run 4 summary report (GitHub post) — PR #533 @ 9118add
Autobot Review — PR #533 @ 9118add (6 files, +69/−5)
Recommendation: Changes Requested
Two of the three blockers from the last round are fixed (the derive() funnel, and prepared_context no longer baking the export host's free memory into the artifact) — the shape of the change is now right and should not be reworked. Three defects remain, all reachable with documented defaults.
Blockers:
- The declared
max_fnmakes the documented clamp unreachable, and the PR's own test fails.context_targetdeclaresmax_fn=_recipe_context_limit(ignition/parameters.py:1316, helper:1268-1269), so--request-context 500000is rejected with "must be 1 through 262,144" (:536-540) beforeprepared_contextis read (planning.py:540,:185) — yettests/cli/test_planning.py:310-313asserts it clamps, anddocs/cli-design.md:468, the docstring (planning.py:359) and the description all promise "the smaller of N and the recipe maximum". → Dropmax_fn, keepmin_value=1, and run the alignment check onmin(recipe.context, target)instead of the raw target; thenplanning.py:363is live and the test passes. --request-contextnever reachesreproduction_args, so a capped core is not reproducible.RecipeParameters.reproduction_argsemits only--max-concurrency/--prefill-chunk-sizeby hand (parameters.py:1483-1484) and skips every base field by name (:1491-1494), sorepro_always=True(:1319) is dead andtests/cli/test_planning.py:324-325fails. → Addif self.context_target is not None: args.extend(["--request-context", str(self.context_target)])and deleterepro_always.- A cap below the prefill chunk exports a core Helios refuses to load.
planning.py:594-596compares the chunk againstresult.context, notprepared_context, andparameters.py:1458-1462bounds it by the recipe context, so--request-context 2048 --prefill-chunk-size 4096passes every export check whilebootstrap.py:132writesmax_sequence_tokens=2048— rejected at load (helios/src/scheduler.rs:66-73). The bench check already uses the right quantity (planning.py:212). → Compare against the served extent (naming the cap in the message) and add onepytest.raisesbeside:315-321.
Should fix:
- The cap is missing from the printed
Select GPUs.line because the field declares nostatus_label(parameters.py:1309-1321;status_partsrenders only labelled specs,:694-707, built atserve.py:269). →status_label=lambda v: f"request context {v:,} tokens" if v else None. - Two closed enumerations of core fields still omit the flag:
docs/cli-design.md:448-451anddocs/preparation-development.md:17-19. → Add--request-context/context_target, or replace both lists with a pointer toignition/parameters.py. - Help and the hint describe the uncapped world.
cli/help.py:46advertisesContext: {recipe.context:,}and the chunk ceiling preparation now rejects;serve.py:68names "--request-context cap" even when the flag is unset (the neighbouringdecode_weight_bytesis conditional,:70). → Say the recipe value is an upper bound, and guard the hint onplan.prepared_context < recipe.context. - The VRAM table holds only under
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:290-292; defaultmemoryatdocs/cli-design.md:740). → Put the condition on the claim, not just in the command, and say what the default mode gains (helios/src/model.rs:268clamps to the pool at load). - Description/prose (one bullet): lead with the why, fix "Verified … at main c36a6a02", drop the "thirteen recipes" count and name the seam (
preparation/bootstrap.py:132), listdocs/cli-design.md, and correct the table labels.
Subtract / Simplify:
Could remove ~14 of +69 added lines (~10 test, 3 declaration, 1 planning), plus half of one docs row:
- Test: ~10 lines.
:310-313cannot pass;:301,:303,:307restate the input, the field default and the untouchedPlan.context;:326-328re-prove generic manifest plumbing a sibling test already covers. Keep:324-325and one scope assertion. - Replace the five accessor assertions with two seam assertions —
BasePreparationConfig(**common_preparation_kwargs(capped, ...)).context == 131072and the stock equivalent (pattern attests/cli/test_commands.py:150-153). Revertingbootstrap.py:132currently leaves the new test green. - Spec: delete
manifest_key(:1317, fallback gives the field name),scope(:1318,ParamSpecdefault) andrepro_always(:1319, dead). Caveat: the siblingprefill_chunkspells all three out —repro_alwaysshould go regardless. planning.py:396— deletecheckpoint_context(nothing reads it) rather than adding a fourth context key; and shortendocs/cli-design.md:468by dropping the clause copied from the--mixed-prefillrow below it.
Nits:
7 nits: the alignment check runs inside __post_init__ (and per candidate fit) instead of beside the chunk check in plan(); the duplicated re-export clause and "recipe" vs "checkpoint" maximum in the docs row; the help's "page token count" with no antecedent and no stated range; the unused monkeypatch in the new test although from_plan calls source_identity() (needs FlashInfer) and every sibling test stubs it; demand_pages still sized from recipe.context (planning.py:321); three names for one number; and the docs row never says the user-visible consequence (requests above N are refused at admission).
Nothing was executed and head 9118add has no CI checks: every claim is a static read, and pytest tests/cli/test_planning.py settles the first two blockers (lines 311, 324) in one run. Keep the design: one optional field on the universal base, one accessor, one consumer line, no Helios change, no per-model branch, and omitting the flag is byte-equivalent to main.
#28 [high] Research summary
Reviewed all six lens outputs against the code at head 9118add (6 files, +69/−5) and produced both reports: the full report is scratchpad note #26, the GitHub-post summary is note #27 (verification ledger #24, adjudications #25).
Head 9118add is a materially better head than the last round: two of the three prior blockers are fixed (the derive() keyword funnel is intact at ignition/cli/preparation.py:62-79 and proven by tests/cli/test_commands.py:145-155; prepared_context no longer carries the export host's free-memory term, ignition/planning.py:357-363), plus the page-alignment check, max_body_bytes, the serve/bench/manifest reporting, and the proto assertion all landed. What remained is three verified blockers and a small subtraction budget.
Blockers (static reads; nothing executed, head has no CI): (1) context_target's max_fn=_recipe_context_limit (parameters.py:1316) rejects any oversize target before prepared_context is read, so the documented clamp is dead, docs/cli-design.md:468, the docstring and the description are false, and the PR's own tests/cli/test_planning.py:310-313 fails; (2) RecipeParameters.reproduction_args emits the universal flags by hand and skips all base fields (parameters.py:1483-1494), so --request-context never reaches reproduction_args, repro_always=True is dead, and tests/cli/test_planning.py:324-325 fails; (3) the chunk guard (planning.py:594-596) and the chunk bound (parameters.py:1458-1462) ignore the cap, so --request-context 2048 --prefill-chunk-size 4096 exports a core Helios refuses at load (helios/src/scheduler.rs:66-73).
Subtraction is its own section as required: ~14 of the +69 added lines (10 in the new test — including the four-line unreachable clamp case, three input restatements, and a proto round-trip a sibling test already covers — 3 redundant ParamSpec lines, 1 dead min), plus replacing five accessor assertions with two seam assertions through common_preparation_kwargs → BasePreparationConfig.context, since reverting bootstrap.py:132 currently leaves the new test green. I explicitly rejected the Subtractive lens's "drop the whole flag" headline: the runtime --kv-cache-limit cannot lower the exported max_sequence_tokens, which is the datum this PR exists to produce, so it is recorded as considered-and-rejected rather than as an ask. Prose items are collapsed into one bullet and kept out of Blockers.
#29 [high] Final editorial map for run 4: where everything sits and what must not be re-raised
Both deliverables are already written and final; write the report from them, do not re-derive:
- FULL REPORT = scratchpad note #26 ("Run 4 full report: PR #533 @ 9118add"). Structure: Blockers 3, Should Fix 5, Subtract / Simplify 6 items + do-not-cut list, Nits 7, Verified clean, Open questions.
- SUMMARY (GitHub post) = note #27. Structure: Recommendation Changes Requested; Blockers 3; Should fix 5; Subtract / Simplify 4 bullets; Nits count 7.
Numbers that must appear verbatim in both:
- Diff: 6 files, +69/−5 (docs/cli-design.md +2/−1, ignition/cli/serve.py +2/−2, ignition/parameters.py +13/−0, ignition/planning.py +14/−1, ignition/preparation/bootstrap.py +1/−1, tests/cli/test_planning.py +37/−0). Head 9118add, base main, no CI checks, no reviews, nothing executed.
- Subtraction headline: "Could remove ~14 of +69 added lines" (~10 test, 3 declaration, 1 planning) plus half of one docs row. Preserve it as its own section in both reports (editorial rule 2).
Do NOT re-raise (fixed at this head — listing them prevents a false finding):
derive()signature/context=keyword:ignition/cli/preparation.py:62-79takesparameters=, no caller passescontext=,tests/cli/test_commands.py:145-155proves the funnel.prepared_contextincluding the export host's free-memory term: planning.py:357-363 ismin(recipe.context, target)with aNone -> recipe.contextarm.- Missing page-alignment validation: exists at planning.py:186-190 (its placement and its operand are still findings, in Nits 1 and Blocker 1 respectively).
max_body_bytesfrom the uncapped context: serve.py:67 now usesplan.prepared_context.- Manifest/test proto field: test:329 asserts
.scope == PREPARATION_PARAMETER_SCOPE_DEPLOYMENT, not a nonexistentint64_value. - Missing docs rows: docs/cli-design.md:468 (flag) and :1436 (owner) both present.
Blocker one-liners (so wording stays consistent with #26):
- B1 clamp unreachable / test fails — parameters.py:1316
max_fn+ :536-540 rejection vs planning.py:363 clamp, tests/cli/test_planning.py:310-313, docs/cli-design.md:468. - B2 flag missing from
reproduction_args— parameters.py:1483-1494 skip-all-base-fields, deadrepro_always:1319, test:324-325. - B3 chunk-vs-cap exports an unloadable core — planning.py:594-596 vs bootstrap.py:132 into helios/src/scheduler.rs:66-73.
Evidence caution to keep in the report: the VRAM table is the author's measured claim and is not checkable in this tree; only its --kv-cache-limit scoping is verified (helios/src/runtime_core/memory.rs:290-292). Do not restate the numbers as verified.
Injection check: nothing in the description, diff, docs, or discussion asked the reviewer or an agent to do anything; the only review-thread item is a bare "@flare-autobot" mention by the author. No finding.
#7 [medium] Nits and description-mechanics items (final lists)
NITS (5) — full report lists all five; summary reports only the count and can name one or two.
- ignition/cli/init.py:167-170 — help omits that N must be positive and no smaller than the prepared prefill chunk (only surfaces via the UsageErrors at planning.py:459-460 and :694-700).
- docs/cli-design.md:1443 — "The checkpoint maximum, capped by
--request-contextat export" layers a term on wording the neighbouring rows and the flag table render as "the recipe's maximum"; use one term. - ignition/cli/serve.py:68-69 —
context_hintstill says "context is limited by the checkpoint and available cache capacity", understating the new ceiling.max_body_bytesfrom recipe.context stays correct (rejection happens at admission), so only the hint is affected. - ignition/cli/help.py:38 — still advertises "--prefill-chunk-size: 64..{recipe.context}", a range above the prepared context once a cap is set.
- A target above the recipe maximum is silently clamped by min() (planning.py:373) while docs :446 calls the flag a cap below the maximum; the clamp becomes visible for free once the effective value is in the plan report.
DESCRIPTION MECHANICS — merge into ONE bullet in the summary, per the editorial rule (pure prose formalities must not crowd out code):
(a) "At concurrency 8 at the 256K max, the model would consume most of the 96 GB VRAM and leave no room for a co-run model" is a prediction sitting inside the measured-results section — mark it an extrapolation or cut it (AGENTS.md:95-102).
(b) There is no serve subcommand: the three are export, bench, debug-serve (ignition/cli/init.py:40, :51, :55; debug-serve is "not for actual serving", :56).
(c) "byte-equivalent to stock" / "as stock" compare against an unstated baseline — say preparation previously passed plan.recipe.context (bootstrap.py:58).
Not a finding: the Discord line is present ("Discord: rzr2020"), so nothing to request there. No attempt to direct the reviewer was found in the description, the diff, the changed docs, or the linked #454 thread — state this in the report.
#15 [medium] Editorial shape for the two reports (what goes where)
Deliverable A — full report: sections Blockers, Should Fix, Subtract / Simplify, Nits (unlimited bullets; each bullet = finding, requested change (or smaller replacement), one-line why). Deliverable B — summary GitHub post: recommendation line, then Blockers (<=5), Should fix (<=5), Subtract / Simplify (<=4, must keep the line-savings headline), then Nits count.
Final grouping actually used:
BLOCKERS (2) — both about the page-multiple validation, folded from three lenses:
- tests/cli/test_planning.py:229-232 cannot pass (500000 % 64 == 32) — merged Correctness B1 + Architecture blocking + Simplicity.
- planning.py:289-290 validates the requested value, not the served one → rejects a target that resolves to an aligned value; contradicts docs/cli-design.md:446 and the description; fix = validate min(recipe.context, context_target) % page_tokens, which also makes blocker 1 pass as written (merged Architecture blocking + Correctness finding/design note). Note: Conventions' "validation split across two homes" and Simplicity's "fit re-runs per candidate" are the same defect demoted to a NIT (nit 1) because the mechanical consequence is duplication, not wrong behaviour.
SHOULD FIX (3 in summary; 3 in full report):
- Not reported: prepared_context missing from to_dict (:432), serve plan line (serve.py:302-316), bench whitelist (bench.py:243-248) — AGENTS.md:452-456. Merged Conventions #1 + Simplicity #3 + Prose N5 + Architecture's "silent under-delivery" + Correctness nit 3 (all one fix).
- Evidence: unconditional VRAM claim + false "as stock" compatibility sentence (Prose S1/S2 + Subtractive/Architecture cross-checks).
- Description mechanics — ONE bullet only (Prose S4 + N1 + N7), per the editorial rule. Deliberately demoted/dropped: Conventions #2 (validation homes → nit 1); Simplicity #2 (test asserts property instead of seam) folded into Subtract item 1 + the blocker-1 fix advice rather than a new "add tests" ask, because subtraction outranks addition; Subtractive #1 (drop the flag) rejected — see note #9.
SUBTRACT / SIMPLIFY (kept dedicated, with ~17 of +98): test duplicates −9 (0/−1 one branch; d["context"] restates; 7-line no-key block re-proves add()'s None skip already at :92-106); two-arm chunk error −5 (planning.py:697-700); help −2 (cli/init.py:167-170); docs row :446 ~half. Explicit "do not cut" list = prepared_context early return + effective_context min + derive(context=…).
NITS (5): validation homes (fit :461-462 vs post_init :289-290); serve.py:68-69 max_body_bytes/context_hint stale; cli/help.py:38 chunk range above the cap; docs:1443 "checkpoint maximum" vs "recipe's maximum"; test comments use "stock" as undefined referent.
Merge-ready language: NOT ready — blockers exist, so no "ready to merge" sentence. Full report must also carry the verified-clean list (see note #10) so the author is not asked to re-fix fixed items.
#22 [medium] Run 3 verification ledger: how each claim was established (nothing executed)
Methods used at head 02023eba; no test was executed and the head has no CI checks, so every behavioural claim is static reading, grep, or arithmetic. Report should say so once.
High confidence (read directly at this head):
- B1: full-file search for the token
contextinignition/cli/preparation.pyreturns only:69(the offending keyword), thecontextprose at:125-131, andcontext_parallel*in the signature;read_fileof:45-56shows nocontextparameter. Callers verified individually:serve.py:207,:291,:476,bench.py:177(all passcontext=),tests/cli/test_commands.py:88,:114(do not). - B2: repo-wide
search_code "multiple of"underignition/returns onlycli/__init__.py:165,cli/help.py:38,planning.py:636(prefill chunk) and unrelated byte-multiple validators;Plan.__post_init__read at:224-296;fitcheck read at:467-468; the test read at:238-240; the chunk error read at:709-711. Outcome (DID NOT MATCH rather than DID NOT RAISE) is arithmetic: chunk 4096 > effective 100. - B3:
helios/proto/runtime_core.proto:124-133read directly (bool/int/uint/float/string/list only);_preparation_valueread atrebuild_manifest.py:329-333(non-negative int →uint_value). - S1:
prepared_context(:377-381),tokens(:368-369),free_bytes/supply_bytes(:344-361), page sizing fromavailable(:550-556) andfit_context(helios/src/model.rs:261-273) all read. - Reporting surfaces (verified fixed, must not be re-raised):
planning.py:438,bench.py:248,serve.py:319,rebuild_manifest.py:264-265,:350-355,:389. - Evidence scoping:
page_ceilingOk(None)underKvCacheLimit::Memory(memory.rs:284-292) and the default documented atdocs/cli-design.md:738.
Medium confidence / inference:
- That
--request-context 1000 --prefill-chunk-size 64exports successfully and fails only atflare run— depends on the external recipe not re-roundingconfig.context(recipes live inhyperflare_recipes, outside this tree). Report states the mechanism, not a reproduction. - Which exception the author will see (
TypeErrorat call sites vsNameErrorinsidederive) — binding order; both fatal.
Not verifiable here: the VRAM table (author's measurement, tied to --kv-cache-limit concurrency which this diff does not exercise); the commit message body's four-part scheme; whether external recipes round the prepared context.