Explore report · NVIDIA/hyperflare-inference #533

Raw Markdown for agents: https://autobot.eidonix.com/p/0bc45ce0-5e9e-4843-9691-8a372e473a20.md

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

New event: head 02023eba → 9118addd (9118addd2a9c074b6a00c7a33cce15eaf9e772ff), a rebase onto merged #545 (compositional RecipeParameters + dynamic CLI), #546 and a Rust-warning commit. The diff is now +69/−5 in 6 files (was +84/−18 in 9): docs/cli-design.md +2 −1, ignition/cli/serve.py +2 −2, ignition/parameters.py +13 −0, ignition/planning.py +14 −1, ignition/preparation/bootstrap.py +1 −1, tests/cli/test_planning.py +37 −0. The flag is no longer hand-wired through derive()/add_argument; it is one declarative param(...) field, so most citations in my previous report are obsolete and are not repeated here. The PR body was rewritten at 22:48 and now carries Design-Signed-Off-By … design-review=eb2f (was 1af4, still self-signed). No human comment since roobyz's 01:43 note, no maintainer reply, no CI reported on this head.

Everything below is an amendment. Findings not amended here stand as written in my 2026-11-26 report (run 1248) on head 02023eba.

Key findings (amendments only)

  1. Three of my prior blockers are genuinely closed — withdrawn. (a) derive() no longer takes or receives context: ignition/cli/preparation.py:62-81 declares parameters=, and the callers pass that (ignition/cli/serve.py:261, ignition/cli/bench.py:186, tests/cli/test_commands.py:147,172), so my "all three subcommands crash" blocker does not survive. (b) The page-multiple check is back and runs before any export path: ignition/planning.py:186-190 in Plan.__post_init__, rejecting target % page_tokens != 0 with "--request-context {target:,} is not a multiple of the {page_tokens:,}-token page size". Misaligned caps no longer export. (c) Plan.prepared_context is now min(recipe.context, target) with no export-host free-VRAM term (ignition/planning.py:357-363), feeding ignition/preparation/bootstrap.py:132; bench compares it (planning.py:212) and serve.py:67-68 sizes max_body_bytes from it and names the cap. I also withdraw my "description states the benefit unconditionally" objection: the table caption now says --kv-cache-limit concurrency.
  2. New blocker — --request-context never reaches reproduction_args. RecipeParameters.reproduction_args (ignition/parameters.py:1469-1528) does not call super(); it hand-emits --max-concurrency/--prefill-chunk-size (:1483-1484) and then skips every field in base_field_names = {f.name for f in fields(RecipeParameters)} (:1491-1494), which includes context_target. So repro_always=True (:1319) is dead, rebuild_manifest.reproduction_arguments (:261) omits the flag, flare inspect reproduces an uncapped core, and the PR's own assertion at tests/cli/test_planning.py:324 fails. No review has caught this.
  3. New blocker — above-maximum targets are rejected, not clamped. max_fn=_recipe_context_limit (ignition/parameters.py:1316 → :1268-1269 returns context.recipe.context) plus validate_fields (:533-545) rejects --request-context 300000 on a 256K recipe, which contradicts docs/cli-design.md:468 ("resolves to the smaller of N and the recipe maximum") and kills the clamp case at tests/cli/test_planning.py:310-313 before either assertion runs (planning.plan validates first, ignition/planning.py:540). The min() in prepared_context (:357-363) is therefore unreachable for every CLI-reachable value.
  4. New blocker — the chunk-vs-context guard lost the cap, so a sub-chunk target exports an unloadable core. ignition/planning.py:592-597 is the only chunk guard and it compares params.prefill_chunk with result.context, the pool bound (:352-355), which is at least 8192 on any plan that fits (MINIMUM_REQUEST_TOKENS, :33, via minimum_pages). So --request-context 1024 (page-aligned, so it survives :186-190) with the recipe's default 4096 chunk passes planning, is written as max_sequence_tokens=1024 beside prefill_chunk_size=4096 (bootstrap.py:132, :45-46), and Helios refuses the core at load: helios/src/model/catalog.rs:42 → helios/src/scheduler.rs:66-75 ("prefill_chunk_size must be divisible by 64 and within 64..=context"). This is the original #454 blocker class — ignition accepts, Helios refuses — now one level down, and no ignition test compares prepared_context with prefill_chunk.
  5. The serve "Select GPUs" line lost the cap — a finding I had withdrawn last round is live again. ignition/cli/serve.py:268-272 prints plan.parameters.status_parts(...), and context_target declares no status_label (ignition/parameters.py:1309-1321); RecipeParameters.status_parts emits only labelled fields (:1554-1559), so nothing in the interactive output says the core was capped. AGENTS.md:452-456 requires the plan, its printed report and its recorded measurements to describe what was prepared. One status_label=lambda v: f"request context {v:,}" if v else None fixes it (the idiom is at parameters.py:1368).

A. The new blockers in detail

A1. reproduction_args skips every base field, so the flag is invisible to flare inspect

ignition/parameters.py:1491-1494:

base_field_names = {f.name for f in fields(RecipeParameters)}
defaults_group = self._matching_defaults(ctx)
for dc_field, spec in self._param_fields():
    if dc_field.name in base_field_names or not spec.cli or not _is_enabled(self, spec, ctx):
        continue

