Gates and contracts report · NVIDIA/hyperflare-inference #729

Raw Markdown for agents: https://autobot.eidonix.com/p/4324f360-095e-416d-b952-bd44d99efbd9.md

Contracts, Charter & Verification Gates Audit — PR #729

Scope: only the 14 files in pr_files (the local base is stale, so a raw pr_diff over-reports; hunks for checkpoints.rs (not opened), server/request.rs (not opened), RowRestoreLatency, attach_async_transfers, preserve_message_anchor, snapshot_discovery belong to already-merged #655/#659/#674/#697/#709 and are excluded from this audit).


Gate 1 — Signed core-format / wire / captured-graph / public contract boundaries: CLEAR

No new operation contract, enum value, wire kind, or Protobuf field:

The docs/design-review.md:22-25 owner-approval rule for "introducing a captured-graph operation family" / "a new operation contract" is therefore not triggered, and docs/design-review.md:34-35 (no hardcoded batch-capacity or graph-shape enumeration) is respected — the branch condition is config.speculative_widths.is_empty() and a contract-derived scan (sampling_graphs_bind_grammar_enabled, runtime.rs:~509), not a hardcoded list or model name.

Normative-doc consistency (part of Gate 1): docs/scheduling-runtime-design.md is updated in the same PR for the Mixed stratification change (lines 460-490 region), so no docs/scheduling-theory.md or docs/scheduling-runtime-design.md invariant is contradicted silently. docs/core-design.md:1726-1735 and docs/api.md:781-789 (native replay loop, "two-frame pipelining … transitions to device-masked decoding at MTP width one with one step in flight") remain consistent with the new Worker behavior. docs/scheduling-runtime-design.md:252,278 still say parity service rates "exclud[e] MIXED durations", which the PR does not change.

Informational only, not a gate finding: docs/prefix-cache-offload.md:96-100 still describes the GPU-codec CPU fallback without the new gate-before-mutex ordering. That is a present-state doc omission, not a contradicted normative invariant — but it should be reconciled before merge.


Gate 2 — Vendored upstream dependencies & cross-PR conflicts: CLEAR

All 14 changed paths are helios/src/** plus docs/scheduling-runtime-design.md. No helios/native/*.c (e.g. roce_proxy.c (not opened)), no Cargo.toml (not opened)/Cargo.lock, no .cu/PTX, no Protobuf, no external recipe or unmerged-PR dependency, no new dependency to pin. original-el8's #715 and #710 touch the same cost.rs (not opened) gating sites, but that is a textual merge conflict risk, not a vendored-fork or unpinned-dependency gate violation — the PR's own branch is self-contained.


Gate 3 — Mandatory verification evidence & failing tests

3a/3b. Layer 2 and Layer 3 gates: THREE BLOCKING OMISSIONS

(1) BLOCKER — new lifecycle state added without extending the TLA+ models or conformance fixtures. This PR adds a genuinely new request-lifecycle state and three new transition entry points:

A search over verification/ for paused_for_park|pause_for_park|finish_for_park|set_grammar_constrained|grammar_enabled returns no matches — the models and the Rust observed-edge fixtures were not updated. docs/design-review.md:211-220 requires the TLA+ models and trace-conformance suite for changes to "cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering or ownership"; :234-240 makes it decisive: "Never touch covered code without running and updating its simulator and formal checks. Modifying the Helios scheduler, admission, speculation, cancellation, cache ownership … without running — and updating when behavior, transitions, or supported bounds change — the applicable TLA+ models, Rust conformance fixtures … is a blocking design failure, regardless of whether CPU unit tests pass." :241-246 is exactly on point: "When a change adds protocol states … update the model, conformance fixture, or Kani harness to cover the added domain rather than leaving it unverified."

The PR does run check.py (not opened) (10 models, 9 suites, 621,749 observed transitions) — so this is not a "check not run" finding. The finding is narrower and harder: the run exercised the pre-existing models only, so the newly added domain (paused_for_park draining, grammar toggle with pending == 0, terminal-checkpoint park) is conformance-unverified. This matters because the park path deliberately keeps a request visible-but-unschedulable across an in-flight frame, which is precisely the ownership/ordering property TLA+ is there to model.

(2) BLOCKER — Layer 2 scheduling-simulator evaluation not performed or updated. Bucket 3 changes graph selection, service pricing, and timing estimation: cost.rs (not opened) (+309/−38, PrefillCostModel extended to GraphKind::Mixed, new zero_fill bucket, t_at_umin, mixed_context_slopes, mixed_entry/mixed_duration), plus every caller — policy.rs mixed_candidates, next_progress, resize_prefill, continuation_candidate; service.rs shape_duration→mixed_entry. docs/design-review.md:195-206 requires such changes be "evaluated against the Python simulator and reference solvers in scripts/scheduling_sim/", and timing-estimation changes require "running the screening and 64-seed validation catalog in scripts/scheduling_sim/learning.py". The PR itself discloses: "scripts/scheduling_sim/ models scalar per-graph durations without per-fill/per-context NNLS strata" — i.e. the new strata are neither modelled nor validated, and the simulator was not updated. :147-149 additionally requires updating simulator comments when the cost terms change.

(3) BLOCKER — mutation testing not run on newly added safety guards. Three new guards were added with typed rejection strings ("grammar constraint mode requires a live request with no pending GPU work", "pausing for park requires an active request with pending GPU work", "finishing for park requires a live request with no pending GPU work", plus the BoundaryKind::ConditionedWindow park rejection and the consumed_tokens <= exact_len check in runtime.rs). docs/design-review.md:226-228 requires check.py (not opened) --mutations or cargo-mutants "when adding or changing safety guards"; the PR lists --mutations under unrun checks. :247-251 forecloses the disclosure defense directly: "Disclosure does not excuse skipping runnable CPU checks … 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." This one matters more than usual because the guards are atomic pre-check-then-mutate predicates whose correctness the new unit tests assert only for the cases the author chose.

By contrast, the Kani omission is genuinely N/A and I do not flag it: no completion-vector validation, prepared completion contract, state-view extent arithmetic, or sequential validator was modified (docs/design-review.md:221-225).

3c. Failing CI / failing tests on 150f705: NOT A FINDING

The PR reports zero failures across eos, selene, selene-manager, helios (--lib and --test '*'), flare, flare-cli, the Python suites, and live SM120 GPU codec tests. CI is pending, which is not a failure and is not observable to me. Not flagged.

3d. Performance claim without an attributable served-workload A/B: MAJOR

All three buckets are performance-motivated, and the PR states outright: "Expected serving impact (not benchmarked end-to-end here)" and "No end-to-end exported-core flare run latency or throughput benchmark was run on this branch." docs/design-review.md:109-115 (principle 12) requires "actual Helios service measurements" for performance claims, with comparisons against exported cores through flare run; :15 of docs/verification.md makes the live benchmark the primary check for "latency, throughput, or memory cost". The charter's #210 bar says the same. The headline "eliminates 2K-32K KV and recurrent state wipes" figure has no measurement, citation, or reproducer anywhere. The same author's #645 shipped live SM120 A/B tables, so the bar is demonstrably reachable in this area. This is a Major (not Blocker) because the correctness work is real and independently motivated by open issue #530.

3e. Legacy core loading-and-serving (principle 13): MAJOR

The PR claims "existing exported cores load and run without re-export or ABI changes", but the only reported evidence is a packing unit test. docs/design-review.md:116-123 requires "Test previous core layouts through loading and serving alongside newly exported cores", and the charter's review standards say "verify that existing data, artifacts, and exported cores still load". The claim is not merely structural here — it changes packed behavior: runtime.rs:1700-1706 sets device_grammar_enabled = prompt.grammar.is_some() && (!unmasked_reasoning || !speculative), so a non-speculative core's existing GrammarEnabled binding now receives 1 during open reasoning where it previously received 0. That is very likely fine (speculative verification kernels force width = 1 only on speculative cores, and the PR supplies a cached all-ones mask), but it is exactly the kind of change principle 13 asks to be proven by loading and serving a previous core, not asserted.

I do not render this a Blocker because the format is unchanged (no new Proto field, no new enum value, GrammarEnabled binding unchanged) and the existing reader path is untouched; the gap is evidentiary.


Gate 4 — Material scope / claim contradictions


Verdict

Gate 1 (contract boundaries): CLEAR. Gate 2 (vendored deps): CLEAR. Gate 3: THREE BLOCKING OMISSIONS + TWO MAJORS. Gate 4: two informational nits only.

Required before this can pass the mandatory verification gates:

  1. Extend and re-run the formal checks to cover paused_for_park / pause_for_park / finish_for_park / set_grammar_constrained — update the applicable TLA+ model (Lifecycle/Speculation/CheckpointReservation) and the Rust observed-edge suite to model the draining-but-unschedulable state, and report the run. docs/design-review.md:234-246 is explicit that the existing run does not satisfy this.
  2. Model the (fill, kv_context) NNLS strata including the zero_fill bucket and mixed_context_slopes in scripts/scheduling_sim/, update their comments, and run the screening plus 64-seed catalog in learning.py (docs/design-review.md:195-206).
  3. Run verification/helios-lifecycle/check.py (not opened) --mutations against the new park and grammar-toggle guards (docs/design-review.md:226-228); disclosure does not excuse it (:247-251).
  4. Add a served-workload A/B against main using an exported core through flare run for the grammar-transition bucket, and a measurement for the older-speculative-core Snapshot+Restore cost; cite a source for the "2K-32K" figure (docs/design-review.md:109-115, charter #210).
  5. Load and serve a previously exported core to substantiate the compatibility claim, particularly the non-speculative GrammarEnabled 0→1 packing change (docs/design-review.md:116-123).

Optional but advisable: reconcile docs/prefix-cache-offload.md:96-100 with the new gate-before-mutex order, and correct the delivery_references claim plus the #697/#655 doc-hunk attribution in the description.