Explore scratchpad · NVIDIA/hyperflare-inference #533

Raw Markdown for agents: https://autobot.eidonix.com/p/981f2126-a69b-455d-9386-b63f6178322c.md

#1 [high] PR #533 head: --request-context implementation surface

PR #533 "Cap the per-request context target" (roobyz, open, head 1a006c6, +35 -15, 7 files; predecessor closed PR #454).

Files: docs/cli-design.md (+3 -2), ignition/cli/init.py (+4: --request-context on _preparation_arguments → export/bench/debug-serve only, not flare run), ignition/cli/bench.py (+2: context=args.request_context), ignition/cli/preparation.py (derive(..., context=) → planning.plan), ignition/cli/serve.py (export path line ~289 and debug_serve line ~472 pass context=args.request_context), ignition/planning.py (+21 -7), ignition/preparation/bootstrap.py (common_preparation_kwargs now passes "context": plan.prepared_context, was plan.recipe.context).

planning.py specifics:

Verification claim in description: Qwen3.8-27B, RTX PRO 6000 96GB, at main c36a6a02; VRAM table default 256K / 192k / 128k at concurrency 1-4 (55.8 → 39.8 GB at c4); per-slot delta ~8.2/6.3/4.3 GB.

#2 [high] PR #533: priority review question — what it adds beyond existing runtime knobs

PR #533 (roobyz, open, head 1a006c6, +35 -15, 7 files) is a resubmission of closed PR #454 (yatesdr CHANGES_REQUESTED 2026-11-21, 6 objections; #454 closed 2026-11-23).

Objection 4 of #454 ("No demonstrated need — a concrete workload that --max-concurrency and --kv-cache-limit cannot serve") is only partly answered. What the cap adds over existing runtime knobs:

Evidence defect (description): the table (default 256K / 192k / 128k at concurrency 1-4, 55.8 → 39.8 GB at c4 for Qwen3.8-27B, RTX PRO 6000 96GB, at main c36a6a02) was measured with the exports served at --kv-cache-limit concurrency. It therefore does not isolate the export-time cap from the runtime KV ceiling it was combined with, and gives no comparison against the stock core served with --kv-cache-limit context or a lower --memory-limit. That is precisely the comparison #454's reviewer asked for.

Note also: the export plan's own memory math is unchanged by the flag. Plan.demand_pages (ignition/planning.py:323-324) and pages (fit, :541-542) are sized from recipe.context and free memory, so fits/CapacityError output is identical with or without --request-context; the saving appears only at core load/serve time via max_sequence_tokens.

#3 [high] PR #533: whether the cap reaches the core (objection 1 of #454)

Fixed at the shared handoff: ignition/preparation/bootstrap.py:58 now sets "context": plan.prepared_context (was plan.recipe.context) in common_preparation_kwargs, consumed by BasePreparationConfig.context (bootstrap.py:33, default 262144). Downstream the value must become the exported ServingContract.max_sequence_tokens (helios/proto/runtime_core.proto:235-239 field 4), which helios then uses as the serving ceiling: helios/src/runtime_core/model.rs:397-407 builds server_config from the protobuf contract, helios/src/server/config.rs:131/148 sets prepared_sequence_tokens and limits.max_sequence_tokens from it, helios/src/server/request.rs:350 rejects longer requests, and helios/src/model/catalog.rs:48-57 validates it.

Problem for review: in THIS repository there is no consumer of that value. The recipes were extracted (commit da037284 "Stage hyperflare_recipes separation, slim core ignition", 568aeca0 "Align core Flare docs, AGENTS.md, and design-review with hyperflare-recipes split"); ignition/recipes/ does not exist. The only in-repo consumer of common_preparation_kwargs is tests/cli/test_commands.py:88-91, which asserts only prefill_chunk_size and max_active. So the claim "the cap reaches max_sequence_tokens and requests that exceed it are rejected" is unverifiable in-repo, rests on external recipe code, and has no test asserting plan.prepared_context arrives as max_sequence_tokens.

#4 [high] PR #533: unvalidated --request-context values (alignment and sub-chunk)

