Contracts, Charter & Verification Gates Audit — PR #698 @ 501bb0e
Scope of this lens: the 4 hard gates only (signed contract/core-format boundaries, vendored upstream deps / cross-PR conflicts, mandatory verification evidence, material scope/claim contradictions). Algorithm and lifecycle-correctness findings belong to the Code Correctness lens and are not repeated here.
Verdict
1 hard gate violated: Gate 3 (mandatory Layer‑1 verification for the affected crate). Everything else passes, with one material non-gate fact (the PR is fully superseded by merged #709) and one claim contradiction inside the same evidence line.
- Gate 1 — Signed contract / core-format / captured-graph / normative-doc boundaries: PASS
- Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS (no vendored fork, no unpinned dependency); superseded status recorded separately
- Gate 3 — Mandatory verification evidence: FAIL (one blocker, cited below)
- Gate 4 — Material scope / claim contradictions: one material finding, no scope bundling
Gate 1 — Signed contract, core-format, wire, captured-graph, normative docs: PASS
The diff (pr_diff, result 1) is 1 file, helios/src/server/runtime.rs (+65/−53). It adds no Protobuf field, no core-format enum or version, no wire kind, no captured-graph operation family, no new CLI flag or knob:
- The moved block is the pre-existing
crate::offload::open(prepared, gpu_cubins, copy_gate)chain, relocated from afterRankExecutor::newto before it; the only semantic edit inside it isexecutor.manifest().offload→manifest.offload. close_store(helios/src/server/runtime.rs:1137-1157) is the verbatim body of the existingWorker::close_store, extracted to a free function;Worker::close_storenow delegates (:1353-1355). No contract changes.- Because no captured-graph operation contract is added, the owner-approval requirement in
docs/design-review.md:22-25("Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso … A new operation contract requires approval even if it reuses a graph kind or enum value") is not triggered — no sign-off is outstanding on that axis. - No contradiction of
docs/scheduling-theory.md(not opened),docs/scheduling-runtime-design.md(not opened), ordocs/core-format-design.md(not opened): the change affects neither graph selection, pricing, timing estimation, cohort policy, nor any core-format field.docs/core-format-design.md(not opened) is untouched by the diff and the PR alters no exported artifact. - The doc for this exact ordering already exists on
mainand is consistent with the PR, not contradicted by it:docs/runtime-core-design.md:684onmainrequires the store to be opened "before constructingRankExecutorsocuModuleLoadDatafor embedded GPU codec" does not race the worker, anddocs/prefix-cache-offload.md:63onmainsays the same ("cuModuleLoadData) before starting the persistent worker graph"). Neither sentence is present onpr/698(verified:search_codeonpr/698for "before starting the persistent worker graph" → no matches), but that is a docs gap inherited from the branch point, not a contradiction of a normative invariant. Since the PR does not contradict a normative doc and no shipped default behaviour is altered beyond call ordering, no Gate‑1 violation.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored upstream fork. The diff touches no file under
helios/native/(e.g.roce_proxy.c(not opened)), nothird_party/, noTHIRD_PARTY_NOTICES.md(not opened), and no C/CUDA source. Nothing here mirrors an unmerged upstream PR. - No dependency or pin change.
helios/Cargo.tomlis unchanged by the diff; the existing git pins (helios/Cargo.toml:35-37,deepseek-recipeatrev = "70be62f30…") are untouched. No new external recipe dependency, no unlinked external PR dependency. - Cross-PR conflict — material, but a duplicate rather than a vendored/pin violation. #709 ("Unblock lossless KV compression across Ignition, selene-manager, and Helios Green Contexts", lukealonso) is merged (confirmed via
search_items, result 26) and has already landed this exact code onmain: the identical reorder block athelios/src/server/runtime.rs:760-794onmain(crate::offload::openat:782,RankExecutor::newat:798, with the same comment "open the host prefix store before …cuModuleLoadData") and the byte-identicalclose_storehelper atmain:1282-1302. So #698's one-file diff is already onmain, and #698 is behindmaininside the very hunk it edits. This blocks merging #698 (it is superseded), but it is not a Gate‑2 governance violation — no vendored upstream file is forked and no dependency is unpinned. Recommended disposition: close as superseded with credit to ebfio'scuModuleLoadDatadiagnosis (already credited onmainby PR number athelios/src/runtime_core/persistent_worker.rs:2939(not opened)).
Gate 3 — Mandatory verification evidence: FAIL (1 blocker)
Blocker 3.1 — The reported validation does not compile a single line of the diff
docs/design-review.md:180-184 makes Layer 1 mandatory for every affected Rust crate and names the exact form: "Run cargo test --locked --release on every affected Rust crate (… helios with --features runtime-core,server …)", and docs/design-review.md:247-251 removes the escape hatch: "Disclosure does not excuse skipping runnable CPU checks. … Leaving an applicable crate test … unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable."
The PR's reported validation cannot satisfy this:
helios/src/server/runtime.rsis gated#[cfg(feature = "server")] pub mod server;(helios/src/lib.rs:30-31).runtime-coredoes not implyserver:helios/Cargo.toml:21(runtime-core = ["dep:serde", … "dep:zstd"]) vshelios/Cargo.toml:25(server = [ "dep:serde", "images", "grammar", … "dep:deepseek-recipe"]). They are disjoint feature lists.- Therefore the stated Submission Validation —
cargo test -p flare-helios --features runtime-core("1243 passed; 0 failed; 37 ignored") — never compileshelios/src/server/runtime.rs, i.e. none of the +65/−53 is type-checked, let alone tested. - The stated "Suggested test command" —
cargo test -p helios --features runtime-core— additionally names a package that does not exist:helios/Cargo.toml:2isname = "flare-helios", so that command fails outright.
This is not a "no CI observable" artifact of my tooling; it is an affirmative, checkable defect in the PR's own evidence claim. The authoritative command that would cover the diff is the one CI itself uses (native-serving.yml:63 and :68: cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server, with FLARE_TEST_TEMPLATE_DIR and ulimit -l/prlimit per .github/workflows/native-serving.yml:58-63 (not opened)).
No earlier-round evidence rescues this (per the Round‑2+ calibration): I checked ## Case File History and pr_comments (result 2, two flare-autobot comments). The only recorded run is the --features runtime-core one above; no --release run with server, no check.py output, and no A/B benchmark appears in any round. The Discovery Dossier states it explicitly: "No fresh GPU startup reproduction was run for this submission."
Concrete fix: run and report
cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server
(passing FLARE_TEST_TEMPLATE_DIR and raising memlock as in native-serving.yml:58-63), then correct both commands in the PR body.
Why this is a real gate for this change (not pedantry)
- The changed file is exactly the crate/feature pair Layer 1 names, so the gate is not a stretch.
- The change is on a CUDA-ordering path:
docs/verification.md:14assigns "CUDA ordering, captured state, inactive rows, allocation stability, or resource lifetimes" to "Real execution tests on assigned GPUs", anddocs/verification.md:143-144repeats "Changes to actual GPU execution or lifetime behavior require the real execution path." The PR's own property claim (module load must precede persistent-worker launch) is a CUDA-ordering property. Under principle 12 (docs/design-review.md:106-115) the disclosure that the GPU repro was not re-run is honest but does not substitute for the CPU layer — and the GPUbefore/after(>400 s→0.6 s,1.239–1.259×,3.6 sdrain) was captured on the previous head9ed34da, before theclose_storerefactor in501bb0e, so it does not describe the code under review. - The hardening obligation is real because the PR rewrites three failure paths whose discharge contract is already unit-tested:
helios/src/server/runtime/phase_tests.rs:2288(shutdown_retains_the_store_when_its_drain_fails),:2319(…without_closing_when_the_executor_did_not_drain),:2341(…when_its_drain_panics). Those tests exist and would catch a regression in the extractedclose_store— but they are inside theserver-gated module, so the reported run never executes them either.
Layer 3 (TLA+ / Kani) — correctly not triggered; recorded so the omission is not mistaken for a skip
docs/design-review.md:212-215 requires python3 verification/helios-lifecycle/check.py when changing "admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering or ownership, offload aggregation, readiness, or rank coordination." The PR changes none of these:
- No scheduler, admission, fence, generation, cancellation, speculation, cache-compaction, or snapshot-alias code is touched.
- No response buffering/ownership code is touched (
ResponseLifecyclemaps toModelRuntime::generate_many,Incoming,Generation— unchanged). - No rank-coordination code is touched:
helios/src/execution/threaded/protocol.rs(not opened),parallel.rs(not opened),threaded.rs(not opened) are untouched, so the mandatory multi-GPU collective gate atdocs/design-review.md:252-259does not apply. - "offload aggregation" in that list is the multi-rank offload reply aggregation protocol (
verification/helios-lifecycle/README.md:10,:218-230), notoffload::openstartup ordering. - No completion-vector validation, prepared completion contract, state-view extent arithmetic, or sequential validator is modified, so Kani (
docs/design-review.md:221-225) is not triggered. - No new or changed safety guard, so
--mutations(docs/design-review.md:226-228) is not triggered.
Note that verification/helios-lifecycle/check.py:318 itself builds with --features server, so that run would have recompiled the diff. It is not required by the trigger list, so I do not raise it as a blocker — but it is the cheapest available substitute if maintainers prefer it over the full crate run.
Failing tests / failing CI: not reported — not flagged
The description reports 1243 passed; 0 failed; 37 ignored, and the Dossier reports no failing check. Per the calibration rules I am not flagging "no CI run observable."
Gate 4 — Material scope & claim contradictions: one material finding
Finding 4.1 (material) — Two claims in the PR description are contradicted by its own diff
- Evidence claim. "Suggested test command:
cargo test -p helios --features runtime-core" and "cargo test -p flare-helios --features runtime-core … 1243 passed" present a green suite as validation of this change, but as shown in Blocker 3.1 that suite excludes the modified module and the suggested package does not exist. Underdocs/design-review.md:150-160the evidence part of the description must connect to the claim; here the stated evidence is provably disconnected from the diff. - "What changed" claim is stale versus the head. The Changes section describes "Add LIFO cleanup on all early-error paths after
storeopens (store.close()directly ifRankExecutor::newfails;executor.close()first, thenstore.close()only whenshutdown.drained…)". Those ad-hoc blocks and thestd::mem::forget(store)retention mechanism no longer exist at501bb0e: the diff replaces them with the singleclose_storehelper and routes all three sites through it (helios/src/server/runtime.rs:703,:716,:780), andWorker::close_storedelegates (:1353-1355). Principle 16 requires the description's "what exactly changed" to be accurate, and a reader "must not need the diff … to reconstruct the argument."
This is a description-accuracy defect with a real governance basis (principles 12 and 16), not a phrasing nuance: it misdescribes the code under review and mis-attributes the evidence. Fix: rewrite the Changes and Verification sections against 501bb0e, state that the diff is superseded by #709, and link #701 as the follow-on.
Not flagged (deliberate)
- No scope bundling. +65/−53 in one file; no unrelated tooling, no vendored blobs, no new standalone scripts.
- No
docs/TODO.txtbookkeeping requirement, and none flagged. - No unobservable-CI flag, as above.
- Discord contact present (
Discord: ebfio), satisfyingdocs/design-review.md:163-169— no nit. - No charter violation on root-causing. The change fixes call ordering rather than swallowing/retrying the failure, matching
docs/design-review.md:143-146and the Charter's "Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error" (#397). It is one file, no per-model branch, no new flag — consistent with "keep the runtime small and model-agnostic" and "smallest footprint in shared code." - Informational overlap with neighbouring work (open #723 extending codec Green Contexts, #729 editing other regions of
runtime.rs) touches different hunks and is noted only asInfo: neither is a Gate‑2 dependency or pin.
Required actions to clear this lens
- Gate 3 (blocking): run and report
cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server(withFLARE_TEST_TEMPLATE_DIRand the memlock setting from.github/workflows/native-serving.yml:58-63(not opened)); correct the Suggested command to drop the nonexistent-p heliospackage. Alternatively, re-run the GPU ordering observation against501bb0eand the CPUserver-feature suite, sincedocs/verification.md:14classifies this property as CUDA ordering. - Gate 4 (should fix): rewrite the Changes and Verification sections against head
501bb0e— drop the removed ad-hoc cleanup /store.close()-directly /mem::forgetdescription, describe the singleclose_storehelper and its three call sites, and attribute evidence honestly. - Disposition (governance, not a gate): since merged #709 already contains this diff on
main(helios/src/server/runtime.rs:760-794,:1282-1302), the soundest close is "superseded by #709," explicitly crediting ebfio'scuModuleLoadDatadiagnosis and linking the P1 follow-on #701. Landing #698 after a rebase would add no code beyond comment wording.
No vendored-file or signed contract/core-format gate violations. One mandatory verification gate violation (Blocker 3.1) and one material claim contradiction (Finding 4.1).