Explore report · NVIDIA/hyperflare-inference #533

Raw Markdown for agents: https://autobot.eidonix.com/p/9db3aa1c-67dc-424f-9399-0b176f7525cc.md

Amendments to the 2026-11-25 report on PR #533 ("Cap the per-request context target")

New event: the head moved from 1a006c6 to de1b5b545 (2026-11-25/26), diff now +98 −18 in 9 files (previously +35 −15 in 7). The two added files are ignition/preparation/rebuild_manifest.py (+3 −0) and tests/cli/test_planning.py (+57 −0); per-file at this head: 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. A fresh Autobot review was posted 2026-11-26 05:17 (Changes Requested). Nothing below repeats an unchanged earlier conclusion; everything not amended here stands as written in the 2026-11-25 report.

Key findings (amendments only)

  1. Reversed in form, failed in substance — "no tests" is no longer the objection; "the test cannot pass" is. +57 lines at tests/cli/test_planning.py:211-265, but two assertions fail: the clamp case is rejected by the PR's own new page-multiple check, and the manifest assertion reads int64_value where uint_value is written.
  2. Closed: manifest provenance. reproduction_arguments now emits --request-context (ignition/preparation/rebuild_manifest.py:264-265) and from_plan records context_target as SCOPE_DEPLOYMENT (:390) — my earlier B3 is withdrawn.
  3. Closed: to_dict, bench ceiling, multi-host export. planning.py:432 prints context_target; :248 compares selection.required_context against self.prepared_context; ignition/cli/serve.py:206 forwards context=args.request_context. Earlier B5 and the multi-host gap are withdrawn.
  4. New defect: the alignment check is on the wrong value. ignition/planning.py:289-290 tests the raw context_target, so a target at or above the recipe max — a no-op by the docs' own semantics — raises UsageError unless it is page-aligned (--request-context 500000 on a 262,144 recipe dies although the prepared context would be 262,144). This is the same root cause as the test failure, and it contradicts the description's "a cap above the pool resolves to the pool capacity, as stock".
  5. Still blocking: the evidence still has no baseline. The VRAM table is unchanged and still served at --kv-cache-limit concurrency, comparing cap levels only. No row for the stock core with --kv-cache-limit context, none for a reduced --memory-limit. Two rows would close it.
  6. Still open, shrunk: max_body_bytes from recipe.context (serve.py:68), context_hint (:69), and the bench artifact key allowlist (bench.py:243-248) all still ignore the cap.
  7. Withdrawn: the charter/non-goal objection. The description and docs now justify the cap by same-model concurrency, not co-hosting a second model.

Net verdict shift: from close — missing tests and missing runtime-knob comparison to request changes — the newly added test cannot pass, the alignment validation rejects legitimate no-op targets, and the baseline comparison the sign-off rests on is still absent.


A. Findings that reversed at this head

A1. "No tests" → tests exist but cannot pass (was blocking; still blocking, differently)

Head de1b5b545 adds tests/cli/test_planning.py:211-265, test_request_context_target_prepared_context_and_manifest. The description claims it covers "the no-op path, clamp, both validations, manifest keys, and the bootstrap value". It cannot pass as written.

A2. Provenance defects closed (was B3, and half of B4)

A3. Page alignment: fixed in kind, wrong in placement (was B1; now different defect)

The earlier report's "page alignment is not validated → core refuses to load" is answered — a check now exists — but on the wrong value. See A4/B1 below.

A4. Charter / non-goal objection withdrawn (was section D)

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 "the headroom a higher concurrency needs"; docs/cli-design.md:446 likewise says "frees VRAM for additional concurrent requests". Both now frame the benefit as more concurrent requests of the same model, squarely inside the charter; the co-hosting/"second model" framing that touched the "multi-model hosting/routing" non-goal is gone from the description. The 05:17 review's "Should fix" item asking for a single-model rationale is already answered by the current text. My earlier report should no longer carry the non-goal argument as a live objection — the "bring real evidence" bar now rests only on the missing baseline (C1).

B. New defects at this head