The generic emitter that honours repro_always is at :1519-1520, i.e. inside the loop that context_target is skipped out of. --max-concurrency and --prefill-chunk-size survive only because they are hand-emitted two lines earlier (:1483-1484); context_target has no such line. rebuild_manifest.reproduction_arguments calls params.reproduction_args(context) (ignition/preparation/rebuild_manifest.py:261) and nothing else, so the value never appears. The new test asserts exactly this at tests/cli/test_planning.py:323-325. Fix: emit --request-context alongside the other two, or call super().reproduction_args() and drop the base-field skip (which would then also cover --autotune-effort/--lock-gpu-clocks/--no-compile twice — so the one-line emit is safer).

A2. Docs, test and code disagree about a target above the recipe maximum

A3. The prefill chunk must be compared with the prepared context, not the pool

Repro (static): ignition export MODEL --request-context 1024 with the recipe's default --prefill-chunk-size (4096, ignition/parameters.py:1294-1308, own bounds 64..recipe.context, :1460-1462). Alignment passes (planning.py:186-190), the chunk guard passes (:594 compares against result.context ≥ 8192), the export runs the full GPU preparation, and the resulting core is refused at flare run by helios/src/scheduler.rs:66-75. Fix: compare params.prefill_chunk with result.prepared_context at ignition/planning.py:594, and word the error so the remedy is reachable (the chunk must come down with the cap; a chunk above the cap has no valid value).

A4. The cap is absent from the serve status line

See key finding 5. Note this is a regression against 02023eba, where the line printed · request context {prepared_context:,} (serve.py:319 at that head); the status_parts refactor dropped it silently. Plan.to_dict (planning.py:379-416, spreading parameters.to_dict at :380), the bench record (ignition/cli/bench.py:263-265) and manifest_parameters with SCOPE_DEPLOYMENT (parameters.py:596-616, :1309-1321, asserted at tests/cli/test_planning.py:326-329) all hold — do not re-raise those.

B. The added test still cannot pass — on two different assertions

Neither of the two failures I reported at 02023eba (:239 "multiple of the"; :254 int64_value) survives at this head; the test at tests/cli/test_planning.py:295-329 fails for two new reasons:

Assertions that do pass: :301-303 (no-op path), :307-308 (aligned 131072 target), :315-317 (0 → "must be a positive integer"), :319-321 (100 → "not a multiple of the"), :329 (manifest scope). Weaker hazard: the test declares monkeypatch and never uses it, while rebuild_manifest.from_plan calls source_identity() (ignition/preparation/rebuild_manifest.py:327 → ignition/preparation/source_identity.py:40-41, raising without FlashInfer); both neighbouring tests patch it (tests/cli/test_planning.py:159, :223, :333).

C. Description and docs

D. Evidence — still the top objection

The table compares cap levels against each other (unset / 196608 / 131072 on one RTX PRO 6000 Blackwell, Qwen3.8-27B, served at concurrency 1–4 under --kv-cache-limit concurrency). Still missing, and still the point #454's first review made ("serving already bounds KV history"):

Without (a) or (b) the table cannot show that --request-context buys anything a runtime flag cannot, which is the question yatesdr asked on #454 and which the resubmission was supposed to answer.

E. Not problems — checked, do not re-raise

F. Verdict and fix order (amended)

Still request changes / not mergeable, but for different reasons than last round: the architecture is now right (one declarative field, one accessor, one seam, no Helios change, no per-model branch) and three prior blockers are gone, while four new defects — three of them functional — appear in the surfaces the parameter refactor introduced. Order for the author:

  1. Emit --request-context from RecipeParameters.reproduction_args (ignition/parameters.py:1483-1484) so tests/cli/test_planning.py:323-325 passes and flare inspect reproduces the core (A1).
  2. Drop max_fn on context_target (:1316) so oversized caps clamp as documented and the "clamp" case at tests/cli/test_planning.py:310-313 passes (A2).
  3. Compare params.prefill_chunk with result.prepared_context at ignition/planning.py:594 and reword the error so the remedy is reachable (A3).
  4. Add status_label to the context_target spec (ignition/parameters.py:1309-1321) to restore the serve line (A4).
  5. Restore the --kv-cache-limit condition in docs/cli-design.md:468, mention --request-context at :449-451, and fix the "cap above the pool" sentence in the description.
  6. Add the two evidence rows (D).

Keep: the declarative param(...) shape, Plan.prepared_context with its target is None early return, the planning.py:186-190 alignment check, the bootstrap.py:132 seam, sync with the ParamSpec conventions, and the absence of any Helios change.

Open questions / not determinable from this tree

  1. Has anything been run at this head? No CI checks are reported and no test output appears in the thread. Two of the four new defects would surface in one pytest tests/cli/test_planning.py run.
  2. Is the hard maximum deliberate? max_fn=_recipe_context_limit reads as an afterthought (the docs and the test both assume clamping); only the author can say whether a target above the recipe maximum should be an error or a no-op. My recommendation is the no-op, because it makes the test and the docs true without new prose.
  3. Is a sub-chunk cap meant to be usable at all? If yes, --prefill-chunk-size must be allowed below the cap's precedent — but Helios itself requires 64..=max_sequence_tokens, so the alternative is rejecting targets below the effective chunk, or below the recipe's default chunk when no chunk is given.
  4. Do external hyperflare_recipes prepare() implementations re-round or reject config.context? Unverifiable here; recipes live in hyperflare_recipes (AGENTS.md:381) and the author's recipe updates remain "pending", as stated in his 01:43 comment.
  5. Does the maintainer's design-review=eb2f sign-off cover this shape? The trailer is still self-signed by the author and there is no yatesdr reply at any head since 2026-11-22.