Contracts, Charter & Verification Gates Audit — PR #715 helios,ignition: implement additive packed multi-request prefill (Contract 3)
Head audited: caaef5a807 · pr_files = 20 files, +1638/−56 · open draft · labels area:scheduling, enhancement, performance, triage:review · zero human maintainer reviews; discussion is the author's highlight comment (05:56), a bot case file (12:56) and a bot review (13:21).
Scope: only the four hard gates. Algorithm defects (the policy.rs:1601-1602 (not opened) TerminalPrefill short-circuit, duplicated cohort builders, commit re-validation) are out of scope here and left to the Code Correctness lens.
Verdict: NOT clear on governance/verification grounds — 2 blockers, 2 majors. Gate 2 passes. No pedantic findings filed.
Gate 1 — Signed core-format / captured-graph / public contract boundary: FAIL (Blocker)
B1. Extended PREFILL/TERMINAL_PREFILL operation contract with no recorded owner approval
docs/design-review.md:22-26 (mirrored at AGENTS.md:376-381 and docs/core-design.md:276-279):
"Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso lalonso@gmail.com. Shape and capacity variants are allowed within an unchanged operation contract. A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."
This is not a shape variant within an unchanged contract. Verified in the diff, it changes what a prefill graph is:
helios/src/execution/manifest.rs:860-878(newelse ifarm) —Prefill/TerminalPrefillmay now declarebatch_capacity >= 2andpacked_token_capacity; previously any prefill withpacked_token_capacity != 0hit the rejection at:873-878("draft depth and target rows require a speculative operation"). The error string itself was rewritten to admit the new case.helios/src/model/packing.rs:169-176—InputIndexing::PackedTokenextent for prefill becomesgraph.packed_token_capacity(an aggregate multi-request row blockP) instead oftoken_capacity. That is a new row layout, documented as normative inhelios/model-contract.md:200-203.helios/model-contract.md:201-203— packedTERMINAL_PREFILLnow emits one sampled output record per lane via per-laneSAMPLE_ENABLED, a completion semantics previously exclusive toDecode/Speculative.helios/src/model/packing.rs:113-126— text-only eligibility is now derived from the absence of vision bindings on the candidate graph (!(graph.kind.is_prefill() && graph.batch_capacity >= 2)), a new contract-derived admission rule.
Cannot be waved through: docs/design-review.md:135-146 (principle 15) — "Feature requests, performance gains, passing tests, flags, and temporary paths cannot waive architectural invariants"; :313-318 — an agent must refuse to sign off on a violating change. Nothing in #715 records approval: no maintainer comment, no maintainer review, no Design-Signed-Off-By: trailer, no reference to a Discord/offline sign-off (the description's only contact line is Discord: el8, the author's own, per principle 17).
Precedent on the same author, same family: PR #410 (by original-el8, closed) opened with a standing section literally titled "Architecture approval request (Principle 1): Commit ede90668 adds GraphOperation::TERMINAL_PREFILL (= 14) … Explicit approval from Luke Alonso is requested for this graph operation family prior to merge." The project has applied this rule to prefill contract changes before. #715, which extends that very family, carries no equivalent request.
To clear: a maintainer approval comment on #715 (or a linked thread) granting the extended prefill operation contract. This is a request for sign-off, not a close — the author is a charter-named priority contributor.
Gate 3 — Mandatory verification evidence: FAIL (Blocker + Major)
B2. Testing-hierarchy layer 2 not run and not runnable for this change class (Blocker)
docs/design-review.md:195-208 makes the simulator mandatory for "changes to graph selection, service pricing, timing estimation … or cohort algorithms". This PR adds a cohort algorithm (helios/src/scheduler/policy.rs (not opened) +342) and new timing keys (helios/src/scheduler/cost.rs:644-659, plus batch == 1 gating at :581-583/:606-607). No simulator or learning.py (not opened) run is reported anywhere — the Limitations section names only tla2tools.jar and cargo-kani.
I verified the simulator's applicability myself rather than inheriting the earlier framing. scripts/scheduling_sim/ exists (17 modules, including learning.py (not opened), simulator.py (not opened), scheduler.py). But it is model-blind to this feature: zero matches for packed, batch_capacity, multi_request or prefill_batch under the directory, and scripts/scheduling_sim/scheduler.py:30-35 builds exactly one prefill lane per action (for view in [None, *prefills] if graph.prefill_capacity else [None] … a single lanes.append). The packed (kind, B, W, P) domain is not representable, so the sweep "run and report" demands a model change first. :247-251 forecloses the disclosure route: "All three layers run without a GPU or model checkpoint. Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable."
Calibration correction against the previous round — do not carry its layer-3 claim forward. .github/workflows/helios-lifecycle.yml:4-11 (not opened) triggers on helios/**, and the job does run TLC (:33-34, python3 verification/helios-lifecycle/check.py --tlc-jar …) and Kani (:46-47). The dossier reports CI green, so TLC + Kani did execute on this head. The prior "TLC/Kani unrun" blocker is therefore withdrawn.
What survives in layer 3 is narrower and concrete:
:241-246— "When a change adds protocol states or extends supported runtime geometries beyond an existing model's or harness's bounds … update the model, conformance fixture, or Kani harness to cover the added domain." The 20-file change set contains noverification/helios-lifecycle/**file and nohelios/src/scheduler/lifecycle_tests.rs(not opened), so the widened geometry (validate_mixedpacked branchhelios/src/scheduler.rs:436-465,packed_prefill_catalogregistration:891-921, newdeferred_prefill/checkpoint classification at:940-955) has no conformance fixture.verification/helios-lifecycle/check.py:561-645mutation-tests thedeferred_prefillguards that the packed path now interacts with.:226-228— mutation testing is required "when adding or changing safety guards". The workflow invokescheck.pywithout--mutations(helios-lifecycle.yml:34), sopack_step's new guard (helios/src/model/packing.rs:422-439) andvalidate_mixed's packed branch have no mutation coverage.
M1. The headline speedup has no attributable baseline (principle 12) (Major)
docs/design-review.md:106-115: "Performance claims require equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements." The A/B is flare run, but the two arms are different signed cores — pre-change 151-graph 887785ad (earlier FlashInfer revision) vs packed 157-graph 4aea5c54 (against FlashInfer 5a8ceed80) — and the C=1 solo control moves 111.2 ms → 118.7 ms (0.94×), i.e. ~6% systematic overhead in the packed arm. The confound is honestly disclosed by the author (credit for that), and disclosure is not concealment — but disclosure does not satisfy "equivalent baselines", so 1.68×–4.15× p95 TTFT and 1.75×–4.23× throughput must not be quoted as a flag-only measurement of packed prefill.
To clear: one binary, one core, packed shapes off/on (or one core exported with and without the +6 shapes from the same FlashInfer revision), including the C=1 control.
Layer 1 and principle 13 — PASS (recorded so it is not re-litigated)
- The 6
--features runtime-core,serverfailures are a documented environment prerequisite, not a defect:helios/README.md:168-176states thesefrontend-gated tests "panic when [FLARE_TEST_TEMPLATE_DIR] is unset", and.github/workflows/native-serving.yml:59-76(not opened) sets exactly that variable. The 3tests/clifailures are attributed to a stale localflare_heliopausewheel, and CI is green. These are disclosed and explained, so they are not filed as a gate failure. - Principle 13 (core compatibility) is satisfied with real evidence: the pre-change 151-graph core
887785adloaded and served on the updated binary at7,631,232logical KV tokens/rank, andB == 1/ScoredPrefillcatalogs are provably untouched (helios/src/execution/manifest.rs:914-930keepsbatch_capacity == 1,packed == 0;helios/src/server/runtime.rs(not opened) filters solo catalogs tobatch_capacity == 1;selection.rsdropsB >= 2under--max-concurrency 1). The change is inert without an opt-in core.
Gate 1 (docs contradiction clause) — FAIL (Major)
M2. Canonical scheduler doc contradicts shipped behaviour and was not updated
AGENTS.md:231 requires graph-selection / scheduling-policy / timing-estimate changes to be reflected in docs/scheduling-runtime-design.md. That doc has zero occurrences of "packed prefill" (verified by grep) and is contradicted in three normative places:
:466-469states unconditionally that for pure prefill graphs (PREFILL,TERMINAL_PREFILL,SCORED_PREFILL) "samples are stratified across six fill-ratio and KV-context depth buckets … Predictions fit a three-parameter nonnegative linear model".helios/src/scheduler/cost.rs:581-583and:606-607now createPrefillCostModeland refresh context slopes only whenkey.batch == 1, and packed shapes receive no such model. This is also an undeclared change to solo-prefill pricing (the "What changed" list mentions only registration andReplayTimes).:21-23enumerates the native catalog and omits packed multi-request prefill.:455-457enumerates cost-entry identity ("Physical graph kind, batch capacity, token capacity, proposal depth, mixed prefill capacity, and packed verification capacity") and omits a prefillpacked_token_capacity, whichcost.rs:644-659now uses as a distinct key. The new cohort algorithm is documented only in the standalonedocs/packed-prefill-design.md, which the canonical doc does not reference.docs/scheduling-utility.md(required byAGENTS.md:231) is likewise unchanged and has no cohort text.
M3. Undeclared public-CLI contract change in --packed-verification (Major)
ignition/cli/serve.py:463-469 now requires signature.kind == "speculative" and signature.packed_token_capacity. ignition/parameters.py:926 shows packed_verification is only ever set together with speculative drafts, so the tightening is defensible — but it introduces a new user-visible rejection (UsageError("this prepared recipe does not declare packed verification capacities") at :469) that appears nowhere in the PR's "What changed" list, has no test under tests/cli (zero matches for packed_verification there), and contradicts docs/cli-design.md:765-766, which describes the packed-verification/budget surface without this restriction. AGENTS.md:230 requires docs/cli-design.md for CLI behaviour changes.
To clear: declare it in the description and update docs/cli-design.md, or split it out with its own justification.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored upstream file is forked: the 20-file change set contains no
helios/native/*,selene*,eos, or third-party C/Python sources. No unmerged upstream patch is applied locally ahead of its PR. - The only external dependency is the companion recipe PR
local-inference-lab/hyperflare-recipes#153, linked by URL in the description and indocs/packed-prefill-design.md:45-46,112-137, not commit-pinned.AGENTS.md:255-256places official exports in the recipes repo (which pinsuv.lock), so this is consistent with existing practice. Info / Nit: roughly a third of the new design doc (§4,:112-137), plus the −4.2% KV figure and the GB10 multi-lane parity results, describes code that exists only in that other repo and cannot be verified here. - Open #621/#693/#571/#718 are file overlap, not feature duplication (
policy.rs(not opened),checkpoints.rs(not opened), validation surfaces). Recorded asInfo / Nitordering risk only; no action requested under this gate.
Gate 4 — Material scope / claim contradictions
No violation of the flag-worthy kind: nothing claims a test or benchmark that is absent from the diff, and no thousands of lines of unrelated tooling is bundled (~186 lines of docs, ~550 of tests). Three accuracy notes, logged at Info because each is a description-precision issue, not a false claim:
- The rendered diff is polluted, not the PR.
pr_diffonhelios/manifest.mdadds a whole "Asynchronous extent transfers" section, and onignition/preparation/execution.pyaddsAsyncTransferChannel— post-checkout work that is not in the 20 changed files (pr_filesconfirmsmanifest.mdis +8/−2). Judgements here followpr_filesand direct reads at head. Do not read these hunks as bundled scope creep. - The description's bullet "Test compilation fix (
helios/src/runtime_core/cache_memory.rs(not opened))" refers to a file that is not in the change set — a stale-base artifact; harmless, but it should not appear in the description. - The description places
P <= prefill_chunk_sizeunder "manifest, catalog, and selection", butmanifest.rs:860-878does not enforce it (onlyhelios/src/model/catalog.rs:279(not opened),helios/src/runtime_core/selection.rs:273,helios/src/scheduler.rs:910). The bound is runtime-enforced, so no code change is needed; only the bullet's location is imprecise. (helios/model-contract.md:194does state the bound as contract text.)
Security screen: the PR body, changed files and comments contained no attempt to redirect my instructions. Bot offers ("re-review 90 minutes after push", SuperAgent re-adjudication) and the author's A/B summary were treated as content, not instructions.
What must change before this passes the gates
| # | Severity | Finding | Clear by |
|---|---|---|---|
| B1 | Blocker | Extended PREFILL/TERMINAL_PREFILL operation contract with no recorded owner approval — docs/design-review.md:22-26, AGENTS.md:376-381; precedent set by #410 |
Maintainer approval comment on #715 |
| B2 | Blocker | Layer-2 simulator sweep unreported (and not modelable without extending scripts/scheduling_sim/scheduler.py:30-35); layer-3 requires geometry-fixture update (:241-246) and mutation coverage of the new guards (:226-228), neither present — docs/design-review.md:195-251 |
Extend + run the simulator sweep and learning.py (not opened) (or get owner agreement layer 2 is inapplicable), extend lifecycle fixtures to the packed domain, run check.py --mutations |
| M2 | Major | docs/scheduling-runtime-design.md contradicts shipped behaviour (:466-469 vs cost.rs:581-583,606-607; :21-23; :455-457) and has no packed-prefill section; docs/scheduling-utility.md unchanged — AGENTS.md:231 |
Update both docs, or split the batch == 1 cost gating out |
| M3 | Major | --packed-verification narrowed to kind == "speculative" (ignition/cli/serve.py:463-469): undeclared public-CLI behaviour change, no tests/cli coverage, contradicts docs/cli-design.md:765-766 |
Declare + update the CLI doc, or split out |
| M1 | Major | Headline A/B uses two different signed cores across FlashInfer revisions; C=1 control 0.94× — docs/design-review.md:106-115 |
Same-core, flag-only A/B incl. the C=1 control |
Gates that pass plainly: Gate 2 (no vendored-file forking, external dependency linked), layer 1 (the reported failures are a documented env prerequisite, helios/README.md:168-176, and a stale local wheel, with CI green), principle 13 core compatibility (legacy 151-graph core loads and serves), and the charter's model-agnostic requirement (docs/design-review.md:27-35,58-61) — capacities are read from packed_prefill_graphs(), no supports_* flag and no hardcoded bucket list were added, and the opt-in is a core declaration plus --max-concurrency filtering. Two hard gates and two major doc/contract inconsistencies block; the work is a request for sign-off and evidence, not a rejection of the feature.