Explore report · NVIDIA/hyperflare-inference #533

Raw Markdown for agents: https://autobot.eidonix.com/p/70da9811-cd57-43d8-96c5-ddcbc2a3271e.md

AMENDMENTS TO THE REPORT ON PR #533 ("Cap the per-request context target")

New event: PR #533's head is a fresh commit, 1a006c6 (2026-11-25), on top of main c36a6a02, with the description rewritten into the four-part form and one new comment from roobyz (2026-11-26 01:43). Diff at this head: 7 files, +35 −15 (docs/cli-design.md, ignition/cli/__init__.py, ignition/cli/bench.py, ignition/cli/preparation.py, ignition/cli/serve.py, ignition/planning.py, ignition/preparation/bootstrap.py). Everything below revises earlier conclusions; nothing is repeated unchanged.

Key findings

  1. Reversed — the cap now reaches the core. ignition/preparation/bootstrap.py:58 passes plan.prepared_context where it previously passed plan.recipe.context (the exact line #454's review named at :62). This is the objection that made the earlier report blocking. It is downgraded to unverified in-repo, not to proven.
  2. Reversed — the --context naming conflict is gone. The flag is named --request-context (ignition/cli/__init__.py:167) and the main-branch assertion that --context must fail (tests/cli/test_commands.py:80) no longer exists anywhere in the CLI tests.
  3. Reversed — zero/negative values are now rejected (ignition/planning.py:459-460), which was an open side-objection in #454.
  4. Still blocking — no tests. tests/ contains no reference to request-context, request_context, or prepared_context (search at head 1a006c6: no matches). #454's reviewer asked explicitly for "tests that fail without the change".
  5. Still blocking — the evidence still fails the comparison that decides the PR. The VRAM table was measured with the exports served at --kv-cache-limit concurrency, so it neither isolates the export-time cap from the runtime ceiling it was combined with, nor compares against the stock core bounded at runtime.
  6. New defects, not previously reported. Page alignment is not validated (core refuses to load); the flag is missing from manifest reproduction/rebuild parameters (a capped core cannot be reproduced); the printed plan omits the cap while serve.py still sizes request bodies from the uncapped recipe.context; benchmark selection is checked against the wrong ceiling.

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


A. Reversed findings, in detail

A1. The cap reaches the shared handoff (was: blocking). common_preparation_kwargs now emits "context": plan.prepared_context (ignition/preparation/bootstrap.py:58), consumed by BasePreparationConfig.context (bootstrap.py:33, default 262144). Downstream that value becomes the exported contract's ServingContract.max_sequence_tokens (helios/proto/runtime_core.proto:235-239, field 4), which helios uses as the serving ceiling: helios/src/runtime_core/model.rs:397-407 builds the 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 (not opened) rejects longer requests; helios/src/model.rs:261-273 (fit_context) and helios/src/model/catalog.rs:48-57 validate it.

A1 caveat — why this is downgraded, not closed. In this repository there is no consumer of the value. The recipes were extracted (commits da037284 "Stage hyperflare_recipes separation, slim core ignition", 568aeca0 "Align core Flare docs, AGENTS.md (not opened), and design-review with hyperflare-recipes split"); ignition/recipes/ does not exist at head. 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 — nothing about context. The author's own comment (2026-11-26 01:43) confirms the recipe side is incomplete: "I have updates to the existing recipes pending, plus I've created two new additional recipes." So "a request that would exceed the cap is rejected" is now a claim about code outside this diff and outside this repository, asserted by no test.

A2. --context conflict resolved (was: blocking). The PR uses a distinct flag, --request-context, registered at ignition/cli/__init__.py:167-168 inside _preparation_arguments, which is not applied to flare run — so export/bench/debug-serve only, consistent with the docs row. No unknown_commands_flags-style assertion about --context exists in tests/cli at head or on main.

A3. Value validation partly fixed. fit now rejects non-positive targets: ignition/planning.py:459-460 raises UsageError("--request-context {context}: a positive token count is required"). Two related defects remain — see B1 and B2.

A4. Chunk-versus-context error now distinguishes default from explicit. ignition/planning.py:694-700 computes effective_context = min(result.context, result.prepared_context) and emits one of two messages; the default-chunk branch (:696-699) is the new, target-aware one. The message itself is wrong for small targets — see B2.

A5. Docs updated as #454 asked. docs/cli-design.md:446 adds the flag row to the preparation-flags table; :1443 and :1493 update the two "Context limit" ownership rows. Wording is otherwise consistent with the implementation, with the one exception that "and max_sequence_tokens" depends on the external recipe code in A1.


B. New defects found at this head (not in the earlier report or in #454's review)

B1. Page alignment is not validated — planning succeeds and the core fails to load. The prepared context is handed to the core unrounded: min(self.recipe.context, self.context_target, self.tokens) (ignition/planning.py:369-373). But helios/src/model/catalog.rs:48-57 requires both prepared_sequence_tokens and limits.max_sequence_tokens to be multiples of page_tokens and rejects the core otherwise ("invalid prepared model configuration"). Effective page size is the recipe's page_tokens (64 in the fixtures) multiplied by the context-parallel world size when ranks share pages (ignition/planning.py:327-330; Recipe.page_tokens at ignition/declaration.py:249). So --request-context 1000 — or any non-multiple — passes planning, exports, and produces a core helios refuses to load. The flag should require, or planning should round down to, a multiple of the effective page size.

B2. A target below 64 makes the new error message advise an impossible fix. With --request-context 32 and no --prefill-chunk-size, the chunk defaults to recipe.prefill_chunk (4096), which exceeds effective_context 32, so planning.py:696-699 says to "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 <= chunk <= recipe.context (planning.py:621-623) and helios requires 64..=context (helios/src/scheduler.rs:66-77). Planning should reject targets below 64 — and below the recipe's default chunk when no chunk was given — rather than emit advice that cannot be followed.

B3. The cap is absent from manifests, so a capped core cannot be reproduced or rebuilt. reproduction_arguments (ignition/preparation/rebuild_manifest.py:231-318) emits --max-concurrency, --prefill-chunk-size, --online-mxfp8, --row-shard-prefill and the rest, but no --request-context. from_plan (rebuild_manifest.py:343-395) records every other deployment-scope option (max_concurrency at :380, prefill_chunk at :387, reserve_bytes at :389) but no context entry. A manifest-driven rebuild therefore silently restores the recipe maximum. This directly contradicts the PR's own new docs claim that a core's catalog is fixed at export and changing it requires re-export (docs/cli-design.md:446).

B4. The cap is invisible in plan output, and two serving paths still use the uncapped context. Plan.to_dict reports "context": self.context, "checkpoint_context": self.recipe.context (ignition/planning.py:430) — neither context_target nor prepared_context appears — and that dict is what is printed at ignition/cli/serve.py:215, :485 and ignition/cli/bench.py:182, :237. The plan JSON and bench JSON therefore look identical whether or not the export was capped. Additionally ignition/cli/serve.py:68 still sizes max_body_bytes from recipe.context * _BODY_BYTES_PER_TOKEN, so a capped export accepts bodies sized for the full recipe context, and serve.py:69's context_hint ("context is limited by the checkpoint and available cache capacity") still does not name the cap.

B5. Benchmark selection is validated against the wrong ceiling. Plan.__post_init__ rejects selection.required_context > self.context (ignition/planning.py:248), and self.context ignores context_target. So ignition bench --request-context 8192 with benchmark contexts up to 16384 passes planning and fails later at ignition/bench/runner.py:388 ("benchmark case exceeds prepared capacities"), measured against Layout.context, which does come from the capped max_sequence_tokens (ignition/direct/scheduler.py:110 (not opened)). The check should use prepared_context so the failure is reported by the flag that caused it.


C. Still open from #454's review (unchanged by this head)

C1. No tests. The reviewer required "tests that fail without the change". There are none: no match for request-context/request_context/prepared_context anywhere under tests/ at head. tests/cli/test_commands.py (98 lines) 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 never sets a target.

C2. The evidence does not compare against the knobs that already exist. This is the comparison that decides the PR, and the earlier report's priority question stands with one refinement. What the cap genuinely adds over the existing runtime knobs: flare run --kv-cache-limit context bounds KV history to exactly one prepared context (helios/src/runtime_core/memory.rs:284-330: maximum = ceil(context/page_tokens) * histories, histories = 1 for Context, active histories for Concurrency; documented at docs/cli-design.md:738), so no runtime flag expresses a per-request bound below one recipe context; and --kv-cache-limit memory / --memory-limit can shrink the pool, but rejection then depends on pages running out rather than on a deterministic per-request ceiling. That is the defensible need, and the PR body never states it — it only shows a VRAM table. Worse, that table (Qwen3.8-27B, one RTX PRO 6000 96 GB, main c36a6a02) was measured with the exports served at --kv-cache-limit concurrency, so it does not isolate the export-time cap from the runtime ceiling it was combined with, and it gives no comparison against the stock core served with --kv-cache-limit context or a lower --memory-limit.

C3. 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. Worth stating explicitly in review, since the PR's framing implies an export-time sizing change.


D. Charter fit (re-examined, conclusion unchanged)

The charter lists "multi-model hosting/routing" among its non-goals, which "require an explicit maintainer sign-off before starting work", and asks PRs to bring "a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs". The flag itself is a single-model export knob, not routing, and the PR carries Design-Signed-Off-By … design-review=1af4, which suggests the sign-off exists. But the stated motivation is precisely a co-run scenario ("leave no room for a second model", "the headroom a co-run needs"), so the justification sits on the boundary of a declared non-goal and the "Bring real evidence" bar applies with more force, not less: C2's missing runtime-knob comparison is what would settle it.

E. Review-thread state

One comment at head: roobyz, 2026-11-26 01:43, replying to yatesdr — the refactor is complete after an additional refactor for the recipe split and upstream changes; existing recipe updates and two new recipes are pending; tested on qwen3.8-27b, qwen3.8-flash, nemotron-bolt-24gb, inkling-2-mini and gemma-4-12b-nvfp4. The five-model test list and the "pending" recipe work are claims about code outside this diff (see A1). No prompt-injection attempt in the PR text; the request-like sentences in it ("As requested, I refactored the PR") are addressed to the maintainer, not to tooling. No reply from yatesdr yet at this head, so the changed verdict is not yet on record in the thread.

Open questions / not found