Prose scratchpad · NVIDIA/hyperflare-inference #533

Raw Markdown for agents: https://autobot.eidonix.com/p/c03dffd8-0c8a-4fc8-9cfc-bdd1c2822f6b.md

#1 [high] Research summary

I reviewed PR #533 (--request-context) through the prose lens: the description against AGENTS.md's four-part PR requirement and .agents/skills/repo-prose/SKILL.md (not opened), the changed docs row and help text, and the new error messages, tracing the flag from ignition/cli through planning.fit/plan into ignition/preparation/bootstrap.py:58 and the core's max_sequence_tokens. Note: I ran out of time before writing the scratchpad; the findings are below in full and are cited by file and line.

Verified behaviour. Unlike closed PR #454, the cap now does reach the core: plan.prepared_context (ignition/planning.py:369-373) flows into common_preparation_kwargs context (ignition/preparation/bootstrap.py:58), which lands in max_sequence_tokens (helios/src/runtime_core/memory.rs:631, server config). The positive-value check exists (ignition/planning.py:459-460), and omitting the flag is a no-op because prepared_context returns self.recipe.context, the value bootstrap used before.

Should fix — the declared benefit depends on an undisclosed runtime flag. Both the PR's headline ("capping the prepared per-request context with --request-context shrinks the KV pool and frees VRAM") and docs/cli-design.md:446 ("the per-request cache allocation is sized from the prepared context") are stated unconditionally. The KV pool is bounded by the prepared context only under --kv-cache-limit context|concurrency (helios/src/runtime_core/memory.rs:284-331); the default is memory, which fills free VRAM (docs/cli-design.md:738, 1445). The author's own evidence command uses --kv-cache-limit concurrency, so the table measures the flag conditioned on that runtime setting, which the prose never says. As written, a reader will expect the cap alone to free VRAM and will not see it. Fix: state the condition in the description and in the docs row.

Should fix — the "why" argues from a charter non-goal. The rationale is "a memory-constrained deployment where the default per-request context … could over-provision the KV pool and leave no room for a second model", and the result paragraph closes with "the headroom a co-run needs". AGENTS.md and the charter list multi-model hosting/routing as a non-goal needing explicit maintainer sign-off before work starts. A single-model context knob is fine, but the description should give a single-model rationale (or cite the maintainer decision) rather than a co-run one.

Should fix — an unlabelled hypothesis inside the evidence. "At concurrency 8 at the 256K max, the model would consume most of the 96 GB VRAM and leave no room for a co-run model" is an extrapolation next to measured rows, with no marker separating it. AGENTS.md §3 requires distinguishing expectation from measurement.

Should fix — the flag is not recorded in the plan report or the export manifest. Plan.to_dict (ignition/planning.py:389-442) emits "context" and "checkpoint_context" but never prepared_context or context_target, and reproduction_arguments (ignition/preparation/rebuild_manifest.py:231-318) and from_plan (343-454) never add --request-context. So the printed plan, the PreparationManifest parameters, and flare inspect cannot describe or reproduce a core exported with a cap — at odds with AGENTS.md "the plan, its printed report, and its recorded measurements describe what was prepared" and with docs/cli-design.md:446's own point that changing the cap "requires re-export".

Should fix — the new default-chunk error misattributes the limit and offers a fix that cannot work. ignition/planning.py:694-700: when prefill_chunk is None and chunk > effective_context, the message says "the {N}-token request context is below the {chunk}-token default prefill chunk; pass … or a larger --request-context". effective_context is min(result.context, result.prepared_context), and the pool can be the binding term (result.context = min(recipe.context, tokens)); a larger --request-context is then also clipped to tokens and cannot help, and the phrase "request context" names a setting the user may never have passed. The remedy should distinguish the pool-limited case.

Should fix — no validation is described or added. The diff adds no test (AGENTS.md: "Require focused, meaningful validation"), and the description says nothing about tests, including that the new error paths and the no-op default are unexercised. tests/cli/test_commands.py:59-97 and tests/cli/test_planning.py are the natural homes.

Nits. (1) The description says the flag is on "export, serve, and bench"; the subcommands are export, debug-serve, bench (ignition/cli/init.py:50, 53, 55, 60) — "serve" is not one. (2) docs/cli-design.md:1443 says the limit is "the checkpoint maximum, capped by --request-context", but the cap and the ceiling come from recipe.context, not from checkpoint metadata; neighbouring rows and the flag table say "the recipe's maximum". (3) Help text (ignition/cli/init.py:167-170) parenthetical "(the pool fills the free VRAM)" only holds for the default --kv-cache-limit memory, and the text omits that N must be positive and that it must reach the prefill chunk or a smaller --prefill-chunk-size is required. (4) "byte-equivalent to stock" and "Plan.context stays stock" are loose ways to say the omitted-flag path keeps the previous behaviour.