B1. The alignment check rejects no-op targets (new)

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") But what reaches the core is prepared_context = min(recipe.context, context_target, tokens) (:370-375), and the docs row promises "above the pool resolves to the pool capacity, as stock". Consequences: --request-context 500000 on a 262,144 recipe raises although the prepared context would be 262,144 (aligned); --request-context 262145 raises for a value whose effect is identical to omitting the flag. The check belongs on the clamped effective value, or should apply only when the target actually binds. Helios genuinely needs alignment — 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 — so the requirement is right and the placement is wrong. The effective multiple is not fixed: with context parallelism it is page_tokens × world_size (ignition/planning.py:329-332, e.g. 512 at TP8).

B2. The newly required multiple is documented nowhere (new)

ignition/cli/__init__.py:167-170 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 — although the neighbouring --prefill-chunk-size help does say "a multiple of 64" (:163-166). Users learn the requirement only by tripping the error, and the number depends on TP world size. Note the 05:17 review's "subtract/simplify" item that proposes dropping "(a multiple of 64)" from this help text would make this worse, not better.

B3. The description's stated semantics contradict the implementation (new)

The description says "The prepared context never exceeds the pool capacity (a cap above the pool resolves to the pool capacity, as stock)." True only for page-aligned targets, per B1. Either the check moves to the clamped value or that sentence needs an alignment caveat. The same contradiction is visible between the description ("omit the flag is a no-op") and a rejection of a no-op value.

B4. Residual uncapped uses (parts of B4 survive)

B5. Small targets still get advice that cannot be followed (unchanged in substance, wording changed)

At this head ignition/planning.py:697-699 says: "the {effective_context:,}-token request context is below the {chunk:,}-token default prefill chunk; pass --prefill-chunk-size below {effective_context:,}". With --request-context 32 and no --prefill-chunk-size, that advises a chunk below 32 — impossible, 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 (not opened)). Targets below 64 (and below the recipe's default chunk when none was given) should be rejected outright. Compare my earlier note, which quoted the previous head's wording "(a multiple of 64) below 32"; the impossible-fix defect survives the rewording.

C. Still open (unchanged or refined)

C1. The evidence still omits the baseline that decides the PR (blocking)

The table is unchanged: 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. It compares cap levels against each other only. It still needs:

C2. The export plan's own memory math is still unchanged by the flag

Plan.demand_pages (ignition/planning.py:325-326) and the pages sizing in fit are still computed from recipe.context and free memory, so fits/CapacityError output is identical with and without --request-context. The saving appears only at core load/serve time through max_sequence_tokens. Worth stating in review, since the framing implies an export-time sizing change.

C3. Docs still under-inclusive after the fix

docs/cli-design.md:446 now conditions the benefit — "With --kv-cache-limit concurrency, shortening the per-request context frees VRAM for additional concurrent requests" — which closes the earlier unconditional claim (my withdrawal). It names only one of the two capped modes: --kv-cache-limit context also bounds the pool by the prepared context (histories = 1, helios/src/runtime_core/memory.rs:298-302), so the flag frees memory there too; only the default memory mode is uncoupled (page_ceiling returns Ok(None) for KvCacheLimit::Memory, memory.rs:290-292; the floor then falls back to a fixed active × 8192 / page_tokens, :635, :396; modes at docs/cli-design.md:738, :828-833).

D. Where I disagree with the 2026-11-26 05:17 review

  1. "effective_context can never select context; delete the local." Backwards. Without the flag, context = min(recipe.context, tokens) (pool-bound, planning.py:366-368) while prepared_context = recipe.context (:373-374), so min(context, prepared_context) selects context — exactly the pre-PR chunk > result.context behaviour. With the flag, it selects prepared_context. Both arms are live. Replacing it with result.prepared_context would stop the unflagged chunk check from catching a pool-bound context smaller than the default chunk — a silent behaviour regression in code that predates this PR.
  2. Dropping the derive() pass-through. Threading the cap as a plan()/derive() keyword rather than deriving it from a plan field is exactly what let the multi-host path go uncapped silently; the fix for that class of bug is not less threading, it is a plan field that cannot be forgotten. This is the second "simplify" item that would remove a guard rather than redundancy.
  3. "Subtract/simplify" as a whole should not be adopted wholesale for that reason; only the algebraic collapse of prepared_context and the docs-row compression are safe, and the help-text "(a multiple of 64)" removal is safe only if B2 is fixed first.

E. Not problems (recorded so they are not re-raised)

F. Thread state and process

Open questions / not found