Opened by a workflow run, Nov 25, 2026 8:44 PM EST.
screen malicious
Screen Result: All Clear
Evidence: I read the full diff of PR #533 (7 files, +35/−15) hunk by hunk and searched the PR text and changed files for agent-directed or hidden content. Everything in the PR is ordinary Python and Markdown implementing a documented CLI capability.
ignition/cli/__init__.py:167-170adds anargparseflag--request-context N(int) with help text.ignition/cli/{bench.py:177, serve.py:289,472, preparation.py:56,68}threadcontext=args.request_contextintoderive()/plan().ignition/planning.pyaddsPlan.context_target(:176), theprepared_contextaccessor (:368-373,min(recipe.context, target, tokens)), a positive-valueUsageError(:459-460), and a clearer prefill-chunk error distinguishing the default chunk from a user-set one (:694-700).ignition/preparation/bootstrap.py:58passesplan.prepared_context(wasplan.recipe.context) so the cap reaches exportedmax_sequence_tokens.docs/cli-design.md:446, 1443, 1493documents the flag in the flag table and the two context-limit tables.
No "ignore previous instructions"/role-reset/system-prompt text, no instructions addressed to agents or reviewers, no hidden or non-rendered markup in the docs (searched for HTML comments, <img, <script>, data: URIs — no matches), no shell/curl/eval/subprocess payloads, no credential, path-traversal or exfiltration content, and no new network targets. The PR body is a technical VRAM table with markdown/mailto links, a Discord handle and sign-off trailers. The only comment (roobyz, 2026-11-26 01:43: "As requested, I refactored the PR… I believe I covered all of your points") is an author-to-maintainer status note, not an instruction to an agent. Nothing attempts to steer the reviewing agent.
Non-security context: the author's earlier attempt PR #454 (same feature) was closed with a technical CHANGES_REQUESTED review from yatesdr; this PR visibly addresses those objections. Remaining gaps — no tests in the diff and no CI on head 1a006c6 — are review/evidence matters, not malicious behavior. Open question: the runtime/engine side of the claim (rejection above the cap, byte-equivalence with the flag omitted) could not be verified statically for this report.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: roobyz (CONTRIBUTOR); Discord rzr2020 (from the PR's "Discord:" line)
Motivation: Serve one model at a large context currently sizes the KV pool for that whole context per request, which can fill a 96 GB GPU and leave nothing for a second model. This adds --request-context N to export/serve/bench so the prepared per-request context — and the core's max_sequence_tokens — can be capped below the recipe maximum at export time, freeing VRAM.
Scale: +35 / −15 lines in 7 files
Proposal:
- Add
--request-context Non the preparation argument group (registered inignition/cli/__init__.py:167), so it exists onexport,benchanddebug-serveonly, notflare run. - Thread it through
derive()/fit()/plan()into a newPlan.context_targetfield (ignition/planning.py:176) and pass it into planning fromignition/cli/preparation.py,bench.py:177,serve.py:289,serve.py:472. - Add
Plan.prepared_context(planning.py:369-373): recipe max when no target, elsemin(recipe.context, target, tokens);Plan.contextstays stock. - Hand the cap to the recipe core:
common_preparation_kwargsnow passes"context": plan.prepared_contextinstead ofplan.recipe.context(ignition/preparation/bootstrap.py:58, default at:33). - Validate
context > 0(planning.py:459-460) and raise a chunk-versus-context error, distinguishing a default chunk from a user-set one (planning.py:694-700); update three docs rows (docs/cli-design.md:446,:1443,:1493). Touches: ignition/planning.py— newPlanfield, accessor semantics, and the validation/message paths that all other flags also share.ignition/preparation/bootstrap.py— the single shared handoff to every recipe core; the one line that decides whether the cap is real.ignition/cli/{__init__,preparation,bench,serve}.py— the flag plumbing across three subcommands. Related items:- #454 Cap the prepared per-request context (closed): the previous submission of this same change, rejected with six objections; this PR is the resubmission and answers four of them.
- #516 ignition: add --kv-cache-format declaration... (open): threads a new preparation flag through the same seven files, so it collides in
cli/__init__.py/planning.py. - #508 recipe-declared row-sharded attention planning and PreparationManifest metadata (open): same plumbing surface plus manifest metadata this PR lacks.
- #499 recipe-declared row-sharded prefill planning and RoCE collectives (merged): the example of a flag that does get into the manifest and reproduction arguments.
- #122 Make the compiler memory headroom a preparation setting (open): long-lived precedent for a preparation knob carrying provenance.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Autobot comments: The new head (
1a006c6) reverses two blocking findings from the earlier report: the cap now reaches the core at the shared handoff (bootstrap.py:58), and--request-contextreplaces the--contextname that a main-branch CLI test asserted must fail, so that conflict is moot. Zero/negative values are now rejected. What remains blocking is the absence of any test (the reviewer explicitly asked for tests that fail without the change;tests/has no reference to the flag at all) and the fact that the evidence still does not compare the export-time cap against the existing runtime knobs (--kv-cache-limit context|concurrency,--memory-limit), which is the comparison that decides whether this flag earns its footprint — the VRAM table was measured with--kv-cache-limit concurrencyin play, so it does not isolate the cap. Three defects are new to this head and not previously reported: a non-page-aligned--request-contextpasses planning and yields a core helios refuses to load; the flag is absent fromrebuild_manifest.py'sreproduction_argumentsandfrom_planparameters, so a capped core cannot be reproduced or rebuilt and silently reverts to the recipe max; andPlan.to_dictomits the target, so the printed plan and bench JSON look uncapped whileserve.py:68still sizesmax_body_bytesfromrecipe.context. Reachability itself is now unverifiable in-repo because recipes were extracted tohyperflare_recipes, and the author's own comment says the recipe updates are still "pending" — so the claim "the cap reachesmax_sequence_tokens" rests on code not in this repository. The stated motivation (headroom for a co-run model) sits on the boundary of the charter's "multi-model hosting/routing" non-goal; the PR carriesDesign-Signed-Off-By/design-review=1af4, but that raises rather than lowers the bar for the missing runtime-knob comparison. No prompt-injection attempt in the PR text.
Value Proposition
Verdict: worth it with changes — the capability is real and the footprint is right, but as submitted it has correctness and reproducibility gaps, and hasn't shown it beats the runtime knobs it overlaps.
What the change actually is
7 files, +35/−14, entirely in Ignition's Python CLI/planner; no Rust, no model branches. Two functional lines:
ignition/preparation/bootstrap.py:58—"context": plan.prepared_contextreplacesplan.recipe.context, which is the hook that reaches the core'smax_sequence_tokens(viaBasePreparationConfig.context,bootstrap.py:33).ignition/planning.py:369-373—Plan.prepared_context= recipe max when no target, elsemin(recipe.context, context_target, self.tokens);Plan.context(planning.py:364-366, stock) is untouched. Plus wiring (planning.py:453,535,preparation.py:56,68,serve.py:289,472,bench.py:177), a positivity check (planning.py:459-460), a better below-chunk error (planning.py:694-700), and docs (docs/cli-design.md:446,1443,1493).
This resolves the blocking objections from the closed #454: the cap now reaches max_sequence_tokens (so helios/src/server/request.rs:350 and /v1/models's max_model_len at helios/src/server/models.rs:81 enforce it), non-positive values are rejected, the default-chunk failure now names --prefill-chunk-size, docs are updated, and the description has the four required parts with model, commands, revision, table and Discord line. The old --context-is-rejected objection is moot because the flag is renamed.
Why it is worth making
- It fills a gap the runtime genuinely cannot.
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:284-331) and--memory-limit(memory.rs:245-274) bound the pool. Neither can lower the per-request admission ceiling or advertise a smallermax_model_len; both are baked fromprepared_sequence_tokensat load (helios/src/server/config.rs:131-148,helios/src/model.rs:261-273). Correctly advertising a 128K model, rather than serving a 256K model with a small pool, is only possible at export. - Right layer and size. One dataclass field with a default, one property, three pass-throughs; model-agnostic; no per-model flags; a strict no-op when omitted (
prepared_contextreturnsrecipe.context), so existing cores and cached artifacts are unaffected. - Cheap maintenance. No new runtime path, no CUDA work, no state/catalog-transition risk.
Why not as submitted
- Reproducibility is broken — the strongest objection.
rebuild_manifest.reproduction_arguments()(ignition/preparation/rebuild_manifest.py:231-318) never emits--request-context, andfrom_plan()'s deployment-scoped parameter set (rebuild_manifest.py:368-395) has no context entry, nor doesPlan.to_dict()(planning.py:389-442, which still reports only"context"and"checkpoint_context"). So the printed plan (serve.py:215,485,bench.py:182,237),flare inspect's reproduction command (flare-cli/src/inspect.rs:454), and the embedded preparation manifest all describe a 256K core when the actual core is capped. That directly cuts against "Be explicit and pin everything" and the charter's review standard on artifacts still loading/being reproducible. - No page-geometry validation.
prepared_sequence_tokensmust be a multiple of the page size, andmax_sequence_tokenslikewise, or load fails with a generic "invalid prepared model configuration" (helios/src/model/catalog.rs:44-71).--request-context 100000therefore bakes a core that dies atflare run, far from the flag. The planner already knows the real page size (planning.py:326-330,recipe.page_tokens × CP size), so it can validate or round and say so. - The baked value depends on the export host's free memory. Because the cap clamps by
self.tokens(planning.py:373), the exportedmax_sequence_tokensvaries with the exporting machine's VRAM; the help says "cap at N" while the core may silently bake something lower. If that clamp is intentional (the code comment says a cap above the pool resolves to the pool) it needs to be stated, and the effective value should appear into_dict()and in the plan output. - No tests. There is not one test referencing
prepared_context/context_targetintests/; the wiring patterns already have homes (tests/cli/test_planning.py:71-138,tests/cli/test_commands.py:59-98). Minimum: min() with/without target,≤0rejection, both branches of the chunk-vs-cap error,common_preparation_kwargscarrying the cap, and the manifest/to_dict()exposure once added. - Evidence doesn't prove the flag is needed. The table shows pool = concurrency × prepared-context behaviour and uses
--kv-cache-limit concurrencythroughout, so it measures what a smaller pool costs — which--kv-cache-limit contextor--memory-limit -16Galready deliver at serve time without a re-export. Charter "Bring real evidence" (#210) and "the smallest footprint … or a way to solve it without new code at all" (#404) require a comparison against those alternatives at the same prompt/output lengths, plus one case that shows the admission ceiling/max_model_lendifference. - Priority caveat. The stated payoff is "headroom a co-run needs" — i.e. a second model on the same GPU, which sits next to the non-goal "multi-model hosting/routing". Freeing VRAM is not co-hosting, but the motivation sits in a pattern the charter says needs maintainer sign-off, so the justification should be restated around the primary capability (preparing and honestly advertising a shorter-context core) rather than the co-run scenario.
- Minor: the cap also lowers the default output limit, since
max_new_tokensdefaults tomax_sequence_tokens(helios/src/server/config.rs:210-212). Worth one sentence indocs/cli-design.md:446.
Recommended changes before merge
- Emit
--request-contextfromreproduction_arguments()and add a deployment-scoped parameter infrom_plan(); reportcontext_target/prepared_contextinPlan.to_dict(). - Validate
Nagainst the plan's effective page size and against the prefill chunk up front, with messages naming the accepted multiple and the flag. - Decide and document the
min(…, self.tokens)clamp; prefer a host-independent artifact if not required. - Add the four or five planner/CLI tests above.
- Add a benchmark column for
--kv-cache-limit contextand--memory-limitat equal concurrency and request lengths, and reframe the need around the per-request ceiling and advertisedmax_model_len.
With those in place this is a small, general, well-placed addition to a decision the export layer already owns; without them it is a knob whose effect the artifact, the reproduction command and the test suite cannot see.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Architecture
Verdict: blocking issues
Blocking:
- ignition/cli/serve.py:193-206:
_export_hosts(the--ranks Nexport path) never passescontext=args.request_contexttoplanning.plan(), so a multi-host export silently prepares at the recipe maximum while the flag is accepted without warning. - ignition/planning.py:389-442:
Plan.to_dictemits onlycontext/checkpoint_context, nevercontext_target/prepared_context, so the printed plan reports a context the core does not serve. - ignition/preparation/rebuild_manifest.py:231-318 and :343-454: neither
reproduction_argumentsnorfrom_planrecords--request-context, so a recorded rebuild restores a full-context core and two cores differing only in prepared context are indistinguishable.
Should fix:
- ignition/planning.py:368-373 + :459-460:
prepared_contextbecomesmax_sequence_tokens, which Helios requires to be a multiple ofpage_tokens(helios/src/model/catalog.rs:44-57), but the target is only validated as> 0; a non-multiple target looks like an export that produces an unloadable core. - ignition/planning.py (whole change): no tests added for a shared planning behaviour change that alters exported cores; tests/cli/test_planning.py is the natural home.
Nits: 2 (description's motivation leans on multi-model hosting, a charter non-goal; overlap with --kv-cache-limit/--memory-limit not argued in the description).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Conventions
Verdict: blocking issues Blocking:
- ignition/cli/serve.py:206:
_export_hosts(theexport --ranks > 1path) buildsplanning.plan(...)with every preparation flag exceptcontext=args.request_context, so multi-host export accepts--request-contextand silently drops it. Should fix: - ignition/planning.py:389-442, ignition/preparation/rebuild_manifest.py:343-454 and :231-318: the cap has no
Plan.to_dict()key, noSCOPE_DEPLOYMENTmanifest parameter, and no--request-contextreproduction argument, soto_dict()["context"]keeps reporting the uncappedmin(recipe.context, tokens)whilebootstrap.py:58prepares the capped context. - ignition/cli/init.py:156-170:
--request-contextis added to the sharedcapacitygroup, sobenchinherits it even though bench exports no core, has its own--contextscontract, and its check at planning.py:248 compares against stockPlan.context; the neighbouring--mixed-prefill/--prompt-logprobsare rejected in bench.py:115-116 instead. Nits: 1 —Plan.prepared_context(planning.py:368-373) duplicatesPlan.contextwith one extra term, andeffective_context = min(result.context, result.prepared_context)(planning.py:694) is provably a no-op; both fold into one edit. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Correctness
Verdict: blocking issues
Blocking:
- ignition/cli/serve.py:193-206:
_export_hosts()never passescontext=args.request_contexttoplanning.plan(), soignition export --ranks N --request-context Nsilently ignores the new flag and exports at the recipe max. - ignition/planning.py:369-373:
prepared_context(and thus the core's prepared sequence length) is never checked for page alignment; Helios rejects a core whose prepared/max_sequence_tokensis not a multiple ofpage_tokens, so a cap like 200000 prepares, exports, then fails to load.
Should fix:
- ignition/planning.py:389-442 / ignition/preparation/rebuild_manifest.py:231-300,343-395: neither
Plan.to_dict()norreproduction_arguments()/from_plan()record the cap, so the printed plan is identical to an uncapped one andflare inspectreproduces the wrong (uncapped) core. - ignition/planning.py:248: benchmark
required_contextis validated against the stockPlan.contextinstead ofprepared_context, so a--contextslist above the cap passes planning and only fails in ignition/bench/runner.py:388 after the full GPU preparation and graph capture.
Nits: 1 — a --request-context above the recipe max is silently clamped with no notice, though docs/cli-design.md:446 describes the flag as a cap below that maximum.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Simplicity
Verdict: blocking issues
Blocking:
- ignition/cli/serve.py:193-206:
_export_hostscallsplanning.plan()withoutcontext=args.request_context, soignition export --ranks N --request-context 131072silently prepares the recipe maximum — the flag is accepted and dropped, contrary to AGENTS.md "Don't silently ignore API fields" and the new docs row promising the cap applies at export.
Should fix:
- ignition/planning.py:389-442 (
to_dict) and ignition/preparation/rebuild_manifest.py:231-300 (reproduction_arguments) / 343-454 (from_plan): the plan report and the reproduction/manifest metadata never mention the target or the prepared context, so the printed plan andflare inspectargs describe a core prepared at the recipe max; AGENTS.md:454-456 requires the plan, its printed report and recorded measurements to describe what was prepared. - tests/: no test anywhere references
request_context,context_targetorprepared_context; the flag, field, property, validation and new error are unproven, including the PR's headline "omitting the flag is a no-op" claim (AGENTS.md:194-199). - ignition/planning.py:459-460 vs 601-619: the positive-target check sits inside
fit, which runs once per candidate world size and per option probe; one validation belongs beside the other flag checks at the top ofplan().
Nits: 3 — dead min(result.context, result.prepared_context) at planning.py:694; two-arm error text restating the multiple of 64 help (planning.py:696-700); help text (cli/init.py:167-170) and docs row (docs/cli-design.md:446) carrying rationale clauses longer than the setting.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Prose
Verdict: blocking issues
Blocking:
- docs/cli-design.md:446 (and the PR description): the claimed VRAM benefit holds only with runtime
--kv-cache-limit context|concurrency; the defaultmemoryfills free VRAM regardless of the prepared context, and that condition is nowhere stated.
Should fix:
- PR description "Why"/"Result" and docs/cli-design.md:446: the rationale is multi-model co-run hosting, which AGENTS.md:171-175 lists as scope expansion requiring an explicit maintainer decision, and no such decision is cited.
- PR description "Evidence": the "At concurrency 8 at the 256K max … would consume most of the 96 GB" sentence is an unlabelled extrapolation inside a measured-results section (AGENTS.md:95-102).
- ignition/planning.py:389-442 and ignition/preparation/rebuild_manifest.py:231-318, 343-454:
context_targetnever reachesPlan.to_dict,reproduction_arguments, or the manifestparameters, so an exported cap cannot be inspected or reproduced, contrary to AGENTS.md:452-456 and the new docs row's own re-export warning. - ignition/planning.py:694-700: the new default-chunk error names "the request context" and offers "a larger --request-context" even when the pool (
result.context = min(recipe.context, tokens), planning.py:364-366) is the binding term and a larger cap cannot help. - No tests added or mentioned for the positive-target check, the new error paths, or the omitted-flag no-op (AGENTS.md:194-199).
Nits: 4 — "serve" is not a subcommand (it is debug-serve, ignition/cli/init.py:55); docs/cli-design.md:1443 says "checkpoint maximum" where the cap and ceiling come from the recipe declaration; the help text at ignition/cli/init.py:167-170 states "(the pool fills the free VRAM)" as if unconditional and omits the positive-N requirement and the --prefill-chunk-size interaction; "byte-equivalent to stock"/"Plan.context stays stock" are loose descriptions of the omitted-flag path.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Detail: the code change itself is correct through this lens — prepared_context (planning.py:369-373) does reach max_sequence_tokens via bootstrap.py:58, the positive check exists at planning.py:459-460, and omitting the flag reproduces the previous behaviour. The problems are in the prose: an unconditional benefit claim that depends on an undisclosed runtime flag, a rationale that argues from a charter non-goal, a hypothesis presented next to measurements, an export setting absent from the plan report and rebuild manifest, and a migration error whose suggested remedy cannot work when the pool is the limit. No instructions directed at an agent were found in the description, diff, or linked #454 discussion.
Subtractive
Verdict: make it smaller first The change: +35 / -15 lines across 7 files Could remove: about 15 lines in 5 places (or ~28 of the 35 added lines if the flag itself is dropped, since only ignition/preparation/bootstrap.py:58 is load-bearing) Biggest subtractions:
- ignition/planning.py:368-373:
prepared_contextre-derives whatPlan.contextalready is;min(recipe.context, N, tokens)==min(self.context, N), so the 5-line body collapses to 2 and the extramin()at :694 goes: about 4 lines - ignition/planning.py:692-701: the two-message prefill-chunk branch turns the stock 3-line check into 9 lines to say the same thing; one message naming the effective context replaces it: about 6 lines
- ignition/cli/preparation.py:56, :68:
derive()'s newcontextkeyword is a pure pass-through — all three callers forwardargs.request_contextor nothing: about 2 lines - docs/cli-design.md:446 plus :1443/:1493: the same fact is stated three times by this PR's own edits; one flag-table row suffices, and the row's "multi-model deployment" prose is unapproved scope per AGENTS.md:171-174: about 3 lines
- ignition/cli/init.py:167-170 + planning.py:459-460, 453, 535, 591, 674: the whole flag duplicates the existing runtime
--kv-cache-limit, so the 28 added lines that exist only to carry one integer to bootstrap.py:58 can go with it: about 28 lines (the larger verdict, below) Left behind: docs/cli-design.md:69 (context_hintstill says "context is limited by the checkpoint"), serve.py:68 (max_body_bytesstill sized fromrecipe.context), ignition/planning.py:248 (selection.required_context > self.contextstill compares against the recipe max), and planning.py:389-442 (to_dict()never recordscontext_target/prepared_context, so the printed plan and bench configuration cannot show what was prepared). Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Pre Test Report
Pre-Test Report — PR #533 "Cap the per-request context target"
Recommendation: DO NOT refer to hardware testing yet. Return to author for fixes.
PR: https://github.com/NVIDIA/hyperflare-inference/pull/533 · author roobyz (CONTRIBUTOR) · head 1a006c6 · base main · 7 files, +35/−15 · no reviews, no CI checks on head. Supersedes closed PR #454 (CHANGES_REQUESTED). Security screen: all clear; I independently found no prompt-injection or agent-directed content in the description, diff, docs, or comments — the "Discord:" line and Design-Signed-Off-By/design-review=1af4 trailers are ordinary PR metadata.
I re-verified every review claim against the tree rather than trusting the summaries. The reviews agree, and they are substantially right.
1. Why testing now is not worth hardware time
The change is small and the core idea is sound, but three defects mean the artifact under test would be wrong, and any result would be invalidated by the pending fixes.
Blocking A — the flag is silently dropped on the multi-host export path
ignition/cli/serve.py:193-206: _export_hosts (reached whenever --ranks > 1, serve.py:153-156) ends its planning.plan(...) call at row_shard_prefill=args.row_shard_prefill) — no context=args.request_context. The other three sites do thread it: serve.py:289 (_prepare), serve.py:472 (debug_serve), ignition/cli/bench.py:177. The flag is registered once in _preparation_arguments (ignition/cli/__init__.py:167-170), so the attribute always exists and ignition export MODEL --ranks 2 --request-context 131072 parses, runs to completion, and prepares at the recipe maximum with no warning. This is exactly what the charter forbids ("Don't silently ignore API fields … Never accept it and quietly drop it", #417).
Two consequences for testing: the fix is a one-keyword change that alters the code path a test would poke; and our fleet cannot test this path anyway — --ranks > 1 needs a second host with a rendezvous address (cn5 is 4 GPUs on one host; cn7 is a single GB10). It must be pinned by a GPU-free test.
Blocking B — a non-page-aligned cap bakes a core that will not load
Plan.prepared_context (ignition/planning.py:369-373) is min(recipe.context, target, tokens) and becomes the core's max_sequence_tokens via bootstrap.py:58 → helios/src/server/config.rs:131,148. helios/src/model/catalog.rs:44-71 rejects a core unless both prepared_sequence_tokens (:50-52) and limits.max_sequence_tokens (:54-57) are multiples of page_tokens, returning the opaque "invalid prepared model configuration" (:70). The PR's only validations are positivity (planning.py:459-460) and the prefill-chunk check (planning.py:694-700) — no alignment check, while plan.page_tokens is right there (planning.py:326-330). So --request-context 200000 on a 128-token page exports fine and dies at flare run. Testing this before the fix just pays GPU time to re-confirm a known bug.
Note the alignment risk is highest at TP>1, where page_tokens multiplies by the CP size (planning.py:326-330).
Blocking C — the cap is unrecorded, so the artifact cannot be audited or reproduced
Plan.to_dict(planning.py:389-442) emits"context": self.context, "checkpoint_context": self.recipe.context(:430) and nocontext_target/prepared_context. Sinceself.contextstays stock (planning.py:363-366) whilebootstrap.py:58prepares the capped value, the printed plan actively misreports the served context — a 128K core prints as 256K. This dict is printed at serve.py:215, serve.py:485, bench.py:182 and copied into the bench record (bench.py:237-248).reproduction_arguments(ignition/preparation/rebuild_manifest.py:231-318) emits--max-concurrency(:257),--prefill-chunk-size(:263),--row-shard-prefill(:306) and every sibling, but never--request-context.from_plan(rebuild_manifest.py:368-395) hasSCOPE_DEPLOYMENTentries forprefill_chunk,max_concurrency,reserve_bytesetc., and none for the cap.
So flare inspect on a capped core prints an ignition export command that rebuilds the uncapped core (flare-cli/src/inspect.rs:453-455). AGENTS.md:452-456 requires the plan, its printed report and its recorded measurements to describe what was prepared. A test run against this head could not even tell from the output whether the cap took effect.
Blocking D — there are no tests at all
grep of tests/ for request_context|context_target|prepared_context|request-context returns zero matches. Nothing exercises the property, the validation, the new error branch, or the PR's headline claim that omitting the flag is a no-op. This is precisely what caught Blocking A, and AGENTS.md:194-199 requires it. The precedents are cheap and already exist: tests/cli/test_planning.py:71-138 (row_shard_prefill: asserts to_dict(), reproduction_args membership and manifest key+scope in one loop) and tests/cli/test_commands.py:59-98 (parser plus common_preparation_kwargs→BasePreparationConfig).
Should fix E — bench validates against the wrong context
Plan.__post_init__ (planning.py:248): if selection.required_context > self.context — self.context is the untouched stock value (planning.py:363-366), so with a cap set, a --contexts list above the cap passes planning and fails only at ignition/bench/runner.py:388, after the full GPU preparation, autotuning and graph capture. Bench also exports no core and already rejects inapplicable preparation flags (bench.py:115-118); it should either honour the cap or reject the flag.
2. Expected value of a hardware test at this head: LOW
The PR's own evidence (--kv-cache-limit concurrency throughout, per the description) measures a behaviour that already exists at runtime. I confirmed in helios/src/runtime_core/memory.rs:284-331 that page_ceiling returns Ok(None) for KvCacheLimit::Memory — the default (docs/cli-design.md:738) — and only Context/Concurrency compute ceil(context/page_tokens) × histories from server_config["max_sequence_tokens"] (memory.rs:631). So our GPUs would largely measure --kv-cache-limit's documented behaviour, not this PR; the newly added docs row (docs/cli-design.md:446) states the VRAM benefit unconditionally, which is misleading for a default flare run.
What is genuinely new and is worth testing once fixed: the export-time admission ceiling and the advertised max_model_len. --kv-cache-limit and --memory-limit bound the pool; neither can lower the per-request ceiling or advertise a smaller model length, both baked from prepared_sequence_tokens at load (config.rs:131-148, model.rs:261-273, server/models.rs:81 (not opened), server/request.rs:350 (not opened)). That is the real capability and the right thing to validate.
Two further devaluations: end-to-end reachability depends on the external hyperflare_recipes recipes mapping BasePreparationConfig.context → core max_sequence_tokens (AGENTS.md:379-384), and the author states recipe updates are still "pending" — so a test would depend on unpublished artifacts. And the stated motivation (headroom for a co-run / second model) is the charter's multi-model hosting/routing non-goal, requiring maintainer sign-off (charter Non-Goals; AGENTS.md:171-175); the justification should be reframed around honestly preparing and advertising a shorter-context core.
Verified clean (so testing would not need to re-check these): the no-flag path is a genuine no-op (planning.py:371-372 returns recipe.context, previously passed as-is); Plan.context is untouched; the frozen-dataclass default keeps construction and dataclasses.replace working (serve.py:207-211, bench.py:178-181); the cap correctly clamps to pool capacity; and negativity is rejected with a UsageError.
3. Conditional test plan (reuse after the fixes land)
Adopt when Blocking A–D and E are addressed and the recipe updates are published. Deliberately minimal: this is a memory-sizing knob with no throughput claim, so no A/B perf sweep is warranted.
Phase 0 — GPU-free, must pass first (no hardware time)
pytest tests/cli/test_planning.py tests/cli/test_commands.py with added cases:
prepared_context == recipe.contextwhen unset;== min(recipe.context, N, tokens)when set.context <= 0rejected; non-page-alignedNrejected or rounded, and the result asserted% page_tokens == 0.- Both arms of the chunk-vs-cap error.
to_dict()carries the target/prepared value;reproduction_argscontains--request-context; manifest parameter present with its scope._export_hostsforwardscontext=args.request_context(a--ranks 2plan assertsprepared_context == N) — this is the only pin available for Blocking A, since we lack a second host.
Phase 1 — cap actually reaches the core (cn5, 1 GPU, SM120)
Use one GPU of cn5 (not all four; the change is orthogonal to parallelism except page size). Model: nvidia/GLM-5.3-Flash-NVFP4 (in-repo documented, GLM-5.3 Flash) — closest available match to the author's SM120 measurement. Two exports from the same command, differing only in the flag: A --request-context 131072, B unset.
/v1/models→max_model_lenis 131072 on A and the recipe max on B (the one assertion that proves the export-side value, not a runtime flag).- A prompt of ~132k tokens is rejected at admission on A; a prompt just under the cap is accepted.
flare inspect Ashows the cap and its reproduction command re-exports a 131072 core (validates Blocking C).- Control falsification:
--request-context 100000(not page-aligned) must fail at planning with an actionable message, not at load.
Phase 2 — VRAM, and the isolating comparison the PR owes
Under both --kv-cache-limit memory (default) and --kv-cache-limit concurrency, at concurrency 1 and 4, record total VRAM for A and B. The pair isolates this PR from the runtime flag; under memory alone the delta may be ~0, which is the honest result and must be reported as such.
Phase 3 — regression (cheap)
A pre-PR core still loads and serves; debug-serve with no flag matches main behaviour; --request-context still absent from flare run.
Budget / efficiency: ~2 exports + ~6 serve starts on a single cn5 GPU ≈ 1–2 GPU-hours, one model, one host. Skip multi-host (no second host), skip cn7 unless an ARM64-specific question appears, and do not benchmark throughput — the PR makes no speed claim.
4. Bottom line for the referral decision
- Substantive architectural/quality problems that must be fixed before testing: yes, four — a silently dropped flag on a supported path, a validation gap that produces an unloadable core, an artifact that cannot describe or reproduce what it built, and zero tests.
- Expected value of testing this head: low — wrong artifacts, output that cannot confirm the cap took effect, dependence on unpublished recipes, and a headline benefit that is really an existing runtime flag's behaviour.
- Fix effort is small (one keyword, one alignment validation, three reporting additions, two test files by copying existing precedents), so a re-review and then a targeted ~1–2 GPU-hour run on cn5 is the efficient order of operations.
code review summary
Recommendation: Changes Requested
The seam is now right — ignition/preparation/bootstrap.py:58 passes plan.prepared_context into common_preparation_kwargs, which reaches Helios as prepared_sequence_tokens (helios/src/server/config.rs:131) and limits.max_sequence_tokens (:148), enforced at admission. That closes #454's blocking objection. But the flag does not reach one path, is validated incompletely, and is recorded nowhere.
Blockers:
ignition/cli/serve.py:193-206— multi-host export (--ranks > 1) never passescontext=args.request_context, soignition export M --ranks 2 --request-context 131072silently prepares at the recipe maximum. → Add one keyword.ignition/planning.py:369-373— the cap need not be a page multiple, but Helios rejects any core whosemax_sequence_tokensis not (helios/src/model/catalog.rs:50-57,:70), so an unaligned--request-contextexports a core that fails atflare run. → Validatecontext_target % page_tokens(reject or floor) inPlan.__post_init__.ignition/planning.py:389-442,ignition/preparation/rebuild_manifest.py:231-318,:343-395— the setting appears in no artifact:to_dict()prints the stockcontext,reproduction_argumentsnever emits--request-context,from_planhas no parameter, soflare inspectreproduces the uncapped core. AGENTS.md:452-456 requires all three. → Add the key, the flag and aSCOPE_DEPLOYMENTentry.- The claimed VRAM benefit is stated unconditionally, but the pool only tracks the prepared context under
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:284-331; default ismemory, docs/cli-design.md:738, :828) — which is how the table was measured but neither the description nor docs/cli-design.md:446 says so. → State the condition or add one default-mode row.
Should fix:
ignition/planning.py:248— bench still validatesrequired_contextagainst the uncappedself.context, so a too-large--contextsfails only after the whole GPU preparation (ignition/bench/runner.py:388(not opened)). → Compareself.prepared_context, or reject the flag in bench like--mixed-prefill(bench.py:115-116).- No test touches any of it (no match for
request_context|prepared_context|context_targetintests/). One case intests/cli/test_planning.pyon 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. docs/cli-design.md:446justifies the cap by "a memory-constrained multi-model deployment"; multi-model hosting is a charter non-goal needing maintainer sign-off (AGENTS.md:171-175). → Give the single-model rationale or cite the decision.ignition/planning.py:694-700— the new default-chunk error can advise "a larger --request-context" when the KV pool, not the cap, is what binds. → Name the binding limit; recommend only the fix that can work.- Description mechanics (one bullet): the concurrency-8 sentence is a prediction inside the measured section; there is no
servesubcommand (export,bench,debug-serve); "byte-equivalent to stock" needs its baseline named (preparation previously passedplan.recipe.context).
Subtract / Simplify:
Could remove ~7 of +35 added lines (plus about half of the new docs row):
ignition/planning.py:368-373—prepared_contextis exactlymin(self.context, self.context_target); collapse the body (~2 lines).ignition/planning.py:694—effective_context = min(result.context, result.prepared_context)can never selectcontext; delete the local (~1 line).ignition/planning.py:696-700andignition/cli/__init__.py:167-170— drop "(a multiple of 64)" (restates the neighbouring help) and "(the pool fills the free VRAM)" (conditional, duplicates the docs) (~3 lines).docs/cli-design.md:446— collapse to one tabular line; the rationale repeats the KV-limit section (:828-833) and the two owner rows this PR edits (:1443, :1493) (~half the line).- ... 1 more (the
derive()pass-through keyword,ignition/cli/preparation.py:56,68, ~2 lines).
Nits:
5 nits
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence: Screened PR 533 "Cap the per-request context target" (roobyz, head de1b5b5, 9 files, +98/−18) in full: every hunk of the diff, the whole description, all comments/reviews, and the touched regions at head (ignition/planning.py, ignition/cli/{init,bench,preparation,serve}.py, ignition/preparation/{bootstrap,rebuild_manifest}.py, tests/cli/test_planning.py, docs/cli-design.md).
No prompt injection or agent-directed instruction was found. Nothing in the diff or discussion says "ignore previous instructions", addresses an AI/agent, asks for approval or to skip review, or hides text (no zero-width/bidi characters; the only non-ASCII is ordinary typography in pre-existing prose). The added code is a coherent, feature-scoped change: Plan.context_target (planning.py:176), prepared_context property (planning.py:371-375) leaving stock context intact (planning.py:366-368), page-multiple and positive-target validation (planning.py:289-290, 461-462), a chunk-below-context error (planning.py:695-700), a to_dict key (planning.py:431), the --request-context flag (cli/init.py:167-170) threaded to derive()/fit()/plan(), plan.prepared_context in bootstrap (bootstrap.py:58), manifest reproduction args and a SCOPE_DEPLOYMENT entry (rebuild_manifest.py:264-265, 390), and an assertion-only test (test_planning.py:210-266). It adds no URLs, network calls, subprocess/eval/exec, base64, secret or environment reads, and no writes outside the documented manifest path. Repo-wide search for "autobot" in tracked files returns no matches; searches for injection markers (IMPORTANT, NOTE TO, reviewer, approval, bypass, skip the) return only ordinary identifiers.
Description trailers (Signed-off-by, Design-Signed-Off-By, design-review=1af4) and the Discord line match repo conventions (.githooks/commit-msg:15,59; docs/design-review.md:195; AGENTS.md:144-150).
One agent-addressed text exists on the PR but is not a finding: the repository's own review automation comment from flare-autobot (2026-11-26 04:21) posting autobot.eidonix.com case-file links and "Include #autobot:ignore in the PR or any comment". The identical boilerplate appears on #519, #521, #522, #525 and #526; it is repo infrastructure, not contributor-authored, and asks for nothing harmful.
Only non-security observations remain: the description's claim that "the thirteen recipes' prepare() read context=plan.prepared_context" is not visible in this diff because recipes live in the extracted hyperflare-recipes repo, and the description's wording about a serve subcommand is loose (the flags land on export, bench and debug-serve). Description-accuracy nits only.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: roobyz (CONTRIBUTOR); Discord rzr2020
Motivation: Today every exported core serves the recipe's full per-request context (256K for Qwen3.8-27B), so the KV pool is over-provisioned for short requests and leaves no VRAM for the concurrency the operator actually wants. This PR adds --request-context N so a deployment can bake a smaller per-request ceiling into the core at export time, freeing VRAM for more concurrent requests of the same model.
Scale: +98 / −18 lines in 9 files
Proposal:
- Adds
--request-context Nto the preparation argument group (export,bench,debug-serve; notflare run) and threads it throughderive()/fit()/plan()into a newPlan.context_target, with aPlan.prepared_contextaccessor (ignition/planning.py:370-375). - Makes the cap real by passing
plan.prepared_contextinstead ofplan.recipe.contextintocommon_preparation_kwargs(ignition/preparation/bootstrap.py:58), which reaches the core asmax_sequence_tokens. - Validates the target: positive (
planning.py:461-462) and a multiple of the page size (:289-290); rewrites the chunk-vs-context error to distinguish a default from an explicit--prefill-chunk-size(:696-700). - Records the setting:
to_dictgainscontext_target(:432),reproduction_argumentsemits--request-context(rebuild_manifest.py:264-265),from_planwrites it asSCOPE_DEPLOYMENT(:390). - Adds one test (
tests/cli/test_planning.py:211-265, +57 lines) and a docs row (docs/cli-design.md:446). Touches: ignition/planning.py— new plan field, accessor, two validations, chunk error, bench ceiling.ignition/preparation/(bootstrap.py,rebuild_manifest.py) — the handoff that decides whether the cap is real, plus manifest provenance.ignition/cli/(__init__.py,preparation.py,serve.py,bench.py) — flag registration and four forwarding sites. Related items:- #454 Cap the prepared per-request context (closed): this PR's predecessor; closes it, and 4 of its 6 objections are now answered.
- #499 Add recipe-declared row-sharded prefill planning… (merged): the precedent pattern (flag + plan field +
to_dict+ reproduction arg + deployment-scope parameter + test) that this PR now matches. - #516 ignition: add --kv-cache-format declaration, planning, help, manifest support (open): same seven-file surface, merge-order conflicts.
- #508 Add recipe-declared row-sharded attention planning and PreparationManifest metadata (open): same surface, conflicts in
_preparation_arguments/from_plan. - #122 Make the compiler memory headroom a preparation setting (open): long-lived precedent for a preparation knob carrying provenance.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Autobot comments: The added test cannot pass as written — two assertions fail (the clamp case is rejected by the new page-multiple check, and the manifest assertion reads
int64_valuewhereuint_valueis written), so the description's "tests/cli/test_planning.py gains a test covering…" is not reproducible; and it still never asserts the load-bearingbootstrap.py:58value. The new alignment check runs on the raw target, so a target at or above the recipe max — a no-op — is rejected, contradicting both the docs' "omitted flag / above-pool resolves to pool" semantics. The evidence table still has no baseline against the stock core served with--kv-cache-limit contextor a reduced--memory-limit, which is the comparison that decides whether an export-time knob earns its footprint. My earlier charter non-goal objection is withdrawn: the description and docs now justify the cap by same-model concurrency. I disagree with two of the 2026-11-26 05:17 review's "subtract/simplify" items: deletingeffective_context(planning.py:696) would regress the unflagged chunk check, and dropping thederive()pass-through is what let the multi-host path go silently uncapped.
Value Proposition
Verdict: worth it with changes — the capability is real, the layer and footprint are right, and every blocker from the closed #454 and my previous review is now addressed. What is left is a genuinely broken new test (it cannot pass), a couple of untested wiring paths, and documentation gaps. Fix those and this should merge.
What the change is now
9 files, +35/−14 plus one new test, entirely in Ignition's Python CLI/planner — no Rust, no per-model branches:
ignition/preparation/bootstrap.py:58—"context": plan.prepared_contextreplacesplan.recipe.context. This is the only line that reaches the core:BasePreparationConfig.context(bootstrap.py:33) → Heliosprepared_sequence_tokens(helios/src/server/config.rs:131-137) →limits.max_sequence_tokens(config.rs:148), enforced at admission (helios/src/server/request.rs:350(not opened)) and advertised asmax_model_len(helios/src/server/models.rs:81(not opened)).ignition/planning.py:370-375—Plan.prepared_context= recipe max when no target, elsemin(recipe.context, context_target, self.tokens); stockPlan.context(planning.py:365-368) is untouched.- Wiring:
planning.py:455,461-462,537,593,676;cli/preparation.py:56 (not opened),68;cli/serve.py:206(multi-host),:289;cli/bench.py:177(not opened). - Validations: positive target (
planning.py:461-462), page multiple in__post_init__(planning.py:289-290), and a chunk-vs-context error that distinguishes the default chunk and names--prefill-chunk-size(planning.py:695-700). - Artifacts:
to_dict()key (planning.py:432),--request-contextinreproduction_arguments(rebuild_manifest.py:264-265),context_targetasSCOPE_DEPLOYMENT(rebuild_manifest.py:390). - Docs: capacity/flag table plus both owner rows (
docs/cli-design.md:446,1443,1493). - Test:
tests/cli/test_planning.py:211-265.
Charter mapping
- Goal fit: a capped per-request context is exactly the "long conversations / coding agents on an SM120 workstation or DGX Spark" case the vision names. Measured on one RTX PRO 6000 Blackwell (SM120, 96 GB), Qwen3.8-27B, pinned revision, with commands and a VRAM table — the four required description parts are present.
- Right problem, right layer (#404): the runtime cannot do this.
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:284-331, defaultmemory,docs/cli-design.md:738) and--memory-limit(memory.rs:238-274) bound the pool; neither can lower the per-request admission ceiling or advertise a smallermax_model_len, because both are baked fromprepared_sequence_tokensat load (config.rs:131-148,helios/src/model.rs:261-273). Honest under-capacity advertising is an export-time decision, which is where this lands. The earlier multi-model rationale (a charter non-goal) is gone from the docs row, so no sign-off question remains. - No per-model branches: one dataclass field with a default, one property, three pass-throughs; nothing recipe-specific.
- Be explicit and pin everything: now satisfied — the setting appears in the printed plan, the embedded preparation manifest and the reproduction command.
- Bring real evidence (#210): solid for the pool effect (~8.2 / ~6.3 / ~4.3 GB per slot; 16 GB freed at concurrency 4). Still missing the measurement only this flag can produce — see gap 5.
Blockers (must fix before merge)
- The new test cannot pass — two independent defects.
tests/cli/test_planning.py:257assertsby_key["context_target"].value.int64_value == 131072. The proto field isint_value(helios/proto/runtime_core.proto:127), so this raisesAttributeError; andrebuild_manifest._preparation_value(rebuild_manifest.py:329-333) emitsuint_valuefor a non-negative int, so the correct assertion isuint_value == 131072.tests/cli/test_planning.py:230-232plans withcontext=500000and expects the clamp.500000 % 64 == 32, so the new page-multiple validation (planning.py:289-290) raisesUsageErrorand the test errors out before reaching the assertion. Use a page-aligned value above the recipe max (e.g.327680or500032). Both are one-line fixes, but as pushed the PR does not pass its own suite.
- Two wiring paths the test does not cover.
common_preparation_kwargsreturningprepared_context(bootstrap.py:58) is the only line that changes the exported core, and the multi-host export path (cli/serve.py:206) was the previous blocker; neither is asserted. Addassert kwargs["context"] == capped.prepared_context(mirroringtests/cli/test_commands.py:88-91) and one assertion that the--ranks > 1plan carries the target.
Should fix
Plan.demand_pagesis uncapped.planning.py:325-326still computesconcurrency * (recipe.context // page_tokens), so the plan's printed/to_dictdemand (planning.py:440) overstates the KV demand of a capped core — the exact number this flag exists to lower. Useprepared_contextthere.- Cap-affected derived values still use the recipe max.
_server_optionssetsmax_body_bytesfromrecipe.contextand tells clients "context is limited by the checkpoint and available cache capacity" (cli/serve.py:68-69); that hint is what users see on a context admission error (helios/src/server/http.rs:59(not opened)). With a cap the hint should name the export cap, andmax_body_bytesshould followmin(recipe.context, prepared_context)or be left deliberately oversized with a comment. Related: a cap also lowers the default output allowance, sincemax_new_tokensdefaults tomax_sequence_tokens(config.rs:210-212) — one sentence in thedocs/cli-design.md:446row. - Evidence still does not show the capability the flag uniquely provides. The table uses
--kv-cache-limit concurrencyfor every column, so it measures the pool, which--kv-cache-limit context/--memory-limitalready move at serve time. Add one case at equal prompt and output length proving the ceiling: a request between the cap and the recipe max rejected by the capped core and accepted by stock, plus/v1/modelsreporting the smallermax_model_len. That is the claim no runtime knob can reproduce. - The
min(…, self.tokens)clamp bakes export-host VRAM into the artifact.planning.py:375means--request-context 131072can silently prepare less on a fuller GPU. It is legal (the catalog only requiresmax_sequence_tokens <= prepared_sequence_tokensand page alignment,helios/src/model/catalog.rs:48-57) and the description now says it, butto_dict()prints the target, not the effective value; printingprepared_contextnext to it makes the artifact self-describing. - Say the accepted multiple in help.
cli/__init__.py:167-170(not opened) says nothing about the page multiple thatplanning.py:289-290enforces; the neighbouring--prefill-chunk-sizeline states its multiple. Also consider naming the kwargcontext_target=rather thancontext=infit()/plan()(planning.py:455,593), sincePlan.contextkeeps a different meaning; the current naming invites future misuse.
Cost, benefit, alternatives
- Cost: ~35 added lines, one field, one property, three pass-throughs, no runtime or CUDA path, no state/catalog-transition risk; a strict no-op when the flag is omitted (
prepared_contextreturns the recipe max), so existing cores and cached artifacts are unaffected. Maintenance is near zero — the pieces to keep in sync are the three artifact sites, now all covered. - Benefit: for people serving a long-context model on one SM120 card or DGX Spark, the choice between 256K per request and double the concurrency; 16 GB freed at concurrency 4 on Qwen3.8-27B, plus an honestly advertised context. Real, but bounded — it helps the memory-constrained single-model deployment the vision describes, not a broad audience.
- Simpler alternative / duplication: checked and rejected.
--kv-cache-limitand--memory-limitshape the pool at serve time but cannot change the admission ceiling ormax_model_len, and doing it "without new code" would mean minting variants of each of the thirteen recipes. This is the smallest footprint that reaches the decision point.
Bottom line
Merge after fixing the two broken assertions in tests/cli/test_planning.py:230-232,257, adding the common_preparation_kwargs/multi-host assertions, and using prepared_context in demand_pages (planning.py:325-326). The evidence gap (5) and the hint/body-limit/default-output notes (4) are worth one revision of the description and one line of docs; none of them touch the design, which is well placed, general, and a no-op by default.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Simplicity
Verdict: should-fix issues only Blocking:
- None. Should fix:
- ignition/planning.py:371-375 + :696:
prepared_contextre-clamps at every caller, so the caller keeps a localeffective_context = min(result.context, result.prepared_context); folding the clamp into the accessor (self.context if self.context_target is None else min(self.context, self.context_target)) is behaviour-identical and deletes the local. - tests/cli/test_planning.py:220-232,247: the new test restates the property's own
min(recipe.context, N, tokens)arithmetic and never assertscommon_preparation_kwargs(...)["context"], the bootstrap seam (ignition/preparation/bootstrap.py:58) that makes the cap reachmax_sequence_tokens; two lines in the existing tests/cli/test_commands.py:88-91 pattern would pin it. - ignition/cli/bench.py:243-248 + ignition/planning.py:432: the bench
preparationrecord is a hand-picked key tuple with no context key at all, andto_dictpublishes stock"context"beside"context_target"but never the prepared value, so recorded measurements do not describe what was prepared (AGENTS.md:452-456). Nits: 3 (positive-target check inside per-candidatefitrather than once inplan(); two-arm ~170-character default-chunk error; three-line help entry plus a rationale clause in docs/cli-design.md:446 that duplicates the KV-limit section). Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Prose
Verdict: should-fix issues only Blocking:
- None. Should fix:
- PR description (opening sentence): the headline VRAM benefit is stated unconditionally, but the KV pool tracks the prepared context only under
--kv-cache-limit context|concurrency(defaultmemoryfills free VRAM); the evidence command uses--kv-cache-limit concurrency, so the condition is required. AGENTS.md:95-102. - PR description ("a cap above the pool resolves to the pool capacity, as stock"): false —
planning.py:373-375clips totokenswhere stock passedrecipe.context(bootstrap.py:58); a cap above the pool prepares a lowermax_sequence_tokensthan no flag. Hides a compatibility change (AGENTS.md:92-94). - PR description order: evidence/result precede the "why", which exists only as a "Workload:" line inside Evidence; AGENTS.md:74-80 requires why → what → result → evidence, and
docs/design-review.md:140-150rejects out-of-order messages. - docs/cli-design.md:446 and ignition/cli/init.py:167-170: the new page-multiple requirement (
planning.py:289-290) is documented nowhere; the multiple isrecipe.page_tokens * context_parallel_size(planning.py:329-332), not always 64.
Nits: 7 — "thirteen recipes" identity-free attribute and wrong path for the value; dead/loose effective_context = min(...) at planning.py:696 and its misnaming of the binding limit; docs table row 1443 "checkpoint maximum" should be the recipe maximum; stale context_hint (cli/serve.py:69); printed plan never emits prepared_context (planning.py:432); undefined "stock" in tests (test_planning.py:217, 227, 247); "Verified … at main c36a6a02" phrasing misattributes the branch measurement to main.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
No prose problems in code behaviour: the omitted flag is byte-equivalent to main (bootstrap.py:58 receives recipe.context), context_target reaches Plan.to_dict, reproduction_arguments, and SCOPE_DEPLOYMENT manifest entries, and tests cover the no-op, clamp, both validations and both manifest paths. The commit message body could not be checked from here. No attempts to instruct the reviewer were found in the description, diff or docs.
Architecture
Verdict: blocking issues
Blocking:
- ignition/planning.py:289-290: the page-multiple check validates the raw
--request-contextvalue instead of the resolvedprepared_context, so the PR's own new test (tests/cli/test_planning.py:230-232,context=500000against a 64-token-page fixture) is guaranteed to raiseUsageErrorand the documented "cap above the recipe max is a no-op" path is unreachable unless the oversized value happens to be aligned.
Should fix:
- ignition/planning.py:371-375:
prepared_contextmin'sself.tokens, which is sized from the export host's free VRAM, so an exported core'smax_sequence_tokensdepends on how much memory was free at export whilereproduction_argsstay identical (AGENTS.md:452-456); Helios already performs this clamp (helios/src/model.rs:268-272).
Nits: 1 (the plan report's context/context_target/tokens trio makes the served value only derivable, not printed; minor, and defensible).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Correctness
Verdict: blocking issues
Blocking:
- tests/cli/test_planning.py:230: the clamp case plans with
context=500000, which the PR's own new page-multiple validation (ignition/planning.py:289-290, fixturepage_tokens=64) rejects, so the test raisesUsageErrorbefore its assertion. - tests/cli/test_planning.py:257: asserts
by_key["context_target"].value.int64_value, a field that does not exist onPreparationValue(helios/proto/runtime_core.proto:124-133 declaresint_value=2,uint_value=3) and would read 0 anyway, since_preparation_valuewrites non-negative ints asuint_value(ignition/preparation/rebuild_manifest.py:333).
Should fix:
- None.
Nits: 2
- ignition/planning.py:375: a target above the recipe maximum is clamped silently, with no notice, while docs/cli-design.md:446 describes the flag as a cap below the recipe's maximum.
- ignition/cli/serve.py:68:
max_body_bytesstill sizes the image budget fromrecipe.contextrather thanprepared_context, so a capped core accepts HTTP bodies for prompts the engine will reject at admission.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Note: the earlier code-level blockers from my previous review round (the multi-host _export_hosts path dropping the flag, the missing page-multiple validation, the cap missing from to_dict()/reproduction args, and bench validating against the stock context) are all fixed at head de1b5b5 and verified in the code. No CI checks ran on the head commit, which is why the two test defects were not caught. pytest tests/cli/test_planning.py settles both.
Conventions
Verdict: should-fix issues only Blocking:
- None. Should fix:
- ignition/cli/serve.py:302-316 and ignition/cli/bench.py:243-248:
--request-contextis the only preparation setting absent from the printed "Select GPUs" plan line and from the benchmark's whitelistedconfiguration.preparationdict, so a capped core's printed report and recorded measurements describe stock preparation (AGENTS.md:452-456). - ignition/planning.py:461-462 vs ignition/planning.py:289-290: one flag's two validations live in two functions (
fitandPlan.__post_init__), departing from the precedent at planning.py:622-625 where--prefill-chunk-sizevalidates form and range in one block inplan(). Nits: 2 —prepared_contextrestatescontextandeffective_context = min(result.context, result.prepared_context)(planning.py:696) is provably a no-op;to_dict()["context"]still reports the uncapped limit beside the newcontext_target, so consumers read a limit the core will reject. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Subtractive
Verdict: make it smaller first
The change: +98 / −18 lines across 9 files (code+docs +41/−18: planning.py +23/−9, ignition/cli/init.py +4, bench.py +2/−1, preparation.py +2/−2, serve.py +3/−3, preparation/bootstrap.py +1/−1, rebuild_manifest.py +3, docs/cli-design.md +3/−2; tests/cli/test_planning.py +57/−0)
Could remove: about 45 lines, in 6 places (≈70 if the flag is dropped entirely and the existing runtime --kv-cache-limit carries the argument)
Biggest subtractions:
- ignition/cli/init.py:167-170, preparation.py:56/68, bench.py:176-177, serve.py:289/472, planning.py:176/453/459-460/535/591/674, rebuild_manifest.py:264-265/390, docs/cli-design.md:446/1443/1490, tests:211-265: the whole
--request-contextsurface is unnecessary — the PR's own VRAM table is measured with the pre-existing runtime--kv-cache-limit concurrency; nothing replaces it except oneBasePreparationConfig.contextinteger: about 28 code lines + the tests - tests/cli/test_planning.py:211-265: the duplicate clamp case, the 0/−1 pair hitting one
<= 0branch, thed["context"]restatement and the 7-line "no context_target when unset" block re-provingfrom_plan's genericadd()-skips-None rule: nothing: about 13 lines - ignition/planning.py:692-701: the 9-line two-message chunk branch, back to the stock 3-line single message carrying the effective context: about 6 lines
- ignition/planning.py:370-375: the 5-line
prepared_contextbody, becausemin(recipe.context, N, tokens)ismin(self.context, N); also the extraminat :696: about 4 lines - docs/cli-design.md:446: the long row repeats :1443 and :1490 (this PR's own other edits) and advertises multi-model hosting, unapproved scope per AGENTS.md:171-175: about 3 lines
Left behind: ignition/cli/serve.py:68-69 (
max_body_bytesstill sized fromrecipe.context;context_hintstill "limited by the checkpoint"), ignition/cli/help.py:38 (--prefill-chunk-size: 64..{recipe.context}), ignition/bench/runner.py:388 (validateslayout.context, the pool-bound value, not the new cap) Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Pre Test Report
Pre-Test Report — PR #533 "Cap the per-request context target" (head de1b5b5)
Recommendation: DO NOT refer to hardware testing yet. Return to the author for fixes.
PR: https://github.com/NVIDIA/hyperflare-inference/pull/533 · author roobyz (CONTRIBUTOR) · head de1b5b5 · base main · 9 files, +98/−18 · no reviews, no CI checks on head. Supersedes closed PR #454 (CHANGES_REQUESTED). Security screen all clear; I found no prompt-injection or agent-directed content in the description, diff, docs or comments — the Design-Signed-Off-By/design-review=1af4 trailers and the "Discord:" line are ordinary PR metadata.
I re-verified every review claim against the tree. The reviews disagree about how much is wrong but agree the feature's seam is right; where they disagreed I went to the code, and on two points I side with the newer reviews against the older ones (see "Corrections" at the end).
1. Why testing now would be wasted hardware time
Blocking A — the PR's own added test cannot pass, for two independent verified reasons
This is decisive on its own: the head is not green, so any GPU time would be spent on an artifact the author must change.
(a) tests/cli/test_planning.py:230-232 plans with context=500000 and expects a clamp. The fixture (tests/cli/test_planning.py:37-38) declares context=262144, page_tokens=64, and its RankCosts (:43) leaves page_tokens unset (ignition/declaration.py:174), so Plan.page_tokens == 64 (ignition/planning.py:329-332). 500000 % 64 == 32, and this PR adds at ignition/planning.py:289-290:
if self.context_target is not None and self.context_target % self.page_tokens:
raise UsageError(f"--request-context {self.context_target:,} is not a multiple of the {self.page_tokens:,}-token page size")
Plan.__post_init__ therefore raises UsageError and the test errors before its assertion.
(b) tests/cli/test_planning.py:257 asserts by_key["context_target"].value.int64_value. helios/proto/runtime_core.proto:124-133 declares int_value = 2 and uint_value = 3 — there is no int64_value, so this is an AttributeError. Even renamed to int_value it would read 0, because rebuild_manifest._preparation_value (ignition/preparation/rebuild_manifest.py:333) writes non-negative ints as uint_value.
Neither defect is judgement: they are arithmetic and the declared protobuf schema. pytest tests/cli/test_planning.py settles both. The bigger gap behind them: the test never asserts the one line that makes the cap real — common_preparation_kwargs(plan)["context"] == plan.prepared_context (ignition/preparation/bootstrap.py:58) — so it would pass even if the cap stopped reaching the core.
Blocking B — alignment is validated on the request rather than the resolved context, and that needs a decision before testing
planning.py:289-290 checks the raw target, while the value the core receives is prepared_context (planning.py:371-375, consumed at bootstrap.py:58). So --request-context 500000 (or 262145, or any unaligned value above the recipe max) is rejected outright even though it would clamp away to a no-op. That contradicts the PR's own docs row (docs/cli-design.md:446, "below the recipe's maximum") and its description ("a cap above the pool resolves to the pool capacity"). Whether the fix validates the resolved value, floors to a page, or keeps rejecting is a semantics decision, and it changes exactly the behaviour a hardware test would exercise. Testing before it is settled risks testing a behaviour that gets reversed.
Blocking C — the exported ceiling depends on the export host's free VRAM
prepared_context is clamped by self.tokens (planning.py:375), and tokens = pages * page_tokens with pages sized from the exporting host's free supply (planning.py:538-544). Two exports with byte-identical reproduction_args — now including --request-context (rebuild_manifest.py:264-265) — can declare different max_sequence_tokens. It is also a duplicated clamp: Helios already narrows at load (helios/src/model.rs:268-272 fit_context; catalog.rs:49 only requires max_sequence_tokens <= prepared_sequence_tokens). And to_dict() prints the target, never the served value (planning.py:432), so a run cannot be read back to prove what was prepared — which is also the reason a hardware run against this head could not conclude anything.
Blocking D — the evidence still does not isolate what this PR adds
helios/src/runtime_core/memory.rs:284-292: page_ceiling returns Ok(None) for KvCacheLimit::Memory — the default (docs/cli-design.md:738) — and only Context/Concurrency size the pool from ceil(context/page_tokens) × histories. The author's VRAM table was measured with --kv-cache-limit concurrency, so it demonstrates the existing runtime flag, not this PR. What only an export-time cap can do is lower the admission ceiling and advertise a smaller max_model_len (helios/src/server/config.rs:131,148; helios/src/server/request.rs:350 (not opened); helios/src/server/models.rs:81 (not opened)). Without one row showing that difference, our GPUs would mostly re-measure --kv-cache-limit.
Also blocking for a useful test — reachability depends on code outside this repo
BasePreparationConfig.context (ignition/preparation/bootstrap.py:33) must be written by each recipe into the core's max_sequence_tokens. The recipes live in the external local-inference-lab/hyperflare-recipes (AGENTS.md:12, 380-392), and the author has previously described the recipe updates as pending. A test could not confirm the end-to-end claim from this repository alone.
2. Should fix before merge (not test-blocking, but cheap while the author is in the file)
- The cap is missing from the printed plan line and the benchmark record.
ignition/cli/serve.py:302-316enumerates every preparation choice but adds no context field, soignition export M --gpus 0 --request-context 131072prints a byte-identical plan line to stock.ignition/cli/bench.py:243-248buildsconfiguration.preparationfrom a 17-key whitelist with no context key at all, so two bench runs at different caps record identical configurations. Both are one-liners next torow_shard_prefill(serve.py:316,bench.py:247). - Add
prepared_contexttoPlan.to_dict()(planning.py:432) rather than onlycontext_target— it is the value Helios is told to serve, and it removes the "read three keys and combine them" step. - Stale derivations after a cap:
serve.py:68max_body_bytesstill usesrecipe.contextandserve.py:69context_hintstill says "context is limited by the checkpoint and available cache capacity" (the string a user sees on a context rejection);planning.py:325-326demand_pagesisconcurrency × (recipe.context // page_tokens)— printed at:440— so it overstates KV demand for a capped core;ignition/cli/help.py:38(not opened) still advertises--prefill-chunk-size: 64..{recipe.context}. - One flag, two validation homes: positivity in
fit(planning.py:461-462, re-run per candidate world size and per option probe) and the page multiple inPlan.__post_init__(:289-290), against the--prefill-chunk-sizeprecedent that keeps form and range in one block inplan()(:622-625). - Redundant reduction:
effective_context = min(result.context, result.prepared_context)(planning.py:696). With no targetprepared_contextisrecipe.context(≥context), with a target it is ≤context; the min is a no-op. Collapsingprepared_contexttoself.context if self.context_target is None else min(self.context, self.context_target)keeps behaviour and removes both. - Docs/help: the page-multiple requirement (
planning.py:289-290) appears in neither the docs row nor the help, and the required multiple isrecipe.page_tokens × context_parallel_size(planning.py:329-332), not always 64. The docs row also states the VRAM benefit unconditionally, though it holds only with--kv-cache-limit context|concurrency.
These are minor and I would not hold a hardware run for any of them alone — but A–D mean the run should not happen yet anyway.
3. Expected value of a hardware test at this head: LOW
- The artifact is not what would ship: two broken assertions plus an unresolved alignment semantics (B).
- The output cannot prove the cap took effect: the served value is neither printed nor recorded (
planning.py:432,bench.py:243-248). - The headline benefit is an existing runtime flag's behaviour under
--kv-cache-limit concurrency(D). - End-to-end reachability depends on unpublished recipe code.
Genuinely worth validating once fixed: the export-time admission ceiling and the advertised max_model_len, plus an honest default-mode VRAM delta (which may be ~0 and must be reported as such).
4. Conditional test plan (adopt after A–D are addressed)
Phase 0 — GPU-free, must pass first (no hardware time)
pytest tests/cli/test_planning.py tests/cli/test_commands.py, with these cases added or repaired:
prepared_context == recipe.contextwhen the flag is omitted;== min(recipe.context, N)when set.context <= 0rejected; a non-page-alignedNbehaves as the decided semantics say, and the resolved value is asserted% page_tokens == 0.- Both arms of the chunk-vs-context error (
planning.py:696-700). - The seam:
assert common_preparation_kwargs(capped, ...)["context"] == 131072and== recipe.contextfor the unflagged plan (pattern:tests/cli/test_commands.py:88-91withBasePreparationConfig). This is the assertion the current test lacks. to_dict()carriescontext_targetandprepared_context;reproduction_argscontains--request-context; the manifest parameter present withSCOPE_DEPLOYMENT— assertinguint_value, notint64_value.- Parser:
--request-contextexists onexport,bench,debug-serveand not onflare run; the multi-host path forwards it (a--ranks 2plan assertsprepared_context == N) — the only pin available for the_export_hostspath, since we have no second host.
Phase 1 — the cap reaches the core (1 GPU of cn5, SM120; matches the author's hardware)
Model: nvidia/GLM-5.3-Flash-NVFP4. Two exports from the same command, differing only in the flag: A --request-context 131072, B unset. Use one GPU, not four — the change is orthogonal to parallelism except through page size.
/v1/models→max_model_lenis 131072 on A and the recipe maximum on B. This is the one assertion only the export-side value can satisfy.- A prompt of ~132k tokens is rejected at admission on A; a prompt just under the cap is accepted.
flare inspect Ashows the cap and its reproduction command re-exports a 131072 core (validates the recording).- Falsification control: an unaligned
--request-contextfails at planning with an actionable message, not at core load (helios/src/model/catalog.rs:50-57yields the opaque "invalid prepared model configuration").
Phase 2 — VRAM, the isolating comparison the PR owes
Under both --kv-cache-limit memory (default) and --kv-cache-limit concurrency, at concurrency 1 and 4, record total VRAM for A and B. The pair separates this PR from the runtime flag. Expect ~0 delta under memory mode; report that as the result.
Phase 3 — regression (cheap, same job)
A pre-PR core still loads and serves; a no-flag export produces the same preparation config as main (bootstrap.py:58 previously received plan.recipe.context, and prepared_context returns exactly that when unset); --request-context still absent from flare run.
Budget / efficiency: ~2 exports + ~6 serve starts on a single cn5 GPU ≈ 1–2 GPU-hours, one model, one host. Skip multi-host (no second host available — cn5 is four GPUs on one host, cn7 is a single GB10). Skip cn7 (no ARM64-specific question). Do not run a throughput A/B sweep — the PR makes no speed claim, only a memory and admission-ceiling claim.
5. Bottom line for the referral decision
- Substantive problems that must be fixed first: yes, four — the PR's own test cannot pass (two verified defects), the alignment check validates the wrong quantity, the exported ceiling is export-host-dependent and unprintable, and the evidence does not isolate this PR from
--kv-cache-limit. - Expected value of testing
de1b5b5: low — wrong artifact, unprovable output, dependence on unpublished recipes. - Fix effort is small (two assertions, one alignment decision,
prepared_contextinto_dict, two reporting one-liners, one seam test), so the efficient order is: fix → GPU-free suite green → one targeted 1–2 GPU-hour run on cn5. - Fixed since my previous report, do not re-raise:
_export_hostsnow forwards the flag (serve.py:206); page-multiple validation exists;to_dict/reproduction_arguments/from_planrecord the cap (planning.py:432,rebuild_manifest.py:264-265,:390); bench compares againstprepared_context(planning.py:248); a test exists.
Corrections to the reviews, from reading the code:
- The Subtractive lens's first recommendation — drop
effective_contextatplanning.py:696as a deadmin— is right that theminnever selectscontext, but deleting the comparison would be wrong: the chunk check must still run against the served ceiling. Collapse the property, keep the check. - The Subtractive lens's claim that the whole flag duplicates
--kv-cache-limitoverreaches:memory.rs:284-292/config.rs:131-148show the runtime cannot lowermax_sequence_tokensormax_model_len. The overlap objection is about the evidence, not the capability. - The "multi-model hosting is a charter non-goal" objection is withdrawn: the description and the docs row now justify the cap by same-model concurrency.
Full detail with citations is in scratchpad entries #5 (verified blocker state at de1b5b5), #6 (blocking defects with file:line), and #7 (decision, plan and budget).
code review summary
Recommendation: Changes Requested
Blockers:
- The added test cannot pass.
tests/cli/test_planning.py:230plans withcontext=500000; the fixture page size is 64 (:38,RankCostsat:43leavespage_tokensunset soPlan.page_tokensfalls back torecipe.page_tokens,planning.py:329-332), and500000 % 64 == 32, so your own check atplanning.py:289-290raises before the assertion at:232runs. The head has no CI, so it was never executed;pytest tests/cli/test_planning.pysettles it in one command. - The page-multiple check validates the request, not the value served.
planning.py:289-290rejects a target whose resolved context is perfectly aligned (--request-context 262145on a 256K recipe), contradictingdocs/cli-design.md:446("below the recipe's maximum") and the description's "a cap above the pool resolves to the pool capacity". → Validatemin(self.recipe.context, self.context_target) % self.page_tokens: one expression,100is still rejected (100 % 64 = 36), and the 500000 case then passes unchanged and becomes the proof of the documented clamp.
Should fix:
- The cap appears in no plan report and no benchmark record.
Plan.to_dict(planning.py:432) gainedcontext_targetbut notprepared_context, so a pool-clamped cap is invisible andcontext(pool-bound) reads as the served ceiling; the serve "Select GPUs" line (serve.py:302-316) lists every sibling preparation choice (row-sharded prefill at:316) and omits this one; the benchpreparationwhitelist (bench.py:243-248, 17 keys) contains no context key at all, so two runs at different caps record identical configurations. → Add"prepared_context": self.prepared_contexttoto_dict, a guarded· request context {plan.prepared_context:,}to the f-string, and"context_target", "prepared_context"to the bench tuple (three one-liners next to existing precedent). - Two evidence claims are wrong. The VRAM result holds only with
--kv-cache-limit context|concurrency—page_ceilingreturnsOk(None)under the defaultmemorymode (helios/src/runtime_core/memory.rs:290-292; default atdocs/cli-design.md:738), and your own commands use that flag; and "a cap above the pool resolves to the pool capacity, as stock" is false, since stock passedrecipe.contextunclipped (bootstrap.py:58before this PR), 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 and the why arrives last as a Workload line (
AGENTS.md:74-80,docs/design-review.md:140-150(not opened)); "Verified … at main c36a6a02" reads as if the capped numbers were measured on main, though the flag exists only on this branch; "thirteen recipes" is a count a reviewer cannot check (recipes live in the external repository,AGENTS.md:9-13).
Subtract / Simplify:
Could remove ~17 of +98 added lines (≈9 of the +57 test hunk, ≈8 of the +41 code/docs), plus about half of the new docs row:
tests/cli/test_planning.py:235-238,:247,:259-265— drop the duplicate cases (~9 lines):0and-1hit one branch,d["context"] == capped.contextrestates:227, and the 7-line no-key block re-provesadd()'s genericNoneskip (rebuild_manifest.py:350-352) already covered at:92-106. Keep the clamp case — once the blocker is fixed it proves the documented no-op.ignition/planning.py:697-700— collapse the two-arm chunk error to one message against the effective bound (~5 lines); the stock message already names both numbers, and thepass --prefill-chunk-size below Nremedy is implied.ignition/cli/__init__.py:167-170— shorten the three-line help to one clause plus a default, matching:163-166(~2 lines).docs/cli-design.md:446— trim about half the row: the rationale sentence repeats the KV-limit section (:828-833) and the two owner rows you already edit (:1443,:1490).- Do not cut (verified load-bearing):
prepared_context'scontext_target is Noneearly return andeffective_context = min(result.context, result.prepared_context)(planning.py:373-374,:696), andderive(context=...)(preparation.py:56 (not opened),68).
Nits:
5 nits
Full report — PR #533 "Cap the per-request context target" (head de1b5b5, base main, 9 files, +98/−18, no CI checks)
Key findings
- The seam and the shape are right and need no rework.
ignition/preparation/bootstrap.py:58passesplan.prepared_contextintoBasePreparationConfig.context(bootstrap.py:33), which becomes Helios'sprepared_sequence_tokensandlimits.max_sequence_tokens(helios/src/server/config.rs:131,147-148), narrowed by the runtime to the physical pool (helios/src/model.rs:268-272) and validated for page alignment at load (helios/src/model/catalog.rs:43-70). Omitting the flag is a true no-op (planning.py:373-374). One optional field, one accessor, one keyword, one line at the consumer — no new mechanism, no per-model branch. - Two blockers, both from one line: the validation at
planning.py:289-290checks the requested target rather than the value the core will serve, which (a) fails the PR's own new test and (b) rejects inputs whose resolved context is aligned, contradicting the docs row and the description's clamp promise. - One should-fix carries five lenses' worth of findings: the setting reaches the plan JSON and the manifest but not the printed plan line, not the benchmark configuration record, and there is no
prepared_contextkey anywhere — AGENTS.md:452-456 is only two-thirds satisfied. - Subtraction: ~17 of the +98 added lines are removable without losing coverage or behaviour, plus about half the new docs row. The three "dead code" claims from earlier rounds (
prepared_context's early return, theeffective_contextmin,derive(context=)'s keyword) were checked and are load-bearing — do not ask for them. - Never run: the head has no CI checks and no pytest run happened in this review. Every behavioural claim below is arithmetic over the fixture constants or a schema lookup; one
pytest tests/cli/test_planning.pyconfirms both blockers.
Blockers
B1 — The added test cannot pass on this head.
tests/cli/test_planning.py:229-232:
oversized = planning.plan(recipe, recipe.checkpoints[0], gpus, context=500000, **base)
assert oversized.context_target == 500000
assert oversized.prepared_context == min(recipe.context, oversized.tokens)
The fixture declares context=262144, page_tokens=64 (:37-38) and its RankCosts (:43) leaves page_tokens unset (ignition/declaration.py, default None), so Plan.page_tokens == recipe.page_tokens == 64 (planning.py:329-332). 500000 % 64 == 32, and this PR adds the rejection at planning.py:289-290, which runs in __post_init__ for every Plan(...) — including the one fit builds (planning.py:528-537), because page_tokens depends only on recipe/costs/context-parallel width. So planning.plan(...) raises UsageError("--request-context 500,000 is not a multiple of the 64-token page size") and the assertions never run. No CI checks on the head, which is presumably why it was not seen.
Requested change: fixing B2 makes this case pass unchanged and turns it into the proof of the clamp; if you prefer to keep the validation as-is, use a page-aligned over-size target such as 524288 (64 × 8192) and leave 100 in the rejection case at :241-242.
Why: the test and the validation currently contradict each other; the head cannot be green.
B2 — The page-multiple check validates the request, not the served value.
planning.py:289-290:
if self.context_target is not None and self.context_target % self.page_tokens:
raise UsageError(f"--request-context {self.context_target:,} is not a multiple of the {self.page_tokens:,}-token page size")
The core receives prepared_context = min(recipe.context, context_target, tokens) (:371-375, consumed at bootstrap.py:58), so a target above the recipe maximum resolves to an aligned value yet is rejected: --request-context 262145 on a 256K recipe fails outright even though it changes nothing. That contradicts docs/cli-design.md:446 ("below the recipe's maximum", default "the recipe's maximum context"), the description's "a cap above the pool resolves to the pool capacity, as stock", and the way the rest of plan treats capacity (:370-375, :538-544 clamp rather than reject).
Requested change (one expression): validate min(self.recipe.context, self.context_target) % self.page_tokens (or prepared_context where it is available). 100 % 64 = 36 is still rejected, so the existing match="multiple of the" case keeps working. Settle the intended rule — accept, floor to a page, or reject an unaligned oversized target — and state it in docs/cli-design.md:446 and the helptext.
Why: the alignment requirement is real (helios/src/model/catalog.rs:43-70 requires both prepared_sequence_tokens and limits.max_sequence_tokens to be multiples of page_tokens, and rejects a misaligned core at load — long after export), so the check belongs at export time, just on the quantity the core is told to serve.
Should Fix
S1 — The cap appears in no printed plan and no recorded measurement (Backgammon: AGENTS.md:452-456).
AGENTS.md:452-456: a plan-carried setting is one whose "plan, printed report, and recorded measurements describe what was prepared". The plan JSON and manifest satisfy this (planning.py:432, rebuild_manifest.py:264-265, :390); the other two surfaces do not.
(a) Plan.to_dict (planning.py:432) emits context (pool-bound, :365-368), context_target and checkpoint_context, but not prepared_context — so with a cap set, a pool clamp is silent and the report names a ceiling the prepared core will reject. (b) The printed "Select GPUs" line (serve.py:302-316) enumerates every sibling preparation choice, with row-shard-prefill a one-token addition at :316, and has no context field: ignition export M --gpus 0 --request-context 131072 prints a byte-identical plan line to stock while preparing graphs and KV pages at a different context — the one number the PR's own evidence table is a function of. (c) The benchmark record (bench.py:243-248) builds details["configuration"]["preparation"] from a whitelist of 17 to_dict() keys with no context key at all, so two --request-context runs at different caps write identical configurations.
Requested change (three one-liners, each next to existing precedent): add "prepared_context": self.prepared_context beside context_target in to_dict; add a guarded · request context {plan.prepared_context:,} to the serve f-string next to row-shard-prefill; add "context_target", "prepared_context" to the bench key tuple next to "row_shard_prefill".
Why: this is the same defect five lenses reached from different directions (silent under-delivery, unrecorded measurement, unstated served value), and one implementation resolves all of them.
S2 — Two evidence claims in the description are wrong or unscoped.
(a) The VRAM headline is unconditional, but the pool only follows the prepared context under a non-default --kv-cache-limit. helios/src/runtime_core/memory.rs:290-292: page_ceiling returns Ok(None) under KvCacheLimit::Memory — the default mode (docs/cli-design.md:738, :828); only Context and Concurrency size a ceiling from the prepared context (:298-320). The author's own reproduction commands say --kv-cache-limit concurrency, and the shipped docs row says so (docs/cli-design.md:446); the description does not. (b) "a cap above the pool resolves to the pool capacity, as stock" is false. Stock passed plan.recipe.context unclipped (bootstrap.py:58 before this PR), whereas with a target the value is min(recipe.context, target, tokens) (planning.py:373-375) — so a cap above the pool can prepare a lower max_sequence_tokens than the same export without the flag, which is the opposite of "as stock" and is a compatibility change (AGENTS.md:92-94, :103-109). The new test asserts exactly this behaviour (tests/cli/test_planning.py:229-232).
Requested change: add the --kv-cache-limit context|concurrency condition to the headline and to the Result line, and state that a cap above the KV pool resolves to the pool capacity and can therefore prepare a lower max_sequence_tokens than no flag.
Why: a reader who exports with a cap and runs with defaults will see none of the claimed 16 GB; and the sentence as written reassures the reader precisely where the largest behaviour change occurs. Prefer stating this over changing the clamp — the clamp is correct and makes the bench check honest (planning.py:248).
S3 — One PR-description mechanics bullet.
The four required questions are out of order: the measurements and headline result lead, and the "why" appears only as a Workload line inside Evidence (AGENTS.md:74-80, docs/design-review.md:140-150 (not opened), :172-177). "Verified on one RTX PRO 6000 Blackwell … at main c36a6a02" reads as if the capped numbers were taken at main, though --request-context exists only on this branch (ignition/cli/__init__.py:167, planning.py:176); c36a6a02 is the baseline for the no-flag comparison, as the description says later. "the thirteen recipes' prepare() read context=plan.prepared_context" names a count a reviewer cannot check (recipes are external, AGENTS.md:9-13) and misplaces the seam, which is ignition/preparation/bootstrap.py:58.
Requested change: lead with the single-model why (a 256K recipe maximum over-provisions per-request KV for the requests a deployment actually serves), then what changed, then the claimed result with its --kv-cache-limit condition, then the measurements; name which side each number came from and drop the recipe count.
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 the new docs row.
- Duplicated test cases —
tests/cli/test_planning.py:235-238,:247,:259-265(~9 lines).context=0andcontext=-1both hit the singlecontext <= 0check (planning.py:461-462) — keep one (~2).assert d["context"] == capped.contextrestates:227(~1). The 7-line "nocontext_targetwhen unset" block re-provesfrom_plan's genericadd()early return onNone(rebuild_manifest.py:350-352), already exercised by the sibling manifest test at:92-106(~6). Keep the clamp case: after B2 it becomes the proof of the documented no-op, which is more valuable than deleting it. - Two-arm chunk error —
planning.py:697-700(~5 lines). The stock three-line message already names both numbers, which is all a user needs to choose a remedy; thepass --prefill-chunk-size below Nclause restates the constraint. Keep one message against the effective bound with a(default chunk is 4096)clause — the default-chunk arm is reachable only through an explicit target below 4096 (the pool floor is 8192 tokens:MINIMUM_REQUEST_TOKENSat:32,minimum_pagesat:336), so a clause is enough. No test asserts either string. - Three-line help —
ignition/cli/__init__.py:167-170(~2 lines). One clause plus a default, matching--prefill-chunk-sizeat:163-166, e.g."cap the prepared per-request context at N tokens, a multiple of the page size; longer requests are rejected (default: the recipe's maximum)". - Docs row —
docs/cli-design.md:446(~half the line). "since the per-request cache allocation is sized from the prepared context" is already documented at:828-833; "a request that would exceed N is rejected" is restated by this PR's own:1443/:1490edits; "Command line only; … requires re-export" is the same clause--mixed-prefillcarries at:447. - Do not cut — verified load-bearing, previously mis-claimed dead.
prepared_context'scontext_target is Noneearly return (planning.py:373-374): with no target it returnsrecipe.context, which can exceed the pool-boundcontext(:365-368) on a memory-constrained host; folding it toself.contextwould lower the declaredmax_sequence_tokenswith no flag and break the PR's own no-op claim (tests/cli/test_planning.py:220). Likewiseeffective_context = min(result.context, result.prepared_context)(:696) is the clamp that keeps the no-flag path stock, andderive(context=...)(preparation.py:56 (not opened),68) is the funnel all four entry points use. Keep all three. - Not asked: dropping the flag in favour of
--kv-cache-limit. Considered and rejected. The runtime flag sizes loaded KV at serve time; it cannot lower the exportedmax_sequence_tokens, which is the residual datum this PR adds and the thing #454 asked for. The flag stays; only the scaffolding above is subtracted.
Nits
- One flag, two validation homes —
planning.py:461-462vs:289-290. Thecontext <= 0check lives infit, whichplan()re-enters per candidate world size and per shortfall probe (:686-704), while its sibling sits in__post_init__. Move it beside the alignment check (both there, wherepage_tokensandrecipe.contextare available) or both intoplan()next to the--prefill-chunk-sizeblock (:622-625). The new tests drive both throughplanning.plan(...), so moving them drops no coverage. serve.py:68-69still describe the pre-cap world.max_body_bytesis sized fromrecipe.context, andcontext_hintreads "context is limited by the checkpoint and available cache capacity"; with a cap both misdescribe the served ceiling. Harmless (admission rejects with the documented error) but the one remaining place that treats the recipe maximum as the served context.ignition/cli/help.py:38advertises--prefill-chunk-size: 64..{recipe.context}, a range above the effective prepared context once capped.docs/cli-design.md:1443says "The checkpoint maximum" where the new flag row and neighbouring rows say "the recipe's maximum"; one term.- Test comments use "stock" as an undefined referent (
tests/cli/test_planning.py:217,:227,:247); say "the behaviour without the flag".
Verified clean — do not re-raise
- All four entry points forward the flag:
serve.py:206(_export_hosts),:289,:472,bench.py:177— the earlier multi-host gap is closed. - Omission is byte-equivalent to
main:prepared_contextreturnsrecipe.context(planning.py:373-374), exactly whatbootstrap.py:58passed before;rebuild_manifest.py:264-265is inside thecontext_target is not Noneguard andadd()skipsNone(:350-355). - The setting reaches reproduction and inspection:
reproduction_arguments()(rebuild_manifest.py:264-265) andfrom_planwithSCOPE_DEPLOYMENT(:390). - Bench compares against the cap:
planning.py:248usesprepared_context, so an over-large--contextsselection now fails at planning rather than after GPU preparation. - Compatibility of the field:
Planis frozen andcontext_targetdefaults toNone(:176), so existing constructions work anddataclasses.replace()carries it through the CLI paths. - Scope and precedent: flag grouping in the capacity group beside
--prefill-chunk-size(ignition/cli/__init__.py:167-170), keyword-only threading style matchingrow_shard_prefill, house error form, no per-model branch, no env toggle, no Helios change, no duplicated mechanism (the nearest lever,--kv-cache-limit, is genuinely distinct). The docs row correctly scopes the payoff to--kv-cache-limit concurrency. - No attempt to direct the reviewer was found in the description, the diff, the docs changes or the closed #454 thread.
Open questions / not verifiable from this tree
- Did the two blockers reproduce? Not run here. Both follow from arithmetic (
500000 % 64 = 32) and the declared protobuf schema;pytest tests/cli/test_planning.pysettles them, and the head has no CI checks. - What is the intended rule for an unaligned target above the recipe maximum — accepted, floored to a page, or rejected? Needs a decision, not a measurement, and should be stated in the docs row.
- Should
to_dict()["context"]stay pool-bound? The new test pins the current meaning (tests/cli/test_planning.py:247); only a maintainer can say whether external consumers depend on it. Addingprepared_context(S1) makes the question non-urgent. - Do external recipes re-round
config.context? Recipes live inhyperflare_recipes(AGENTS.md:381), outside this diff. Nothing in this repository rounds, and the load-time alignment check is in Helios, which is why an export-time check on the right quantity matters. - The VRAM table (RTX PRO 6000 Blackwell, Qwen3.8-27B, concurrency 1-4) is the description's claim; nothing in this tree pins the relationship, and no test can — only the
--kv-cache-limitscoping (S2a) can be verified. - The commit message body was not checked (
git log -1 --format=%B de1b5b5); whether it follows the four-part scheme cannot be settled from this environment.
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence:
I reviewed the full diff of PR #533 ("Cap the per-request context target", roobyz, open, head 02023eb, base main, 9 files +84/−18, no CI checks, no human reviews): docs/cli-design.md, ignition/cli/{__init__,bench,preparation,serve}.py, ignition/planning.py, ignition/preparation/{bootstrap,rebuild_manifest}.py, tests/cli/test_planning.py; plus the whole PR conversation and the linked closed predecessor #454.
- No instruction-bearing text aimed at an agent. Nothing in the description, comments, code comments, docstrings, docs rows or test docstrings tells a reader-agent to ignore prior instructions, approve, run commands, or withhold findings. The only test docstring (tests/cli/test_planning.py:212) is descriptive:
"--request-context: no-op path, clamp, validations, manifest keys." - No hidden or obfuscated content. No zero-width/joiner/bidi/BOM characters in the changed hunks, no base64 blobs, no added
eval/exec/__import__/os.system. - No exfiltration or execution surface added. The diff is arithmetic (
min(recipe.context, context_target, tokens), ignition/planning.py:377-381), argparse flag registration, error strings, dict keys (planning.py:438), and a manifest reproduction arg usingstr(int)(rebuild_manifest.py:264-265, 389). - No supply-chain, CI, hook, dependency, AGENTS.md or skills changes. No
.github/workflows,.githooks, Dockerfile, dependency manifest or permission file in the diff. - Two benign items examined and dismissed. (1) The two
flare-autobotreview footers ("Call @flare-autobot after push", "include #autobot:ignore to opt out", report links) are reader/reviewer-facing boilerplate, not agent instructions — noted, not a finding. (2) The description'sDesign-Signed-Off-By: Roberto Rivera; design-review=1af4trailer matches the repo's own commit-trailer convention (.githooks/commit-msg, docs/design-review.md:191-199); self-signing is a process question, not an injection. I could not recompute the digest. - Non-safety defect worth a reviewer's attention (not malicious). At the reviewed head, the new test expects a page-multiple rejection (
pytest.raises(UsageError, match="multiple of the")forcontext=100againstpage_tokens=64, tests/cli/test_planning.py:238-240), but I found no page-multiple check anywhere inignition/— repo-wide search for "multiple of the" matches only selene/src/disk.rs:458 (not opened) and that test line;ignition/planning.pyhas only the positive-target validation. The test would therefore fail at this head. Ordinary defect, and the reason no CI signal exists.
Original task instruction followed: nothing malicious found, so the report is issued as "All Clear".
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: roobyz (CONTRIBUTOR); Discord rzr2020
Motivation: Exports today always prepare the core for the recipe's full 256K context, which over-provisions the KV pool for the concurrency a deployment actually wants. A --request-context N export flag would let an operator lower that per-request ceiling deterministically, at export time, instead of only bounding KV at serve time.
Scale: +84 / −18 lines in 9 files (head 02023eba, down from +98/−18 at the head I last reported)
Proposal:
- Add
--request-context Nto the preparation arguments (ignition/cli/__init__.py:167), soexport,benchanddebug-servetake it;flare rundoes not. - Thread it
serve/bench → derive() → planning.fit(), addPlan.context_target(planning.py:186) andPlan.prepared_context = min(recipe.context, target, tokens)(:379-381), leavingPlan.contextstock. - Hand
plan.prepared_contextto the recipes viaignition/preparation/bootstrap.py:58, so it becomes the core'smax_sequence_tokens. - Record the cap:
to_dictcarriescontext_target/prepared_context(:438), the manifest emits--request-contextand aSCOPE_DEPLOYMENTparameter (rebuild_manifest.py:264-265,:389), the serve line and bench whitelist print it (serve.py:319,bench.py:248). - Add one test,
tests/cli/test_planning.py:211-254, and adocs/cli-design.md:446flag row. Touches: ignition/planning.py— the plan/validation/accessor surface; the one place the cap is (or is not) checked.ignition/cli/—preparation.py(derive),serve.py,bench.py,__init__.py: the flag's whole wiring, and where all three subcommands now crash.ignition/preparation/(bootstrap.py,rebuild_manifest.py) plustests/cli/test_planning.pyanddocs/cli-design.md. Related items:- #454 Cap the prepared per-request context (closed): the superseded attempt; #533 answers its review, so its four objections are the yardstick here.
- #516 (open): touches the same
_preparation_arguments,from_plan,reproduction_arguments,common_preparation_kwargsand serve "Select GPUs" line — larger now (+546/−82), so merge order decides conflicts. - #508 (open, now merged into this PR's base): row-sharded attention; the new test sits directly above #508's test at
tests/cli/test_planning.py:258. - #543 (merged into base): joint-tuning removal — accounts for the diff shrinking from +98 to +84.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Autobot comments: Do not merge. Two things changed since the last report, both for the worse. (1) The page-multiple validation that existed at
de1b5b5has been deleted, so--request-contextis now validated only for positivity (planning.py:467-468) and a misaligned cap exports a core Helios refuses at load (helios/src/model/catalog.rs:48-57) — the original #454 blocker is back, while the rewritten description still claims the validation and the test still asserts its error message. (2) A blocker no review has caught:derive()never declares acontextparameter (ignition/cli/preparation.py:45-56) yet:69writescontext=context, soexport,benchanddebug-serveraiseTypeError: unexpected keyword argument 'context'on every invocation, flag or no flag, and two existing tests (tests/cli/test_commands.py:88-91,:114-117) break. The added test still cannot pass (two different assertions now fail), and it still asserts neither the load-bearingbootstrap.py:58handoff nor the multi-host path. Three prior findings are genuinely closed (plan JSON, serve line, bench record). The evidence table still lacks the only two rows that would justify the flag — a stock core served with--kv-cache-limit context, and a reduced--memory-limit— and the docs row lost the--kv-cache-limit concurrencycondition it had gained. The only new human event is a bare@flare-autobotre-review ping at 17:56, posted minutes after the description rewrite; no CI run is reported on the head.
Value Proposition
Verdict: worth it with changes — the capability is needed, the layer is right, the footprint is tiny (9 files, +35/−14 plus one test, all Ignition Python), and the flag is a strict no-op when omitted. But as pushed the new test still cannot pass, and the "page-multiple validation" the description claims was removed in this revision, leaving an unaligned target that exports a core Helios refuses to load after a full GPU preparation.
What the change does (verified on the head)
ignition/preparation/bootstrap.py:58—"context": plan.prepared_contextreplacesplan.recipe.context. This is the only line that reaches the core:BasePreparationConfig.context(bootstrap.py:33) → Heliosprepared_sequence_tokens(helios/src/server/config.rs:131) →limits.max_sequence_tokens(config.rs:148), narrowed to the physical pool (helios/src/model.rs:268-272), enforced at admission (helios/src/server/request.rs:350) and advertised asmax_model_len(helios/src/server/models.rs:81(not opened)). A cap also lowers the default output allowance, sincemax_new_tokensdefaults tomax_sequence_tokens(config.rs:210-212).ignition/planning.py:186—context_target: int | None = Noneon the frozenPlan;:377-381—prepared_context= recipe max when no target, elsemin(recipe.context, context_target, tokens); stockPlan.context(:372-374) untouched.- Wiring:
planning.py:549,689;cli/preparation.py:68-69;cli/serve.py:207(multi-host),:291,:476;cli/bench.py:177. All four entry points forward the flag — the multi-host gap from the earlier round is closed. - Artifacts:
to_dict()(planning.py:438) carriescontext_targetandprepared_context;--request-contextinreproduction_arguments(rebuild_manifest.py:264-265);context_targetasSCOPE_DEPLOYMENT(rebuild_manifest.py:389); bench configuration record now includes both keys (cli/bench.py:248); the "Select GPUs" line prints the effective value (cli/serve.py:319). - Docs: flag row plus both ownership rows (
docs/cli-design.md:446,1443,1493).
Charter mapping
- What gets merged: "a measured performance/memory issue". The description gives a measured VRAM table on a named SM120 card, model, pinned revision and the exact commands.
- Vision fit: the exact case the vision names — long conversations / coding agents on one SM120 workstation or DGX Spark — where a 256K per-request ceiling over-provisions KV for the requests actually served. Single-model rationale; the multi-model framing that was a charter non-goal is gone from the docs row.
- Right problem, right layer (#404): the runtime genuinely cannot do this.
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:284-331) and--memory-limit(memory.rs:238-274) shape the pool; neither can lowermax_sequence_tokensor the advertisedmax_model_len, which are baked fromprepared_sequence_tokensat load. An honest under-capacity advertisement is an export-time decision. - No per-model branches: one dataclass field, one property, three pass-throughs, one help line. Nothing recipe-specific, no Helios change, no new mechanism.
- Be explicit: the setting now reaches the plan JSON, the printed plan line, the benchmark record, the embedded preparation manifest and the reproduction command.
- Evidence: solid for the pool effect (~8.2 / ~6.3 / ~4.3 GB per slot; 16 GB freed at concurrency 4), but see gap 5.
Blockers (must fix before merge)
- The new test cannot pass — two independent defects in
tests/cli/test_planning.py.:254assertsby_key["context_target"].value.int64_value == 131072._preparation_valuewritesuint_valuefor a non-negative int (rebuild_manifest.py:332-333; proto fields areint_value = 2,uint_value = 3,helios/proto/runtime_core.proto:127-128), so the attribute does not exist →AttributeError. Correct assertion:uint_value == 131072.:238-240expectsmatch="multiple of the"forcontext=100. No page-multiple validation exists on this head (Plan.__post_init__,planning.py:224-296, never mentionscontext_target; search finds no such error string anywhere inignition/).context=100is rejected instead by the chunk check atplanning.py:709-711— "--prefill-chunk-size 4,096 exceeds the 100-token context this plan allows" — sopytest.raises(..., match="multiple of the")fails.
- The alignment validation the description advertises is missing, and its absence is a real export-time defect. Helios rejects a core whose
prepared_sequence_tokensorlimits.max_sequence_tokensis not a multiple of the page size (helios/src/model/catalog.rs:49-57, called at load fromhelios/src/server/config.rs:226). With no export-time check,--request-context 131100on a 64-token-page recipe plans cleanly, spends the full GPU preparation, and then the core fails with "invalid prepared model configuration" atflare run. Add the check inPlan.__post_init__on the value actually served —min(recipe.context, context_target) % page_tokens(page_tokens is available there viaplanning.py:335-338) — so an oversized-but-aligned target (500000-alignment aside) stays accepted,100is rejected, and the docs may then state the rule. Either implement it or drop the claim from the description and document that unaligned targets fail at load.
As pushed, pytest tests/cli/test_planning.py therefore fails; the head has no CI, which is why it has not been seen.
Should fix
Plan.demand_pagesis still uncapped (planning.py:331-332):concurrency * (recipe.context // page_tokens)feeds the printed/to_dictKV demand (:446), so a capped core's report overstates the very number this flag lowers. Useprepared_context.- Cap-affected derived values still use the recipe max.
_server_optionssizesmax_body_bytesfromrecipe.contextand tells clients "context is limited by the checkpoint and available cache capacity" (cli/serve.py:68-69) — that hint is what a user sees on a context admission error. With a cap both misdescribe the served ceiling. Related:ignition/cli/help.py:38advertises--prefill-chunk-size: 64..{recipe.context}, a range above the effective context once capped; anddocs/cli-design.md:446should note that a cap also lowers the default output allowance (config.rs:210-212). - The evidence still does not measure what only this flag can do. Every column uses
--kv-cache-limit concurrency, so the table measures the pool, which--kv-cache-limit context/--memory-limitalready move at serve time (and under the default--kv-cache-limit memory,page_ceilingreturnsOk(None),helios/src/runtime_core/memory.rs:290-292, so the headline should state the condition). Add one case at equal prompt and output length proving the ceiling: a request between the cap and the recipe max rejected by the capped core and accepted by stock, plus/v1/modelsreporting the smallermax_model_len. - One description claim is false. "a cap above the pool is a no-op: the prepared context resolves to the pool-bound value, matching stock behavior" — stock passed
recipe.contextunclipped (bootstrap.py:58before this PR), whereasprepared_contextismin(recipe.context, target, tokens)(planning.py:381), so a cap above the pool can prepare a lowermax_sequence_tokensthan the same export without the flag. That is a deliberate, defensible clamp (the pool cannot hold more), but it is a behaviour change and should be stated as one. The description also claims the test covers "the bootstrap value"; it does not — nothing assertscommon_preparation_kwargs(plan)["context"] == plan.prepared_context(tests/cli/test_commands.py:94-97checks only prefill chunk and max_active). That is the one line that changes the exported core, so it deserves the assertion. - Name the kwarg
context_target=infit()/plan()(planning.py:461,605) —context=next to aPlan.contextwith different meaning invites misuse. Minor: put the positive-value check (planning.py:467-468) beside the alignment check so both live in__post_init__and both cover directPlan(...)construction.
Cost, benefit, alternatives
- Cost: ~35 added lines, one optional field with a default, one property, three pass-throughs, one help line, no runtime or CUDA path, no catalog or state-transition risk. Maintenance is the three artifact sites, all now covered. Omitting the flag returns
recipe.contextexactly (planning.py:379-380), so existing cores and cached artifacts are unaffected. - Benefit: for someone serving one long-context model on a single SM120 card or DGX Spark, the choice between 256K per request and roughly double the concurrency, plus an honestly advertised context. 16 GB freed at concurrency 4 on Qwen3.8-27B is real, but bounded — it helps the memory-constrained single-model deployment the vision describes, not a broad audience.
- Simpler alternative / duplication: checked and rejected.
--kv-cache-limitand--memory-limitshape loaded KV but cannot lower the admission ceiling ormax_model_len; doing it "without new code" would mean minting recipe variants. This is the smallest footprint that reaches the decision point. - Risk: low. The only semantic change is that a cap below the pool now caps admission and the advertised
max_model_len— which is the point — plus the alignment hole in blocker 2.
Bottom line
Merge once the two broken assertions in tests/cli/test_planning.py:239-240,254 are fixed, the page-multiple validation the description promises is actually implemented (or the claim and docs corrected to say a misaligned target fails at load), and demand_pages uses prepared_context. The hint/body-limit/help notes and the missing ceiling measurement are worth one revision of the description and one line of docs; none of them touch the design, which is well placed, general, and a no-op by default.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Simplicity
Verdict: blocking issues
Blocking:
- tests/cli/test_planning.py:238-240: the new test's page-multiple case cannot pass — the head has no page-multiple validation (only the positive guard at ignition/planning.py:467-468), so
context=100hits the prefill-chunk error at planning.py:710-711 andmatch="multiple of the"fails; and an unaligned--request-contextnow exports a core Helios rejects at load (helios/src/model/catalog.rs:49-57).
Should fix:
- ignition/planning.py:709:
effective_context = min(result.context, result.prepared_context)duplicates the accessor's own pool bound;prepared_context=self.context if self.context_target is None else min(self.context, self.context_target)andif chunk > result.prepared_context:deletes the local, behaviour-identically. - tests/cli/test_planning.py:220-227,243-244: four assertions restate the accessor's
min(...)and never assert the only seam that carries the cap,contextincommon_preparation_kwargs(ignition/preparation/bootstrap.py:58); the test passes even if bootstrap.py stopped readingprepared_context(AGENTS.md:194-199).
Nits: 5 Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Correctness
Verdict: blocking issues Blocking:
- ignition/cli/preparation.py:45-56,69:
derive()has nocontextparameter but passescontext=context(undefined name), while its four callers pass the keyword — every export/debug-serve/bench raises, flag or no flag - ignition/planning.py:377-381 (with 224-296): no page-multiple validation of the cap exists, so
--request-context 100exports a core that helios/src/model/catalog.rs:50-57 refuses to load; the new test'spytest.raises(match="multiple of the")at tests/cli/test_planning.py:239 fails - tests/cli/test_planning.py:254: reads
.value.int64_value, a field the proto does not define (it isint_value/uint_value) and_preparation_valuewritesuint_valuefor non-negative ints — AttributeError even before the wrong value Should fix: - None.
Nits: 4 (serve.py:68-69 body sizing/context hint still use
recipe.context; help.py:38 (not opened) advertises a chunk range above the effective bound; docs/cli-design.md:1443 "checkpoint maximum" vs "recipe's maximum"; an above-maximum target is silently clamped with no notice) Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Architecture
Verdict: blocking issues Blocking:
- ignition/cli/preparation.py:69: derive() passes
context=context, but derive has no such parameter (signature :45-56) and the module defines no such name — every export, debug-serve, and bench call raises NameError with or without the flag. - ignition/planning.py:224-296 / tests/cli/test_planning.py:238-240: the described page-multiple validation does not exist, so the PR's own test fails and an unaligned
--request-contextexports a core that helios/src/model/catalog.rs:50-57 rejects at load. Should fix: - ignition/planning.py:377-381:
prepared_contextmin'sself.tokens(export-host free VRAM), so the exportedmax_sequence_tokensis not reproducible from the recordedreproduction_args(rebuild_manifest.py:264-265); Helios already applies this clamp at serve time (helios/src/model.rs:268-272). Nits: 5 Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Prose
Verdict: blocking issues Blocking:
- tests/cli/test_planning.py:238-240 + ignition/planning.py (no check exists): the description advertises a "page-multiple validation" and a chunk error that "distinguishes the default chunk from an explicit one", but the head contains neither, so the PR's own new test cannot pass. Should fix:
- ignition/planning.py:377-381 / PR description "Result:": "a cap above the pool is a no-op … matching stock behavior" is false — stock passed
recipe.contextunclipped (bootstrap.py:58 at main), so a cap above the pool prepares a lowermax_sequence_tokens, a compatibility change the description hides. - docs/cli-design.md:446 + description headline: the VRAM benefit is stated unconditionally, but the pool tracks the prepared context only under
--kv-cache-limit context|concurrency(helios/src/runtime_core/memory.rs:290-292 returnsOk(None)for the defaultmemory); the author's own commands use that flag. - PR description: the four required answers are out of order — evidence and result lead, the "why" survives only as a "Workload:" line inside Evidence (AGENTS.md:74-80; docs/design-review.md:137-152).
- docs/cli-design.md:446: the row never says a request above the cap is rejected, though the description's Result claims it and
max_sequence_tokensis enforced at admission. - PR description "What Changed": names seven files but omits docs/cli-design.md, which this PR changes (+3/−2), contrary to AGENTS.md:88-94. Nits: 5 Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Conventions
Verdict: blocking issues Blocking:
- tests/cli/test_planning.py:238-240 / ignition/planning.py: no
--request-contextpage-multiple validation exists at head 02023eba, so the PR's own test asserts aUsageErrorthat cannot be raised; nothing at export time protects the page-alignedmax_sequence_tokensHelios rejects at load (helios/src/model/catalog.rs:44-70) Should fix: - ignition/planning.py:467-468: the positivity rule lives alone in
fit, whileplan()holds every sibling flag's form and range in one pre-flight block (planning.py:615-637) — one flag, two validation homes, no precedent; the check also re-runs inside the world-size search loop Nits: 4 —effective_context = min(result.context, result.prepared_context)(planning.py:709) is provably a no-op;to_dict()(planning.py:438) names one served ceiling three ways (context_target,prepared_context,checkpoint_context);docs/cli-design.md:1443says "The checkpoint maximum" where the new row (:446) and neighbours say "the recipe's maximum";serve.py:319usesformat(x, ','), the only such rendering inignition/cli. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Review through the conventions-and-duplication lens only. Every changed file read in context, callers followed (export, debug-serve, bench, multi-host _export_hosts, derive/fit/plan, bootstrap.common_preparation_kwargs, rebuild_manifest, Helios load). Two findings from my earlier turn are fixed at this head and were withdrawn: the multi-host forwarding gap and the manifest/to_dict recording gap — all four entry points forward context=args.request_context (serve.py:207, :291, :476; bench.py:177), and the cap is recorded in to_dict (planning.py:438), reproduction_arguments (rebuild_manifest.py:264-265) and from_plan SCOPE_DEPLOYMENT (:389). The seam itself is clean: one plan field, one accessor, one bootstrap.py:58 consumer, no new mechanism and no per-model branch. Open questions: intended handling of an unaligned target above the recipe maximum; whether to_dict()["context"] should stay pool-bound; the VRAM table is untestable here. No CI checks ran on this head, so the blocking test failure should be confirmed with pytest tests/cli/test_planning.py.
Subtractive
Verdict: make it smaller first
The change: +84 / −18 lines (9 files; code+docs +37/−18, tests +47/−0)
Could remove: about 22 lines in 4 places while keeping the flag; about 70 of the 84 if the flag is dropped and the existing runtime --kv-cache-limit carries the memory argument
Biggest subtractions:
- ignition/planning.py:186,379-381,438,468 + cli/init.py:167-168 + cli/{bench,serve,preparation}.py forwards + rebuild_manifest.py:264-265,389 + docs/cli-design.md:446,1443,1493 + tests/cli/test_planning.py:211-255: the whole
--request-contextsurface duplicates the runtime--kv-cache-limit, which is what the PR's own VRAM table is measured with; the only new datum is a lower exportedmax_sequence_tokensreaching one line, bootstrap.py:58: about 70 lines - tests/cli/test_planning.py:229-254: duplicate clamp case, an assertion restating :221, a page-multiple rejection no code implements, a manifest round-trip that re-proves
from_plan's genericNoneskip, and anint64_valueread of a field emitted asuint_value: about 15 lines - ignition/planning.py:467-468: the
context <= 0check sits infit(), whichplan()re-enters per candidate world size, instead of inPlan.__post_init__beside every other flag validation (:266-296): 2 lines - ignition/planning.py:379-381:
prepared_context's body duplicatescontext;return self.context if self.context_target is None else min(self.context, self.context_target): 2 lines - docs/cli-design.md:1443,1493: the two owner-table rewrites repeat the flag-table row at :446: 2 lines
Left behind: ignition/cli/serve.py:68
max_body_bytesstill sized fromrecipe.context; ignition/cli/serve.py:69context_hintstill says the checkpoint and cache limit context; ignition/cli/help.py:38 still advertises--prefill-chunk-size: 64..{recipe.context}Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Pre Test Report
Pre-Test Report — PR #533 "Cap the per-request context target" (head 02023eba)
Recommendation: DO NOT refer to hardware testing. Return to the author for fixes.
PR: https://github.com/NVIDIA/hyperflare-inference/pull/533 · author roobyz (CONTRIBUTOR) · open · base main (f377dc85) · head 02023eba · 9 files, +84/−18 · no reviews, no CI checks on the head. Supersedes closed PR #454. Security screen all clear; I found no prompt-injection or agent-directed content in the description, diff, docs or comments — the Design-Signed-Off-By/design-review=1af4 trailers, the "Discord:" line and the @flare-autobot re-review ping are ordinary process metadata.
I re-verified every review claim against the tree rather than trusting the summaries. This revision is a regression from the previous head de1b5b5 (+98/−18 → +84/−18): a rebase onto merged #543 (joint-tuning removal) dropped the context parameter from derive() while keeping its call, and the page-multiple validation was deleted.
1. Why testing now would be wasted hardware time
Blocking A — every preparation command crashes; there is nothing to test
ignition/cli/preparation.py:45-56 declares 26 keyword-only parameters and has no context, yet line 69 ends the planning.plan(...) call with row_shard_attention=row_shard_attention, context=context). A full-file search for the token returns only context_parallel/context_parallel_size (:47, :62), the offending :69, and the context_parallel() helper (:124-132) — no module-level context.
So derive() raises on every invocation, flag or no flag. Callers: serve.py:207 (_export_hosts), serve.py:291 (_prepare), serve.py:476 (debug_serve), bench.py:177 (not opened). Two tests call derive() directly and will also fail: tests/cli/test_commands.py:88 and :114 (the latter from merged #508).
The diff confirms it: pr_files shows ignition/cli/preparation.py at +1/−1 — only the call line was edited, never the signature. One-keyword fix, but until it lands the branch produces no artifact at all.
Blocking B — the page-multiple validation described and asserted does not exist
The description advertises "a page-multiple validation" and tests/cli/test_planning.py:238-240 asserts it. No such check exists anywhere: search_code "multiple of the" over ignition/ returns no matches, and context_target appears only at planning.py:186 (field), :379/:381 (accessor), :438 (to_dict), :468 (positivity error), :549 (constructor kwarg). __post_init__ (:224-296) never inspects it; fit() validates only context <= 0 (:467-468).
This is a real load-time defect, not a test nit. bootstrap.py:58 makes prepared_context the prepared catalog's context, which becomes max_sequence_tokens, and helios/src/model/catalog.rs:50-57 rejects any core whose prepared_sequence_tokens or max_sequence_tokens is not a multiple of page_tokens — with the opaque "invalid prepared model configuration" at :70. So --request-context 1000 exports cleanly and dies at flare run, after a full GPU preparation.
The PR's own test fails too: with the fixture's page_tokens=64 (test_planning.py:38) and prefill_chunk=4096 (:42), context=100 passes :635 and :467, then trips the chunk check at planning.py:709-711 ("--prefill-chunk-size 4,096 exceeds the 100-token context this plan allows") — which does not match "multiple of the".
Blocking C — the test reads a protobuf field that does not exist
tests/cli/test_planning.py:254 asserts by_key["context_target"].value.int64_value. helios/proto/runtime_core.proto:124-133 declares int_value = 2 and uint_value = 3 — no int64_value (AttributeError). Even renamed, it would read 0: _preparation_value (rebuild_manifest.py:329-333) writes non-negative ints as uint_value.
These three are arithmetic and schema facts, not judgement. The head is not green, and no CI ran on it.
Blocking D — the exported ceiling is not reproducible, so a GPU result could not be attributed
prepared_context is clamped by self.tokens (planning.py:381), and tokens = pages * page_tokens (:368-369) with pages from available // page_bytes — i.e. the free VRAM of the export host. Recorded reproduction_args carry only --request-context N (rebuild_manifest.py:264-265), so identical recorded flags reproduce different cores on hosts with different free memory. It is also redundant: Helios already applies exactly this clamp at load (helios/src/model.rs:268-272, fit_context). The untargeted path correctly returns recipe.context and leaves binding to serve time.
Blocking E — the evidence measures a flag that already exists
helios/src/runtime_core/memory.rs:284-292: page_ceiling returns Ok(None) for KvCacheLimit::Memory — the default. Only Context/Concurrency derive a ceiling from the prepared context. The author's VRAM table was measured with --kv-cache-limit concurrency throughout, so our GPUs would largely re-measure --kv-cache-limit, not this PR.
To be fair to the change: the capability is genuinely not a duplicate. --kv-cache-limit and --memory-limit bound the pool; neither can lower the exported max_sequence_tokens (helios/src/server/config.rs:131,148) or advertise a smaller max_model_len. That export-time ceiling is real and only this flag provides it — which is exactly why the evidence should show it and does not. I disagree with the Subtractive lens's recommendation to drop the flag.
Also limiting — reachability is outside this repo
Recipes live in the external hyperflare-recipes repository; BasePreparationConfig.context must be written by each recipe into max_sequence_tokens. A test from this tree cannot confirm the end-to-end claim.
2. Expected value of a hardware test at this head: LOW (effectively zero)
- The code under test cannot execute (
derive()crash). - The PR's own test does not pass — no green baseline.
- The alignment gap means a misaligned cap produces an unloadable core; testing would confirm a known defect.
- The artifact's ceiling depends on export-host free VRAM, so a memory result could not be attributed to the flag.
- The headline benefit is an existing runtime flag's behaviour.
- Multi-host (
--ranks > 1) cannot be tested on our fleet: cn5 is 4 GPUs on one host, cn7 a single GB10. It must be pinned GPU-free.
Verified clean (no need to re-test once the blockers are fixed): the no-flag path is a true no-op (planning.py:379-380 returns recipe.context, exactly what bootstrap.py:58 passed before); Plan.context is untouched; all four entry points forward the flag; the cap reaches the plan JSON (:438), the printed serve line (serve.py:319), the bench record (bench.py:248 (not opened)), the reproduction args (rebuild_manifest.py:264-265) and the manifest at SCOPE_DEPLOYMENT (:389); the flag is correctly absent from flare run (_preparation_arguments registered only at __init__.py:50 export, :53 bench, :60 debug-serve); the frozen dataclass with a defaulted field keeps replace() working; no per-model branch, no env toggle, no Helios change.
3. Conditional test plan (adopt only after A–E are fixed and the GPU-free suite is green)
Phase 0 — GPU-free, must pass first (no hardware time)
pytest tests/cli/test_planning.py tests/cli/test_commands.py, with these cases added or repaired:
prepared_context == recipe.contextwhen unset;== min(recipe.context, N)when set.context <= 0rejected; unalignedNbehaves per the decided rule, and the resolved value asserted% page_tokens == 0.- The seam:
common_preparation_kwargs(plan)["context"] == plan.prepared_context— the one line that changes the core (bootstrap.py:58). The current test never asserts it, so it would pass even if the cap stopped reaching the core. Pattern:tests/cli/test_commands.py:94-97. to_dict()carriescontext_targetandprepared_context;reproduction_argscontains--request-context; manifest parameter present withSCOPE_DEPLOYMENT— assertinguint_value, notint64_value.derive(..., context=N)driven end-to-end, assertingplan.context_target == N. The current test bypassesderive()and callsplan()directly — that gap is precisely what let Blocking A through.- Parser: flag on
export,bench,debug-serve; absent fromflare run; multi-host_export_hostswith--ranks 2assertsprepared_context == N(the only pin available, since we lack a second host).
Phase 1 — the cap reaches the core (1 GPU of cn5, SM120; matches the author's hardware)
Model: nvidia/GLM-5.3-Flash-NVFP4. Two exports from the same command, differing only in the flag: A --request-context 131072, B unset. Use one GPU, not four — the change is orthogonal to parallelism except through page size.
/v1/models→max_model_lenis 131072 on A and the recipe maximum on B. The one assertion only the export-side value can satisfy.- A prompt of ~132k tokens is rejected at admission on A; a prompt just under the cap is accepted.
flare inspect Ashows the cap, and its reproduction command re-exports a 131072 core.- Falsification control: an unaligned
--request-contextfails at planning with an actionable message, not at core load.
Phase 2 — the isolating VRAM comparison the PR owes
Under both --kv-cache-limit memory (default) and --kv-cache-limit concurrency, at concurrency 1 and 4, record total VRAM for A and B. The pair separates this PR from the runtime flag. Expect ~0 delta under memory mode — report that honestly as the result.
Phase 3 — regression (cheap, same job)
A pre-PR core still loads and serves; a no-flag export produces the same preparation config as main; --request-context still absent from flare run.
Budget / efficiency
~2 exports + ~6 serve starts on a single cn5 GPU ≈ 1–2 GPU-hours, one model, one host. Skip cn7 (no ARM64-specific question). Skip multi-host (no second host — must be pinned GPU-free). No throughput A/B sweep — the PR claims memory and admission-ceiling behaviour, not speed.
4. Bottom line
- Substantive problems that must be fixed before testing: yes, five — a crash on every preparation path; the advertised validation absent while its test asserts it; a test reading a non-existent proto field; an export-host-dependent artifact; and evidence that does not isolate this PR from
--kv-cache-limit. - Three are regressions introduced in this revision, not inherited from
de1b5b5. - Expected value of testing
02023eba: zero — the branch cannot run and its suite cannot pass. - Fix effort is small (one signature keyword, one alignment check, one proto field name, one clamp removal, three reporting one-liners, one funnel test), so the efficient order is: fix → GPU-free suite green → one targeted 1–2 GPU-hour run on cn5.
- The feature itself is worth building. The export-time admission ceiling is a real capability the runtime knobs cannot provide. The remedy is to close it out correctly, not to abandon it.
code review summary
Recommendation: Changes Requested
Blockers:
derive()never gained the parameter it now passes on — every preparation command is dead, flag or no flag.ignition/cli/preparation.py:45-56has nocontextparameter yet:69ends withcontext=context; the four CLI callers pass it too (serve.py:207,:291,:476,bench.py:177) andtests/cli/test_commands.py:88/:114hit the undefined name. → Addcontext: int | None = Nonebeforeforce_moe_decode_a16, and add one assertion to the existingtest_derive_forwards_row_shard_prefill(plan.context_target == 131072) so the funnel is covered, not justplanning.plan().- The page-multiple validation the description advertises is not in the diff, so the PR's own test cannot pass. Nothing inspects
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 (planning.py:335-338;page_tokensis world-size dependent, so use the property). - The new test reads a proto field that does not exist.
tests/cli/test_planning.py:254asserts.value.int64_value; the proto declaresint_value/uint_value(helios/proto/runtime_core.proto:124-133) and_preparation_valuewrites non-negative ints asuint_value(ignition/preparation/rebuild_manifest.py:329-333). →uint_value.
Should fix:
- Drop the export-host memory term from
prepared_context.planning.py:381returnsmin(recipe.context, context_target, tokens), wheretokensderives from the export host's free VRAM (:360-369,:550-556), so the same recorded flags rebuild 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), and update the assertions attests/cli/test_planning.py:226,:232. This is what makes "a cap above the pool is a no-op, matching stock" true. - Three evidence claims need fixing. 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 until the fix above (stock passedrecipe.contextunclipped,preparation/bootstrap.py:58); and state the workload--kv-cache-limit/--max-concurrencycannot serve — a single request longer than N, rejected before it loads pages (what #454 asked for). - Two user-visible bounds still describe the uncapped 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_contextin both. - Description mechanics (one bullet). Lead with the why before the measurements (
AGENTS.md:74-80(not opened)); "Verified … at main c36a6a02" reads as if the capped numbers came from main; drop the uncheckable "thirteen recipes" count and name the seam (preparation/bootstrap.py:58); listdocs/cli-design.mdamong the changed files; and delete the "page-multiple validation" / "distinguishes the default chunk" clauses once the code matches (the head has one message,planning.py:711).
Subtract / Simplify:
Could remove ~10 of +84 added lines (~7 in the test hunk, ~3 in docs):
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 "a 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 (~3 lines).ignition/planning.py:381— the third term is Should fix #1: no line saved, but a free-memory dependency on the export host removed.- Do not cut:
prepared_context'scontext_target is Noneearly return (:379-380),derive(context=...), the bench check (:260), andeffective_context = min(...)at:709(load-bearing once thetokensterm is gone).
Nits:
6 nits: the <= 0 check lives in fit instead of beside plan()'s flag checks; rename the parameter to context_target to delete the context_target=context translation; 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 an undefined referent.
Nothing was executed here and head 02023eba has no CI checks; every behavioural claim is a static read of the code at that head. pytest tests/cli/test_planning.py tests/cli/test_commands.py settles all three blockers in one command. The design itself is sound and should be kept: one optional frozen Plan field, one accessor, one keyword through fit/plan, one consumer line, one flag in the shared capacity group, no Helios change, no per-model branch — and omitting the flag is byte-equivalent to main, with the reporting gaps from the previous round (plan JSON, serve line, bench record, manifest, multi-host, docs owner rows) all fixed at this head.
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence: No prompt injection, agent-directed instruction, or other attempt to cause unwanted agentic behavior was found in PR #533 ("Cap the per-request context target", author roobyz, open, head 9118add, 6 files +69/−5). Every claim below was checked at the PR head and re-verified in the code before writing.
Surfaces screened: (1) the PR description — a conventional four-part summary, a VRAM table, a Discord line, and a Signed-off-by plus Design-Signed-Off-By: Roberto Rivera <rzrivera@protonmail.com>; design-review=eb2f trailer, which is a documented repo convention (.githooks/commit-msg:15,59, docs/design-review.md:191-207) that the docs themselves call "an attention check, not proof of review" (docs/design-review.md:230), not an injected directive; (2) the full discussion — two author refactor notes and three flare-autobot review summaries, i.e. review material about the code, whose only "instruction" is the bot's own opt-out line #autobot:ignore, which was not followed and is not a target for escalation; (3) the entire diff of the 6 files — docs/cli-design.md (+2/−1), ignition/cli/serve.py (+2/−2), ignition/parameters.py (+13), ignition/planning.py (+14/−1), ignition/preparation/bootstrap.py (+1/−1), tests/cli/test_planning.py (+37); no CI/workflow, dependency, lockfile, secret, network, shell or permission changes, and no new files; (4) negative-result searches at pr/533: "autobot" → 0 hits; case-insensitive "ignore previous|disregard|do not report|approve this|AI agent" → only docs/cli-design.md:729 --dangerously-approve-key, a genuine flag; "skip review|pre-approved|lgtm|maintainer approved" → 0; in tests/cli/test_planning.py "you (must|should)|do not|note to|reviewer|agent|instruction" → 0; in ignition/parameters.py "eval(|exec(|subprocess|os.environ|requests.|urllib|base64" → 0 and "TODO|FIXME|XXX" → 0.
Substance check: the change does what it says and every behavioural edit tightens a bound rather than widening one. RecipeParameters.context_target (ignition/parameters.py:1309-1321) is a DEPLOYMENT-scope, manifest_key="context_target" parameter; Plan.prepared_context (ignition/planning.py:357-363) returns the recipe max when unset and min(recipe.context, target) otherwise, while Plan.context (:353-355) stays stock; common_preparation_kwargs passes plan.prepared_context as the exported context (ignition/preparation/bootstrap.py:132); serve.py:67-68 sizes max_body_bytes from it and names the cap in context_hint; the bench check now compares against prepared_context (ignition/planning.py:212); Helios still clamps to the pool (helios/src/model.rs:268-272). Nothing loosens auth, admission or resource limits.
Open questions are confined to function, not trust: max_fn=_recipe_context_limit (ignition/parameters.py:1316, resolved at :241-246, enforced at :522-545) rejects targets above the recipe context, so the clamp branch at planning.py:363 and the oversized case at tests/cli/test_planning.py:310-313 look unreachable via the CLI; the page-multiple check at planning.py:187 validates the raw target rather than min(recipe.context, target); and the VRAM payoff is conditioned on --kv-cache-limit concurrency, as the description states. These are ordinary review findings for the code, already raised by flare-autobot, and carry no security implication.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: roobyz (CONTRIBUTOR); Discord rzr2020 Motivation: A deployment that only ever serves requests much shorter than a recipe's maximum context still pays for a KV pool sized to that maximum, so it cannot fit the concurrency (or a co-resident workload) it wants. This PR makes the per-request ceiling a documented, reproducible export-time parameter instead of a runtime-only guess. Scale: +69 / −5 lines in 6 files Proposal:
- Add one declarative
context_targetparameter to the (now compositional)RecipeParameters:--request-context N,DEPLOYMENTscope,manifest_key="context_target",repro_always=True,min/maxbounds taken from the recipe maximum — the parameter system generates the CLI arg, manifest entry and reproduction arg. - Add
Plan.prepared_context(recipe.contextwhen unset,min(recipe.context, N)otherwise) and a page-multiple rejection inPlan.__post_init__;Plan.context(pool bound) stays as it was. - Feed it through the single seam
common_preparation_kwargs()→BasePreparationConfig.context, so every recipe's core getsmax_sequence_tokenscapped; compare the benchrequired_contextand sizemax_body_bytesfromprepared_context. - Document the flag in
docs/cli-design.mdand add one test intests/cli/test_planning.pycovering the no-op, clamp, validation, manifest, and reproduction args. Touches: ignition/parameters.py— the new field's bounds,reproduction_args,status_parts,to_dict(highest risk: the field is inert in most of these surfaces).ignition/planning.py—prepared_context, the alignment check, and the prefill-chunk guard.ignition/preparation/bootstrap.py— the single keyword every recipe consumes. Related items:- #454 Cap the prepared per-request context (closed): the same change, changes-requested by yatesdr for exactly the defects this head reintroduces — re-landed, not superseded.
- #545 ignition: introduce compositional RecipeParameters and dynamic CLI (merged): the base this head rebased onto; the flag is now one
param(...)field rather than hand-wired plumbing. - #516 ignition: add --kv-cache-format declaration, planning, help, and manifest support (open): touches the same five files and rewrites
tests/cli/test_planning.pyaround a shared fixture, so merge order decides the conflicts. - #544 (open): also edits
ignition/parameters.py. - #518 Add recipe-declared --target-head-quantization preparation flag (open): the closest sibling pattern of a declarative recipe-declared flag.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Autobot comments: Three of my prior blockers are genuinely closed by the rebase (the
derive(context=…)crash, the missing page-alignment check, the export-host free-VRAM term inprepared_context) and I withdraw them. But four new defects appear at the new head, none of them previously reported: the added test still cannot pass (two assertions, one of which exposes a product bug),--request-contextnever reachesreproduction_argsbecauseRecipeParameters.reproduction_argsskips every base-class field, above-maximum targets are rejected rather than clamped as the docs and the test promise, and the prefill-chunk guard no longer compares against the cap, so--request-context 1024with the default chunk exports a core Helios refuses at load — the original #454 blocker, one level down. The serve "Select GPUs" line also lost the cap again. The evidence table still compares cap levels only, with no stock-core--kv-cache-limit contextand no reduced--memory-limitrow, so it still cannot show what the flag buys over pre-existing runtime flags.
Value Proposition
Verdict: worth it with changes
The capability is needed, the layer is right, and this is the smallest-footprint version of the change yet: after the rebase onto #545's compositional RecipeParameters, the whole thing is 6 files, ~+30 code, +37 test, and the flag, --help row, manifest entry and SCOPE_DEPLOYMENT scope all come for free from the shared parameter machinery. Omitting the flag is a strict no-op (prepared_context returns recipe.context). But two defects make the PR's own new test fail, and one exports a core Helios refuses to load after a full GPU preparation.
What it does, verified on the head
ignition/parameters.py:1309-1321—context_targetas a base-classparam(...)withflag="--request-context",min_value=1,max_fn=_recipe_context_limit,manifest_key,DEPLOYMENTscope,repro_always=True. Registration, parsing, help and manifest emission come from #545.ignition/planning.py:357-363—prepared_context: recipe max when no target, elsemin(recipe.context, target). The export-hosttokensterm flagged last round is gone, so the same recorded flags rebuild the same core anywhere.ignition/planning.py:186-190— the page-multiple check that was missing last round now exists;:212(bench) comparesrequired_contexttoprepared_context.ignition/preparation/bootstrap.py:132—"context": plan.prepared_context→BasePreparationConfig.context(:33) → Heliosprepared_sequence_tokens(helios/src/server/config.rs:131) andlimits.max_sequence_tokens(:148), enforced at admission (server/request.rs:349-363), advertised asmax_model_len(server/models.rs:81), pool-clamped at load (model.rs:261-273).ignition/cli/serve.py:67-68—max_body_bytesnow usesprepared_context(last round's should-fix, done). No Helios change, no per-model branch, no new mechanism.
Blockers
--request-contextnever reachesreproduction_args, so the new test fails attests/cli/test_planning.py:324and the manifest's reproduction command rebuilds an uncapped core — exactly the #454 objection.RecipeParameters.reproduction_args(parameters.py:1469) overrides the base implementation, emits base fields by hand (:1483-1484,:1522-1527), and then skips every base-class field in its generic loop::1491buildsbase_field_namesfromfields(RecipeParameters)and:1494continues when the name is in it.context_targetis a base field, sorepro_always=Trueon it is dead. The manifestparameterslist does carrycontext_target(basemanifest_parameters,:596-616, has no such skip), so artifact and reproduction command disagree — proof it is an oversight. → Emit it beside--prefill-chunk-sizeat:1484.- An oversized target is rejected, contradicting the docs row and the PR's own test (
tests/cli/test_planning.py:310-313).max_fn=_recipe_context_limit(:1268-1269, wired at:1316) returns the recipe context, sovalidate_fields(:533-545) raises "--request-context for ALIAS must be 1 through 262,144" forcontext_target=500000. Butplanning.py:363promisesmin(recipe.context, target), anddocs/cli-design.md:468says "resolves to the smaller of N and the recipe maximum". The test asserts acceptance. → Dropmax_fnfromcontext_target(keep it onprefill_chunkat:1301) and align the page check to the value actually served —min(self.recipe.context, target) % self.page_tokens(planning.py:187-190) — because500000 % 64 == 32, so the current check alone still rejects it. With that pair, lines 310-313 and 319-321 both pass unchanged. (Thetarget=0case at:315-317still tripsmin_value=1first, so it stays valid.) - A cap below the prefill chunk exports a core Helios refuses to load. Helios rejects
prefill_chunk_size > max_sequence_tokens(helios/src/scheduler.rs:66-77, viamodel/catalog.rs:42afterfit_context). Export writesprefill_chunk_size = parameters.prefill_chunk(bootstrap.py:45-46; default 4096) andmax_sequence_tokens = prepared_context. Ignition never compares the two against the cap:RecipeParameters.validatecompares the chunk toctx.recipe.context(parameters.py:1458-1462) andplan()compares toresult.context(planning.py:594-596) — neverprepared_context. Soignition export qwen3.8-27b --request-context 2048plans cleanly, spends the entire GPU preparation, thenflare runfails "invalid prepared model configuration". → Validateprefill_chunk <= prepared_contextinPlan.__post_init__beside the page check, naming--request-context.
Should fix
planning.py:320-321—demand_pagesstill usesrecipe.context, so the printed/to_dictKV demand overstates the very number this flag lowers.Plan.to_dict(planning.py:379-416) carriescontext,checkpoint_contextandcontext_targetbut noprepared_context, andcontext_targethas nostatus_label, so the "Select GPUs" line (serve.py:268-272,parameters.py:1540-1562) never mentions the cap. A capped export and a stock one differ in reporting only bycontext_target.docs/cli-design.md:468should say a cap also lowers the default output allowance (max_new_tokensdefaults tomax_sequence_tokens,server/config.rs:210-213) and must be at least the prefill chunk.- Evidence is mode-scoped: under the default
--kv-cache-limit memory,page_ceilingreturnsOk(None)(runtime_core/memory.rs:290-292) and pages fill free VRAM, so the VRAM table holds only with--kv-cache-limit context|concurrency(the commands used it; the claim does not say so). Add the case only this flag can produce: a request between cap and recipe max rejected by the capped core and accepted by stock, plus a smallermax_model_lenin/v1/models. - No test pins the seam that actually changes the core — add
common_preparation_kwargs(plan)["context"] == plan.prepared_contextattests/cli/test_commands.py:150-155.
Charter mapping
- Merged-PR criteria: addresses a maintainer request — #454's review by
yatesdrnamed exactly these requirements — and a measured memory issue with commands, revision, model and an SM120 card. - Right layer (#404): the runtime genuinely cannot do this.
--kv-cache-limit context|concurrency(runtime_core/memory.rs:284-331) and--memory-limitshape the pool;max_sequence_tokens/max_model_lenare baked at export. An honest under-capacity advertisement is an export-time decision. - No per-model branches: one field on the shared base
RecipeParameters; every recipe inherits it; zero Helios change. - No duplication: nothing else lowers the admission ceiling; doing it "without new code" would mean minting recipe variants.
- Cost: ~30 lines, no runtime or CUDA path, no catalog or state-transition risk. Benefit: modest but real for the vision's core case (one long-context model on an SM120 workstation or DGX Spark) — trade per-request ceiling for concurrency and advertise an honest
max_model_len. Risk: low once blocker 3 is fixed; today an undersized or oversized target fails after full preparation.
Bottom line
Merge once (1) --request-context is emitted in RecipeParameters.reproduction_args, (2) an oversized target clamps and the page check validates the served min(recipe.context, target), and (3) a cap below the prefill chunk is rejected before preparation. The reporting/docs gaps are one revision of the description plus one line of docs; none touch the design, which is well placed, general, and a no-op by default.
Full report · Notes Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.
Correctness
Verdict: blocking issues Blocking:
- ignition/parameters.py:1309-1321:
--request-contextabove the recipe maximum is rejected bymax_fn=_recipe_context_limit, not clamped, soPlan.prepared_context's clamp branch (planning.py:363) is unreachable and tests/cli/test_planning.py:310-313 fails. - ignition/planning.py:594-596: the prefill chunk is validated against the stock
result.context, notprepared_context, so a cap below the recipe's chunk (e.g.--request-context 2048with the documented 4096 chunk) exports a core that Heliosvalidate_prefillrejects at load. Should fix: - ignition/planning.py:395-396:
Plan.to_dict()recordscontextandcheckpoint_contextbut neverprepared_context, so the printed plan JSON cannot show the served context. Nits: 4 Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Simplicity
Verdict: blocking issues Blocking:
- ignition/parameters.py:1316:
max_fn=_recipe_context_limitmakes--request-contextabove the recipe max a UsageError, so the documented clamp (planning.py:363) is dead and tests/cli/test_planning.py:310-313 cannot pass Should fix: - tests/cli/test_planning.py:295-329: the new test never reads
"context": plan.prepared_contextin ignition/preparation/bootstrap.py:132, so it passes if the seam reverts; five assertions restate the accessor instead Nits: 5 Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Lens D (simplicity) at head 9118add: the PR adds one field, one accessor, one validation and one consumer seam — a small, well-placed change. But three of the sixty-nine added lines contradict each other. The parameter spec caps context_target at recipe.context (parameters.py:1316 → 1268-1269, enforced by validate_fields at parameters.py:536, reached from planning.py:540), so min(self.recipe.context, target) in Plan.prepared_context (planning.py:363) can never bind, the doc row (docs/cli-design.md:468) and the PR description advertise a clamp that is unreachable, and the test that encodes the clamp (test_planning.py:310-313, context_target=500000) must raise instead of returning a plan. Either the bound or the clamp has to go — the smaller version drops max_fn and validates page alignment on prepared_context rather than the raw target. Second, the only line that carries the cap into the core is bootstrap.py:132, and no assertion touches it; replacing the five mirrored accessor assertions with the repo's existing BasePreparationConfig(**common_preparation_kwargs(...)).context pattern (tests/cli/test_commands.py:150-153) pins the real contract in two lines. Nits: redundant manifest_key (the fallback at parameters.py:607-612 already yields context_target), dead repro_always (parameters.py:1516-1520 skips None first), the alignment check re-run in Plan.__post_init__ for every candidate and probe, a doc clause copied verbatim from the neighbouring row, and a test signature with an unused monkeypatch. Correct and load-bearing: the target is None early return, the bench check at planning.py:212, and serve.py:67-68. Not verifiable here: no CI and no pytest run; pytest tests/cli/test_planning.py -k request_context settles the blocker. No attempt to direct the reviewer was found.
Architecture
Verdict: blocking issues
Blocking:
- ignition/planning.py:186-190 (+ignition/parameters.py:1316): the page-multiple check runs on the raw
context_targetand the flag declaresmax_fn=_recipe_context_limit, so any target above the recipe max or off a page boundary is rejected beforeprepared_context(planning.py:357-363) can clamp it — the clamp is dead code, docs/cli-design.md:468 and the PR description ("min(recipe.context, N)") are false, and the PR's own test tests/cli/test_planning.py:310-313 fails (500000 > 262144, and 500000 % 64 = 32). - ignition/planning.py:594-596: the prefill-chunk check still compares against
result.context(recipe/pool bound), neverprepared_context, and parameters.py:1457-1462 checks onlyrecipe.context— so--request-context 1024 --prefill-chunk-size 4096exportsmax_sequence_tokens=1024withprefill_chunk_size=4096, which helios/src/scheduler.rs:66-73 rejects at load.
Should fix:
- ignition/cli/help.py:46 and the
--prefill-chunk-sizebound (parameters.py:1294-1307, help text :1458-1462) still advertise the uncapped recipe context after a cap. - ignition/cli/serve.py:68:
context_hintnames the--request-contextcap even when no cap is set; make it conditional onplan.prepared_context < recipe.context. - ignition/parameters.py:1309-1321: no
status_label, so theSelect GPUs.report (serve.py:268-272 via status_parts, parameters.py:1540-1562) never says the core was exported with a reduced context, unlike other DEPLOYMENT flags. - Evidence scoping: the VRAM table only holds under non-default
--kv-cache-limit(helios/src/runtime_core/memory.rs:284-292; defaultmemoryper docs/cli-design.md:740); export-side sizing is unchanged (fitpages from memory, planning.py:471-480;demand_pagesstill uses recipe.context, :320-321). The description should state the condition on the headline result.
Nits: 2
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Confidently clean, and not to be re-raised: the design and scope fit the charter — one optional field declared once on the universal base, auto-generated CLI argument, manifest entry and reproduction arg, one consumer line (preparation/bootstrap.py:132), no Helios change, no per-model branch, and omission byte-equivalent to main. Nothing was executed (head 9118add has no CI checks); pytest tests/cli/test_planning.py settles blocker 1 and the two source comparisons settle blocker 2.
Prose
Verdict: blocking issues Blocking:
- ignition/parameters.py:1491-1494:
RecipeParameters.reproduction_argsskips every base-class field by name — includingcontext_target(:1309) — so the description's "auto-generate ... reproduction arg" claim is false and tests/cli/test_planning.py:324 fails. - ignition/parameters.py:1316:
max_fn=_recipe_context_limitmakes an above-maximum cap a rejection (validate_fields :536-540), not the clamp that tests/cli/test_planning.py:310-313 and docs/cli-design.md:468 ("resolves to the smaller of N and the recipe maximum") promise. Should fix: - tests/cli/test_planning.py:295:
monkeypatchis accepted but never used to stubsource_identity, unlike the sibling tests at :159/:223/:333, so the test needs FlashInfer/GPU to pass. - ignition/parameters.py:1469-1528: description order still runs What Changed → Result → Evidence, with the "why" buried in the Workload sentence (AGENTS.md:74-80).
- ignition/parameters.py:1320 / docs/cli-design.md:468: the VRAM benefit is unconditional, but it only holds under
--kv-cache-limit context|concurrency(defaultmemory, cli-design.md:740). - docs/cli-design.md:468: the row omits the admission rejection the description promises.
- ignition/planning.py:594: the prefill-chunk guard compares against
result.context, notprepared_context, so--prefill-chunk-size 262144 --request-context 131072prepares a core Helios refuses to load. Nits: 6 — help wording at parameters.py:1320, a re-export clause copied from :469, "recipe maximum" vs "checkpoint maximum", the unconditional context_hint at serve.py:68, "192k"/"128k" vs 196608/131072 in the description, and "Total VRAM (GB)" without a measurement definition. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Conventions
Verdict: blocking issues Blocking:
- ignition/parameters.py:1316:
context_targetdeclaresmax_fn=_recipe_context_limit, so a target above the recipe max is rejected, whilePlan.prepared_context(planning.py:357-363), docs/cli-design.md:468 and tests/cli/test_planning.py:310-313 all promise/assert the clamp — the new test fails. - ignition/parameters.py:1491,1494:
reproduction_argsskips every baseRecipeParametersfield and never emits--request-context, sorepro_always=True(:1319) is dead and capped cores are recorded as full-context exports; tests/cli/test_planning.py:324-325 fails. Should fix: - ignition/planning.py:186-190: the page-multiple rule is hand-written in
Plan.__post_init__with its own message whileParamSpec.multiple_ofalready exists and is what the closest precedent,prefill_chunk(parameters.py:1294-1308), uses — one flag, two validation homes. - ignition/parameters.py:1309-1321: no
status_label, so unlikeroce_ring/roce_chain(:1368, :1377) the cap never reaches the plan line printed at ignition/cli/serve.py:269 — the plan JSON and bench record carry it, the report does not. - docs/cli-design.md:448-451 and docs/preparation-development.md:17-19: the two closed enumerations of core universal
RecipeParametersfields were not updated with--request-context/context_target. Nits: 3 Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Subtractive
Verdict: make it smaller first The change: +69 / −5 lines (6 files: code+docs +32/−5, tests +37/−0) Could remove: about 16 lines in 4 places if the flag stays; about 68 of the 69 if it goes Biggest subtractions:
- ignition/parameters.py:1309-1321 + ignition/planning.py:186-190,357-363 + ignition/cli/serve.py:67-68 + ignition/preparation/bootstrap.py:132 + docs/cli-design.md:468 + tests/cli/test_planning.py:295-329: the whole
--request-contextsurface: nothing, replaced by the existing runtime--kv-cache-limit(docs/cli-design.md:740) that the PR's own VRAM table is measured with: about 68 lines - tests/cli/test_planning.py:310-313: the oversized-target case, whose four lines cannot pass (the new
max_fnat ignition/parameters.py:1316 rejects 500000 before the asserts): nothing: 4 lines - tests/cli/test_planning.py:301,303,307,326-329: restatements of the input,
Plan.contextandfrom_plan's generic plumbing already covered at tests/cli/test_planning.py:185-196: nothing: 7 lines - ignition/parameters.py:1317-1319:
manifest_key,scope=andrepro_always=that equalParamSpecdefaults (ignition/parameters.py:89-92): nothing: 3 lines - ignition/planning.py:363: the
min(recipe.context, target)clamp thatmax_fnalready enforces:return self.recipe.context if target is None else target: 1 line Left behind: None.ignition/cli/serve.py:67-68now follow the cap (the earlier leftover),ignition/cli/help.py:46legitimately describes the recipe, and nohelios/path becomes dead. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Pre Test Report
Pre-Test Report — PR #533 "Cap the per-request context target" (head 9118add)
Recommendation: DO NOT refer to hardware testing. Return to the author for fixes.
PR: https://github.com/NVIDIA/hyperflare-inference/pull/533 · author roobyz (CONTRIBUTOR) · head 9118add · base main · 6 files, +69/−5 · no reviews, no CI checks on the head. Supersedes closed PR #454 (CHANGES_REQUESTED). Security screen all clear; I independently found no prompt-injection or agent-directed content in the description, diff, docs or comments. The Design-Signed-Off-By/design-review=eb2f trailers and the "Discord:" line are ordinary PR metadata.
I re-verified every review claim against the tree rather than trusting the summaries. The reviews agree that the feature's shape is right and disagree about how much is broken; on several points the summaries are describing older heads and are now stale (see §5).
1. What the change is
After the rebase onto merged #545, the whole feature is one declarative parameter plus one consumer line:
ignition/parameters.py:1309-1321—context_target: int | Nonedeclared on the universalRecipeParametersbase as--request-context, group "capacity and compression",min_value=1,max_fn=_recipe_context_limit,manifest_key="context_target",DEPLOYMENTscope,repro_always=True. CLI registration,MODEL --help, manifest entries and reproduction args are supposed to be generated from this declaration.ignition/planning.py:357-363—Plan.prepared_context:recipe.contextwhen no target, elsemin(recipe.context, target).Plan.context(the pool bound,:352-355) is untouched.ignition/planning.py:186-190— a page-multiple rejection on the raw target inPlan.__post_init__;:212— the bench pre-check now comparesrequired_context > self.prepared_context.ignition/preparation/bootstrap.py:132—"context": plan.prepared_contextincommon_preparation_kwargs(wasplan.recipe.context). This is the one line that reaches the core:BasePreparationConfig.context(bootstrap.py:33) → Heliosprepared_sequence_tokens(helios/src/server/config.rs:131) →limits.max_sequence_tokens(:148), advertised asmax_model_lenand enforced at admission.ignition/cli/serve.py:67-68—max_body_bytesfromprepared_context;context_hintnames the cap.tests/cli/test_planning.py:295-329— one new test;docs/cli-design.md:468and:1436— docs rows.
No Rust change, no per-model branch, no new mechanism. The design is correct and should be kept. Omitting the flag is a true no-op.
2. Why testing now would be wasted hardware time
Blocking A — the PR's own test cannot pass, on two independent verified grounds
The head is not green, so any GPU time buys results against an artifact the author must change.
- Above-maximum cap is rejected, not clamped — the test asserts the clamp.
context_targetdeclaresmax_fn=_recipe_context_limit(parameters.py:1316), whose helper returnscontext.recipe.context(:1268-1269).validate_fieldsenforces it in theelifbound branch (parameters.py:533-540, message"--request-context for <alias> must be 1 through 262,144"), reached fromPlan.__post_init__(planning.py:185) and fromplan()before any candidate exists (planning.py:540).tests/cli/test_planning.py:310-313doesreplace(base_params, context_target=500000)against a fixture withcontext=262144, page_tokens=64(:139-140) and asserts the plan is returned withprepared_context == recipe.context, so line 311 raises. (Even without the bound,500000 % 64 = 32trips the alignment check atplanning.py:187.) Consequences: the clamp atplanning.py:363is dead code;docs/cli-design.md:468("resolves to the smaller of N and the recipe maximum") and the description ("min(recipe.context, N)") are false; and a user following the docs gets a usage error. --request-contextnever reachesreproduction_args.RecipeParameters.reproduction_args(parameters.py:1469-1528) hand-emits--max-concurrency/--prefill-chunk-size(:1483-1484), then buildsbase_field_names = {f.name for f in fields(RecipeParameters)}(:1491) and skips every base-class field in its generic loop (:1494).context_targetis a base field (:1309), so it is skipped and itsrepro_always=True(:1319) is dead metadata.tests/cli/test_planning.py:324-325asserts"--request-context"and"131072"are present → fails.rebuild_manifest.reproduction_arguments(:231-261) merely splats the same list, soflare inspectand the embedded manifest record a command that silently rebuilds an uncapped core.
Neither is a judgement call: both follow from the declaration and the message strings. pytest tests/cli/test_planning.py settles them.
Blocking B — a legal cap plus the default prefill chunk exports a core Helios refuses to load
The export-side chunk check still compares against the stock context:
if params.prefill_chunk > result.context: # planning.py:594-596; result.context == min(recipe.context, tokens)
prefill_chunk itself is bounded only by ctx.recipe.context (parameters.py:1458-1462). Nothing compares the chunk against the cap, while bootstrap.py:132 writes prepared_context as max_sequence_tokens and bootstrap.py:44-46 forwards parameters.prefill_chunk as prefill_chunk_size. So --request-context 1024 (or 2048) with the default 4096 chunk passes every export-side check, spends the entire GPU preparation, and then fails at load: helios/src/scheduler.rs:66-77 requires prefill_chunk_size <= max_sequence_tokens, surfaced through helios/src/model/catalog.rs:42. This is the same class of defect the new page check exists to prevent, and it is one flag away from the PR's headline scenario — the stated purpose is pushing memory down.
Blocking C — the artifact cannot be audited or reproduced, so a run's output could not prove what was prepared
Plan.to_dict (planning.py:379-416) emits context, checkpoint_context and (via parameters.to_dict) context_target, but no prepared_context; context_target declares no status_label, so the printed Select GPUs. line (serve.py:268-272 via status_parts, parameters.py:694-707) never mentions the cap; and reproduction_args omits the flag (Blocking A.2). A hardware run against this head could not answer "was the cap applied?" from the plan JSON, the console line, or the inspect command.
Blocking D — the evidence measures a flag that already exists
helios/src/runtime_core/memory.rs:284-292 returns Ok(None) for KvCacheLimit::Memory — the documented default (docs/cli-design.md:740) — and only Context/Concurrency derive a page ceiling from the prepared context. The author's VRAM table was measured with --kv-cache-limit concurrency, so it demonstrates an existing runtime flag, not this PR. The capability is genuinely not a duplicate (the runtime cannot lower max_sequence_tokens or max_model_len, both baked from prepared_sequence_tokens at config.rs:131-148; the runtime clamp at helios/src/model.rs:268-272 only narrows to the physical pool) — which is exactly why the evidence should show that and does not, and why the docs row states the VRAM benefit unconditionally instead of scoping it.
Blocking E — the test also depends on a GPU/FlashInfer environment
tests/cli/test_planning.py:295 takes monkeypatch and never uses it, yet calls rebuild_manifest.from_plan (:323), which calls source_identity() (rebuild_manifest.py:290,327); that raises RuntimeError("the preparation environment requires FlashInfer") when FlashInfer is absent (ignition/preparation/source_identity.py:36-41). Every neighbouring test patches it (:159, :333).
Not testable on our fleet regardless
--ranks > 1 (multi-host export) needs a second host; cn5 is four GPUs on one host and cn7 is a single GB10. The flag now forwards on that path (serve.py:178-199), so it must be pinned GPU-free, not by hardware.
3. Expected value of a hardware test at this head: zero
- The branch's own suite cannot pass — no green baseline.
- A legal flag value produces an unloadable core (Blocking B), so a run would re-confirm a known defect.
- The output cannot show the cap took effect (Blocking C).
- The headline benefit is an existing runtime flag's behaviour (Blocking D).
- End-to-end reachability depends on external
hyperflare_recipesmappingBasePreparationConfig.context→max_sequence_tokens; that code is not in this repository.
Verified clean — do not re-test once fixed: the no-flag path returns recipe.context (planning.py:360-362), exactly what bootstrap.py:132 passed before, so omission is byte-equivalent to main; Plan.context is unchanged; all four entry points forward the flag; the cap reaches the plan JSON, the manifest and SCOPE_DEPLOYMENT; the bench check uses prepared_context; max_body_bytes follows the cap; the frozen dataclass with a defaulted field keeps replace() working; no per-model branch, no env toggle, no Helios change.
4. Conditional test plan (adopt only after A–E are fixed and the GPU-free suite is green)
Deliberately minimal: this is a memory-sizing and admission-ceiling knob with no throughput claim, so no A/B perf sweep is warranted.
Phase 0 — GPU-free, must pass first (no hardware time)
pytest tests/cli/test_planning.py tests/cli/test_parameters.py (not opened) tests/cli/test_commands.py, with these cases added or repaired:
prepared_context == recipe.contextwhen unset;== min(recipe.context, N)when set; and whichever semantics the author settles for an oversize target (clamp, or an explicitUsageError) asserted consistently in test,docs/cli-design.md:468, the help string and the description.- Alignment validated on the served value (
min(recipe.context, target) % page_tokens == 0);100still rejected. - Both arms of the chunk-vs-cap error (
--request-contextbelow--prefill-chunk-size). - The seam that changes the core:
common_preparation_kwargs(capped, ...)["context"] == 131072and== recipe.contextfor the unflagged plan, viaBasePreparationConfig(**kwargs)(pattern:tests/cli/test_commands.py:140-155). The current test never asserts it and would pass ifbootstrap.py:132reverted. reproduction_argscontains--request-context 131072; manifest parameter present withDEPLOYMENTscope (assertuint_value, notint_value).- Parser: flag on
export,bench,debug-serve; absent fromflare run;_export_hostswith--ranks 2carries the cap — the only pin available since we have no second host. monkeypatchused or dropped so the test does not need FlashInfer.
Phase 1 — the cap reaches the core (1 GPU of cn5, not 4; SM120 matches the author's hardware)
Model: nvidia/GLM-5.3-Flash-NVFP4 (present on cn5; closest text recipe to the author's measurement). Two exports from the same command, differing only in the flag: A --request-context 131072, B unset.
/v1/models→max_model_lenis 131072 on A and the recipe maximum on B. The one assertion only the export-side value can satisfy.- A prompt of ~132k tokens is rejected at admission on A; a prompt just under the cap is accepted.
flare inspect Ashows the cap, and its reproduction command re-exports a 131072 core.- Falsification control: an unaligned
--request-contextfails at planning with an actionable message, not at core load (Helios returns the opaque "invalid prepared model configuration").
Phase 2 — the isolating VRAM comparison the PR owes
Under both --kv-cache-limit memory (default) and --kv-cache-limit concurrency, at concurrency 1 and 4, record total VRAM for A and B. The pair separates this PR from the runtime flag. Expect ~0 delta under memory mode — that is the honest result and must be reported as such.
Phase 3 — regression (cheap, same job)
A pre-PR core still loads and serves; a no-flag export produces the same preparation config as main; --request-context still absent from flare run.
Budget / efficiency
~2 exports + ~6 serve starts on a single cn5 GPU ≈ 1–2 GPU-hours, one model, one host. Skip cn7 (no ARM64-specific question). Skip multi-host (no second host). No throughput A/B — the PR claims memory and admission-ceiling behaviour, not speed.
5. Corrections to the review summaries
- Stale at this head — do not re-raise: the
derive(context=...)crash and the missing page-multiple validation (both real at02023eba, both fixed:ignition/cli/preparation.py:62-81takesparameters=;planning.py:186-190exists), the export-host free-VRAM term inprepared_context(fixed:planning.py:357-363has notokensterm), and theint64_valuetest assertion (gone;:329asserts only scope). - The Subtractive lens's "drop the whole flag,
--kv-cache-limitalready does this" overreaches.helios/src/runtime_core/memory.rs:284-292andhelios/src/server/config.rs:131-148show the runtime cannot lowermax_sequence_tokens/max_model_len. The overlap objection is about the evidence, not the capability. - The "multi-model hosting is a charter non-goal" objection is withdrawn — the docs row and description now justify the cap by same-model concurrency.
- The Architecture lens's B1 and B2, the Correctness B1/B2, and the Conventions/Prose blocking items all reduce to the same two lines (the
max_fnbound vs the documented clamp, and the base-field skip inreproduction_args), plus the chunk-vs-cap asymmetry. Fix effort is small: dropmax_fn(or delete the clamp, the test case and the "smaller of" wording), validate alignment on the served value, emit the flag beside--prefill-chunk-sizeatparameters.py:1484, compare the chunk againstmin(result.context, result.prepared_context)atplanning.py:594, addprepared_contexttoto_dict, add astatus_label, guardcontext_hint, useprepared_contextindemand_pages(planning.py:320-321), and repair the test.
Bottom line: the feature is worth building and the seam is right, but four substantive problems (a red test from two verified causes, a legal flag value that exports an unloadable core, an artifact that cannot be reproduced or audited, and evidence that measures an existing runtime flag) mean hardware time now would test the wrong artifact. Fix → GPU-free suite green → one targeted 1–2 GPU-hour run on a single cn5 GPU.
code review summary
Recommendation: Changes Requested
The shape of the change is now right and should not be reworked: one optional field on the universal RecipeParameters base (ignition/parameters.py:1309-1321), one Plan.prepared_context accessor (ignition/planning.py:357-363), one consumer line in common_preparation_kwargs (ignition/preparation/bootstrap.py:132), no Helios change, no per-model branch, and omitting the flag is byte-equivalent to main. Three defects remain, all reachable with documented defaults. Nothing was executed: head 9118add has no CI checks, so every claim is a static read of the cited lines, and pytest tests/cli/test_planning.py settles the first two blockers (lines 311 and 324) in one run.
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 any target above the recipe maximum is rejected ("must be 1 through 262,144",:536-540) atplanning.py:540and again inPlan.__post_init__(:185) — yettests/cli/test_planning.py:310-313asserts500000clamps, anddocs/cli-design.md:468, the accessor 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)rather than the raw target; thenplanning.py:363is live and the test passes. --request-contextnever reachesreproduction_args, so a capped core is not reproducible.RecipeParameters.reproduction_argshand-emits only--max-concurrency/--prefill-chunk-size(parameters.py:1483-1484) and then skips every base-class 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, name 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/:1554-1559, 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 (B3);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-292returnsOk(None)forMemory; 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 uncheckable "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(no reader in the tree) 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
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence:
Read the entire diff of PR #533 (8 files, +79/−10, head e623985) rather than the summary: ignition/parameters.py (:1309-1320, :1484-1485, :1492-1495), ignition/planning.py (:186-190, :212, :357-363, :594-597), ignition/cli/serve.py (:67-70), ignition/cli/help.py (:46), ignition/preparation/bootstrap.py (:132), docs/cli-design.md (:446, :465-468, :1433-1436), docs/preparation-development.md (:15-19), tests/cli/test_planning.py (:295-329). Every hunk is an ordinary flag declaration, accessor, keyword pass-through, help string, doc row, or unit test. No new imports, no eval/exec, no subprocess, no network call, no file write, no dynamic code loading, no hidden HTML/comment/zero-width/unusual-Unicode content in the diff (regex scan: no matches).
Injection scans over pr/533 for agent-directed idioms ("ignore previous instructions", "system prompt", "you are an AI", "autobot", "claude", "chatgpt", agent/assistant directives, base64/curl one-liners) found no matches in the changed files; the only "assistant" hits under ignition/ are pre-existing chat-template markers (direct/server.py:71 (not opened),220, preparation/contract.py:92 (not opened),99), untouched by this PR.
Description claims verified against code and found accurate, not deceptive: context_target has no max_fn (parameters.py:1309-1320), so the documented min(recipe.context, N) clamp is genuinely reachable; status_label present (:1318); --request-context hand-emitted in the reproduction_args override because base-class fields are skipped (:1484-1485, :1492-1495); bench check uses prepared_context (planning.py:212); prefill bound uses min(result.context, result.prepared_context) (:594-597); bootstrap.py:132 is the single seam. The VRAM table is unverifiable from here but internally consistent engineering data with no injection angle. No author text tried to redirect review.
One observation, not a finding: the only agent-addressed text in the thread is the repository's own CI automation — three flare-autobot review comments link opaque external URLs (autobot.eidonix.com/p/….html) labelled "[Full Review] for Agents", plus an unused #autobot:ignore opt-out. I did not follow those links; they are ordinary bot output, not instructions to me.
Secondary non-security nit for the author: the page-multiple check is gated on target <= recipe.context (planning.py:187), so an unaligned target above the recipe max silently passes, while the flag help (parameters.py:1319) states the value "must be a multiple of the page token count" unconditionally; docs/cli-design.md:468 matches the code, so help and doc are the inconsistent pair. Not a security issue.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: roobyz (CONTRIBUTOR); Discord rzr2020
Motivation: The export already decides the context each prepared core can serve, but today that number is always the recipe maximum, so a deployment that wants shorter requests must buy a bigger KV pool than it uses. This PR adds one export-time flag, --request-context N, that lowers the prepared per-request context so cores fit in less VRAM at a given concurrency.
Scale: +79 / −10 lines in 8 files
Proposal:
- Add one declarative
context_targetfield (--request-context N) to the universalRecipeParameters, so it appears in help, config, plan JSON and the manifest like its siblings. - Add
Plan.prepared_context=min(recipe.context, target), feedingcommon_preparation_kwargsso Helios receives the cappedmax_sequence_tokens. - Reject non-page-multiple targets (gated to targets at or below the recipe max), and make the prefill-chunk guard and the bench context check compare against the capped value.
- Emit the flag in
reproduction_argsand sizemax_body_bytes/context_hintand the "Select GPUs" line from the cap. - Document the flag in
docs/cli-design.mdanddocs/preparation-development.md; cite a VRAM table under--kv-cache-limit concurrency. Touches: ignition/planning.py—Plan.__post_init__validation, the new accessor, and the chunk-vs-context guard that gates whether an exported core loads at all.ignition/parameters.py— the field spec, its flag/manifest key,reproduction_args,status_parts.ignition/cli/serve.py— startup status line and server option sizing derived from the cap. Related items:- #454 Cap the prepared per-request context (closed): the predecessor this PR claims to answer; its review questions about runtime knobs are still unanswered by the evidence.
- #545 ignition: introduce compositional RecipeParameters and dynamic CLI (merged): the new architecture the flag is now declared in.
- #516 ignition: add --kv-cache-format (open): rewrites the same test file and planning/serve/bootstrap lines; will conflict with the new test block.
- #544 (open): also edits
ignition/parameters.py. - #508 row-sharded attention planning and manifest metadata (merged): precedent for the manifest/scope plumbing used here.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Autobot comments: Amendment to my previous report, at the new head
e623985. All four blockers I raised against head9118adddare fixed and withdrawn: the flag now reachesreproduction_args(ignition/parameters.py:1484-1485), themax_fnupper bound is gone so oversized targets clamp as documented (ignition/planning.py:357-363), the chunk guard comparesmin(result.context, result.prepared_context)(:594), and the serve line regained astatus_label(parameters.py:1318). One new blocker replaces them: because the field lost its upper bound while gaining the label, the "Select GPUs" line prints the requested target (parameters.py:1558feeds the raw field value), so--request-context 500000on a 256K recipe announces "request context 500,000 tokens" while the core serves 262,144 — a provenance error on exactly the surfaceAGENTS.md:452-456governs, contradictingdocs/cli-design.md:468. Two smaller items: the added test (tests/cli/test_planning.py:295-329) is the only one in its file that never patchessource_identity(), so it depends on FlashInfer and a built Heliopause identity; and the flag help claims a page-multiple rule the code deliberately skips for above-maximum no-ops. Still open from before: the VRAM table compares cap levels only, with no stock core under--kv-cache-limit contextand no reduced--memory-limitrow, so it cannot show what this export-time flag buys that a runtime flag does not — the question #454's first review asked. No CI checks are reported at this head and no test output appears in the thread, so nothing here has been demonstrated to run.
Value Proposition
Verdict: worth it with changes
The capability is needed, the layer is right, and the footprint is now small: 6 files, ~+69/−14, all Ignition Python plus docs — one optional field on the shared RecipeParameters base, one Plan.prepared_context accessor, one consumer line, no Helios change, no per-model branch. Omitting the flag is a strict no-op. All three defects I blocked on last round are fixed at head e6239855. What remains are test hygiene, one docs sentence and one reporting line — nothing touches the design.
The three blockers are closed, verified line by line
- Reproduction args.
ignition/parameters.py:1484-1485now emits--request-contextbeside--prefill-chunk-size, inside the override that:1492-1495would otherwise skip by base-class name.repro_always(dead for base-class fields on this path) is gone. A capped export's manifest command now rebuilds a capped core, satisfying the #454 objection. - The documented clamp is reachable.
max_fn=_recipe_context_limitis dropped;context_target(parameters.py:1309-1319) declares onlymin_value=1,manifest_key,DEPLOYMENTscope and astatus_label.planning.py:357-363therefore deliversmin(recipe.context, target), sotests/cli/test_planning.py:310-313(500000→ recipe max) and the rejection at:319-321(100) are now mutually consistent. The page check atplanning.py:186-190is gated ontarget <= recipe.context, which is exactly the set of values whereprepared_context == target— so it validates the served quantity, not the request. That is a better resolution than themin(...) % page_tokensI asked for, because it leaves an oversized target a documented no-op rather than a rejection. - A cap below the prefill chunk is rejected at export.
planning.py:594-597comparesparams.prefill_chunkagainsteffective = min(result.context, result.prepared_context).--request-context 2048with the default 4096 chunk now fails in planning instead of after a full GPU preparation with Helios refusing to load (helios/src/scheduler.rs:66-77viamodel/catalog.rs:42).
Also done: the status_label (:1318) so the cap appears in the printed Select GPUs. line, serve.py:67-70 using prepared_context for max_body_bytes with the hint conditional on the cap being active, the --help wording at help.py:46 (not opened) ("max … can lower this"), both universal-field enumerations (docs/cli-design.md:449, docs/preparation-development.md:18 (not opened)), and the owner rows (cli-design.md:468, :1436).
Should fix before merge
- The new test calls the real
source_identity().tests/cli/test_planning.py:295acceptsmonkeypatchand never uses it, but:323reachesrebuild_manifest.from_plan, which callssource_identity()(rebuild_manifest.py:327) — hashing ignition, flashinfer and heliopause, and requiringfind_spec("flashinfer")to succeed (source_identity.py:39-41). Both sibling tests patch it (:223,:333). In a CPU-only test environment this turns a pure planning test into an environment-dependent one. → One line:monkeypatch.setattr("ignition.preparation.source_identity.source_identity", lambda: "test-source"). - Nothing pins the seam that actually changes the core. Revert
bootstrap.py:132toplan.recipe.contextand the new test still passes::301-313assert the accessor,:324-329assert the manifest. → Two assertions in the pattern oftests/cli/test_commands.py:150-155:BasePreparationConfig(**common_preparation_kwargs(capped, …)).context == 131072, and the same for the stock plan. - The one new safety check has no test.
planning.py:594-597was added this round and is untested. → Onepytest.raises(UsageError, match="prefill-chunk-size")withcontext_target=2048and the fixture's 4096 chunk, beside:315-321. docs/cli-design.md:468under-documents the cap. It should say the cap also lowers the default output allowance (max_new_tokensdefaults tomax_sequence_tokens,helios/src/server/config.rs:210-213) and must be at least the prefill chunk. Both are real constraints a user will hit.- Evidence is mode-scoped. Under the default
--kv-cache-limit memory,page_ceilingreturnsOk(None)(helios/src/runtime_core/memory.rs:290-292) and pages fill free VRAM, so the VRAM table holds only with--kv-cache-limit context|concurrency. The commands used it; the claim does not say so. Put the condition on the claim, and add the case only this flag can produce: a request between cap and recipe max rejected by the capped core and accepted by stock, plus a smallermax_model_lenin/v1/models(helios/src/server/models.rs:81). planning.py:320-321—demand_pagesstill usesrecipe.context, so the printed/to_dictKV demand overstates the very number this flag lowers (only consumer is:407).status_labelprints the raw target: an oversized--request-context 500000reports "request context 500,000 tokens" while the core serves 262,144.- Description: "Helios's
fit_contextappliesmin(context, prepared_context)" is backwards — the min is Ignition's;fit_context(helios/src/model.rs:261-273) clamps topages × page_tokens. Andto_dict(planning.py:379-416) still carriescontext/checkpoint_contextwith noprepared_context, so a capped export differs in reporting only bycontext_target.
Charter mapping
- Merged-PR criteria: addresses a maintainer request — #454's review by
yatesdrnamed these requirements — and a reproduced memory issue with commands, revision, model and an SM120 card. - Solve it in the right place (#404): the runtime genuinely cannot do this.
--kv-cache-limitand--memory-limitshape the pool;max_sequence_tokens/max_model_lenare baked at export. An honest under-capacity advertisement is an export-time decision, and this is the smallest seam for it —bootstrap.py:132→BasePreparationConfig.context→ Heliosprepared_sequence_tokens(server/config.rs:131) →limits.max_sequence_tokens(:148), enforced at admission (server/request.rs:349-363(not opened)), advertised asmax_model_len(server/models.rs:81), pool-clamped at load (model.rs:261-273). - No per-model branches: one field on the shared base; every recipe inherits it; zero Helios change.
- No duplication: nothing else lowers the admission ceiling; "without new code" would mean minting recipe variants.
- Cost vs benefit: ~30 lines of code, no runtime or CUDA path, no catalog or state-transition risk. The benefit is modest but exactly the vision's core case — one long-context model on an SM120 workstation or DGX Spark, trading per-request ceiling for concurrency. The measured table (31.0→27.1 GB at concurrency 1, 55.8→39.8 GB at 4) is a real 16 GB of headroom.
Bottom line
Worth merging. The design is right, general and a no-op by default, and every defect that could produce a wrong or unloadable core is fixed. Merge after (1) the missing source_identity patch, (2) two seam assertions, (3) one pytest.raises for the prefill-chunk bound, and (4) the two constraint sentences in docs/cli-design.md:468. Items 5–8 are one revision of the description plus a line each; none justify holding the change.
Nothing was executed — the head has no CI checks and no pytest run happened here, so every claim above is a static read of the cited lines. pytest tests/cli/test_planning.py tests/cli/test_commands.py settles items 1–3 in one command.
Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Conventions
Verdict: should-fix issues only Blocking:
- None. Should fix:
- ignition/planning.py:186-190: the page-multiple rule is hand-written in
Plan.__post_init__, duplicatingParamSpec.multiple_of(ignition/parameters.py:81, :524-532, rendered into --help at :283-284); the closest precedentprefill_chunk(parameters.py:1302 + :1457-1461) declares the multiple and puts its in-recipe bound inRecipeParameters.validate, giving a consistent alias-bearing message. - ignition/planning.py:366-368, :320-321, :379-416: one served ceiling, three names —
guaranteed_tokensanddemand_pagesstill use the uncappedrecipe.context, so a plan capped at 131072 reportsguaranteed_tokens262144 in the plan JSON, andto_dictemitscontext/checkpoint_contextbut neverprepared_context, the number every consumer now reads (bootstrap.py:132, serve.py:67-70). Nits: 3 (redundantmanifest_key/scopeat parameters.py:1316-1317; third hand-rolledminat planning.py:594; two-fact help line at cli/help.py:46). Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
The change otherwise follows the established shape: one optional base RecipeParameters field, auto-generated CLI/manifest plumbing, one Plan accessor in the existing min(value, capacity) property idiom, one preparation seam (bootstrap.py:132), no per-model branch and no Helios change (charter line 12). The earlier blockers on this PR (unreachable oversized clamp, --request-context missing from reproduction_args, absent page/prefill bounds and status_label, stale doc enumerations, unconditional context_hint) are fixed at head e6239855 and are not re-reported. Open questions: no CI ran at this head, so pytest tests/cli/test_planning.py is unverified; and whether a static multiple_of would be safe depends on whether any real recipe's adjust_page_tokens (parameters.py:571-575) changes the page size — which argues for the in-validate fix.
Simplicity
Verdict: should-fix issues only Blocking:
- None. Should fix:
- tests/cli/test_planning.py:295-329: the new test never reads
"context": plan.prepared_context(bootstrap.py:132), the only line carrying the cap into the core, so deleting it leaves the test green; it also asserts accessor arithmetic five times, takes an unusedmonkeypatch, and re-proves manifest plumbing already covered at :389-395. Nits: 6 Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Lens D (simplicity) at head e6239855, 8 files +79/−10. The shape is right: one universal field, one accessor, one consumer seam. Prior-pass blockers are resolved — max_fn was dropped from context_target so min(recipe.context, target) (planning.py:363) is live, --request-context is emitted at parameters.py:1484-1485, and the prefill bound uses min(result.context, result.prepared_context) (planning.py:594-596). Nothing was executed (no CI on the head commit); pytest tests/cli/test_planning.py -k request_context would settle the test finding.
Six subtractions remain, each with a smaller version: the redundant manifest_key (parameters.py:1316) and scope (:1317) both hit documented defaults; the three-clause clamp re-derivation at planning.py:186-190 reduces to one condition on prepared_context; serve.py:68-70 duplicates a shared hint prefix; cli-design.md:468 repeats a clause copied verbatim from :469; and the two hand-maintained field enumerations in docs both had to be edited and now wrap awkwardly. Load-bearing and not to be cut: the target is None early return (planning.py:361-362), the bench check at planning.py:212, serve.py:67, and bootstrap.py:132.
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- PR description (What Changed/Result/Evidence): the four required answers are out of order and the "why" survives only as a Workload clause inside Evidence, against AGENTS.md:74-80 and docs/design-review.md:141-150.
- PR description Result/Evidence: the −16 GB VRAM result is stated unconditionally, though it needs
--kv-cache-limit context|concurrency;page_ceilingreturnsOk(None)for the defaultmemorymode (helios/src/runtime_core/memory.rs:284-292, docs/cli-design.md:740). - PR description Result/Evidence: "fit_context applies min(context, prepared_context)" misstates the code, which takes
prepared_sequence_tokens.min(pool pages × page_tokens)(helios/src/model.rs:261-273). - docs/cli-design.md:468: the new row omits that a request above the cap is rejected at admission (helios/src/server/request.rs:349-355, model/admission.rs:150-158 (not opened)), which the description promises.
- tests/cli/test_planning.py:295:
monkeypatchis taken and never used, so the test callsrebuild_manifest.from_plan(:323) →source_identity()→ FlashInfer requirement (ignition/preparation/source_identity.py:35-41), unlike siblings at :159/:223/:333.
Nits: 8 — parameters.py:1319/help.py:46 (not opened) help has no floor and an internal term ("page token count"); docs/cli-design.md:468 copies the re-export clause from :469 verbatim; "recipe maximum context" (:468, :1436) vs "prepared context ceiling" (:1486) is one quantity in three spellings; docs/preparation-development.md:19 strands lock_gpu_clocks,; description table says 192k/128k while the command uses 196608/131072; "Total VRAM (GB)" is undefined (per GPU? nvidia-smi? allocator?); parameters.py:1318 status label prints the requested cap rather than the clamped plan.prepared_context.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Detail: all three earlier blockers are fixed at head e623985 and must not be re-raised — above-maximum caps clamp (ignition/parameters.py:1309-1320, planning.py:186-190, 357-363), --request-context is emitted in reproduction_args (parameters.py:1484-1485), and the prefill-chunk guard compares against min(result.context, result.prepared_context) (planning.py:594-597). Checked clean: the docs' context-limit rows and both universal-field enumerations, bootstrap.py:132 (context=plan.prepared_context), and the Discord: rzr2020 line. Not settled: the commit message body (only subject and trailers are exposed) and the external-recipe half of the "single seam" claim, which lives outside this repository (AGENTS.md:9-13).
Architecture
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- ignition/parameters.py:1318:
status_labelprints the rawcontext_target, so--request-context 500000reports "request context 500,000 tokens" whileprepared_contextis 262,144 (ignition/planning.py:363); AGENTS.md:452-456 requires the printed report describe what was prepared — print the clamped value fromRecipeParameters.status_parts. - ignition/preparation/bootstrap.py:132: the one line the feature hinges on is untested — reverting it to
plan.recipe.contextleavestests/cli/test_planning.py:295-329green; add seam assertions oncommon_preparation_kwargs→BasePreparationConfig.context(AGENTS.md:194-199).
Nits: 4 — Plan.demand_pages still uses recipe.context (planning.py:320-321); the --prefill-chunk-size help/bound advertises recipe.context (parameters.py:1294-1307); prepared_context's None short-circuit; docs/cli-design.md:468 vs the help text disagree on when the page-multiple rule binds.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Correctness
Verdict: blocking issues Blocking:
- tests/cli/test_planning.py:295-329: the new test calls rebuild_manifest.from_plan (:323) without stubbing source_identity, which raises RuntimeError without FlashInfer (source_identity.py:39-41, :78-81); every sibling test stubs it (:159, :223, :333, test_parameters.py:296 (not opened)) and this one takes
monkeypatchand never uses it — so the PR's only end-to-end test fails in a normal environment (head has no CI). Should fix: - ignition/planning.py:212: bench check changed from
> self.context(min(recipe.context, tokens)) to> self.prepared_context(recipe.context when uncapped), so a bench selection above the pool-derived context now passes planning and fails only after download/tuning/capture at bench/runner.py:388; use min(self.context, self.prepared_context) as at :594. - ignition/planning.py:395-396: to_dict records
contextandcheckpoint_contextbut notprepared_context, so the printed plan JSON cannot show the value exported as max_sequence_tokens. - ignition/parameters.py:1318: status_label prints the raw target, so --request-context 500000 on a 262144 recipe reports "request context 500,000 tokens" while the served context is 262,144. Nits: 4 — help text names a world-size-dependent page multiple (parameters.py:1319); test assertions restate inputs (:301, :303, :307, :312-313); :329 checks scope but not value; no test covers chunk-vs-cap, the multi-host path, or the bootstrap.py:132 seam. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Subtractive
Verdict: make it smaller first The change: +79 / −10 (code+docs +42/−10 across 7 files; tests +37/−0 in tests/cli/test_planning.py) Could remove: about 15 lines, in 6 places (about 68 more if the maintainers decide the cap belongs to the existing runtime flag) Biggest subtractions:
- ignition/planning.py:357-363: the four-line
prepared_contextbody collapses toreturn min(self.recipe.context, self.parameters.context_target or self.recipe.context);min_value=1(parameters.py:1315) makesorsafe: about 3 lines. The two-lineeffective = min(...)at planning.py:594 can also fold into the comparison: 1 more. - tests/cli/test_planning.py:301,303,307,326-329: three assertions restate the field default, the untouched
Plan.context, and the value passed two lines above; the four-line manifest round-trip re-provesfrom_plan's generic key/scope plumbing and becomes one line: about 6 lines. - ignition/cli/serve.py:68-70: the two-message
context_hintbecomes one string naming checkpoint, cache capacity and the cap: about 2 lines. - ignition/parameters.py:1316-1317:
manifest_key="context_target"andscope=ParameterScope.DEPLOYMENTrestate what the machinery derives (manifest_parametersfalls back todc_field.name, parameters.py:607-612, withmanifest_prefix is None; DEPLOYMENT is the ParamSpec default at :89): about 2 lines. - ignition/planning.py:396:
"checkpoint_context": self.recipe.contexthas no reader anywhere in the tree (search_codefinds only this line): about 1 line. Left behind: None.serve.py:67,help.py:46andbootstrap.py:132all follow the cap; nohelios/path becomes dead. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
code review summary
Recommendation: Changes Requested
The design is right and needs no rework: one field on the universal RecipeParameters base, one Plan.prepared_context accessor, one seam (bootstrap.py:132), no Helios change, and a no-op when the flag is unset. The three earlier blockers are fixed at this head; what remains is reporting fidelity, a loosened bench pre-check, and the missing seam test.
- Blockers: 0
- Should fix: 5
- Subtractive suggestions: 7
- Nits: 7
Pre Test Report
Pre-Test Report — PR #533 "Cap the per-request context target" (head e623985)
Recommendation: DO NOT refer to hardware testing yet. Return to the author for five small fixes, then run one targeted ~1–2 GPU-hour job on cn5.
PR: https://github.com/NVIDIA/hyperflare-inference/pull/533 · author roobyz (CONTRIBUTOR) · open · base main · head e623985 · 8 files, +79/−10 · no CI checks on the head, no human review on this head. Supersedes closed PR #454 (CHANGES_REQUESTED). Security screen all clear; I found no prompt-injection or agent-directed content in the description, diff, docs or comments (the Design-Signed-Off-By/design-review=1af4 trailers, the "Discord: rzr2020" line and the @flare-autobot boilerplate are ordinary process metadata).
I verified every claim below against the tree at this head rather than trusting the review summaries. Four of the five blockers I raised at the previous head (9118add) are genuinely fixed and must not be re-raised. What is left is one test that is environment-dependent and does not test the feature, plus four one-line reporting/validation items. None of them touch the design, which is right.
1. What the change is (verified)
After the rebase onto merged #545 the feature is one declarative parameter plus one consumer line:
ignition/parameters.py:1309-1320—context_target: int | Noneon the universalRecipeParametersbase:--request-context N, group "capacity and compression",min_value=1,manifest_key="context_target",DEPLOYMENTscope,status_label. Nomax_fn— so a target above the recipe maximum is not rejected, it clamps.ignition/planning.py:357-363—Plan.prepared_context:recipe.contextwhen unset, elsemin(recipe.context, target).Plan.context(:352-355,min(recipe.context, tokens)) is untouched.ignition/planning.py:186-190— page-multiple rejection, correctly gated ontarget <= self.recipe.context, so an oversized unaligned target is the documented no-op rather than an error.ignition/planning.py:212— the bench pre-check now comparesrequired_context > self.prepared_context.ignition/preparation/bootstrap.py:132—"context": plan.prepared_contextincommon_preparation_kwargs(wasplan.recipe.context). This is the only line that reaches the core:BasePreparationConfig.context(bootstrap.py:33) → Heliosprepared_sequence_tokens(helios/src/server/config.rs:131) →limits.max_sequence_tokens(:148), advertised asmax_model_len(helios/src/server/models.rs:81(not opened)), enforced at admission (helios/src/server/request.rs:350(not opened)), pool-clamped at load (helios/src/model.rs:268-272).ignition/parameters.py:1484-1485—--request-contexthand-emitted inreproduction_argsahead of the base-class skip at:1492-1495;ignition/preparation/rebuild_manifest.py:327,331therefore carry it into the manifest andflare inspect.ignition/cli/serve.py:67-70—max_body_bytesfromprepared_context;context_hintnames the cap only when it binds.tests/cli/test_planning.py:295-329(new test),docs/cli-design.md:449 (not opened),468,1436,docs/preparation-development.md:17-19,ignition/cli/help.py:46(not opened).
No Rust change, no per-model branch, no new mechanism, and the flag reaches all four entry points (serve.py:180→193-201 multi-host, serve.py:263 / :455-459 single-host, bench.py:186-189). Omitting the flag returns recipe.context, exactly what bootstrap.py:132 passed before.
2. Why testing this head now is still not the efficient move
Blocking A — the PR's own test will fail on any host without FlashInfer, and it does not test the feature
tests/cli/test_planning.py:295-329 calls rebuild_manifest.from_plan(...) at :323 but — unlike its three siblings at :159, :223, :333 (and tests/cli/test_parameters.py:296 (not opened)) — never patches ignition.preparation.source_identity.source_identity. from_plan calls it (rebuild_manifest.py:290,327), and that function imports flare_heliopause and raises RuntimeError("the preparation environment requires FlashInfer") when find_spec("flashinfer") is None (ignition/preparation/source_identity.py:35-41), or "FlashInfer native source directory is unavailable" when data/include/data/csrc are missing (:76-81). The test takes monkeypatch and never uses it — the tell that the stub was dropped. Even where FlashInfer is present the test hashes the ignition, FlashInfer and native source trees on every run.
Worse for our purposes: the test asserts nothing about the line that makes the cap real. Revert bootstrap.py:132 to plan.recipe.context and every assertion at :301-329 still passes — the accessor, the errors, the manifest and the reproduction args are all still correct while the exported core is built for the wrong context. Per AGENTS.md:194-199 ("Tests must exercise the affected behavior or contract") that is the missing coverage, not a nit.
Fix (small): add the one-line monkeypatch.setattr(...), and replace the arithmetic assertions with two seam assertions in the existing house pattern (tests/cli/test_commands.py:150-153):
assert BasePreparationConfig(**common_preparation_kwargs(capped, compile_forwards=True,
kernel_cache=None, retain_graphs=False)).context == 131072
assert BasePreparationConfig(**common_preparation_kwargs(stock_plan, ...)).context == recipe.context
plus one pytest.raises(UsageError, match="prefill-chunk-size") for context_target=2048 with the fixture's 4096 chunk — the new safety check at planning.py:594-597 is currently untested.
Blocking B — the printed plan reports a context the core does not serve
status_label is invoked with the raw field value (parameters.py:1558), so --request-context 500000 on a 262,144-token recipe prints request context 500,000 tokens in the "Select GPUs" line (serve.py:260-274) while PreparedContext clamps to 262,144. AGENTS.md:452-456 requires the plan, its printed report and its recorded measurements to describe what was prepared. status_parts (parameters.py:1541-1563) has the ParameterContext, so the clamp is available there. One-line fix; keep the raw request visible in the manifest.
Blocking C — the served extent is absent from the plan JSON
Plan.to_dict (planning.py:379-416) emits context (pool-bound), checkpoint_context and context_target (via param_dict) but never prepared_context. That dict is printed by export (serve.py:206) and bench (bench.py:194) and folded into the bench record (bench.py:263-266). Without it, a test engineer cannot tell from the artifact whether the cap took effect — which is precisely the question a hardware run is supposed to answer.
Blocking D — the bench bound got looser on the uncapped path
planning.py:212 changed from selection.required_context > self.context to > self.prepared_context. Uncapped, prepared_context == recipe.context while context == min(recipe.context, tokens) (:352-355), so on any memory-constrained host (tokens < recipe.context) the check now admits bench selections the prepared core cannot serve, and they fail only after model download, autotuning and graph capture at ignition/bench/runner.py:388. Fix: min(self.context, self.prepared_context), the same shape as planning.py:594.
Together A–D mean a GPU run now would be spent on an artifact whose own suite is not green and whose output cannot demonstrate the feature. That is exactly the hardware time we should not spend. Fixes are ~10 lines.
Should fix while the author is in the file (not test-blocking)
planning.py:320-321—demand_pagesstill usesrecipe.context, so the printed/JSON KV demand overstates the number this flag exists to lower.parameters.py:1319— the help says the value "must be a multiple of the page token count" unconditionally, butplanning.py:187deliberately skips the check above the recipe maximum. One clause ("ignored above the recipe maximum") closes it.docs/cli-design.md:468(not opened) — should say a cap also lowers the default output allowance (max_new_tokensdefaults tomax_sequence_tokens,helios/src/server/config.rs:210-213) and must be at least the prefill chunk.- Description: state that the VRAM result holds under
--kv-cache-limit context|concurrency(see §3), and thatfit_contextclamps the prepared extent to the physical pool (helios/src/model.rs:261-273) — the description currently attributes theminto Helios.
3. Expected value of a hardware test: low now, moderate-to-good after A–D
The capability is real and is not duplicated by any runtime flag. --kv-cache-limit context|concurrency and --memory-limit shape the KV pool at load (helios/src/runtime_core/memory.rs:238-331); neither can lower max_sequence_tokens or the advertised max_model_len, both baked from prepared_sequence_tokens at load (config.rs:131-148, server/models.rs:81 (not opened)). Prepared-and-honestly-advertised shorter context is an export-time decision and this is the smallest seam for it. I disagree with the subtractive lens's "drop the flag, --kv-cache-limit already does this": the overlap objection is about the evidence, not the capability.
But the evidence does not isolate this PR. page_ceiling returns Ok(None) for the default KvCacheLimit::Memory (memory.rs:290-292; default memory per docs/cli-design.md:740 (not opened)), and export-side page sizing is untouched (planning.py:471-479 fits pages from host free memory; demand_pages still uses recipe.context). So the author's 16 GB table, measured with --kv-cache-limit concurrency, largely re-measures the existing runtime flag. What only this flag buys must be measured, not re-confirmed, and that is what the plan below does.
Not testable on our fleet regardless: --ranks > 1 needs a second host (cn5 is four GPUs on one host, cn7 a single GB10). It must be pinned GPU-free. Reachability also depends on the external hyperflare-recipes mapping BasePreparationConfig.context → max_sequence_tokens; the author states recipe updates are still pending, so any hardware run should confirm the model under test actually honours it (step 1 below does).
4. Test plan — adopt only after A–D are fixed and the GPU-free suite is green
Deliberately minimal: this is a memory-sizing and admission-ceiling knob with no throughput claim, so no A/B perf sweep.
Phase 0 — GPU-free, no hardware time
pytest tests/cli/test_planning.py tests/cli/test_commands.py tests/cli/test_parameters.py (not opened), with:
- seam assertions:
common_preparation_kwargs(...)["context"] == 131072capped,== recipe.contextunset; context_target=0rejected (exists),100rejected as non-multiple (exists),500000clamps (exists),2048+ 4096 chunk rejected (missing);to_dict()carriesprepared_context;reproduction_argscontains--request-context 131072; manifestcontext_targetpresent withDEPLOYMENTscope;- parser: flag present on
export,bench,debug-serve, absent fromflare run; --ranks 2plan carries the cap (the only pin available for multi-host);source_identitystubbed so the file needs no FlashInfer.
Phase 1 — the cap reaches the core (1 GPU of cn5; SM120 matches the author's card)
Model: nvidia/GLM-5.3-Flash-NVFP4. Two exports from the same command, differing only in the flag; one GPU, not four (the change is orthogonal to parallelism except through page size).
- A:
ignition export … --request-context 131072· B: unset.
/v1/models→max_model_lenis 131072 on A, the recipe maximum on B. The one assertion only the export-side value can satisfy.- A prompt just over 131k tokens is rejected at admission on A; a prompt just under is accepted and generates.
flare inspect Ashows the cap and its reproduction command re-exports a 131072 core (validates the recording path).- Falsification control:
--request-context 100000(not page-aligned) fails at planning with an actionable message, not at core load with Helios's opaque "invalid prepared model configuration" (helios/src/model/catalog.rs:50-57,70).
Phase 2 — the isolating VRAM comparison the PR owes
At concurrency 1 and 4, record total VRAM for A and B under both --kv-cache-limit memory (default) and --kv-cache-limit concurrency. The pair separates this PR from the runtime flag. Expect ~0 delta under memory — that is the honest result and must be reported as such, not as a failure.
Phase 3 — regression (cheap, same job)
A pre-PR core still loads and serves unchanged; a no-flag export at this head produces the same preparation config as main (the no-op path); --request-context is still absent from flare run.
Budget / efficiency
~2 exports + ~6 serve starts on a single cn5 GPU ≈ 1–2 GPU-hours, one model, one host. Skip cn7 (no ARM64-specific question). Skip multi-host (no second host — pinned GPU-free in Phase 0). No throughput A/B.
5. Bottom line for the referral decision
- Substantive problems that must be fixed before testing: yes, four (A–D) — a test that cannot run here and never exercises the feature; a printed plan that names a context the core does not serve; a plan JSON that omits the served extent; a loosened bench bound that defers failure past full GPU preparation. All are ~10 lines.
- Fixed since my last report — do not re-raise: the
max_fnthat made the clamp unreachable is gone; the page check is correctly gated totarget <= recipe.context;--request-contextis emitted inreproduction_argsand the manifest; the prefill-chunk guard usesmin(result.context, result.prepared_context);status_label,max_body_bytes, the conditionalcontext_hint,help.py:46(not opened) and both docs enumerations are in place; multi-host export forwards the flag. - Expected value: low at this head, moderate-to-good after A–D. The export-time admission ceiling is genuinely unique to this flag and worth one short GPU run; the VRAM headline is an existing runtime flag's behaviour and should be measured with the default
memorymode reported honestly alongside. - Order of operations: fix (~10 lines) → GPU-free suite green → one targeted 1–2 GPU-hour job on a single cn5 GPU.
Full report · Notes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence:
Read the full diff of PR #533 (8 files, +91/−28: ignition/parameters.py, ignition/planning.py, ignition/cli/serve.py, ignition/cli/help.py, ignition/preparation/bootstrap.py, tests/cli/test_planning.py, docs/cli-design.md, docs/preparation-development.md), the complete PR description, and all discussion (author comment plus five flare-autobot review comments; no maintainer review, no CI checks). Every added line is ordinary engineering: a new context_target field with --request-context (ignition/parameters.py:1309-1319, DEPLOYMENT scope, manifest_key="context_target", no max_fn), a Plan.prepared_context accessor clamping to min(recipe.context, target) (ignition/planning.py:357-363), guaranteed_tokens derived from it (:368), page-multiple/prefill-chunk/bench validation (:186-190, :212, :594), to_dict() emission (:396), repro/status emission (ignition/parameters.py:1483-1484, :1560-1561), serve/help/bootstrap wiring (ignition/cli/serve.py:67-69, ignition/cli/help.py:46, ignition/preparation/bootstrap.py:132), and a unit test (tests/cli/test_planning.py:295-335). No new subprocess, eval, network fetch, file write, encoded blob, or hidden instruction; the description's claims match the code.
Injection scans (ignore previous instructions, autobot in docs, and a broad do not report|skip the review|all clear|agent reading|if you are an agent|system prompt pattern) returned no matches within the PR's content; repo-wide hits are unrelated pre-existing files (vLLM NOTICE, re.fullmatch regex code, Claude Code client tests). The only agent-addressed text is the repository's own review-bot footer ("Have your agent review the Full Review…", "#autobot:ignore to opt out") — standard tooling on this repo, not an attempt to steer this review; its external links were not followed. "Discord: rzr2020" is innocuous contact info.
Open questions: no maintainer review or CI checks exist on head 448f70a, so the description's performance/correctness claims are unverified (a review-completeness gap, not a security finding), and the external bot page was deliberately not fetched.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: roobyz (CONTRIBUTOR); Discord rzr2020
Motivation: A recipe's context maximum (e.g. 256K) is far larger than the requests a deployment actually serves, so the exported core reserves KV pages for the maximum and runs out of VRAM at the concurrency the deployment needs. This PR adds a flag that caps the prepared per-request context (and the exported max_sequence_tokens) at export time, so a deployment can trade maximum sequence length for room for more concurrent requests.
Scale: +91 / −28 lines in 8 files (cumulative at head 448f70a)
Proposal:
- One declarative
context_targetfield on the universalRecipeParametersbase, flag--request-context, deployment scope,min_value=1, nomax_fn. - One accessor
Plan.prepared_context(recipe max when unset,min(recipe.context, N)otherwise);Plan.contextstays stock. - The single seam:
common_preparation_kwargspassesplan.prepared_contextascontext, which becomes Heliosmax_sequence_tokens; no Helios change. - Alignment check and prefill-chunk guard use the prepared extent, so a sub-chunk or unaligned target is rejected at export instead of at load.
- Reporting:
to_dictgainsprepared_context, the manifest/repro args carry--request-context, the serve "Select GPUs." line andcontext_hintreflect the cap; docs and generated help updated. Touches: ignition/planning.py— new accessor, gated page-alignment check, bench and chunk guardsignition/parameters.py— the flag, its repro-args emission and its status fragmentignition/preparation/bootstrap.py— thecontext=seam all recipes consume Related items:- #454 Cap the prepared per-request context (closed): this PR resubmits it and must answer its "serving already bounds KV history" objection
- #545 ignition: compositional RecipeParameters and dynamic CLI (merged): the architecture this change is now built on
- #516 ignition: add --kv-cache-format declaration (open): rewrites
planning.pyand the same test block — conflicts by construction - #544 (open): also edits
ignition/parameters.pyLink: https://github.com/NVIDIA/hyperflare-inference/pull/533 Autobot comments: Amendment report only. My previous blocker (the status line printing the requested rather than the served context) and the unpatchedsource_identitydefect are both fixed and withdrawn; the sub-64/sub-chunk unloadable-core family is now fully covered by two checks and is withdrawn too. Nothing is blocking on code — the substantive objection left is evidential: the body now concedes that under the default--kv-cache-limit memorythe pool fills free VRAM and the cap is only admission control, and Helios already clamps the served ceiling to the pool (fit_context) while--memory-limit/[memory] reserveshrink it, so the table's baseline rows are missing and the "why this flag" question from #454 is unanswered. Small residuals: help/docs/code disagree on page alignment, the chunkmax_fnstill advertises the uncapped recipe maximum, generated help rendersdefault: nonewhere docs promise the recipe maximum, a printed JSON key (checkpoint_context) is silently replaced, anddemand_pagesstill ignores the cap. I also disagree with one finding of the 06:03 review: the bench pre-check was tightened, not loosened. Nothing in the thread shows any test ever executed — head 448f70a reports no CI checks and no test output.
Value Proposition
Verdict: worth merging
The capability is needed, the layer is right, and the footprint is small: 8 files — ~40 lines of code plus a 43-line test, all Ignition Python plus docs (one optional field on the shared RecipeParameters base, one Plan.prepared_context accessor, one consumer line, one CLI argument that the parameter system generates). There is no Helios change, no per-model branch, and omitting the flag is a strict no-op. The two things I said last round must be fixed before merge — the unpatched source_identity() in the new test and the absence of any assertion pinning the seam that actually changes the core — are both fixed at head 448f70a7. What remains is one missing test, two sentences of docs and three reporting nits.
Why this belongs in the project (charter mapping)
- It meets the "what gets merged" bar. It converts
#454'sCHANGES_REQUESTEDreview fromyatesdrinto code, and it addresses a measured memory problem — Qwen3.8-27B on one RTX PRO 6000 Blackwell (SM120, 96 GB, one of the vision's two named hardware targets), with model, commands, revision and a VRAM table. 55.8 → 39.8 GB at concurrency 4 is 16 GB of real headroom on a workstation card, which is exactly the "squeeze the most out of workstation and compact hardware" case, not a hypothetical. - Solve the right problem in the right place (#404). The runtime genuinely cannot do this.
--kv-cache-limitand--memory-limitshape the pool;max_sequence_tokens/max_model_lenare baked into the core at export (helios/src/server/config.rs:131,:148), enforced at admission (helios/src/server/request.rs:350), advertised in/v1/models(helios/src/server/models.rs:81) and only subsequently clamped to the physical pool (helios/src/model.rs:261-273). An honest under-capacity advertisement is an export-time decision, andignition/preparation/bootstrap.py:132→BasePreparationConfig.contextis the single seam every recipe consumes. This is the smallest footprint in shared code — the exact thing the charter asks for. - No per-model special cases or flags. One field on the universal base; every recipe inherits it; zero branches on model identity; zero runtime change.
- No duplication. Nothing else lowers or honestly advertises the admission ceiling.
#454's objection 2 ("sentinel: use--kv-cache-limit") is answered by the flag's own evidence section: under the default--kv-cache-limit memorythe pool fills free VRAM regardless (helios/src/runtime_core/memory.rs:290-292), so the cap's effect there is admission control only. The alternative without new code is minting recipe variants per context, which is strictly worse. - No silently ignored API fields (#417). A request above the cap is rejected at admission rather than truncated, and
Plan.to_dict()now carriesprepared_context(planning.py:396), so the served extent is reported rather than the stock number.
What I verified at this head (fixes since my last report)
- The new test patches the environment.
tests/cli/test_planning.py:296setssource_identity, sorebuild_manifest.from_planat:329no longer hashes ignition/flashinfer/flare-heliopause or requiresfind_spec("flashinfer"). - The seam is now pinned.
tests/cli/test_planning.py:316-319assertscommon_preparation_kwargs(capped)["context"] == capped.prepared_context == 131072and!= recipe.context. Revertingbootstrap.py:132toplan.recipe.contextnow turns the test red — previously the whole test stayed green with the cap disconnected, which was the most serious remaining gap. - The printed report shows the served value, not the request.
parameters.py:1560-1561emitsrequest context {min(context_target, recipe.context):,} tokens, so--request-context 500000prints the recipe maximum. That closes my previous item 7. - The safety checks line up with the quantity that is actually served.
planning.py:186-190gates the page-multiple check ontarget <= recipe.context— precisely the set whereprepared_context == target— so it validates the served extent and leaves an oversized target a documented no-op;:212usesmin(context, prepared_context)for bench;:594-597bounds the prefill chunk bymin(result.context, result.prepared_context)so a cap below the chunk fails at export instead of after a full GPU preparation with Helios refusing the core (helios/src/scheduler.rs:66-77viamodel/catalog.rs:42);:368folds the cap intoguaranteed_tokens. checkpoint_context→prepared_contextinto_dict(planning.py:395-396) is safe: a repo-wide search finds zero readers ofcheckpoint_context(Rustflare inspectreadsdeployment["max_sequence_tokens"], which now carries the capped value through the core itself).- The description now scopes its evidence to
--kv-cache-limit concurrencyand states that under the defaultmemorymode the cap buys admission control only, and thefit_contextsentence is now accurate. With why / what changed / result / evidence in order, it satisfies the charter's four-part description requirement.
Should fix before merge (all small, none touching the design)
- The one new safety check has no test.
planning.py:594-597is untested. The fixture's chunk is 4096 (tests/cli/test_planning.py:120), so onepytest.raises(UsageError, match="prefill-chunk-size")withcontext_target=2048, beside:321-327, covers it. docs/cli-design.md:458under-documents two constraints a user will hit: the cap must be at least--prefill-chunk-size, and it also lowers the default output allowance becausemax_new_tokensdefaults tomax_sequence_tokens(helios/src/server/config.rs:210-213). One clause each.parameters.py:1318help contradicts the check: it says the value "must be a multiple of the page token count" unconditionally, whileplanning.py:187only enforces that below the recipe maximum, and the help never says the value is clamped to the recipe max. Reword to match the implemented rule.planning.py:320-321—demand_pagesstill usesrecipe.context, so the KV demand printed into the plan JSON overstates exactly the number this flag lowers. Useprepared_context(sole consumer isto_dictat:407).
Nits, not worth holding the change: status_parts (parameters.py:1560-1561) inlines the clamp where every sibling uses a status_label, and dereferences context.recipe.context without the None guard _recipe_context_limit (:1268-1269) applies — unreachable from serve.py:271, which always supplies a recipe.
The residual risk, stated plainly
BasePreparationConfig.context still defaults to 262144 (bootstrap.py:33), and nothing validates that an exported core's max_sequence_tokens equals plan.prepared_context; Helios checks only internal consistency (helios/src/model/catalog.rs:35-71). Recipe prepare() functions live outside this repository, so a recipe that builds its PreparationConfig without routing common_preparation_kwargs would silently ignore the flag. The PR's own verification (five named checkpoints, three prepared contexts, VRAM scaling ~8.2/6.3/4.3 GB per slot — the pool = concurrency × prepared context signature) is the evidence that the seam works in practice, and it is the right kind of evidence for this repo. I would not ask for a structural fix, only that the merge commit or docs row carries the note that the cap reaches the core through common_preparation_kwargs.
Bottom line
Worth merging. It is the right capability in the right layer, general and a no-op by default, with measured payoff on the project's target hardware and a four-part description that satisfies the charter. Merge after (1) one pytest.raises for the prefill-chunk bound, (2) two constraint clauses in docs/cli-design.md:458, and (3) aligning the --request-context help with the implemented clamp rule. Item 4 and the nits are optional polish.
Nothing was executed: the head has no CI checks and no pytest run happened here, so every claim above is a static read of the cited lines at 448f70a7. pytest tests/cli/test_planning.py tests/cli/test_commands.py settles item 1 and confirms items 1–2 of the "verified" list in one command.
Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Conventions
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- ignition/planning.py:186-190: the page-multiple rule is hand-written in
Plan.__post_init__althoughParamSpec.multiple_of(ignition/parameters.py:81, enforced invalidate_fieldsat :524-532) already implements and renders exactly that rule; the siblingprefill_chunk(:1294-1308) puts its recipe-dependent bound inRecipeParameters.validate(:1455-1460), whichPlan.__post_init__already calls at :185. The same rule is hand-written a third time in the field's help text (:1318). - ignition/planning.py:319-321:
demand_pagesis the last derived value still sized from the uncapped recipe max, so a capped plan's JSON reports a demand ~2x the served extent besidecontext/prepared_context/guaranteed_tokenskeys that use the cap.
Nits: 4 — hand-rolled if context_target is not None status line in RecipeParameters.status_parts instead of the status_label mechanism (parameters.py:98, :1554-1559); min(target, recipe.context) computed in three places (planning.py:362-363, parameters.py:1561, planning.py:594); redundant manifest_key/scope restating defaults (parameters.py:1316-1317); page-alignment documented in --help but not in the docs flag row while --prefill-chunk-size's row does document its alignment (docs/cli-design.md:457-458); one stale prose flag enumeration in docs/direct-execution.md:53-57.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- docs/cli-design.md:458: the
--request-contextrow omits the page-size-multiple requirement that ignition/planning.py:186-190 enforces as a usage error; the adjacent--prefill-chunk-sizerow (:457) states its alignment, and Helios rejects a misaligned core at load (helios/src/model/catalog.rs:50-57). - Description / ignition/planning.py:396:
Plan.to_dict()replaces main'scheckpoint_contextkey (main planning.py:383) withprepared_contextwhile the description presents it as an addition; AGENTS.md:92-94 requires material compatibility changes named with before/after, and the recipe maximum leaves the plan JSON under a cap.
Nits: 8 — parameters.py:1318 help ("page token count", rule stated unconditionally, no floor below --prefill-chunk-size), help.py:46 no floor, cli-design.md:458 verbatim re-export clause copied from --mixed-prefill, one ceiling spelled three ways (:458/:1426/:1476), long reflowed line at cli-design.md:450-451, unnamed GraphOperation groups at preparation-development.md:17-19, unguarded context.recipe at parameters.py:1561, and two description phrasings ("expected pool", per-slot numbers being concurrency-1 totals).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Architecture
Verdict: clean (nits only)
Blocking:
- None.
Should fix:
- None.
Nits:
ignition/planning.py:396:to_dictreplaces thecheckpoint_contextkey withprepared_contextinstead of adding it, so the plan JSON loses the recipe's declared maximum once a cap is set (main emittedplanning.py:383"checkpoint_context": self.recipe.context; no in-repo consumer, so reporting fidelity only — emit both).ignition/planning.py:320-321:demand_pagesstill multipliesrecipe.context, so the plan's demand row describes the uncapped world whilecontext_target/prepared_contextin the same document describe the capped one.ignition/parameters.py:1318: the help's "must be a multiple of the page token count" reads as unconditional, but the check binds only whentarget <= recipe.context(planning.py:187); an oversize unaligned target is accepted as a no-op. One clause ("ignored above the recipe maximum") removes the contradiction. Same for--prefill-chunk-size, whose advertised bound isrecipe.context(parameters.py:1301,_recipe_context_limitat:1269) while the plan now rejects abovemin(context, prepared_context)(planning.py:594-597).ignition/parameters.py:1561:context.recipe.contextis dereferenced without theNoneguard used elsewhere in the module (:1269,:270,:716); harmless today (onlyserve.py:271calls it with a plan context that has a recipe).
Everything my earlier reports raised is fixed at this head and was re-checked in code, not inferred from the description: the target is validated/clamped properly (no max_fn, min() at planning.py:357-363, alignment gated at :186-190), the prefill-chunk and bench bounds use the cap (:594-597, :212), --request-context reaches the manifest and reproduction_args (parameters.py:1483-1484, :1316-1317), the printed report now names the clamped value (parameters.py:1560-1561 via serve.py:271), and the seam is tested (tests/cli/test_planning.py:316-319).
Scope and layering fit the charter and AGENTS.md: one optional field on the universal RecipeParameters base with generated CLI/manifest/repro plumbing, one Plan accessor, one consumer line at bootstrap.py:132, DEPLOYMENT scope matching the prefill_chunk precedent, no Helios change, no per-model branch, no env toggle, and omission returns recipe.context byte-equivalently to main. The evidence caveat is now stated in the description: the VRAM savings hold only under the non-default --kv-cache-limit concurrency; under the default memory mode page_ceiling returns Ok(None) (helios/src/runtime_core/memory.rs:284-331), so the cap is admission control only.
Limits: nothing was executed (head 448f70a has no CI checks); the source-level claims are settled by pytest tests/cli/test_planning.py. The measured table cannot be re-derived here, and whether default-mode pools gain any headroom is unmeasured.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Simplicity
Verdict: should-fix issues only Blocking:
- None. Should fix:
- tests/cli/test_planning.py:295-335: the new test asserts the accessor's arithmetic five times and re-proves generic manifest plumbing, but never fails when the one line carrying the cap into the core (ignition/preparation/bootstrap.py:132
"context": plan.prepared_context) is reverted; its seam assertion compares that expression to itself. Nits: 6 — redundantmanifest_key(parameters.py:1316) and defaultscope(:1317); clamp re-derived in planning.py:186-190 instead of usingprepared_context; clamp re-derived a third time in parameters.py:1560-1561 (and unguardedcontext.recipe.context); duplicated hint strings in cli/serve.py:68-70; docs/cli-design.md:458 clause copied verbatim from the neighbouring row (:459) plus an over-long line at :450. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Shape is right and needs no rework: one universal field, one accessor Plan.prepared_context, one seam in bootstrap.py, Plan.context deliberately left stock, no Helios change. The blockers from earlier passes are gone, and this head deletes both hand-maintained field enumerations from the docs in favour of a pointer to ignition/parameters.py. Load-bearing lines not to cut are listed in the full report. Nothing was executed (no CI on the head commit); pytest tests/cli/test_planning.py -k request_context settles the should-fix.
Correctness
Verdict: should-fix issues only Blocking:
- None. Should fix:
- ignition/parameters.py:1318 + ignition/cli/help.py:46: the help text names
recipe.page_tokensas the alignment the cap must obey, but the check uses the world-size-adjustedPlan.page_tokens(planning.py:324-325, viaadjust_page_tokens) and runs only insidePlan.__post_init__(planning.py:186-190), after model resolution and GPU discovery — unlikeprefill_chunk's inlinemultiple_of(parameters.py:1300-1302). Nits: 4 —status_partsdereferencescontext.recipewith no None guard (parameters.py:1560-1561);Plan.demand_pagesstill uses the uncappedrecipe.contextand is printed in the plan JSON (planning.py:320-321, :407), contradicting AGENTS.md:452-456's "the printed report describes what was prepared"; weak assertions at tests/cli/test_planning.py:302-314; the manifest assertion at :335 checks scope, not the recordeduint_value. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
All four defects from earlier heads are fixed at 448f70a7 and were re-verified rather than repeated: the new test stubs source_identity (test_planning.py:296); the bench bound is min(self.context, self.prepared_context) (planning.py:212); to_dict emits prepared_context (planning.py:396); status_parts prints the clamped value (parameters.py:1561); the prefill-chunk bound uses min(result.context, result.prepared_context) (planning.py:594-597); and --request-context is emitted in reproduction_args (parameters.py:1483-1484).
Verified clean: the no-flag path is identical to main (prepared_context returns recipe.context); the clamp branch is reachable and page-aligned because the check is gated on target <= recipe.context; the manifest key passes Helios's validate_key and is never interpreted; Helios's fit_context clamps at serve time so a cap above the pool only shrinks the artifact; the admission rejection and context_hint the docs claim exist do exist (helios/src/model/admission.rs:150 (not opened), server/request.rs:350 (not opened), serve.py:68-70); max_body_bytes stays under the 256 MB ceiling; and common_preparation_kwargs is the single seam every recipe receives.
Untested (not broken): chunk-vs-cap rejection, the multi-host --ranks path with a cap, and a recipe actually consuming config.context. Open: whether any external recipe overrides adjust_page_tokens, and whether dropping checkpoint_context from to_dict breaks a downstream consumer.
Subtractive
Verdict: make it smaller first The change: +91 / −28 (code+docs +48/−28 across 7 files; tests +43/−0) Could remove: ~17 lines (18 with the redundant plan-JSON key), in 7 places, plus ~20 duplicated words Biggest subtractions:
- tests/cli/test_planning.py:304,308,313,319,332-335: four assertions restate the input one line above or untouched
Plan.context; the four-line manifest round-trip re-provesfrom_plan's generic key/scope plumbing and collapses to one dict-comprehension assert: ~7 lines - ignition/planning.py:357-363:
prepared_contextbody 4→return min(self.recipe.context, self.parameters.context_target or self.recipe.context)(safe:min_value=1at parameters.py:1315,validateruns first at planning.py:185): ~3 lines - ignition/cli/serve.py:68-70: replace the two-branch
context_hintwith one fixed string like its neighbourcapacity_hint: ~2 lines - ignition/parameters.py:1316-1317: delete
manifest_key/scope, both derived defaults (parameters.py:607-612, :89): ~2 lines - ignition/parameters.py:1560-1561 or ignition/planning.py:396: the served extent is reported three times (plan JSON, status line, context_hint); keep one home: ~1-2 lines
Left behind: None.
checkpoint_contexthas no reader anywhere; no helios/ path becomes dead;--kv-cache-limituntouched; tests/cli/test_commands.py:80 guards--context, a different spelling. Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
code review summary
Recommendation: Changes Requested
The design is right and needs no rework: one field on the universal RecipeParameters base, one Plan.prepared_context accessor, one seam (bootstrap.py:132), no Helios change, and a no-op when the flag is unset. Earlier blockers are all fixed at this head; what remains is reporting fidelity in the plan record and the wording of the page-alignment rule.
- Blockers: 0
- Should fix: 2
- Subtractive suggestions: 7 (~14 of the +91 added lines)
- Nits: 5
See the Full Review for file:line citations and suggested changes.
Pre Test Report
Pre-Test Report — PR #533 "Cap the per-request context target" (head 448f70a)
Recommendation: REFER TO HARDWARE TESTING — narrowly, and after two one-line reporting fixes and a green GPU-free suite.
PR: https://github.com/NVIDIA/hyperflare-inference/pull/533 · author roobyz (CONTRIBUTOR) · open · base main · head 448f70a · 8 files, +91/−28 · no CI checks on the head, no human review at this head. Supersedes closed PR #454 (CHANGES_REQUESTED). Security screen all clear; I found no prompt-injection or agent-directed content in the description, diff, docs or comments (the Design-Signed-Off-By/design-review=1af4 trailers, the Discord: rzr2020 line and the @flare-autobot boilerplate are ordinary process metadata; the bot's #autobot:ignore opt-out line was not treated as an instruction).
This reverses my recommendation at the two previous heads. At e623985 and again at 9118add I recommended no referral. I re-verified every one of those blockers against the tree at 448f70a, and all four are genuinely fixed in code, not merely claimed in the description. What remains is reporting fidelity and help wording — no behaviour change, no unloadable core, no silently dropped flag. That is the first head at which hardware time buys information instead of confirming known defects.
1. What the change is (verified at 448f70a)
ignition/parameters.py:1309-1319—context_target: int | Noneon the universalRecipeParametersbase:--request-context N, group "capacity and compression",min_value=1,manifest_key="context_target",DEPLOYMENTscope. Nomax_fn, so a target above the recipe maximum clamps rather than being rejected.ignition/planning.py:357-363—Plan.prepared_context:recipe.contextwhen unset, elsemin(recipe.context, target).Plan.context(:352-355,min(recipe.context, tokens)) is deliberately untouched.ignition/planning.py:186-190— page-multiple rejection, correctly gated ontarget <= self.recipe.context, i.e. exactly the set whereprepared_context == target, leaving an oversized unaligned target the documented no-op.ignition/preparation/bootstrap.py:132—"context": plan.prepared_contextincommon_preparation_kwargs. This is the only line that changes the exported core:BasePreparationConfig.context(bootstrap.py:33) → Heliosprepared_sequence_tokens(helios/src/server/config.rs:131) andlimits.max_sequence_tokens(:148) → advertised asmax_model_len(helios/src/server/models.rs:81) and enforced at admission (helios/src/server/request.rs:349-355), then pool-clamped at load (helios/src/model.rs:268-272).ignition/parameters.py:1483-1484—--request-contexthand-emitted inreproduction_argsahead of the base-class-field skip at:1491-1495;rebuild_manifesttherefore carries it into the manifest andflare inspect. Printed report shows the clamped value (parameters.py:1560-1561); plan JSON carriesprepared_context(planning.py:396); bench record carries the whole parameter dict (bench.py:263-266);max_body_bytesandcontext_hintfollow the cap (serve.py:67-70);MODEL --helplabels the recipe context a maximum (help.py:46);--request-contextcorrectly absent fromflare run(cli/__init__.py:22).
Verified fixed since my last report — do not re-raise: test env + seam pin (tests/cli/test_planning.py:296, :318); clamped status line; prepared_context in to_dict; pool-aware bench bound. I also read the new test's arithmetic against the fixture (:139-142, context=262144, page_tokens=64) and all five of its cases should pass: 131072 caps, 500000 clamps (page check correctly skipped above the max), 0 trips min_value, 100 trips the page check, and the manifest round-trip matches. Claims in several review summaries that "the test cannot pass" describe older heads (de1b5b5, 02023eba, 9118add), and the recurring claim that "reverting bootstrap.py:132 leaves the test green" is false at this head — :318 is a chained comparison, so kwargs["context"] == 131072 fails on a revert.
2. Should fix before the run (two one-liners, reporting only)
Neither blocks merge on correctness grounds; both matter because they are what a test engineer reads to decide whether the cap took effect.
ignition/planning.py:320-321—demand_pagesstill uses the uncapped recipe max, and it is printed at:407inside the same plan JSON that now carriesprepared_context. With a cap the KV demand row is ~2× the served extent — the exact number this PR exists to lower, in the artifact used to explain the VRAM result. Sole consumer isto_dict; useprepared_context.ignition/planning.py:396—to_dictreplaces main'scheckpoint_contextkey withprepared_contextinstead of adding. No in-repo reader (search_code checkpoint_context→ no matches), so it is reporting fidelity only, but the plan record then cannot state the recipe's declared maximum and the served extent at once. Emit both.
Everything else is nits and should not hold hardware time: the page-multiple rule is hand-written in __post_init__ rather than ParamSpec.multiple_of/RecipeParameters.validate and its message omits the for {alias} clause every sibling flag error carries (parameters.py:520,531,539); the help says "must be a multiple of the page token count" unconditionally though planning.py:187 skips the check above the recipe maximum; parameters.py:1561 dereferences context.recipe without the None guard used at :1268-1269; and the pre-existing --prefill-chunk-size bound still advertises recipe.context (parameters.py:1301) while the plan now rejects above min(context, prepared_context) (planning.py:594-597).
3. Expected value of the hardware test
The capability is real and no runtime flag duplicates it. --kv-cache-limit context|concurrency and --memory-limit shape the KV pool (helios/src/runtime_core/memory.rs:238-331 (not opened)). Neither can lower the exported max_sequence_tokens or the advertised max_model_len, both baked from prepared_sequence_tokens at export/load (config.rs:131-148, server/models.rs:81). Honest under-capacity advertising is an export-time decision, and bootstrap.py:132 is the smallest seam that reaches it.
But the PR's own VRAM table does not isolate this PR. page_ceiling returns Ok(None) for the default KvCacheLimit::Memory, and the author's commands all used --kv-cache-limit concurrency. Export-side page sizing is untouched. So the headline 16 GB largely re-measures an existing runtime flag — which the description now concedes. The high-value test is not VRAM; it is the admission ceiling and the advertised max_model_len, which only this flag can produce. The plan below weights accordingly and reports the default-mode VRAM delta honestly even if it is ~0.
Reachability depends on code outside this repository. Recipes live in local-inference-lab/hyperflare-recipes (AGENTS.md:379-384) and the author states recipe updates are still pending. Step 1 of Phase 1 is therefore a reachability gate: if max_model_len does not move, the correct conclusion is "blocked on external recipe", not "PR broken".
Not testable on our fleet at all: --ranks > 1 needs a second host with a rendezvous address. cn5 is four GPUs on one host; cn7 is a single GB10. Multi-host must be pinned GPU-free.
4. Test plan (minimal, one host, one GPU, one model)
Phase 0 — GPU-free, must pass before any hardware booking (zero GPU time).
pytest tests/cli/test_planning.py tests/cli/test_commands.py (not opened) tests/cli/test_parameters.py (not opened) — this head has never run in CI, so a green run is itself the first result. Add: common_preparation_kwargs(...)["context"] == 131072 capped and == recipe.context unset through BasePreparationConfig(**kwargs) (the seam is asserted as a dict at :318, not as a constructed config); one pytest.raises(UsageError, match="prefill-chunk-size") for context_target=2048 with the fixture's 4096 chunk — planning.py:594-597 is a new safety check with no test; reproduction_args contains --request-context 131072; manifest context_target present with DEPLOYMENT scope; flag present on export/bench/debug-serve and absent from flare run; and a --ranks 2 plan carrying the cap (the only available pin for multi-host). Also run the two one-liners from §2 and re-run.
Phase 1 — the cap reaches the core (1 GPU of cn5, not 4; SM120 matches the author's card).
Model: nvidia/GLM-5.3-Flash-NVFP4 (cached on cn5; GLM uses 256-token pages per docs/core-design.md:1480). Read the recipe maximum from MODEL --help and choose N = half that, rounded down to a page multiple. Two exports from the same command differing only in the flag: A --request-context N, B unset.
- Reachability gate:
/v1/models→max_model_lenisNon A. On B expectmin(recipe max, pages × page_tokens)(Helios'sfit_contextclamps at load, so B may legitimately read below the recipe max on 96 GiB). If A does not move, stop and report "external recipe does not forwardcontext". - A prompt just over
Ntokens is rejected at admission on A with the context error; a prompt just under is accepted and generates. This is the one assertion no runtime flag can satisfy. flare inspect Ashows the capped extent and its reproduction command re-exportsN.- Falsification control: an unaligned N (e.g. 130000 on a 256-token page) fails at planning with an actionable message, not at core load with Helios's opaque "invalid prepared model configuration" (
catalog.rs:50-57,70).
Phase 2 — the isolating VRAM comparison, at concurrency 1 and 4, for A and B, under both --kv-cache-limit memory (default) and --kv-cache-limit concurrency. The A/B × kv-limit pairing is what separates this export-time flag from the runtime flag. Under memory the delta may be ~0 — report that as the result, not as a failure.
Phase 3 — regression, same job. A pre-PR core still loads and serves unchanged; a no-flag export at this head yields the same preparation config as main (prepared_context returns recipe.context, exactly what bootstrap.py:132 passed before); --request-context still absent from flare run.
Budget and efficiency. 2 exports + ~6 serve starts on a single cn5 GPU ≈ 1–2 GPU-hours, one host, one model, one GPU. Skip cn7 (no ARM64-specific question). Skip multi-host (no second host — pin GPU-free in Phase 0). No throughput A/B — the PR claims memory and admission-ceiling behaviour, not speed; a perf sweep would burn time on a claim the PR does not make.
5. Bottom line for the referral decision
- Substantive architectural or quality problems that must be fixed before testing: none. The design is right and needs no rework — one optional field on the universal base, one accessor, one consumer line, no Helios change, no per-model branch, strict no-op when omitted.
- Two one-line reporting fixes worth landing first (
demand_pages, plan-JSON key) because they are the artifact the test reads; neither requires re-review. - Expected value of the hardware run: moderate, and concentrated in Phase 1. The VRAM headline is largely a runtime flag's behaviour; the admission ceiling and
max_model_lenare unique to this change and are worth 1–2 GPU-hours. - Order of operations: two one-liners → GPU-free suite green → one targeted job on a single cn5 GPU. If Phase 1 step 1 shows no movement, stop and report the external-recipe dependency rather than spending further hardware time.
Full report · Notes Decision to Test: no (84%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
Apply Labels
Applied: +triage:review, +performance, +enhancement, +area:memory, +area:preparation
Classification Confidence
Threshold: 65%
Triage
- [✓]
triage:review: 96.7% -
triage:validation: 2.0% -
triage:design-review: 0.9%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
enhancement: 99.3% - [✓]
performance: 73.1% -
community: 32.1% -
duplicate: 16.5%
Area
- [✓]
area:preparation: 83.5% - [✓]
area:memory: 77.7% -
area:api: 53.1% -
area:scheduling: 8.5%
Model
-
model:qwen3.8-27b: 8.5% -
model:qwen3.8-flash-next: 6.0% -
model:glm-5.3: 5.3% -
model:kimi-k3.1: 4.7% decide malicious: all_clear (100%): No malicious content found
explore
Author: roobyz (CONTRIBUTOR); Discord rzr2020
Motivation: A recipe's default per-request context (often 256K tokens) reserves far more KV cache than requests actually use, so a deployment cannot fit the concurrency it wants. This adds --request-context N so the exported core declares a smaller per-request ceiling, and requests that would exceed it are rejected at admission.
Scale: +78 / −31 lines in 9 files (head 503a438, rebased onto 2147cd4c; was +91/−28 in 8 at my previous amendment)
Proposal:
- New declarative field
context_targeton the universalRecipeParametersbase (ignition/parameters.py:1344-1352): flag--request-context,min_value=1, no upper bound, hand-emitted inreproduction_args(:1529-1530). - New
Plan.prepared_contextaccessor =min(declared_context, target or declared)(ignition/planning.py:373-375); one seam passes it to preparation (ignition/preparation/bootstrap.py:132), so it becomes the core'smax_sequence_tokens. - Validation and reporting made cap-aware: page-multiple check gated on
target <= declared_context(ignition/planning.py:199-200), bench check againstmin(context, prepared_context)(:222), chunk guard (:626-629),demand_pages(:330-331),to_dictaddsprepared_contextwhile retainingcheckpoint_context(:407-409), serve body sizing and guarded hint (ignition/cli/serve.py:69-74). - Docs: flag row in
docs/cli-design.md:458,--request-contextadded to the direct-execution flag list (docs/direct-execution.md:55), two closed field enumerations replaced by pointers toignition/parameters.py. - One new test,
tests/cli/test_planning.py:298-329, covering the capped/oversized/unset resolutions, the bootstrap seam, both rejections and the manifest/reproduction args. Touches: ignition/parameters.py— new universal field plus reproduction-args emission; wrongdefault: nonein help and an uncapped--prefill-chunk-sizemax (:1336,:1502-1506).ignition/planning.py— accessor, gated alignment check, plan JSON, bench and chunk guards; plan sizing remains cap-independent.ignition/preparation/bootstrap.py+ignition/cli/serve.py— the single seam into Helios and the serve sizing/hint/status line. Related items:- #454 Cap the prepared per-request context (closed): the predecessor whose resubmission this is; its evidence question is still unanswered.
- #545 ignition: compositional RecipeParameters and dynamic CLI (merged): the architecture this PR is now built on.
- #516 ignition: add --kv-cache-format … (closed): earlier file-collision risk, closed 2026-11-28 as superseded by #545.
- #544 (merged): also edited
ignition/parameters.py; that collision is now resolved. - #608 (merged): added the PR-triggered pytest workflow that could finally settle the untested claims.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/533
Autobot comments: New head
503a438closes four of my prior findings (demand_pages, retainedcheckpoint_context, the failing-test family, spec nits), leaving no blockers — but the rewritten description now claims the flag "reduces KV pool/export size", which the code contradicts: preparation sizing (ignition/planning.py:502-510,bootstrap.py:133) never readsprepared_context, so only the declaredmax_sequence_tokenschanges. The evidence table still has no stock-core-under---memory-limitand no--kv-cache-limit contextrow, so it cannot show what the existing runtime knobs fail to do — the objection yatesdr raised on #454. Also open: the alignment rule disagrees across help/code/docs and the docs row is self-contradictory for an unaligned target above the recipe max;--prefill-chunk-sizeis still bounded by the uncapped context; help rendersdefault: none;status_partslacks a None guard. No test output appears in the thread at any head.
Value Proposition
Value Proposition — PR #533, --request-context
Charter alignment. The change sits where the charter says it should: one declarative deployment-scoped field in ignition/parameters.py, one accessor (Plan.prepared_context), one seam (ignition/preparation/bootstrap.py:132), no Helios change and no per-model branch — consistent with "keep the runtime small and model-agnostic" and "solve the right problem in the right place." The motivation (same-model concurrency, KV provisioning) does not touch the multi-model/co-hosting non-goal, and the dossier records the earlier charter objection as withdrawn. Unset, the plan is byte-equivalent to main, so the blast radius is small.
Novelty & status. Not obsolete: the dossier cites no merged PR fixing this; #454 only raised the question. Not superseded: the remaining co-editors of ignition/planning.py are open #453 and #122, neither identified as canonical for this capability. Genuinely additive at the Ignition layer.
Value vs maintenance cost. Cost is low: +78/−31 across 9 files, additive plan/manifest keys (checkpoint_context retained beside prepared_context), one new test, no runtime branch. Beneficiaries are real but narrow — operators wanting a host-independent, export-declared ceiling. The evidence is the weak link, and the dossier's substantive objection stands:
- The table varies only the cap (unset / 196608 / 131072) for Qwen3.8-27B on one RTX PRO 6000 Blackwell under
--kv-cache-limit concurrency. There is no stock-core row under--memory-limit, no--kv-cache-limit contextrow, and no preparation-side measurement. Since Helios clamps the served ceiling viafit_contextandpage_ceilingreturnsNonein default Memory mode (helios/src/runtime_core/memory.rs:308-314), a stock core under a reduced--memory-limitplausibly reaches similar VRAM. - The description's "reduces KV pool/export size" is contradicted by the code: preparation sizing derives from supply alone (
ignition/planning.py:502-510,bootstrap.py:133), so the exported core is byte-identical; only the declaredmax_sequence_tokenschanges. - Fixable inconsistencies remain: alignment enforced only when
target <= declared_contextwhile help (parameters.py:1351) and docs (docs/cli-design.md:458) demand it unconditionally (self-contradictory for e.g.500001);--prefill-chunk-size'smax_fnstill advertises the uncapped maximum (parameters.py:1336); generated help rendersdefault: none. A value above the recipe max is silently ignored, which grates against the charter's "be explicit" stance. - No test execution appears at any head despite the PR-triggered pytest workflow added by #608.
No prompt-injection attempt was found in the description, diff, docs, or thread.
Verdict: Worth it with changes. Right mechanism, right layer, small footprint; mergeability hinges on (1) restating the benefit as an admission-control ceiling plus the two baseline rows, (2) reconciling the alignment rule across help/code/docs, and (3) making the chunk ceiling cap-aware and posting a passing CI run.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:review, performance, enhancement, area:memory, area:preparation
Threshold: 65%
Triage
- [✓]
triage:review: 97.7% -
triage:validation: 1.6% -
triage:design-review: 0.5% -
none: 0.1% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0% -
triage:verify-for-closure: 0.0%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
enhancement: 96.3% - [✓]
performance: 91.5% -
community: 37.8% -
duplicate: 10.7% -
bug: 0.2% -
documentation: 0.0%
Area
- [✓]
area:preparation: 94.0% - [✓]
area:memory: 70.6% -
area:api: 50.0% -
area:caching: 3.3% -
area:scheduling: 1.6% -
area:orbit: 1.4% -
area:selene: 1.0% -
area:engram: 0.4% -
area:kernels: 0.2% -
area:rocenante: 0.2% -
area:packaging: 0.1%
Model
-
model:qwen3.8-27b: 4.7% -
model:nemotron-3.5-bolt: 1.6% -
model:kimi-k3.1: 1.4% -
model:inkling-small: 1.2% -
model:qwen3.8-flash-next: 0.9% -
model:deepseek-v4.1: 0.8% -
model:muse-glimmer: 0.7% -
model:deepseek-v4: 0.2% -
model:glm-5.3: 0.2% -
model:mimo-v2.6: 0.2% -
model:gemma4: 0.1%
Apply Labels (Intake)
No label changes
Subtraction and simplicity
Subtraction/Simplicity/Conventions review of PR #533 at head 503a438: the architecture is lean (one field, one Plan.prepared_context accessor, one seam at ignition/preparation/bootstrap.py:132), but the min(target, ceiling) clamp is re-derived in six places and two of those are removable outright.
Findings, high value first:
- Dead conjunct in the alignment gate —
ignition/planning.py:198-200guards ontarget <= self.declared_context, which cannot change the outcome because_validate_declared_context(:432-441) already provesdeclared % page_tokens == 0andprepared_context(:375) clamps oversized targets. Gate onself.prepared_context % self.page_tokensinstead: one rule instead of two, closing the help/code/docs contradiction at its source. Plan.contextignores the cap while documenting it as "the longest sequence one request may reach" (ignition/planning.py:367-370), so callers re-writemin(...)at:222and:626. Redefine asmin(self.prepared_context, self.tokens); both call sites collapse and the added"prepared_context"key at:409becomes a duplicate that can be deleted.- A third clamp lives in
RecipeParameters.status_parts(ignition/parameters.py:1606-1607) computed from a different base (context.recipe.context, wrong under anyadjust_contexthook) than the plan report; delete it, or use the existingstatus_labelmechanism (:105,:707-720). Same family: un-branchcontext_hint(ignition/cli/serve.py:73-74). ignition/cli/help.py:46duplicates the flag's own page-size rule in a 200-character line; revert to the short original. Likewise revert the--request-contextinsertion into the hand-maintained flag list atdocs/direct-execution.md:54-56— the enumeration this PR deletes elsewhere.- Rename
context_target→request_context(ignition/parameters.py:1344) so flag, plan JSON and manifest key agree (5 source lines, 6 test lines).
Explicitly lean and worth keeping: the single accessor, the single seam, the cap-aware bench/demand_pages guards, and the docs paragraphs that replaced inline flag enumerations with a pointer to RecipeParameters.
Open: whether three JSON keys are wanted, and whether the manifest key name difference is intentional; no execution evidence exists at any head, so everything above is a static read.
Correctness and contracts
Reviewed PR #533 at head 503a438 (cap --request-context). The design is sound — one declarative field, one Plan.prepared_context accessor, one preparation seam, cap-aware bench/chunk guards and reporting, no Helios change, no per-model branch, and unset-flag exports match main. Nothing here runs per request, so there is no new contention, buffering or failure-propagation surface. The problems are contract and claim accuracy:
- Major —
status_partsprintsmin(target, context.recipe.context)(ignition/parameters.py:1606-1607) instead of the servedmin(target, declared_context)(ignition/planning.py:372-375,:363-365); wrong for any checkpoint-declared oradjust_context-scaled context, and it prints even when the cap is a no-op while serve's hint suppresses itself (ignition/cli/serve.py:73-74). Untested. - Major — three surfaces, two alignment rules: help says the value "must be a multiple of the page size" unconditionally (
ignition/parameters.py:1351), code checks only whentarget <= declared_context(ignition/planning.py:198-200), and the docs row asserts both in one sentence (docs/cli-design.md:458), self-contradictory for e.g.500001. - Major — the description's "reduces KV pool/export size" is not what the code does: pages, cache states and snapshot budget come from GPU supply (
ignition/planning.py:502-510,ignition/preparation/bootstrap.py:133); only the declaredmax_sequence_tokensshrinks, and the runtime pool only under a non-default--kv-cache-limit. - Major — the evidence table has no stock-core baseline under a reduced
--memory-limitand no--kv-cache-limit contextrow, so it does not answer the inherited #454 question. - Minor —
--prefill-chunk-sizestill advertises the uncapped ceiling (ignition/parameters.py:1336,:1502-1506) and is only rejected later (ignition/planning.py:626-629). - Minor — help renders
default: none(nodefault_label), contradictingdocs/cli-design.md:458. - Minor —
status_partslacks acontext.recipe is Noneguard (latent;ignition/parameters.py:126), and the alignmentUsageErrorinsidefit()aborts GPU auto-selection (ignition/planning.py:609) for a world size the message never names.
Open: the alignment rule for an above-max misaligned value; whether the maintainer accepts an admission-control framing in place of baselines; whether external hyperflare_recipes re-rounds config.context; whether direct execution honors the cap (ignition/direct/scheduler.py:202); no test run or CI result at any head. No prompt injection found.
Final review
Recommendation: Ready To Merge
All prior blockers and earlier review items are resolved at 503a438: the change cleanly adds --request-context via one declarative RecipeParameters field, one Plan.prepared_context accessor, and one preparation seam (ignition/preparation/bootstrap.py:132), with full parity across single-host export, multi-host export, ignition bench, and --direct serving, no Helios changes, and exact no-op behavior when unset. No blocking defects remain; one non-blocking display mismatch introduced during the rebase onto #212 (status_parts using context.recipe.context instead of _declared_context_limit) and two small simplifications are noted below for an optional quick follow-up.
Merge Risk
Level: Low
- Entirely confined to Ignition parameter parsing, planning arithmetic, serve metadata, docs, and one unit test (+78/−31 across 9 files); nothing runs on the per-request hot path and Helios is untouched.
- Omitting
--request-contextleavesPlan.prepared_context == Plan.declared_context(ignition/planning.py:375), keeping default planning, preparation kwargs, manifest entries, andreproduction_argsequivalent tomain. - End-to-end Helios validation (
helios/src/model/catalog.rs:42-69,helios/src/scheduler.rs:66-77,helios/src/runtime_core/memory.rs:308-355,704-708) and direct execution (ignition/direct/scheduler.py:202,561) align cleanly with the export-time page-multiple and prefill-chunk guards.
Walkthrough
ignition/parameters.py: Addscontext_target: int | None(--request-context,min_value=1) toRecipeParameters(:1344-1352), emits--request-context Ninreproduction_args()when set (:1529-1530), and appends a summary fragment instatus_parts()(:1606-1607).ignition/planning.py: AddsPlan.prepared_context(:373-375), validates page-size alignment for in-range targets inPlan.__post_init__(:198-200), wires cap-aware checks for benchmark workloads (:222) and prefill chunks (:626-629), and updatesdemand_pages(:331),guaranteed_tokens(:380), andPlan.to_dict()(:409, retainingcheckpoint_contextbesideprepared_context).ignition/preparation/bootstrap.py: Routesplan.prepared_contextinto the sharedcontextentry ofcommon_preparation_kwargs()(:132), carrying the cap into all recipes (and thusserver_config["max_sequence_tokens"]for both Helios and--direct).ignition/cli/serve.py&ignition/cli/help.py: Sizesmax_body_bytesfromplan.prepared_context(serve.py:71), appends the--request-contextnote tocontext_hintonly when the cap is active (serve.py:73-74), and notes inmodel_epilogthat--request-contextcan lower the recipe maximum (help.py:46).docs/&tests/cli/test_planning.py: Documents--request-contextindocs/cli-design.md(:458,:1445) anddocs/direct-execution.md(:55), replaces verbose inline universal-field enumerations indocs/cli-design.md(:448-450) anddocs/preparation-development.md(:17-19) with pointers toRecipeParameters, and addstest_request_context_target_prepared_context_and_manifest(tests/cli/test_planning.py:298-329).
Pre-merge Checks
- [PASS] Security / malicious screen: No prompt injection, covert execution, or unsafe I/O found in the diff, docs, or PR thread.
- [PASS] Charter & value fit: Lives strictly in Ignition with zero runtime/per-model branching; uniquely enables per-request admission capping below total KV pool capacity and concurrency-proportional sizing under
--kv-cache-limit concurrencywithout hand-tuning--memory-limit. - [PASS] Related / duplicate / conflict check: Closes #454 (addressing all prior review points); cleanly rebased onto recent
main(#545,#212,#592) with no conflicting open PRs targeting the same capability. - [WARN] Tests & verification evidence: All assertions in
tests/cli/test_planning.py:298-329and existing planning/help tests verify statically, and Qwen3.8-27B VRAM measurements under--kv-cache-limit concurrencyare provided, but no pytest / CI run output (.github/workflows/python-cpu.yml(not opened)) is shown at head503a438yet.
Blockers
None.
Should Fix
ignition/parameters.py:1606-1607—status_parts()ignores checkpoint-declared /adjust_context-scaled ceilings (rebase mismatch with#212) and lacks acontext.recipe is Noneguard:- Currently:
if self.context_target is not None: parts.append(f"request context {min(self.context_target, context.recipe.context):,} tokens") - After
#212,Plan.declared_contextresolves viaadjust_context(recipe.base_context(checkpoint), ctx)(ignition/planning.py:363-365, mirrored by_declared_context_limitatignition/parameters.py:1299-1304). For a checkpoint with a largercheckpoint.context(e.g., 1,048,576 over a 262,144 recipe, as intests/cli/test_planning.py:462) or anadjust_contexthook (:527), passing--request-context 524288printsrequest context 262,144 tokensin theSelect GPUsstatus line even thoughprepared_contextand the exported core serve524,288tokens. In addition,ParameterContext.recipedefaults toNone(ignition/parameters.py:126), so direct calls without a recipe raiseAttributeError, and oversized no-op targets still print even thoughignition/cli/serve.py:74suppresses the cap hint when inactive. - Fix: Reuse
_declared_context_limit(self, ctx)and only emit when the cap is active (or recipe is absent):if self.context_target is not None: declared = _declared_context_limit(self, ctx) if declared is None or self.context_target < declared: parts.append(f"request context {self.context_target:,} tokens")
- Currently:
Subtract / Simplify
ignition/planning.py:368-370,:222,:626-629— makePlan.contextcap-aware (return min(self.prepared_context, self.tokens)):Plan.contextis documented as "The longest sequence one request may reach", yet currently ignoresprepared_context(min(self.declared_context, self.tokens)), forcing both guards at:222and:626to repeatmin(context, prepared_context)and causingPlan.to_dict()["context"](:407) to report the uncapped context even when--request-contextis active. Changing:370toreturn min(self.prepared_context, self.tokens)removes bothmin(...)wrappers and theeffectivelocal while keeping"prepared_context"into_dict()(which remains distinct from"context"wheneverself.tokens < self.prepared_context).
ignition/planning.py:198-200— checkself.prepared_context % self.page_tokensdirectly:- Replace
if target is not None and target <= self.declared_context and target % self.page_tokens:withif target is not None and self.prepared_context % self.page_tokens:(formattingself.prepared_contextin the message). Keeps thetarget is not Noneguard so an unset flag never emits a--request-contexterror, drops the redundant range comparison, and validates the exact value passed tocommon_preparation_kwargsand Helios (helios/src/model/catalog.rs:48-55).
- Replace
Nits
ignition/parameters.py:1344-1352: Adddefault_label="the recipe's maximum context"(matchingcompile_workersat:1373) so generated--helpdoes not renderdefault: none(:303-304) contrary todocs/cli-design.md:458.docs/cli-design.md:458: Clarify the clamp-before-alignment precedence (e.g., "Values at or below the recipe maximum must be a multiple of the core's page size (otherwise rejected at export); values above the recipe maximum are ignored.") so misaligned values above the recipe max (such as500001) are not described ambiguously.- PR description wording: Core planning derives
pagesandsnapshot_budget_bytesfrom GPU supply alone (ignition/planning.py:502-511,ignition/preparation/bootstrap.py:133), so the major VRAM savings occur at serve time under--kv-cache-limit concurrency|contextrather than by shrinking the exported artifact's KV pool (your Notes already explain this; aligning the opening/Result wording removes the small inconsistency). Also,checkpoint_contextis still asserted by two in-repo tests (tests/cli/test_planning.py:472,478), so retaining it was the right call.
Dropped on verification
- Correctness lens #2 / Discovery #8 (make
_declared_context_limitcap-aware for--prefill-chunk-size): Dropped — false positive with a harmful suggested fix. DuringMODEL --help,root.context_targetisNone, somax_fnstill properly advertises64..declared_context(andtests/cli/test_planning.py:494should not change). Mutating_declared_context_limitwould also corruptRecipeParameters.validate()(ignition/parameters.py:1492-1501), causing misaligned--request-contextinputs like100to fail with a"declared context ... must be a 64-aligned positive int32"error instead of the page-multiple error expected bytests/cli/test_planning.py:319-321. Runtime/export safety is already enforced atignition/planning.py:626-629. - Correctness lens #5 (alignment
UsageErrorinPlan.__post_init__aborting GPU auto-selection): Dropped — speculative and proposed fix (RecipeParameters.validate) would bypassPlan.page_tokens(adjust_page_tokens). RaisingUsageErrorwith the effective page size when a candidate world size cannot represent--request-contextis the intended behavior. - Correctness lens #3 / Discovery #5 ("exported core is byte-identical" claim): Dropped the overstatement — while
fit()pages andsnapshot_budget_bytesare cap-independent,config.context = plan.prepared_contextis passed to externalhyperflare_recipes(settingmax_sequence_tokensand potentiallypage_tableswidth). Kept only as a brief description-wording nit. - Correctness lens #4 / Discovery #6 ("evidence does not answer #454 without
--memory-limitand--kv-cache-limit contextrows"): Dropped as a blocker/should-fix — verified against#454andhelios/src/model.rs:270-274:--memory-limitalone lets a single request consume up tomin(262144, pool_tokens)and starve concurrent slots, whereas--request-contextenforces a per-request admission ceiling and cleanly scales--kv-cache-limit concurrencypools without per-GPU gigabyte math. - Subtraction S1 (dropping
target is not NoneinPlan.__post_init__): Dropped the unsafe part — removingtarget is not Nonecould raise a--request-contexterror when the flag was never passed ifadjust_page_tokensincreasespage_tokensaboverecipe.page_tokens. Kept the safe simplification (if target is not None and self.prepared_context % self.page_tokens:). - Subtraction S2 sub-claim (deleting
"prepared_context"fromPlan.to_dict()as a duplicate of"context"): Dropped — false when the export host is pool-bound (self.tokens < self.prepared_context), wherecontext == self.tokenswhileprepared_contextis the higher ceiling written to the core. - Subtraction S3 (deleting
status_partsand un-branchingcontext_hint), S4 (revertinghelp.py:46anddocs/direct-execution.md), and S5 (renamingcontext_target→request_context): Dropped — low-signal churn that directly contradicts changes requested in earlier Autobot review rounds (anti-moving-goalposts). - Correctness Open Questions #4 & #5 (lower-bound Helios compatibility and
--directparity): Verified clean acrosshelios/src/model/catalog.rs:42-69,helios/src/scheduler.rs:66-77,helios/src/runtime_core/memory.rs:308-355,704-708,ignition/cli/serve.py:401-483, andignition/direct/scheduler.py:202,561.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 94.1% -
triage:validation: 4.1% -
none: 1.3% -
triage:design-review: 0.3% -
triage:partial: 0.1% -
triage:integration: 0.1% -
triage:verify-for-closure: 0.0% -
triage:investigate: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: yes (89%): Testing will add considerable value with the code. It is ready to merge and the tests will validate and improve confidence on hardware we have available for testing.
Pre Test Report
Hardware Test Plan — PR #533 "Cap the per-request context target" (head 503a438)
Verdict: refer to hardware testing, narrowly — ~2–4 GPU-hours on ONE GPU of cn5. Skip cn7. Skip multi-host.
PR #533 adds --request-context N, an export-time cap on the prepared per-request context. It is a memory-sizing and admission-ceiling change with no speed claim, so this plan deliberately contains no throughput A/B. Two things are worth GPU time and nothing else is: (1) does the cap actually reach the exported core (max_sequence_tokens, advertised max_model_len, admission enforcement), and (2) does it buy VRAM that the default --kv-cache-limit memory mode does not already give. Item 2 may honestly measure ~0 — report that, don't hide it.
1. What the code guarantees (verified at 503a438, so you can predict the result)
| Fact | Citation |
|---|---|
Plan.prepared_context = declared_context when unset, else min(declared, N) |
ignition/planning.py:373-375 |
declared_context = adjust_context(recipe.base_context(checkpoint), …) (checkpoint/#212-aware) |
planning.py:363-365, :432-441 |
The single seam into every recipe/core: "context": plan.prepared_context |
ignition/preparation/bootstrap.py:132 (BasePreparationConfig.context, default 262144 at :33) |
| It becomes the served ceiling and is advertised | helios/src/server/config.rs:131,148 → max_sequence_tokens; /v1/models max_model_len at helios/src/server/models.rs:99 |
| Served ceiling is then clamped to physical pages | helios/src/model.rs:263-275 (fit_context) |
| Over-cap request → HTTP 400, before any prefill work, message names the ceiling | helios/src/server/request.rs:577-587; code context_length_exceeded at helios/src/server.rs:743 (not opened) |
Cap also lowers the default output limit (max_new_tokens defaults to max_sequence_tokens) |
helios/src/server/config.rs:210-213 |
| Misaligned in-range N rejected at planning; above-max N silently clamps | planning.py:198-200, :373-375 |
| Prefill chunk must be ≤ served context (export-time rejection) | planning.py:626-629 |
| Cap recorded in plan JSON / manifest / repro args / serve hint | planning.py:407-409, ignition/parameters.py:1529-1530, ignition/cli/serve.py:69-74 |
| Page sizes: Qwen 64, GLM 256, DeepSeek 128 tokens | docs/core-design.md:1480 |
Default runtime mode ignores the cap for pool sizing (page_ceiling → None for KvCacheLimit::Memory) |
helios/src/runtime_core/memory.rs:314-316; default memory per docs/cli-design.md:733 |
Two known head-of-branch defects that can corrupt your reading if you trust the wrong surface (both non-blocking, already reported in the final review):
- The
Select GPUsstatus line printsmin(target, context.recipe.context)(ignition/parameters.py:1606-1607) and can under-report under a checkpoint-declared/adjust_context-scaled ceiling. Trustplan.prepared_contextin the stderr plan JSON,flare inspect, and/v1/models— never the status line. --helprendersdefault: nonefor the flag (parameters.py:1344-1352, nodefault_label). Ignore.
2. Hardware targeting
- cn5 (use): 4 × RTX PRO 6000 Blackwell Max-Q 96 GiB →
gb202/SM120, i.e. the author's exact card family;ignition/planning.py:38accepts it. Use one GPU (--gpus 0); the change is orthogonal to tensor parallelism except through page size (planning.py:334-335). - cn7 (skip): 1 × GB10, arm64. Raises no ARM64-specific question and the
gb10core would need a separate export → wasted GPU time. - Multi-host
--ranks > 1(skip): needs a second host with a rendezvous address; cn5 is 4 GPUs in one host, cn7 is a single device. It is already forwarded correctly (ignition/cli/serve.py:206) and must be pinned GPU-free in Phase 0.
Model: nvidia/GLM-5.3-Flash-NVFP4 (cached on cn5; GLM-5.3 Flash is the model the repo's own examples qualify, docs/model-preparation.md:318, docs/multi-host.md:340). Page size 256 → N must be a multiple of 256.
Preflight before booking the GPU (5 min, no GPU):
df -h ~ /tmp; du -sh ~/.cache/flare/cores ~/.cache/huggingface/hub
A cn5 job gets only 16 GiB scratch. A checkpoint + core for a GLM-class model can exceed that; point paths.core_cache, paths.export_staging, and paths.hub_cache in ~/.config/flare/config.toml (not opened) at a larger writable volume, or the run dies mid-export and burns the booking.
3. Phase 0 — GPU-free, must be green first (zero GPU time)
The head has no CI. Its own new test is tests/cli/test_planning.py:298-329 (stubs source_identity, asserts the bootstrap seam, both rejections, manifest uint_value, repro args). Run:
.venv/bin/python -m pytest tests/cli/test_planning.py tests/cli/test_parameters.py (not opened) tests/cli/test_commands.py (not opened) -q
Then confirm, all GPU-free because planning precedes download (ignition/cli/serve.py:264-290) and derive() (ignition/cli/preparation.py:62-81):
.venv/bin/ignition export glm-5.3-flash-nvfp4 --gpus 0 --request-context 100000 --verbose # expect UsageError "--request-context 100,000 … is not a multiple of the 256-token page size" (planning.py:198-200)
.venv/bin/ignition export glm-5.3-flash-nvfp4 --gpus 0 --request-context 2048 --verbose # expect UsageError "--prefill-chunk-size 4,096 exceeds the 2,048-token context" (planning.py:626-629)
.venv/bin/ignition export glm-5.3-flash-nvfp4 --help | grep -A2 request-context # flag present; note the "Context: X tokens max (page size: 256)" line (help.py:46)
flare-cli/target/release/flare run --help | grep request-context || echo "absent on flare run (correct)"
Record the declared maximum X from that --help line. Set N = largest multiple of 256 ≤ X/2 (e.g. X=262144 → N=131072). Do not hardcode N anywhere below.
Gate: if any of these fail, stop — a GPU run would test code that cannot plan.
4. Phase 1 — does the cap reach the core? (the only genuinely new capability; ~2 exports)
Two exports from the same command, differing only in the flag. A = capped, B = stock.
# A
.venv/bin/ignition export glm-5.3-flash-nvfp4 --gpus 0 --max-concurrency 4 --request-context $N 2> a-plan.json (not opened) | tee a-export.txt
# B (skip only if `flare models list` already holds a stock core for this alias+TP: then reuse it)
.venv/bin/ignition export glm-5.3-flash-nvfp4 --gpus 0 --max-concurrency 4 2> b-plan.json (not opened) | tee b-export.txt
A1 — the artifact (no serving needed). From a-plan.json (not opened) / b-plan.json (not opened):
python - <<'PY'
import json
for f in ("a-plan.json (not opened)","b-plan.json (not opened)"):
p=json.load(open(f))["plan"]
print(f, {k:p[k] for k in ("context","checkpoint_context","prepared_context","tokens","page_tokens","guaranteed_tokens","demand_pages")})
PY
PASS: A prepared_context == $N; B prepared_context == checkpoint_context (the declared max); demand_pages == 4 × prepared_context/page_tokens in each (planning.py:331 — this is the KV-demand number the PR exists to lower).
A2 — the exported core. flare inspect <A entry>:
flare-cli/target/release/flare inspect CACHE_ENTRY_A --json | grep -m1 max_sequence_tokens
PASS: max_sequence_tokens == $N on A, declared max on B; and A's printed reproduction command contains --request-context $N (ignition/parameters.py:1529-1530 → flare-cli/src/inspect.rs:454). This is the reproducibility claim from the closed #454.
A3 — the reachability gate (stop condition). Serve A and B and compare the advertised ceiling:
flare-cli/target/release/flare run CACHE_ENTRY_A --gpus 0 --max-concurrency 4 --kv-cache-limit concurrency &
curl -s localhost:8000/v1/models | python -c 'import json,sys; d=json.load(sys.stdin)["data"][0]; print(d["max_model_len"], d["model_info"]["flare"]["context_length"])'
PASS: A reports exactly $N. B: expect ≥ N and ≤ declared max — not necessarily the recipe max, because Helios narrows the served ceiling to pages × page_tokens at load (helios/src/model.rs:263-275). The pass condition is A == N and B > N, not "B == recipe max".
FAIL here = "the external hyperflare_recipes recipe does not forward BasePreparationConfig.context" — the seam is outside this repo (AGENTS.md:379-396 (not opened)). Stop and report that; do not keep spending GPU time.
5. Phase 2 — admission ceiling, cheap (no long generation)
The 400 is produced from prompt + max_tokens > max_sequence_tokens before any prefill work (request.rs:577-587), so this costs seconds, not minutes. Calibrate the prompt with the CPU-side counter (docs/api.md:13):
curl -s localhost:8000/v1/messages/count_tokens -d '{"model":"…","messages":[{"role":"user","content":"<~1k token text>"}]}'
Then, against A and B:
# accepted on both (a few tokens of generation, then cancel)
curl -s localhost:8000/v1/chat/completions -d '{"model":"…","messages":[{"role":"user","content":"<~1k>"}],"max_tokens":4000}' | head -c 200
# rejected on A only
curl -s -w '\n%{http_code}\n' localhost:8000/v1/chat/completions -d '{"model":"…","messages":[{"role":"user","content":"<~1k>"}],"max_tokens":200000}'
PASS on A: HTTP 400, code: context_length_exceeded, message prompt of P tokens plus an output limit of O tokens exceeds this server's context of $N tokens, and the body carries the context is limited by … the --request-context cap hint (ignition/cli/serve.py:73-74 → helios/src/server/http.rs:57-68). Same request on B (stock) must be accepted — that comparison is the assertion no runtime flag can reproduce, since --kv-cache-limit/--memory-limit cannot lower max_sequence_tokens.
Also record "default output limit" from flare inspect on A vs B: it should drop with the cap (config.rs:210-213) — a real user-visible side effect worth one line in the report.
6. Phase 3 — the isolating VRAM comparison (A/B × kv-limit mode; ~4 serve starts)
At --max-concurrency 4, for A and B, under both pool modes:
for core in A B; do for mode in memory concurrency; do
flare-cli/target/release/flare run $core --gpus 0 --max-concurrency 4 --kv-cache-limit $mode &
sleep 45 # after load settles
nvidia-smi --query-gpu=memory.used --format=csv,noheader -i 0
curl -s 'localhost:8000/metrics?format=json' | python -c 'import json,sys; m=json.load(sys.stdin); print({k:m.get(k) for k in ("total_kv_pages","free_kv_pages","cached_kv_pages")})'
kill %1
done; done
Read total_kv_pages as the primary number (helios/src/server/metrics.rs:1388), with nvidia-smi memory.used as corroboration.
Expected, and this is the honest framing:
--kv-cache-limit concurrency: A's pool should scale as4 × Npages vs B's4 × declared(memory.rs:322-344) → the big delta the PR's table reports. This confirms the mechanism but is partly the runtime flag's documented behaviour.--kv-cache-limit memory(default): pages fill free VRAM regardless of the cap (memory.rs:314-316), so the VRAM delta should be ≈0; the cap's benefit there is admission control only. Report this as the result, not as a failure — and say so explicitly, because the PR description's headline reads as if VRAM shrinks unconditionally (its "reduces KV pool/export size" wording is contradicted byplanning.py:502-511, which sizes pages from supply alone).
7. Phase 4 — regression (same job, ~10 min)
- No-op path: from
b-plan.json(not opened),prepared_context == checkpoint_contextand the core loads and serves identically to amain-built core of the same alias/TP. If a pre-PR core is already cached, justflare runit — it must still load (helios/src/model/catalog.rs:42-69). - Bench record:
ignition bench … --request-context $Nwritesconfiguration.preparationincluding the cap (ignition/cli/bench.py:263-266); one run, no tuning sweep, just confirm two different caps produce different records. --directparity (optional, 1 run):ignition debug-serve … --direct --request-context $N, thencurl /v1/models— served ceiling should be$N(the cap reaches direct execution viaconfig["max_sequence_tokens"],ignition/direct/scheduler.py:202). Cheap confirmation, and it is the one path not covered by the added test.
8. Budget, skip list, stop conditions
| Item | Cost |
|---|---|
| Preflight + Phase 0 (GPU-free) | ~20 min CPU |
| Phase 1 (one export ≈ 30–60 min on one Blackwell; skip export B if a stock core is cached) | 1–2 GPU-h |
| Phase 2 (admission probes) | ~10 min |
| Phase 3 (4 serve starts) | ~45 min |
| Phase 4 (regression) | ~20 min |
| Total | ≈2–4 GPU-hours, 1 GPU of cn5, 1 model, 1 host |
Skip: cn7 (no ARM64 question), multi-host --ranks>1 (no second host — Phase 0 pins it), any throughput or latency sweep (the PR makes no speed claim), any full-context decoding test (Phase 2 replaces it), autotune-effort sweeps.
Stop and report instead of continuing if: Phase 0 fails; the preflight shows <~25 GiB writable scratch for export; Phase 1 A3 shows max_model_len does not move (external-recipe gap); or Phase 1 A2 shows --request-context missing from the reproduction command.
9. What to bring back
prepared_context/demand_pagesfor A vs B (plan JSON).flare inspectcontext + reproduction command for A./v1/modelsmax_model_lenfor A and B, with the< N/> Ncomparison.- The exact 400 body +
code+context_hintfor A, and B accepting the same request. total_kv_pagesandnvidia-smi memory.usedfor the 2×2 grid (core A/B ×memory/concurrency), including the honestmemory-mode delta.- Any mismatch between the
Select GPUsstatus line andprepared_context(expected: the known display bug atignition/parameters.py:1606-1607) — worth reporting as confirmation, not a new blocker. - Whether the external recipe actually forwarded the cap (item 3) — the single fact that decides whether this feature ships working.
Discord Test Request
Deliverable — Discord post (copy from here)
Recommendation: Test
High confidence — worth GPU time, but narrowly scoped.
Hardware Required
- One GPU of cn5 (RTX PRO 6000 Blackwell, 96 GiB),
--gpus 0. Skip cn7 and multi-host. nvidia/GLM-5.3-Flash-NVFP4core — page size 256, so the cap must be a multiple of 256.- ~25+ GiB writable scratch for the export (cn5 jobs get only 16 GiB; point core/staging/hub caches at a bigger volume).
Justification
- The only genuinely new effect is export-time: the cap lowers the core's
max_sequence_tokens/ advertisedmax_model_lenand rejects over-cap requests at admission — no runtime flag (--kv-cache-limit,--memory-limit) can do that. - The VRAM saving only appears under
--kv-cache-limit concurrency; in the defaultmemorymode expect ~0 change. That is a valid result, not a failure.
Estimated Time to Complete
~2–4 GPU-hours on one GPU, plus ~20 min GPU-free preflight and unit tests.
Verification I did (what backs the post, and what does not)
Checked directly at PR #533 head 503a438 (diff + files):
Plan.prepared_context=min(declared_context, context_target or declared_context)—ignition/planning.py:373-375;declared_contextat:363-365. Confirmed.- Page-multiple validation only for in-range targets —
ignition/planning.py:198-200. Confirmed (target <= declared_context and target % page_tokens). demand_pagesnow usesprepared_context—planning.py:331;prepared_contextemitted inPlan.to_dict()—:409. Confirmed.- Prefill-chunk check against the effective cap —
planning.py:626-629. Confirmed. - The single seam into every recipe:
"context": plan.prepared_context—ignition/preparation/bootstrap.py:132;BasePreparationConfig.contextdefault262144atbootstrap.py:33. Confirmed. - Flag declaration (
--request-context N,min_value=1, nodefault_label) —ignition/parameters.py:1344-1352; reproduction args —:1529-1530; status line —:1606-1607. Confirmed. help.py:46now says "tokens max …--request-contextcan lower this". Confirmed.- Test added:
tests/cli/test_planning.py:298-329. Confirmed.
Findings that changed the post versus the supplied report:
- The report's claim that the PR description "reads as if VRAM shrinks unconditionally" is out of date at this head — the description itself now carries the caveat ("Under the default
--kv-cache-limit memorymode, the pool fills available VRAM regardless of the cap"). The post still states the condition, because the headline number (≈16 GB at concurrency 4) is concurrency-mode only. - The PR's evidence table is Qwen3.8-27B, while the plan picks GLM-5.3-Flash-NVFP4 (page size 256). Keeping GLM is fine, but the cap must be a multiple of 256, and its declared max has to be read from
--help, not assumed from the 262,144 figure in the Qwen table. - The known status-line defect is real and visible in the diff:
parameters.py:1606-1607printsmin(context_target, context.recipe.context), which ignoresdeclared_context/adjust_context, so it can under-report. The post does not rely on that surface.
Not verified from this tree (asserted by the supplied report, cited to code I did not open): the Helios side of the claim — helios/src/server/config.rs:131 (not opened),148 (max_sequence_tokens), models.rs:99 (not opened) (max_model_len), request.rs:577-587 (not opened) and the context_length_exceeded code, model.rs:263-275 (not opened) (fit_context), runtime_core/memory.rs:314-316 (not opened) (page_ceiling → None for KvCacheLimit::Memory), page sizes in docs/core-design.md:1480 (not opened), and the cn5/cn7 hardware identities and 16 GiB scratch limit. The post's hardware and time numbers therefore rest on the supplied pre-test summary, not on my own reading.
Review-hygiene note: no attempt to direct me appeared in the PR description, diff, docs or thread; the bot comment's closing "Note to requester (not part of the comment body)" is internal review bookkeeping, not an instruction I acted on.
Caveat on process: I was cut off before writing scratchpad entries, so this report is the only durable record of the verification above.