Contracts, Charter & Verification-Gates Audit — PR #708
Scope: hard governance only (docs/design-review.md, AGENTS.md), contract boundaries, vendored upstream files, mandatory verification gates, and material claim/scope contradictions. No algorithm-correctness review.
Verdict: no blocking contract, wire, vendored-file, or scope violations. Two genuine open items, both narrow and both related to weakened/undemonstrated guarantees — not to format or scope.
Gate 1 — Signed core-format / wire / captured-graph / public-contract boundaries: PASS
- No core-format or wire change.
pr_filesis exactly 7 files:helios/src/model.rs,helios/src/model/admission.rs,helios/src/model/tests.rs(not opened),helios/src/server/runtime.rs,helios/src/server/runtime/phase_tests.rs(not opened),ignition/components/vision_state.py,tests/components/test_vision_state.py. No.proto, nohelios/src/model/contract.rs, noCargo.toml(not opened)/Cargo.lock. No newValueSource/GraphKind/HistoryKindmember, no newModelContractfield, noSupports*flag — the new entry points are Rust functions (validate_continuation_prompt_data,Admission::from_continuation) with the old names kept as delegating wrappers (helios/src/model.rs:406-408,helios/src/model/admission.rs:72-74,122-137). - No captured-graph operation family added, so principle 1's owner-approval clause is not triggered. The description explicitly declines the one path that would have needed it (no
GrammarMask/GrammarEnableddecode mask). - Existing cores still load from the format's perspective: nothing in the diff changes how a core is read, validated structurally, or bound. Contract-version and signature checks are untouched.
- No contradicted normative document. I searched
docs/for the invariant the PR relaxes:bijection,validate_prompt_data,Admission::from_prompt,prompt validation,vision_token_indices,feature_token,ImageSpan,image_token,VisionState— no match anywhere indocs/(onlydocs/api.md(not opened) user-facing image-budget text). So the Discovery Dossier's open question 6 answers itself: no design doc states whole-prompt strict bijection, so there is no contradicted normative doc left stale and no doc that this PR must update to stay coherent. This is aNo blocker / no doc-gatefinding, not a TODO.txt nit. - The change actually implements documented behavior rather than contradicting it.
docs/core-design.md:486-489already specifies: preempted requests "are readmitted with its history ... Shared handling extends text-position and image-index metadata for generated tokens before readmission," anddocs/core-design.md:1620-1639("Multimodal identity") says "A sequence of image-placeholder token IDs alone is insufficient to identify model state" with canonical positions, dependencies and feature indices describing the prompt. The PR's continuation rule (positions extended,vision_token_indices == -1, in-vocabulary only —helios/src/model.rs:427-448) and its index-drivenVisionStateare the code-side realization of exactly that text. Atomic-span invariants indocs/scheduling-runtime-design.md:342,418,503concern prefill-chunk boundaries and frontend-declared spans, which remain scoped to0..initial_prompt_tokens(helios/src/model.rs:468-487), so they are not violated. - One governance weakening worth a maintainer decision (Minor, not a format/contract violation).
VisionState.__init__now takesimage_token=Noneas a default (ignition/components/vision_state.py:26) and skips the token-id cross-check entirely when it is unset (:45-46). That is a silent, default-off suppression of a validation check for any future caller that omits the keyword, andvalidate_prefillnow also acceptsindex == -1on a token that is the image token (:43-46) — an image whose index was lost is treated as text rather than rejected. AgainstAGENTS.md:182-186("Reject weakened guarantees ... Do not remove validation") and principle 3's rejection of "default-false opt-ins" (docs/design-review.md:58-61) and principle 15 (:135-146), the recommended repair is to makeimage_tokenrequired again, or to reject a visual-layout core that leaves itNone, keeping the index-driveninject(:51-61) as-is. In-tree blast radius is currently zero (image_token=appears only intests/components/test_vision_state.py:18,40,56,82;VisionStatehas no other in-repo consumer), so this is a forward-looking contract-tightening request, not a shipped-default break.
Gate 2 — Vendored upstream dependencies and cross-PR dependency pins: PASS
- No vendored upstream file is touched:
helios/native/roce_proxy.c(not opened) and every otherhelios/native/*path are absent frompr_files. No.patch, no forked upstream C source. - No dependency change at all (no Cargo manifest or lock file in the PR), so the pin-everything rule is untouched.
- No hard dependency on an unmerged external PR or a
local-inference-lab/hyperflare-recipescommit. The only external coupling is the operational statement that legacy token-keyed cores need re-export, which is the normal recipe workflow described inAGENTS.md:382-396, not a build- or merge-order dependency. Info only: the "9 VLM recipes" population and theimage_token=call sites live in that external repository and cannot be counted or checked from this repository; the claim is unverifiable here rather than false.
Gate 3 — Mandatory verification evidence: one substantive open item
Layer 1 (crate unit/contract tests, --release) — satisfied.
- Author reports
helios --features runtime-core,server --lib1,837 passed / 47 ignored / 7 failed,flare255/0,flare-cli246/0,heliopause229/0, targeted continuation/worker run 4/0, Pythontests/components/test_vision_state.py5/0 andtests/components+tests/cli336/56 skipped. - Those 7 reported failures are environment artifacts, not failing tests, and I explicitly do not flag them.
.github/workflows/native-serving.yml:28-31(not opened) generates the template fixtures and:59,67,72,76exportFLARE_TEST_TEMPLATE_DIR, which accounts for the 6 template failures;:61-62(ulimit -l,prlimit --memlock=67108864) accounts for the singleengram::readermemlock failure, which the author also re-ran clean (helios/README.md:170(not opened) confirms those tests panic when the variable is unset). The Discovery Dossier's concern that this diverges from peers' "0 failed" is therefore resolved from the workflow file, not a gate failure. - The Python suite choice matches the affected component (
tests/components).
Layer 3 (verification/helios-lifecycle/check.py) — satisfied.
- The change does touch admission/readmission, cancellation (
self.scheduler.cancel(handle)?) and worker lifecycle, so the TLA+ + trace-conformance gate applies. The author reportspython3 verification/helios-lifecycle/check.py --tlc-jar … --target-dir flare-cli/targetpassing all models —Lifecycle1,710 edges,RankProtocol1,291,DispatchRing7,940,OffloadTransfer8,490,CacheOwnership222,817,Speculation13,566,ResponseLifecycle365,508,CheckpointReservation68,RankDispatch— plus 12 concurrency/lifecycle regressions. Checking prior rounds/comments (pr_comments: only the case-file notice) shows no contradicting evidence. - The response-ownership invariant the change touches (
ResponseLifecycle) and the runtime-admission mutation fixtures are in that catalog, so the run covers the right models.
Kani — satisfied, not missing.
helios/src/model/kani_proofs.rscoversvalidate_completiononly; there is no prompt-validation harness onmain, so the change creates no new proof obligation for an unharnessed function. More decisively,.github/workflows/helios-lifecycle.yml:36-47(not opened) runscargo kani --manifest-path helios/Cargo.toml (not opened) --features runtime-core --libon every PR touchinghelios/**(:5-6), and CI passed on4fee325. The author's local "Kani not installed" disclosure is not a skipped gate.
Mutation testing — Info, not a blocker.
check.py --mutations(catalog atverification/helios-lifecycle/check.py:417-677) targets scheduler, cache-memory, offload-transfer, dispatch-ring and runtime response-admission invariants. None of the changed lines (Worker::admiterror isolation,validate_continuation_prompt_data) are in that catalog, so running--mutationswould not have exercised the new guards;cargo-mutantswas not installed. Honest disclosure, no reachable CPU gate skipped. Optional hardening for the maintainer: calibrate a mutation againstworker_admit_isolates_admission_and_stop_matcher_failures_without_killing_worker(helios/src/server/runtime/phase_tests.rs:9326(not opened)) andcontinuation_prompt_validation_permits_decoded_in_vocab_image_and_span_tokens_only_after_initial_prompt(helios/src/model/tests.rs:2461(not opened)).
Open item (Major, disclosed in the description): principle 13's "Validate previous cores through loading and serving" was not performed.
- The load-bearing compatibility claim — that legacy token-keyed cores still load unchanged and, when they must re-prefill an unindexed decoded feature token, fail only that request with
ExecutionError::Device { code: 32 },active = False, no embedding corruption and no worker termination — is reached by reasoning fromVisionState's GPU-sidevalidate_prefilland fromcatch_unwind/worker_healthhandling. Noflare runserving, no legacy-core replay, no checkpoint-backedimage_admissionrun, and no GPU test was done.docs/design-review.md:116-123andAGENTS.md:435-448both call for previous cores to be validated through loading and serving, anddocs/design-review.md:110-115requires actual Helios service measurements for served-path claims. Because the PR relaxes acceptance for cores that already exist and asserts a specific clean-failure mode for them, this is the one gate that remains genuinely open. It is not waivable by disclosure (:247-251) but it is also not runnable without a GPU and checkpoint, so the correct disposition is: merge-blocking only if the maintainer wants the compatibility claim to stand as stated; otherwise the description's compatibility paragraph should be downgraded to "expected, not measured." No transcript, log, or artifact for that behavior exists in the diff.
No performance claim is made anywhere in the description, so no main-vs-branch served-workload A/B benchmark is required (docs/design-review.md:106-115 applies to performance claims only).
Gate 4 — Material scope / claim contradictions: PASS
- Every named artifact exists at the stated place. Verified in the tree at head:
helios/src/model/tests.rs:2461(not opened)continuation_prompt_validation_permits_decoded_in_vocab_image_and_span_tokens_only_after_initial_prompt;helios/src/server/runtime/phase_tests.rs:9035(not opened)vlm_feature_token_survives_preemption_and_thinking_budget_readmission,:9217vlm_feature_and_span_tokens_survive_grammar_transition_readmission,:9326worker_admit_isolates_admission_and_stop_matcher_failures_without_killing_worker;tests/components/test_vision_state.py:77test_unindexed_feature_tokens_remain_text_during_validation_and_injection,:128test_index_only_vision_state_without_image_token. The production changes described all appear:Admission::from_continuation(helios/src/model/admission.rs:137-161), the continuation validator (helios/src/model.rs:414-493),initial_prompt_tokensfromCarried::prompt_tokensand the three isolated error paths (helios/src/server/runtime.rs,Worker::admithunk), andself.admissions[slot]written only after all three constructions succeed. Nothing promised is missing; nothing material is done that is omitted except the two weakenings already covered under Gate 1 (theimage_token=Nonedefault andindex == -1on an image token). - No bundling of unrelated tooling. +736/−56 in 7 files, of which +564 is tests. No new scripts, harnesses, or generated artifacts.
- Diff-viewer extra files are a stale-base artifact, not hidden scope. The viewer shows
AGENTS.md,docs/*,flare-cli/src/*andpreserve_message_anchorfields (e.g.helios/src/server/runtime.rs:47-52,helios/src/server/request.rs(not opened)) as added; those are #697's merged interior-anchor work re-shown by a stale base.pr_files(7 files) is authoritative. Info only. - No agent-directed instructions appear in the PR body or comments; the body follows the required why / what / claimed result / evidence order (
docs/design-review.md:147-162), givesDiscord: lukealonso(:163-169), and discloses unrun checks (:106-115).Design-Signed-Off-Bytrailers are not observable through my tools, so I make no finding either way. - Overlap with open #483 (
helios/src/model.rsspan validation) and #621 (Worker::admit) is textual-rebase risk on unmerged PRs, not a governance gate. Info / Nit.
Findings summary
| # | Gate | Finding | Severity |
|---|---|---|---|
| A | 3 | Principle 13 "validate previous cores through loading and serving" not performed: the legacy token-keyed core compatibility claim (ExecutionError::Device { code: 32 }, clean single-request failure) is reasoning-only — no flare run, no legacy core replay, no GPU/checkpoint image_admission run |
Major, open (disclosed; not runnable without a GPU) |
| B | 1 / governance | VisionState(image_token=None) defaults off the tokens == image_token cross-check, and index == -1 on an actual image token is accepted as text — a silent validation weakening (AGENTS.md:182-186; principles 3 / 15) |
Minor, request change (make image_token required or reject None for visual layouts) |
| — | 1 | No proto / core-format / enum / captured-graph / ModelContract change; no contradicted normative doc (docs/ contains no whole-prompt-bijection statement) |
No violation |
| — | 2 | No vendored upstream file, no dependency change, no unmerged-PR pin dependency | No violation |
| — | 3 | Layer 1 crate + Python tests run; the 7 reported helios failures are explained by native-serving.yml:28-31,59,61-62; TLA+ conformance run reported; Kani runs in CI (helios-lifecycle.yml:36-47) |
Gate satisfied |
| — | 3 | Mutation testing not run for the new guards (--mutations catalog does not cover the changed lines) |
Info |
| — | 4 | All six named tests present at the stated lines; stale-base diff noise explained; no fabricated evidence | No violation |
No contract, wire, vendored-file, or material-scope blocker. Code-format and public-contract boundaries are intact; the two items above are (A) one verification gate that cannot be closed on this host and should either be run on GPU or have its claim downgraded, and (B) one default-off validation weakening that should be removed before merge.