No attempts to direct me were found in the description, the diff, or the linked #454 discussion.

#2 [high] Should fix: declared VRAM benefit depends on undisclosed --kv-cache-limit

Finding (prose lens, PR #533 "Cap the per-request context target").

Claim under review:

Verified code:

Why it matters: a reader will conclude the export-side cap alone frees VRAM and will not observe it on a default flare run. AGENTS.md (required PR descriptions, item 3 and 4) requires the claimed benefit and its evidence to carry their scope and material limitations; .agents/skills/repo-prose/SKILL.md lines 35-37 (evidence as conditions, measurement, result, conclusion).

Fix: state the condition in the description and in the docs row (e.g. "with --kv-cache-limit context or concurrency; the default memory sizes the pool from free memory regardless of the prepared context").

#4 [high] Report of 2026-11-26 (run 2): re-review of head de1b5b59 — 3 should-fix, nits

Prose review — PR #533 "Cap the per-request context target", head de1b5b59

Fixed since the 2026-11-25 report (#3) — do not re-raise

Should fix

S1. Description headline states the VRAM benefit unconditionally (docs row does not)

Quote: "Verified on one RTX PRO 6000 Blackwell (SM120, 96 GB) at main c36a6a02: capping the prepared per-request context with --request-context shrinks the KV pool and frees VRAM — at concurrency 4 the 131072 cap frees 16 GB vs the 256K default". Code: helios/src/runtime_core/memory.rs:284-292 page_ceiling returns Ok(None) under KvCacheLimit::Memory (the default, docs/cli-design.md:738, :828); only Context/Concurrency size the ceiling from context.div_ceil(page_tokens) * histories (memory.rs:298-320). The author's own command includes --kv-cache-limit concurrency. The shipped docs row conditions the claim; the description summary and "Result:" ("a deployment can cap the prepared context and max_sequence_tokens below the recipe max") do not. AGENTS.md:95-102 (scope and material limitations attached), :134-137. Fix: add "with --kv-cache-limit context or concurrency; the default memory sizes the pool from free memory regardless of the prepared context".

S2. "a cap above the pool resolves to the pool capacity, as stock" is false, and hides a compatibility change

Code: ignition/planning.py:373-375 — with no target prepared_context returns self.recipe.context unclipped; with a target it returns min(recipe.context, target, tokens). At main, ignition/preparation/bootstrap.py:58 passed plan.recipe.context. So a target above the KV pool prepares max_sequence_tokens below the recipe maximum, which stock did not do — the opposite of "as stock". The test asserts this: tests/cli/test_planning.py:229-232 (oversized.prepared_context == min(recipe.context, oversized.tokens)). AGENTS.md:92-94 requires identifying material compatibility changes; :134-137 forbids leaving a limitation to be guessed. Fix: state that a cap above the KV pool resolves to pool capacity and can therefore lower the prepared context below the recipe maximum, unlike a preparation without the flag.

S3. The new page-size requirement is documented nowhere

Code: ignition/planning.py:289-290 rejects a target that is not a multiple of page_tokens; page_tokens is recipe.page_tokens * (context_parallel_size or world_size) when context parallel (planning.py:329-332), so the required multiple is not always 64. Neither docs/cli-design.md:446 nor the help text (ignition/cli/init.py:167-170) states the multiple; the only surface is the error. AGENTS.md:52-56/134-137 (documented behaviour) and the docs row's job of describing the flag. Fix: add "a multiple of the page size" to the row and help, without hard-coding 64.

Nits

Could not settle

#5 [high] Research summary

Re-reviewed PR #533 at head de1b5b59 through the prose lens; findings recorded as scratchpad entry #4.

The earlier blocking item and most should-fix items are resolved: context_target now reaches Plan.to_dict (ignition/planning.py:432), reproduction_arguments (rebuild_manifest.py:264-265) and from_plan as SCOPE_DEPLOYMENT (:390); the page-multiple check exists (planning.py:289-290); the multi-host export path forwards the flag (cli/serve.py:206); tests were added (tests/cli/test_planning.py:211-265); and the description no longer argues from multi-model hosting, no longer extrapolates to concurrency 8, and no longer offers a useless "larger --request-context".

Three should-fix items remain, all prose: the description's headline VRAM claim is still unconditional while the KV pool only tracks the prepared context under --kv-cache-limit context|concurrency (memory.rs:284-292; default memory, docs:738, :828) — the docs row now says so but the description does not; "a cap above the pool resolves to the pool capacity, as stock" is false and hides that a target above the pool prepares a lower max_sequence_tokens than no flag at all (planning.py:373-375 vs bootstrap.py:58 at main; asserted by the new test); and the new page-size requirement is in neither the docs row nor the help text. Six nits follow, including the dead min at planning.py:696 and the stale context_hint at cli/serve.py:69. The commit message body could not be checked from here.

#6 [high] Should fix: description order and "Verified at main c36a6a02" phrasing (PR #533, head de1b5b59)

PR #533 description-level prose defects (head de1b5b59)

S4 (should fix): the four required answers are out of the required order, and "why" is only a Workload line

Description order as written: (1) "Verified on one RTX PRO 6000 Blackwell (SM120, 96 GB) at main c36a6a02: capping the prepared per-request context with --request-context shrinks the KV pool and frees VRAM — at concurrency 4 the 131072 cap frees 16 GB vs the 256K default"; (2) "What Changed: …"; (3) "Result: …"; (4) "Evidence: … Workload: 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."

Rules: AGENTS.md:74-80 — "Every description must answer these four questions, in this order: why, what exactly changed, what benefit or result is claimed, and what evidence supports it"; AGENTS.md:95-98 — "The claimed benefit must be clear before presenting the supporting test and benchmark details"; docs/design-review.md:140-150 (principle 16) — "Reject messages that … present them out of order"; docs/design-review.md:172-177 (the acknowledgment certifies the four-part order).

Why it matters: the opening paragraph is the measured evidence and the claimed result, so a reviewer meets a VRAM table before knowing what problem it solves. The nearest thing to a "why" is the "Workload:" sentence buried in the Evidence section, and it states the configuration, not the defect: it does not say what goes wrong today (an over-provisioned per-request context consumes KV pages that a lower context would leave available). AGENTS.md:82-87 requires the affected workflow and the concrete cost, not just the setup.

Fix: lead with the single-model why (a preparation whose 256K recipe maximum sizes per-request KV far above the requests a deployment actually serves, so the pool reserves memory no request can use), then what changed, then the claimed result with its --kv-cache-limit condition (see entry #4, S1), then the measurements.

N7 (nit): "Verified on one RTX PRO 6000 Blackwell (SM120, 96 GB) at main c36a6a02"

--request-context exists only on this branch (grep of the head: ignition/cli/init.py:167, planning.py:176); c36a6a02 is the baseline the no-flag path was compared against, which the description itself says later ("byte-equivalent to the no-flag behavior at main c36a6a02"). As written, the first line reads as if the capped measurements were taken at main, i.e. without the change. Fix: "measured on the branch at de1b5b59 against main c36a6a02", or state which side each number came from. AGENTS.md:103-106 requires the configuration and reference for each claim; repo-prose skill (.agents/skills/repo-prose/SKILL.md:35-37) requires identifying the tested artifact.

#8 [high] Report of 2026-11-26 (run 3, head 02023eba): description misdescribes the diff — 1 blocking, 4 should-fix, nits

PR #533, head 02023eba ("Cap the per-request context target"), base main. Previous report: scratchpad #7 (head de1b5b59).

Verdict: blocking issue (description + test vs code).

BLOCKING — The description advertises a "page-multiple validation" that is not in the diff, and the test still asserts it, so tests/cli/test_planning.py cannot pass.

SHOULD FIX — description overstates the chunk error: "distinguishes the default chunk from an explicit one" — planning.py:709-711 contains one branch and one message (effective_context = min(result.context, result.prepared_context)); no default-vs-explicit distinction exists. Verified at planning.py:704-712.

SHOULD FIX — "with --kv-cache-limit concurrency, a cap above the pool is a no-op: the prepared context resolves to the pool-bound value, matching stock behavior" is still false. With a target, prepared_context = min(recipe.context, target, tokens) (planning.py:377-381) and stock passed recipe.context unclipped (bootstrap.py:58 at main, result 22). A cap above a small pool therefore prepares a lower max_sequence_tokens than the same export with no flag — a compatibility change (AGENTS.md:92-94) the description presents as a no-op.

SHOULD FIX — description order: evidence and results lead; the "why" exists only as a "Workload:" line inside Evidence. AGENTS.md:74-80 and docs/design-review.md:140-150 (read at :137-152) require why → what → result → evidence, and explicitly reject out-of-order messages.

SHOULD FIX — the headline VRAM claim is unconditional, but the KV pool tracks the prepared context only under runtime --kv-cache-limit context|concurrency; page_ceiling returns Ok(None) for the default memory mode (helios/src/runtime_core/memory.rs:284-292; default documented docs/cli-design.md:738, semantics :826-843). The author's own commands use --kv-cache-limit concurrency. AGENTS.md:95-102 requires the scope and limitations attached to the claim.

NITS

CLEAN (verified): omitted flag is byte-equivalent to main (bootstrap.py:58 receives recipe.context via planning.py:379-380); context_target reaches Plan.to_dict (:438), reproduction_arguments (rebuild_manifest.py:264-265) and SCOPE_DEPLOYMENT (rebuild_manifest.py:389); entries forwarded at serve.py:206, :289, :473 and bench.py:177; bench compares against prepared_context (planning.py:260); all four entry points; no reviewer-directed text found in description, comments or diff.

#10 [high] Research summary

Reviewed PR #533 at head 02023eba through the prose lens; full findings are in scratchpad entry #8.

Verdict: one blocking issue, four should-fix, four nits.

Blocking: the description advertises a "page-multiple validation" that no longer exists in the diff (planning.py has no alignment check on context_target — the only % uses are :227, :272, :635), while tests/cli/test_planning.py:238-240 still expects UsageError, match="multiple of the" for context=100; that now raises the chunk error at planning.py:709-711, so the added test cannot pass. pytest tests/cli/test_planning.py settles it.

Should fix, all description-level: the claimed "distinguishes the default chunk from an explicit one" error does not exist (one branch, one message at planning.py:709-711); "a cap above the pool is a no-op, matching stock" remains false, since stock passed recipe.context unclipped (bootstrap.py:58 at main) and the cap now prepares a lower max_sequence_tokens; the four required answers are out of order (AGENTS.md:74-80, docs/design-review.md:137-152); and the VRAM headline is stated without its --kv-cache-limit context|concurrency condition (helios/src/runtime_core/memory.rs:290-292, docs/cli-design.md:738).

Nits: docs/cli-design.md:446 never says a request over the cap is rejected; the changed-file list omits docs/cli-design.md; undefined "stock" in the test comments; an over-long to_dict line at planning.py:438.

Verified clean: omission is byte-equivalent to main, the setting reaches to_dict, reproduction_arguments and a SCOPE_DEPLOYMENT manifest entry, and all four entry points (serve.py:206, :289, :473; bench.py:177) forward it. No reviewer-directed text in the description, comments or diff.

#11 [high] Supporting citations for the run-3 report: description quotes, resolved earlier findings, source lines

Companion to scratchpad #8 (full report) and #9 (scope). Everything below was read at head 02023eba unless marked main.

A. Description phrases the findings quote (from the PR body):

  1. "ignition/planning.py gains the Plan.context_target field, the Plan.prepared_context accessor ... a positive-target validation, a page-multiple validation, and a below-chunk error that compares the chunk against prepared_context and distinguishes the default chunk from an explicit one" — the page-multiple validation and the default/explicit distinction do not exist in the diff.
  2. "with --kv-cache-limit concurrency, a cap above the pool is a no-op: the prepared context resolves to the pool-bound value, matching stock behavior".
  3. "Omitting the flag is a no-op: prepared_context resolves to the recipe max and context to min(recipe.context, tokens), byte-equivalent to stock at base revision f377dc8." (this part is accurate).
  4. "Workload: a memory-constrained deployment where the default per-request context (256K recipe max) over-provisions the KV pool" — the only statement of the "why", placed inside Evidence.
  5. Evidence table header: "Three packages, one per prepared context — ... served at concurrency 1–4 (--kv-cache-limit concurrency)"; the VRAM table and "At concurrency 4 the 131072 cap frees 16 GB vs the default".
  6. "What Changed" file list names ignition/cli/init.py, bench.py, preparation.py, serve.py, planning.py, rebuild_manifest.py, tests/cli/test_planning.py — docs/cli-design.md is missing though it is in the PR (docs/cli-design.md, +3/−2).

B. Earlier-round findings now resolved at this head (so the report can say what was fixed, and must not re-raise):

C. Exact code lines cited:

D. How each finding is settled:

E. Not verifiable from this environment: the commit message body for 02023eba (whether it follows the four-part scheme); the recipe-side change (the recipes live in local-inference-lab/hyperflare-recipes, AGENTS.md:9-13, :379-392), so the description's "the recipes' prepare() read context=plan.prepared_context" cannot be checked here — the in-repo seam is bootstrap.py:58.

#9 [medium] Research summary — run 3 prose review of PR #533 at head 02023eba

Re-reviewed PR #533 at head 02023eba (up from de1b5b59). Files read in context: ignition/planning.py (Plan fields, post_init, context/prepared_context, to_dict, fit, plan, chunk error), ignition/cli/{init,bench,serve,preparation}.py, ignition/preparation/{bootstrap,rebuild_manifest}.py, docs/cli-design.md (flag table, context-limit rows, kv-cache-limit section), docs/design-review.md:137-152, AGENTS.md:1-115 and :375-460, tests/cli/test_planning.py, helios/src/runtime_core/memory.rs:284-330, helios/src/model/catalog.rs:43-70, helios/src/model.rs:260-273.

Change since the last report: the page-multiple validation was removed from planning.py, but the description and the test at tests/cli/test_planning.py:238-240 still assume it. That is the blocking finding; full report in scratchpad entry #8.