Amendments to the 2026-11-26 report on PR #533 ("Cap the per-request context target")
New event: head 9118addd → e623985 (e6239855, roobyz, 2026-11-26), diff now +79/−10 in 8 files (was +69/−5 in 6). Per-file: docs/cli-design.md +3−2, docs/preparation-development.md +2−1, ignition/cli/help.py +1−1, ignition/cli/serve.py +4−2, ignition/parameters.py +14−0, ignition/planning.py +17−3, ignition/preparation/bootstrap.py +1−1, tests/cli/test_planning.py +37−0. The PR body was rewritten again and now documents the no-max_fn clamp, the gated alignment check, the chunk bound and the reproduction_args override; the evidence table caption now names --kv-cache-limit concurrency. Thread state unchanged from my last report: last human comment is roobyz's 2026-11-26 01:43 note, the last Autobot review is 2026-11-27 01:01 (Changes Requested), no maintainer reply, no CI checks reported.
Everything below is an amendment. Findings not amended here stand as written in my 2026-11-26 report (run 1386) on head 9118addd; line citations from that report are obsolete because the diff moved.
Key findings (amendments only)
- Four blockers withdrawn — genuinely fixed at this head. (a)
--request-contextreaches reproduction args:ignition/parameters.py:1484-1485hand-emits it beside--max-concurrency/--prefill-chunk-size, so the base-field skip at:1492-1495no longer matters andflare inspectreproduces a capped core; the PR's own assertion attests/cli/test_planning.py:324-325now holds. (b) Above-maximum targets clamp:max_fn=_recipe_context_limitis gone from the field (onlymin_value=1remains,ignition/parameters.py:1309-1320), soPlan.prepared_context'smin()(ignition/planning.py:357-363) is live and matchesdocs/cli-design.md:468; the clamp case attests/cli/test_planning.py:310-313passes. (c) The chunk guard includes the cap:ignition/planning.py:594effective = min(result.context, result.prepared_context), so--request-context 1024with the default 4096 chunk is now rejected at export instead of producing a core Helios refuses at load (helios/src/scheduler.rs:66-75viahelios/src/model/catalog.rs:42). (d) The serve line reports the flag again:status_labelatignition/parameters.py:1318, rendered at:1555-1560, printed atignition/cli/serve.py:271. - New blocker — the status line reports the requested target, not the context the core serves. The label receives the raw field value (
ignition/parameters.py:1558spec.status_label(getattr(self, dc_field.name))) and the field now has no upper bound (:1309-1320), soignition export MODEL --request-context 500000on a 256K recipe — a documented no-op serving 262,144 tokens (ignition/planning.py:357-363) — announces "request context 500,000 tokens" (ignition/cli/serve.py:271). The startup report contradictsdocs/cli-design.md:468, the accessor docstring (ignition/planning.py:359) and theAGENTS.md:452-456requirement that the printed report describe what was prepared. - Small — the added test is the only one in its file that never patches
source_identity().tests/cli/test_planning.py:323callsrebuild_manifest.from_plan, which calls the real digest (ignition/preparation/rebuild_manifest.py:327→ignition/preparation/source_identity.py:39-48, which raisesRuntimeError("the preparation environment requires FlashInfer")without FlashInfer and needs a built Heliopause identity). Siblings attests/cli/test_planning.py:333(and:159,:223; alsotests/cli/test_parameters.py:296) patch it; this test declaresmonkeypatchand does not use it. It is the only test whose result depends on the environment and on a digest of the tree at run time. - Small — the flag help states a rule the code skips.
ignition/parameters.py:1319says the cap "must be a multiple of the page token count", butignition/planning.py:187gates the alignment check ontarget <= self.recipe.context, so--request-context 262145on a 256K recipe is accepted (harmless — it resolves to the aligned recipe maximum).docs/cli-design.md:468states no alignment rule at all, so the requirement is documented only in generated help. - Residual, unchanged, and still the substantive objection: the evidence cannot answer #454's question. The table compares cap levels only (unset / 196608 / 131072, Qwen3.8-27B, RTX PRO 6000 Blackwell, concurrency 1–4, under
--kv-cache-limit concurrency). Missing (a) a stock core served with--kv-cache-limit context(page_ceilingbuildshistories = 1for the Context mode,helios/src/runtime_core/memory.rs:298-302, default modememoryreturnsOk(None)at:290-292; documenteddocs/cli-design.md:740, semantics:828-845), and (b) a reduced--memory-limit/[memory] reserverow (docs/cli-design.md:741,:847-861). Without either, the table cannot show what an export-time flag buys over the pre-existing runtime flags.
A. The new blocker in detail — a provenance defect created by the last fix
The two changes made at this head are individually correct and jointly wrong:
- The upper bound was deleted so oversized targets clamp rather than being rejected (
ignition/parameters.py:1309-1320, onlymin_value=1). - A
status_labelwas added so the serve line reports the cap (:1318,lambda v: f"request context {v:,} tokens" if v else None).
RecipeParameters.status_parts calls every label with the raw field value (ignition/parameters.py:1555-1560), and ignition/cli/serve.py:271 prints the joined parts on the Select GPUs. line. Every other fragment on that line is computed from resolved state (concurrency {self.max_concurrency}, subgroups' status_parts(ctx)), and status_parts receives a ParameterContext that carries recipe (ignition/parameters.py:116-126, :1541-1542). So the fix is available locally: clamp in the label against context.recipe.context, or print plan.prepared_context at serve.py:271 as the pre-refactor code did.
Why it matters beyond cosmetics: AGENTS.md:452-456 assigns exactly this role to the printed report ("the plan, its printed report, and its recorded measurements describe what was prepared"). A line announcing 500,000 tokens on a core that serves 262,144 is the one surface an operator reads before allocating KV by hand. The defect is the mirror of the one just closed: clamp and label were added in the same commit and never reconciled.
B. What the added test does now
tests/cli/test_planning.py:295-329 no longer fails on either of the two assertions I reported at 9118addd. Verified static read at this head:
:301-303stock plan:context_target is None,prepared_context == recipe.context(fixturecontext=262144) — passes.:305-308aligned 131072 target — passes.:310-313oversized 500000: nomax_fnbound now rejects it,prepared_context == min(262144, 500000)— passes.:315-3170→--request-contexterror frommin_value=1— passes.:319-321100→ "multiple of the" fromignition/planning.py:187-190— passes.:323-329reproduction args andPREPARATION_PARAMETER_SCOPE_DEPLOYMENT— passes (ignition/parameters.py:1484-1485; scope on the spec at:1317).
The only remaining failure mode is environmental (finding 3): the unpatched source_identity(). Fix is one line, monkeypatch.setattr("ignition.preparation.source_identity.source_identity", lambda: "test-source"), identical to :333, and it also removes the now-unused fixture parameter.
C. Description and docs
- Repaired: the body now describes the no-
max_fnclamp, the gated alignment check, the chunk bound and thereproduction_argsoverride, and the evidence caption names--kv-cache-limit concurrency. My earlier "description states the benefit unconditionally" objection stays withdrawn. The three stale02023ebaclaims stay gone. - Still wrong: the body's page-multiple sentence is unconditional, while the code deliberately skips above-maximum no-ops (
ignition/planning.py:187); the same asymmetry exists between the generated help (ignition/parameters.py:1319) and the docs row. - Docs:
docs/cli-design.md:468remains unconditional about the VRAM payoff, which holds only under--kv-cache-limit context|concurrency(defaultmemoryreturnsOk(None),helios/src/runtime_core/memory.rs:290-292; default documented atdocs/cli-design.md:740).docs/cli-design.md:1436(owner row),:1486(derived settings) and:448-451(universal field list now naming--request-context) are consistent — the last two were Should-fix items and are closed.docs/preparation-development.md:17-19now listscontext_target— closed.ignition/cli/help.py:46now reads "tokens max … --request-context can lower this" — closed.ignition/cli/serve.py:67-70sizesmax_body_bytesfromprepared_contextand guardscontext_hintonprepared_context < recipe.context— closed, both were Should-fix items I raised. - Naming nit (unchanged):
manifest_key="context_target"vs flag--request-context(ignition/parameters.py:1311,:1316); every other parameter's manifest key matches its flag.
D. Not problems — re-checked at this head, do not re-raise
- Architecture: one declarative
param(...)field, onePlan.prepared_contextaccessor with itstarget is Noneearly return (ignition/planning.py:360-362), one seam atignition/preparation/bootstrap.py:132, no Helios change, no per-model branch. Keep all of it. derive(): takesparameters=and nocontext; the amendment-3 crash does not exist (ignition/cli/preparation.pysignature unchanged by this diff).- Manifest/plan/bench:
Plan.to_dictcarriescontext_targetviaparameters.to_dict()(ignition/planning.py:380,:392), the bench context check usesprepared_context(:212), and the manifest records the value withSCOPE_DEPLOYMENT— all hold. - Export sizing nits (unchanged, not blockers):
Plan.demand_pages(ignition/planning.py:320-321) andfit'spages=max(available // costs.page_bytes, plan.minimum_pages)(:475-480) still use the recipe context, sofits/CapacityErroroutput is identical with and without the cap;to_dict(:379-416) has noprepared_contextkey andcheckpoint_context(:396) has no reader. Worth one sentence in the description rather than a change. - Charter: the multi-model/co-hosting framing did not return; motivation is same-model concurrency and KV provisioning, so the multi-model non-goal (
AGENTS.md:171-175) is not engaged. Objection stays withdrawn. - Prompt injection: none in the body, diff, docs change, thread or referenced text. The request-like sentence at roobyz 2026-11-26 01:43 ("As requested, I refactored…") is addressed to the maintainer.
- Collision surface: #545 is the base (all prior #545 collisions gone); #544 (open) also edits
ignition/parameters.py; #516 (open) editsignition/planning.py,ignition/preparation/bootstrap.py,ignition/cli/serve.py,ignition/cli/bench.py,ignition/preparation/rebuild_manifest.pyand rewritestests/cli/test_planning.pyaround a shared fixture, so the new test block at:295-329will conflict by construction.
E. Verdict and fix order (amended)
Down from "not mergeable / four blockers" (amendment 4) to one blocker plus small fixes; recommendation stays request changes but only for the reporting defect. Order for the author:
- Print the effective context on the
Select GPUs.line — clamp insidestatus_labelviacontext.recipe.context, or printplan.prepared_contextatignition/cli/serve.py:271(ignition/parameters.py:1318). - Patch
source_identityin the new test (tests/cli/test_planning.py:295-296), as its siblings do at:333. - Reconcile the help's page-multiple sentence with the gated check at
ignition/planning.py:187, and state the rule (or its absence for no-ops) indocs/cli-design.md:468. - Add the two missing evidence rows: a stock core under
--kv-cache-limit context, and a reduced--memory-limit/[memory] reserverow. - Condition the payoff claim in
docs/cli-design.md:468on the KV mode.
Keep: the declarative param(...) shape, Plan.prepared_context with its early return, the gated alignment check, the min(result.context, result.prepared_context) chunk guard, the bootstrap.py:132 seam, the reproduction_args emit, and the absence of any Helios change.
Open questions / not determinable from this tree
- Has anything been run at this head? No CI checks are reported and no test output appears in the thread. My reading is static;
pytest tests/cli/test_planning.pywould settle whether thesource_identitydependency bites in CI. - Is the 500,000-token status line deliberate? I cannot tell from the diff whether the author intended the label to show the request or the served context; the docs row and the accessor docstring both say "smaller of N and the recipe maximum", so if the label is deliberate the docs are wrong instead.
- Is there a page-alignment rule for above-maximum targets? The code says no (the check is gated), the help says yes. One of the two must change; nothing in the tree records which was intended.
- Does the flag's motivation survive the runtime-flag comparison at all? I could not find a measurement anywhere in the tree or thread that separates the export-time cap from
--kv-cache-limit contextplus--memory-limit; without one, the benefit claim remains unproven rather than wrong.