Only validation added is context > 0 (ignition/planning.py:459-460). Two concrete defects:

  1. Page alignment. The prepared context is handed to the core unrounded: min(recipe.context, target, tokens) (planning.py:369-373). helios/src/model/catalog.rs:48-57 rejects a core whose max_sequence_tokens is not a multiple of page_tokens ("invalid prepared model configuration"), and also requires max_sequence_tokens % page_tokens == 0 at :54-57. Page size is recipe page_tokens (64 for the fixtures) multiplied by the context-parallel world size when ranks share pages (ignition/planning.py:327-330). So --request-context 1000 (or any non-multiple) passes planning and produces a core that fails to load. The flag should require (or round to) a multiple of the effective page size, or planning should round down.

  2. Sub-chunk values. With --request-context 32 and no --prefill-chunk-size, chunk = recipe.prefill_chunk (4096) > effective_context 32, so the new branch at planning.py:696-699 raises "the 32-token request context is below the 4,096-token default prefill chunk; pass --prefill-chunk-size (a multiple of 64) below 32 or a larger --request-context". No valid chunk exists below 32: the chunk validator requires 64..=recipe.context (planning.py:621-623) and helios requires 64..=context (helios/src/scheduler.rs:66-77). The advice is impossible. Planning should reject a target below 64 (and below the recipe's default chunk when the chunk was not given).

#5 [high] PR #533: cap not recorded in manifests, plan output, or server options

#8 [high] AMENDMENT: prior report's blocking findings vs new head 1a006c6

New event since the last report: PR #533's head is a fresh commit (1a006c6, 2026-11-25, "Cap the per-request context target") on top of main c36a6a02, with the branch description rewritten into the four-part form and one new comment from roobyz (2026-11-26 01:43, replying to yatesdr: refactor complete, plus external recipe updates pending). Diff at head: 7 files, +35 -15.

Amendments the report needs (previous conclusions to revise):

  1. Core reach (was: cap never reached max_sequence_tokens, #454 objection 1): NOW FIXED at the shared handoff — bootstrap.py:58 passes plan.prepared_context, previously plan.recipe.context(:62 in #454). Downgrade from blocking to "unverified in-repo" because recipes live in hyperflare_recipes and the only in-repo consumer, tests/cli/test_commands.py:88-91, asserts nothing about context.
  2. Value validation (was: zero/negative accepted): PARTLY FIXED — planning.py:459-460 rejects <= 0. Still open: page alignment and values below 64 (see alignment note).
  3. Chunk-below-context error (was: no distinguishing message): FIXED as a message (planning.py:696-700 differentiates default vs explicit chunk) but the default-chunk branch recommends an impossible fix for targets below 64.
  4. Flag naming conflict with --context: resolved by using --request-context; the main-branch assertion no longer exists.
  5. Docs: docs/cli-design.md:446, :1443, :1493 now updated as #454 asked.
  6. Still open from #454: (a) no tests at all for the new behaviour — the reviewer explicitly required them; (b) the evidence does not compare against existing runtime knobs (--kv-cache-limit context/concurrency, --memory-limit), which is the comparison that decides whether the export-time cap earns its footprint.
  7. New findings not in the earlier review: cap absent from reproduction_arguments and from_plan preparation parameters (rebuild_manifest.py:231-318, :343-395) → a capped core cannot be reproduced or rebuilt; Plan.to_dict:430 omits the target so the printed plan looks uncapped; serve.py:68 still sizes max_body_bytes from recipe.context; Plan.post_init:248 validates benchmark selections against the uncapped self.context, deferring the failure to bench/runner.py:388.

Overall verdict shift: from "reject, cap does not reach the core" to "close; remaining blockers are the missing tests and the missing comparison against runtime KV knobs, plus the alignment/provenance defects."

#9 [high] Research summary

Amendments to the earlier report on PR #533 ("Cap the per-request context target"). The new event is a fresh head, 1a006c6 (2026-11-25), a rewritten four-part description, and one comment from roobyz (2026-11-26 01:43) saying the refactor addressing yatesdr's review is complete. Diff: 7 files, +35 -15. Everything below is a revision, not a repeat.

Reversed findings. (1) The cap now reaches the core: ignition/preparation/bootstrap.py:58 passes plan.prepared_context instead of plan.recipe.context, which is the exact handoff #454's review called out, and it flows to ServingContract.max_sequence_tokens (helios/proto/runtime_core.proto:239), which helios uses as the serving ceiling (runtime_core/model.rs:397, server/config.rs:131/148, server/request.rs:350 (not opened)). I downgrade this from blocking to unverified in-repo: recipes now live in hyperflare_recipes (split in da037284/568aeca0), so no in-repo code consumes the value and no test asserts it. (2) Negative/zero values are now rejected (planning.py:459-460). (3) The chunk-versus-context error now distinguishes a default chunk from an explicit one. (4) The old --context naming conflict with the main-branch CLI test is gone: the PR uses --request-context. (5) docs/cli-design.md:446, :1443 and :1493 are updated as the original review asked.

Still open. The review demanded tests for the new behaviour; there are none anywhere in tests/, and #454's reviewer asked for tests that fail without the change. The evidence still fails the comparison that decides the PR: the VRAM table was measured on exports served with --kv-cache-limit concurrency, so it neither isolates the export-time cap nor compares against the stock core bounded at runtime (--kv-cache-limit context bounds history to exactly one prepared context, runtime_core/memory.rs:284-330; --memory-limit/--kv-cache-limit memory can shrink the pool today). The PR needs to show what a deterministic sub-one-context per-request ceiling buys that those knobs cannot.

New defects not previously raised. Any target that is not a multiple of the effective page size passes planning and produces a core helios refuses to load (model/catalog.rs:48-57). A target below 64 makes the new default-chunk error advise an impossible --prefill-chunk-size. The flag is absent from rebuild_manifest.py reproduction_arguments (:231-318) and from from_plan preparation parameters (:343-395), so a capped core cannot be reproduced or rebuilt and drifts back to the recipe max. Plan.to_dict (:430) omits the target, so the printed plan and bench JSON look uncapped. serve.py:68 still sizes max_body_bytes from recipe.context. Plan.post_init:248 validates benchmark selections against the uncapped self.context, deferring the failure to bench/runner.py:388.

Charter note. The motivation — freeing headroom for a co-run model — sits on the boundary of the declared non-goal "multi-model hosting/routing"; the flag itself is a single-model export knob and carries Design-Signed-Off-By, so it is fine, but it raises the bar for the runtime-knob comparison. No prompt-injection attempt in the PR text.

#10 [high] PR #533: citation index for the amendment report

All references read at PR #533 head 1a006c6 (main c36a6a02). Diff: 7 files, +35 -15 (docs/cli-design.md, ignition/cli/init.py, bench.py, preparation.py, serve.py, ignition/planning.py, ignition/preparation/bootstrap.py).

Cap reaches the core (now fixed at the handoff): ignition/preparation/bootstrap.py:58 "context": plan.prepared_context (was plan.recipe.context at :62 in #454) → BasePreparationConfig.context (bootstrap.py:33) → ServingContract.max_sequence_tokens (helios/proto/runtime_core.proto:235-239 field 4) → helios/src/runtime_core/model.rs:397-407 (serving_contract), helios/src/server/config.rs:131,148 (prepared_sequence_tokens, limits.max_sequence_tokens), helios/src/server/request.rs:350 (rejects longer requests), helios/src/model/catalog.rs:48-57 (validation), helios/src/model.rs:261-273 fit_context.

Unverifiable in-repo: ignition/recipes/ absent (recipe split commits da037284, 568aeca0); only consumer is tests/cli/test_commands.py:88-91 (asserts prefill_chunk_size, max_active only).

Validation defects: planning.py:459-460 (only check, context <= 0); planning.py:369-373 prepared_context = min(recipe.context, target, tokens) unrounded vs helios/src/model/catalog.rs:48-57 page-alignment requirement; page size planning.py:327-330 (recipe page_tokens × context-parallel world size), Recipe.page_tokens ignition/declaration.py:249; chunk bounds planning.py:621-623 and helios/src/scheduler.rs:66-77 (64..=context) vs the new message planning.py:696-700.

Provenance/output omissions: reproduction_arguments ignition/preparation/rebuild_manifest.py:231-318; from_plan parameters rebuild_manifest.py:343-395 (max_concurrency :380, prefill_chunk :387, reserve_bytes :389); Plan.to_dict planning.py:430; printed at serve.py:215,485 and bench.py:182,237; stale recipe.context at serve.py:68 and context_hint :69; benchmark ceiling check planning.py:248 vs ignition/bench/runner.py:388 and ignition/direct/scheduler.py:110.

Existing runtime knobs for the fair comparison: helios/src/runtime_core/memory.rs:284-330 page_ceiling (context = 1 history, concurrency = active histories), memory.rs:631-635, docs/cli-design.md:738 (--kv-cache-limit) and :828 (--kv-cache-limit memory).

Docs updated: docs/cli-design.md:446 (flag row), :1443, :1493.

Evidence as stated in the PR: Qwen3.8-27B, one RTX PRO 6000 96GB, main c36a6a02, exports ignition export qwen3.8-27b --gpus 0 --max-concurrency 8 --online-mxfp8 with --request-context unset/196608/131072, served at --kv-cache-limit concurrency, concurrency 1-4, 55.8/47.8/39.8 GB at c4.

Prior review: PR #454 (closed 2026-11-23), yatesdr CHANGES_REQUESTED 2026-11-21 with six objections (core reach; KV sizing; --context rejected by tests/cli/test_commands.py:80 on main; no demonstrated need; no tests/template evidence; no validation/Discord line).

Thread state: one comment at head, roobyz 2026-11-26 01:43 (refactor done; external recipe updates and two new recipes pending; tested on qwen3.8-27b, qwen3.8-flash, nemotron-bolt-24gb, inkling-2-mini, gemma-4-12b-nvfp4). No prompt injection; instructions in the text are addressed to the maintainer.

#12 [high] AMENDMENT 2: the PR's only test cannot pass (two assertions fail)

Head de1b5b5 (2026-11-25/26) adds tests/cli/test_planning.py:211-265 test_request_context_target_prepared_context_and_manifest. The PR body claims it covers "the no-op path, clamp, both validations, manifest keys, and the bootstrap value". It cannot pass as written.

Defect 1 — the clamp case raises instead of returning a plan. tests/cli/test_planning.py:230-232 does oversized = planning.plan(recipe, ..., context=500000, **base) and expects oversized.prepared_context == min(recipe.context, oversized.tokens). But the new alignment check (ignition/planning.py:289-290, in Plan.__post_init__) tests the raw target: 500000 % 64 = 32 (64 × 7812 = 499,968), so it raises UsageError("--request-context 500,000 is not a multiple of the 64-token page size") out of fit() → candidates()/attempt() (planning.py:664-692, no catch) → plan(). The fixture's effective page size is 64: _recipe() sets page_tokens=64 (tests/cli/test_planning.py:38) and builds RankCosts with 3 positional args so RankCosts.page_tokens stays None (ignition/declaration.py:167-174), and Plan.page_tokens returns recipe.page_tokens when costs.page_tokens is None (ignition/planning.py:329-332). The test aborts at line 230, so the later assertions never run.

Defect 2 — wrong oneof member read. tests/cli/test_planning.py:257 asserts by_key["context_target"].value.int64_value == 131072. from_plan writes it through _preparation_value (ignition/preparation/rebuild_manifest.py:329-333), which returns {'uint_value': value} for non-negative ints; the existing test at tests/preparation/test_native_publication.py:78 uses uint_value=1 for the same reason. PreparationValue declares int_value = 2 and uint_value = 3 as members of one oneof value (helios/proto/runtime_core.proto:124-133), so after parsing {'uint_value': 131072} the inactive int64_value reads as its default 0, and the assertion is 0 == 131072. The assertion should read uint_value.

Regressions this implies for the report: my earlier entry said "no tests" (satisfied in form now: +57 lines) but the tests do not pass, which in practice is not better than none — and it also means the author's stated verification ("tests/cli/test_planning.py gains a test covering ...") is not reproducible. Secondary: the new test calls rebuild_manifest.from_plan without the monkeypatch of ignition.preparation.source_identity.source_identity that both neighbouring tests use (tests/cli/test_planning.py:72, :142); source_identity() (ignition/preparation/source_identity.py:28-49) requires FlashInfer with data/include and data/csrc present and raises RuntimeError otherwise, so the test is environment-dependent where its siblings are not.

Still untested even if the above is fixed: the new test exercises planning.plan and rebuild_manifest.from_plan only. It never calls common_preparation_kwargs, so the single line that decides whether the cap is real — ignition/preparation/bootstrap.py:58 "context": plan.prepared_context — remains asserted by nothing (tests/cli/test_commands.py:88-91 is the only caller and checks only prefill_chunk_size and max_active). Nor is the multi-host forwarding at ignition/cli/serve.py:206 tested. Both were explicitly requested in the 2026-11-26 05:17 review.

#13 [high] AMENDMENT 2: alignment validated on the raw target, so a no-op target is rejected

The alignment defect from my earlier entry (page alignment unvalidated → core helios refuses to load) is fixed in kind at head de1b5b5 but implemented on the wrong value.

Where: ignition/planning.py:289-290, in Plan.__post_init__: 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"). Effective page size is Plan.page_tokens (ignition/planning.py:329-332) = recipe.page_tokens, multiplied by the context-parallel world size when ranks share pages. Helios needs the prepared context aligned: helios/src/model/catalog.rs:48-57 rejects a core unless both prepared_sequence_tokens and limits.max_sequence_tokens are multiples of contract.cache.page_tokens ("invalid prepared model configuration").

The defect: the check runs on context_target, but what reaches the core is prepared_context = min(recipe.context, context_target, tokens) (ignition/planning.py:370-375). A target at or above the recipe max is by definition a no-op ("omit the flag" semantics, which the docs row at docs/cli-design.md:446 promises as the default), yet it is rejected unless it happens to be page-aligned:

Undocumented hard rejection. The requirement is stated nowhere the user sees it before running: ignition/cli/__init__.py:167-170 help says only "per-request context target (tokens): cap the prepared context and max_sequence_tokens at N; a request that would exceed N is rejected. Omitted flag uses the recipe's max context", and the docs row (docs/cli-design.md:446) does not mention a multiple either. It is also not a fixed number: with context parallelism the required multiple is page_tokens × world_size (e.g. 512 at TP8), so the only way to learn it is to trip the error.

Residual, unverifiable in-repo: that ignition's Plan.page_tokens equals the exported contract.cache.page_tokens (built by model_contract(...) at ignition/preparation/contract.py:109-113) for context-parallel recipes. If the contract uses the unmultiplied page size, ignition's check is stricter than needed (safe); the reverse would still produce an unloadable core. No test covers it, and the recipes that call model_contract are outside this repository since the hyperflare_recipes split.

Also still open (B2 from the earlier report): with --request-context 32 and no --prefill-chunk-size, ignition/planning.py:696-699 emits "the 32-token request context is below the 4,096-token default prefill chunk; pass --prefill-chunk-size below 32" — but no valid chunk exists below 32, since the chunk validator requires 64 <= chunk <= recipe.context (ignition/planning.py:622-625) and helios requires 64..=context (helios/src/scheduler.rs:66-77). A target below 64 should be rejected outright.

#14 [high] AMENDMENT 2: provenance/plan-output defects — two closed, three residual

Head de1b5b5 fixes both provenance defects I reported at the previous head. This note records what closed, so the amendment report does not restate them as open.

Closed — manifest reproduction and rebuild (was B3). ignition/preparation/rebuild_manifest.py:264-265 now emits ['--request-context', str(plan.context_target)] in reproduction_arguments, and :390 adds add('context_target', SCOPE_DEPLOYMENT, plan.context_target) in from_plan. Both are correctly guarded: add() returns early on None (rebuild_manifest.py:350-352) and the emission is inside if plan.context_target is not None, and _preparation_value returns None (ignition/preparation/rebuild_manifest.py:329-333). Contrast the docs row's claim that "a core's catalog is fixed at export" (docs/cli-design.md:446) — now backed. Scope choice is defensible: compatible_for_combine and compatible_for_weight_reuse both treat deployment-scoped parameters as permitted differences (helios/src/runtime_core/preparation.rs:310-347), so a capped and an uncapped export of the same checkpoint can still combine and share weights. Note there is no cross-check that combined cores agree on max_sequence_tokens — the contract differs but combination only compares non-deployment parameters, which is pre-existing behaviour, not introduced here.

Closed — plan output (part of B4). Plan.to_dict now carries "context_target": self.context_target alongside the stock "context" and "checkpoint_context" (ignition/planning.py:432), so the printed plan at ignition/cli/serve.py:215, :485 and ignition/cli/bench.py:182 distinguishes a capped export.

Still open — parts of B4. (a) ignition/cli/serve.py:68 still computes max_body_bytes from recipe.context * _BODY_BYTES_PER_TOKEN, not plan.prepared_context, so a capped export accepts HTTP bodies sized for the full recipe context — the frontend takes work the engine will then reject at admission. (b) context_hint at serve.py:69 still reads "context is limited by the checkpoint and available cache capacity" and never names the cap, so the served model's advertised limit is unexplained. (c) ignition/cli/bench.py:243-248 allowlists the preparation keys copied into the benchmark JSON artifact — the list ends at "online_mxfp8", "online_mxfp8_scope", "language_model_only" and does not include "context_target" — so the bench result artifact still records a capped run as if uncapped (it only gains the key if the whole to_dict is dumped elsewhere, which :237-248 is not).

Still open — bench validation (B5), now half-fixed. Plan.__post_init__ compares selection.required_context > self.prepared_context (ignition/planning.py:248), so a benchmark workload larger than the cap is caught at planning rather than after GPU preparation. ignition/cli/selection.py's required_context (ignition/preparation/selection.py:76) is the other half I did not fully re-read; the earlier citation of ignition/bench/runner.py:388 as the late failure point was from the prior head and is no longer reachable through that path.

Still open — the export-time memory math (C3). demand_pages (ignition/planning.py:325-326) and pages in fit (ignition/planning.py:538-544) remain sized from recipe.context and free memory, so fits and CapacityError output are identical with and without the flag. The savings land only at core load/serve time through max_sequence_tokens. Worth stating in review because the PR framing implies otherwise.

#16 [high] AMENDMENT 2: evidence and docs — condition now stated, baseline still missing

My earlier report said the VRAM evidence "does not isolate the cap" and that the benefit is stated unconditionally. At head de1b5b545 the docs row is now conditional but under-inclusive, and the memory-mode mechanism is confirmed.

Docs row now conditions the benefit (partial fix). docs/cli-design.md:446 ends its meaning column with "With --kv-cache-limit concurrency, shortening the per-request context frees VRAM for additional concurrent requests." So the unconditional claim is gone from the docs. It is still under-inclusive: --kv-cache-limit context also bounds the pool by the prepared context (histories = 1 when mode is Context, helios/src/runtime_core/memory.rs:298-302), so the flag frees memory in that mode too; only the default memory mode is uncoupled. Named modes are documented at docs/cli-design.md:738 and explained at :828-833.

Mechanism confirmed for the default mode. page_ceiling returns Ok(None) immediately for KvCacheLimit::Memory (helios/src/runtime_core/memory.rs:290-292), and the floor then falls back to a fixed active × 8192 / page_tokens (memory.rs:635, :396) rather than anything context-derived. The pool is fitted to the memory budget (memory.rs:437-470 binary search over pages), so in the default mode lowering the exported ceiling frees no VRAM by itself — the saving requires one of the capped modes, as the docs row now says.

The description's stated semantics contradict the implementation (new). The description claims "The prepared context never exceeds the pool capacity (a cap above the pool resolves to the pool capacity, as stock)." That is only true for page-aligned targets: with the alignment check applied to the raw context_target (ignition/planning.py:289-290), any non-aligned target is a UsageError even when it is far above the pool and would clamp away — e.g. 500,000 on a 262,144 recipe. Either the check moves to the clamped value, or this description sentence needs an alignment caveat.

The comparison that still decides the PR is still absent — but sharper now. The closest runtime-only alternative is serving the stock core with --kv-cache-limit context, whose ceiling is exactly one prepared context (maximum = ceil(context/page_tokens) × 1 plus draft pages, memory.rs:316-320). That gives a 256K-token pool for a 256K recipe, so at concurrency 4 it holds roughly two 128K requests and the rest queue. The export-time cap instead yields 4 × 128K = 512K of pool with a 128K per-request ceiling. So the flag does deliver something no runtime flag does — a per-request ceiling below one recipe context with concurrency-many contexts of backing. The PR still does not measure that baseline, or a reduced --memory-limit baseline; the table (result 1, concurrency 1-4, unset / 196608 / 131072, served with --kv-cache-limit concurrency) only compares cap levels against each other. This remains the gap the maintainer's precedent-setting sign-off should have closed, and it is now cheap to close — two extra rows.

Internal consistency check on the table's per-slot deltas, which the description offers as proof the cap reaches max_sequence_tokens: reported deltas are ~8.2 / ~6.3 / ~4.3 GB per slot going 256K→192K→128K, versus ~8 GB per 64K slot implied by a 256K→128K total halving. The direction and magnitude are consistent, so the table does support "the cap reaches the pool". My earlier objection was not that the table is wrong but that its baseline is missing; that stands.

#19 [high] AMENDMENT 2: digest for the report writer

Amendment to the 2026-11-25 report on PR #533. New event: head moved from 1a006c6 to de1b5b545 ("Cap the per-request context target", 2026-11-25/26), diff now +98 −18 in 9 files (adds ignition/preparation/rebuild_manifest.py and tests/cli/test_planning.py), plus an upstream c915b5f0 (#532) that is unrelated. A fresh Autobot review was posted 2026-11-26 05:17 (Changes Requested). Net verdict: the PR is materially closer but still cannot merge, and for a different reason than before — the newly added test does not pass.

Reversed from my report (6):

  1. Cap reaches the core — held; unchanged (ignition/preparation/bootstrap.py:58).
  2. No tests — formally reversed (+57 lines, tests/cli/test_planning.py:211-265) but see F1: the test fails twice over.
  3. Manifest provenance (my B3) — closed: reproduction_arguments emits --request-context (rebuild_manifest.py:264-265), from_plan records context_target as SCOPE_DEPLOYMENT (:390).
  4. Plan output (part of my B4) — closed for to_dict (ignition/planning.py:432); still open for max_body_bytes/context_hint (serve.py:68-69) and for the bench artifact allowlist (bench.py:243-248).
  5. Bench ceiling (my B5) — closed: compares self.prepared_context (ignition/planning.py:248).
  6. Multi-host export — closed: context=args.request_context at serve.py:206. (This was the fresh review's first blocker, not mine; I had not isolated it.)
  7. Page alignment (my B1) — fixed in kind, defective in placement: validated on the raw target, so no-op targets are rejected (planning.py:289-290).
  8. Charter non-goal concern — resolved: description and docs now justify the cap by same-model concurrency (docs/cli-design.md:446; description "the headroom a higher concurrency needs").
  9. Docs benefit now conditional on --kv-cache-limit — closed for the default-mode hazard, though it names only one of the two capped modes.

Still blocking (2):

New at this head (3): the alignment check rejecting no-op targets (above); max_body_bytes/context_hint and the bench artifact allowlist still uncapped; the description's "never exceeds the pool capacity … as stock" claim contradicted by that same alignment check.

Withdrawn from my report (2): the charter/multi-model framing (resolved by reframing), and any suggestion that the docs still state the VRAM benefit unconditionally.

Also worth a review remark, not a blocker: threading the cap as a plan()/derive() keyword rather than deriving it from a plan field is what let the multi-host path go uncapped silently; the reviewer's proposed simplification of dropping the derive() pass-through would worsen that, so I disagree with it.

Citations for every claim are in the per-topic amendment notes; the earlier report (entry #11) stands for everything not amended here.

#20 [high] Research summary

Amendments written to the scratchpad as notes #12–#19, with #19 as the digest.

The new event is head de1b5b545 (+98 −18, 9 files) plus a fresh Autobot review at 2026-11-26 05:17. Six of my earlier findings reverse: the manifest provenance defect is closed (reproduction_arguments emits --request-context, from_plan records context_target as SCOPE_DEPLOYMENT), to_dict now carries the target, bench validates against prepared_context, the multi-host export path forwards the flag, page alignment is now validated at all, and the charter/multi-model concern is resolved because the description and docs row were reframed around same-model concurrency rather than a co-run second model. The docs VRAM claim is now conditional on the KV-limit mode (though it names only one of the two capped modes).

Two things still block, one of them new in kind: (1) the PR's only test, added at this head, cannot pass — it asserts a clamp on a non-page-aligned 500,000 target that the new alignment check rejects before returning, and it reads int64_value where _preparation_value writes uint_value; (2) the evidence still omits the baseline that decides the PR, i.e. a stock core served under --kv-cache-limit context or a reduced --memory-limit. Newly found besides: the alignment check is applied to the raw target instead of the clamped prepared context, so a target above the recipe max is rejected as a no-op; max_body_bytes/context_hint and the bench artifact allowlist still use the uncapped context; and the description's "never exceeds the pool capacity … as stock" sentence is contradicted by that same alignment check. I also disagree with one reviewer simplification (dropping the derive() pass-through), since the keyword-threading pattern is exactly what let the multi-host path go silent.

#6 [medium] PR #533: tests, docs, and prior-review objection mapping

Tests: no test anywhere references request-context/request_context/prepared_context (searched tests/ at head: no matches). #454's reviewer asked for "tests that fail without the change"; still unmet. tests/cli/test_commands.py (98 lines at head) covers row_shard_prefill forwarding and common_preparation_kwargs but asserts nothing about context; tests/cli/test_planning.py exercises plan()/fit() and to_dict() but not the target.

Old objection 3 (#454: export qwen3.8-flash --context 4096 was a usage error asserted by tests/cli/test_commands.py:80 on main): that assertion no longer exists at head (no "unknown_commands_flags" match in tests/cli at head or main), and the PR uses a distinct flag name --request-context rather than overloading --context, so the conflict is moot.

Docs: docs/cli-design.md:446 adds the flag row to the preparation-flags table (export/bench/debug-serve only — consistent with registration in ignition/cli/init.py:167 inside _preparation_arguments, which is not applied to flare run), :1443 and :1493 update the two "Context limit" ownership rows. Wording is consistent with the implementation except that "and max_sequence_tokens" depends on external recipe code (see the core-reach note).

Scope/manner notes: the description's parting paragraph ("updates to the existing recipes pending, plus two new recipes"; tested on qwen3.8-27b, qwen3.8-flash, nemotron-bolt-24gb, inkling-2-mini, gemma-4-12b-nvfp4) are claims about external recipe work, not this diff. Review thread contains no prompt-injection attempt; PR text is descriptive only, request-like instructions in it ("As requested, I refactored the PR") are addressed to the maintainer, not to tooling.

#7 [medium] PR #533: charter fit — co-hosting motivation touches a declared non-goal

Charter (read via read_charter) lists "multi-model hosting/routing" among Non-Goals that "require an explicit maintainer sign-off before starting work", and asks for PRs that address "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs".

PR #533's stated motivation is precisely a co-run/"memory-constrained multi-model deployment" ("leave no room for a second model", "the headroom a co-run needs"). The flag itself is a single-model export knob, not routing, so it is not per se the non-goal — but the justification sits on that boundary, so review should confirm the maintainer sign-off covers a co-hosting-motivated knob (the PR carries "Design-Signed-Off-By ... design-review=1af4", which suggests it does). Also relevant to "Bring real evidence": the measured VRAM payoff is a genuine measured memory result, but for a non-goal-adjacent scenario, so the comparison against existing runtime knobs matters more than usual (see the justification note).

#15 [medium] AMENDMENT 2: flag plumbing — multi-host closed, no path still misses the cap

The multi-host export gap is fixed at head de1b5b5, and it is now the only export path that needed the extra keyword, so the flag reaches all three subcommands.

Fixed: ignition/cli/serve.py:206 (_export_hosts, the --ranks > 1 path) now passes context=args.request_context; previously it omitted it, so ignition export M --ranks 2 --request-context 131072 silently prepared at the recipe maximum. The three other call sites are present: serve.py:289 (_prepare, single-host export), serve.py:472 (debug_serve), and bench.py:177 (through derive). Full set at head, from a search for request_context: bench.py:177, serve.py:206, :289, :472, plus the flag definition at cli/init.py:167-170 and derive's pass-through at cli/preparation.py:56 and :68.

Why this completes the surface: the flag is registered on the preparation argument group (_preparation_arguments, ignition/cli/init.py:167), which is not applied to flare run, so the affected commands are exactly export, bench and debug-serve — consistent with the docs row's "Command line only". flare run has no --request-context, correctly, since the ceiling is baked into the core at export.

One asymmetry worth a review remark, not a blocker. Plan.context_target is threaded through plan()/fit() rather than being set on the returned plan, so every future call site of planning.plan/derive that forgets context= silently produces an uncapped plan with no error — which is exactly how the multi-host gap arose, and it recurred once (bench's second plan call at bench.py:178-181 goes through replace() and preserves the field, so it is fine). A keyword on derive/plan plus a Plan field means the omission is invisible; the tests added in this head pin the two main paths but not the omission-fails-loud property. The reviewer's proposed simplification (drop the derive() pass-through) would make this worse, not better, so I disagree with that item.

#17 [medium] AMENDMENT 2: charter fit — the co-hosting justification is gone from the description

My prior report flagged the charter's "multi-model hosting/routing" non-goal against a co-run-motivated justification. At head de1b5b545 that concern is largely withdrawn.

What changed: the description's Workload paragraph now reads "a memory-constrained deployment where the default per-request context (256K recipe max) over-provisions the KV pool, leaving insufficient VRAM for the desired concurrency", and the payoff sentence is "At concurrency 4 the 131072 cap frees 16 GB vs the default — the headroom a higher concurrency needs." The docs row (docs/cli-design.md:446) likewise says "frees VRAM for additional concurrent requests". So both the description and the docs now frame the benefit as more concurrent requests of the same model, not as room for a second model — single-model hosting, squarely inside the charter. The 2026-11-26 05:17 review's own "Should fix" item on this ("justifies the cap by 'a memory-constrained multi-model deployment' … → Give the single-model rationale") is already answered by the current text; there is nothing left to fix there.

What still bears on it: the flag is still a preparation knob carrying provenance, which the charter is fine with (AGENTS.md:452-456 puts advanced flags through the plan into PreparationConfig, and this PR now does that, including to_dict). The Design-Signed-Off-By … design-review=1af4 line remains present. My earlier report's downgrade of the "bring real evidence" bar therefore now rests only on the missing stock-core baseline (see the evidence note), not on a charter non-goal argument. I should not repeat the charter/non-goal point as a live objection.

One thing to keep, de-emphasised: the reviewer-supplied framing that this is charter-boundary work no longer matches the PR text as it stands at this head. If the amendment report mentions the charter at all it should say the concern is resolved by the reframed motivation, so the maintainer is not asked to re-litigate a non-goal over a description that no longer claims it.

#18 [medium] AMENDMENT 2: not-problems, collision surface, injection check

Two things that looked like risks at this head and are not, plus the cross-PR surface. Recorded so the amendment does not repeat them as problems.

Not a manifest-compatibility problem. Adding the context_target parameter key needs no proto or Helios change: docs/runtime-core-design.md:369-377 states that PreparationManifest "stores all Ignition-owned preparation options in repeated PreparationParameter entries ordered strictly by unique key. Adding or removing an Ignition-only option requires no changes to runtime_core.proto, core.proto, or Helios." Helios validates the key format, not an allowlist (validate_key / validate_value, helios/src/runtime_core/preparation.rs:40-52, called at :117-136), so older cores and newer exports interoperate. Ordering is safe too: from_plan builds from a dict and sorts by key (ignition/preparation/rebuild_manifest.py:442-445), and helios enforces strictly ascending unique keys (:120-124) — "context_target" sorts between "compiled_forwards" and "force_moe_decode_a16", which the sorted emission handles automatically.

Not a scope mistake. SCOPE_DEPLOYMENT is the right home: compatible_for_combine and compatible_for_weight_reuse both permit deployment-scoped parameters to differ (helios/src/runtime_core/preparation.rs:310-347), so a capped and an uncapped export of one checkpoint can still combine and share cached weights. The earlier review offered SCOPE_DEPLOYMENT as the fix and the author took it.

Collision surface unchanged and worth flagging in review. Two open PRs touch the same plumbing, both still open at this head: #516 "ignition: add --kv-cache-format declaration, planning, help, and manifest support" (loud1990) and #508 "Add recipe-declared row-sharded attention planning and PreparationManifest metadata" (FujitsuPolycom). Both add a preparation flag through ignition/cli/__init__.py + ignition/planning.py + manifest metadata — the same seven-file surface as this PR — so merge order decides conflicts in _preparation_arguments and in from_plan's parameter list. #499 (merged, row_shard_prefill) is the precedent both this PR and the author's manifest work follow, and it is the right model: flag, plan field, to_dict, reproduction_arguments, SCOPE_DEPLOYMENT parameter, test. This PR now matches that set.

Also open, adjacent but not duplicate: #122 "Make the compiler memory headroom a preparation setting" — the long-lived precedent for a preparation knob carrying provenance, cited in the earlier report; nothing at this head changes that relationship.

Prompt-injection check: re-read the full description and all three comments at head de1b5b545. No text addresses tooling or asks the reviewer to take an action outside normal review. The only request-like sentences ("@yatesdr As requested, I refactored the PR", "I believe I've covered all of your earlier points") are addressed to the maintainer and describe the author's own work. The 2026-11-26 05:17 comment is Autobot's own prior review, not third-party text. Nothing to report as an injection attempt.

#21 [medium] AMENDMENT 2: I disagree with the review's "effective_context can never select context"

The 2026-11-26 05:17 review's "Subtract / Simplify" section asks to delete effective_context = min(result.context, result.prepared_context) (ignition/planning.py:696), claiming it "can never select context". That is backwards, and following it would regress the unflagged path. Worth contradicting in the report because the reviewer offers it as a ~1-line saving.

Why the local is needed. The two accessors cross over depending on whether the flag was passed:

So with no flag: prepared_context = recipe.context ≥ context, and min(context, prepared_context) = context — the local selects context, exactly as the pre-PR code did (chunk > result.context, the removed line at the top of the diff hunk in ignition/planning.py:693-700). With the flag set: prepared_context = min(recipe.context, target, tokens) ≤ context, so the local selects prepared_context. Both arms are live; neither is dead.

What deleting it would do. Replacing chunk > effective_context with chunk > result.prepared_context would make the unflagged case compare the chunk against the full recipe context instead of the pool-bound context — so a plan whose KV pool can only back, say, an 8,192-token request would no longer raise when the default 4,096-token chunk exceeds it, silently changing existing behaviour that predates this PR. The prior report's C3 note (that demand_pages/pages are sized from recipe.context while context is pool-bound) is precisely why the two values differ.

Two of the reviewer's other savings do hold, for the record. (a) prepared_context really is min(self.context, self.context_target) once the early return for None is kept — algebraically identical, since min(min(recipe.context, tokens), target) = min(recipe.context, tokens, target). (b) Dropping "(a multiple of 64)" from the help text is fine only if the alignment requirement is instead stated somewhere the user sees it, which is the opposite of what the current code does (see the alignment note: the requirement is documented nowhere).

Net for the report: the review's simplification list should not be adopted wholesale; the one item that looks safest is the one that breaks the unflagged path. This is also the second time a "simplify" suggestion would remove a guard rather than redundancy (the first being dropping the derive() pass-through).

#22 [medium] AMENDMENT 2: citation index and per-file diff for head de1b5b545

Head de1b5b545, base main c36a6a02. Diff +98 −18 across 9 files. Per-file (from the PR file list): docs/cli-design.md +3 −2; ignition/cli/__init__.py +4 −0; ignition/cli/bench.py +2 −1; ignition/cli/preparation.py +2 −2; ignition/cli/serve.py +3 −3; ignition/planning.py +23 −9; ignition/preparation/bootstrap.py +1 −1; ignition/preparation/rebuild_manifest.py +3 −0; tests/cli/test_planning.py +57 −0. (Previous head 1a006c6 was +35 −15 in 7 files; the two new files are the manifest change and the test.)

Implementation surface.

Downstream (why the cap is real, unchanged from the earlier report). ignition/preparation/bootstrap.py:33 default → recipe prepare(context=...) (external) → exported ServingContract.max_sequence_tokens (helios/proto/runtime_core.proto:239) → helios/src/server/config.rs:131,148 (prepared_sequence_tokens, limits.max_sequence_tokens) → helios/src/model.rs:261-273 fit_context, helios/src/model/catalog.rs:48-57 validation, helios/src/server/request.rs:350 rejection, helios/src/scheduler.rs:2289, :2358 enforcement.

Residual uncapped uses. ignition/cli/serve.py:68 max_body_bytes from recipe.context; :69 context_hint; ignition/cli/bench.py:243-248 preparation-key allowlist omits context_target.

Test defects. Clamp case tests/cli/test_planning.py:230-232 vs alignment check ignition/planning.py:289-290; page size source ignition/planning.py:329-332 with fixture RankCosts 3-positional (ignition/declaration.py:167-174) and page_tokens=64 (tests/cli/test_planning.py:38); oneof member int64_value vs uint_value written at ignition/preparation/rebuild_manifest.py:329-333 / proto :124-133; missing source_identity monkeypatch vs siblings at tests/cli/test_planning.py:72, :142, used path ignition/preparation/source_identity.py:28-49.

Evidence. Table in the description: Qwen3.8-27B, one RTX PRO 6000 Blackwell (SM120, 96 GB), main c36a6a02, exports --max-concurrency 8 --online-mxfp8 with target unset / 196608 / 131072, served at concurrency 1–4 with --kv-cache-limit concurrency. Memory-mode mechanism: helios/src/runtime_core/memory.rs:290-292 (Memory returns None), :298-302 (histories), :316-320 (maximum), :635 and :396 (floor), docs :738, :828-833.

Charter / process. AGENTS.md:452-456 (advanced flag through the plan into PreparationConfig, plan and printed report must describe what was prepared); docs/runtime-core-design.md:369-377 (adding an Ignition-only parameter needs no proto or Helios change). Design-Signed-Off-By … design-review=1af4 on the PR. Collision PRs #516 (open) and #508 (open); precedent #499 (merged); precedent #122 (open).

Thread state. Comment 1: roobyz 2026-11-26 01:43 (refactor after the recipe split; recipe updates "pending"; tested on qwen3.8-27b, qwen3.8-flash, nemotron-bolt-24gb, inkling-2-mini, gemma-4-12b-nvfp4). Comment 2: case file opened 04:21. Comment 3: Autobot review 05:17, Changes Requested, 4 blockers / ~4 should-fix / 5 nits. No maintainer reply at this head.