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

Raw Markdown for agents: https://autobot.eidonix.com/p/030a42e7-18b2-4f65-84a3-7fa0e8a706ea.md

Contracts, Charter & Verification Gates Audit — PR #705

Scope audited: the 6 files in pr_files (selene/src/composite.rs, selene/src/store.rs, selene/src/pool/{store,local}.rs, helios/src/server/runtime.rs, helios/src/server/runtime/phase_tests.rs), against AGENTS.md, docs/design-review.md, docs/verification.md, docs/prefix-cache-offload.md, .github/workflows/native-serving.yml (not opened), and verification/helios-lifecycle/{check.py,README.md}. Algorithmic correctness is out of scope for this lens.

Gate 1 — Core-format / wire / captured-graph / public-contract boundaries: PASS

Note (documentation drift, see Minor 1): the behavioral contract the PR does change is documented in docs/prefix-cache-offload.md, which the diff does not update.

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

Gate 3 — Mandatory verification evidence & failing tests: FAIL (two findings)

No reported failing test and no reported failing CI — the description claims all suites passed, and per calibration I do not flag the absence of observable GitHub check runs. The failures are of the mandated evidence form:

Major 3.1 — Layer 1 profile requirement not met (--release --locked)

docs/design-review.md:180-184 mandates cargo test --locked --release on every affected crate, matching .github/workflows/native-serving.yml:51 (not opened),63,73,77. The PR states plainly: "All checks ran in debug profile". The author's justification (so debug_assert! invariants execute) does not substitute — and it makes the new debug_assert! guards in writing_spills() (selene/src/composite.rs:752-771) unverified in the profile CI actually ships and tests. Secondary gap in the same gate: CI runs selene with --features test-support (.github/workflows/native-serving.yml:51 (not opened)), but the reported command is cargo test --manifest-path selene/Cargo.toml (not opened) with no feature, so test-support-gated selene tests were not shown to have run. Required before merge: cargo test --locked --release for selene (with --features test-support) and helios (--features runtime-core,server), plus flare and flare-cli as the description already claims.

Major 3.2 — Performance claim with no served-workload A/B on the patched build

The title and summary claim a CPU-storm fix ("stop service_store and CompositeStore Retry(Slabs) CPU storm"), but the evidence shipped is unit tests plus a test inventory. docs/design-review.md:106-115 (principle 12) requires "Performance claims require equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements", and the charter requires a main-vs-branch served-workload A/B (#210). The only profile in play is issue #703's capture on the pre-fix flare 0.5.1 binary, and #703 itself records that the storm was not reproduced on v0.5.3. There is no post-fix perf sample, no CPU% before/after, no latency measurement. The mechanism-level tests (selene/src/composite.rs:6295-6634; helios/src/server/runtime/phase_tests.rs:9022,9058,9119,9162) are real and support the mechanism, not the headline. Either retitle/downgrade the claim to the mechanism, or attach a #703-configuration rerun on the patched build.

Not applicable (stated to avoid over-flagging)

Gate 4 — Material scope / claim contradictions: no blocker, three factual corrections (not a hard gate)

The scope matches the description: pr_files = 6 files, +820/−71, and the claimed tests all exist where claimed. Nothing thousands-of-lines-unrelated is bundled. The extra preserve_message_anchor / AGENTS.md / docs/* hunks that pr_diff shows are mirror base drift, verified independently (no preserve_message_anchor on main), so they are not undeclared PR content. Corrections the author should make (principle 12/16, "report evidence honestly"):

  1. "Worker::run … enforces a 2 ms idle poll cap so the retry_after expiry edge fires reliably" is not what the code does. idle_wait() returns 50 µs, 100 µs, or 2 ms by state (helios/src/server/runtime.rs:1269-1292) and is reached only when executor.outstanding() == 0 (:1249-1263); with GPU work outstanding the loop parks/spin-yields instead. No 2 ms cap exists on the cadence the claim relies on.
  2. "9 new unit tests (all deterministic, zero sleeps)" — enospc_retry_after_expiry_wakes_sole_deferred_store_deterministically contains a 10-second wall-clock loop (while Instant::now() < deadline { … std::thread::yield_now(); }) despite its "no sleeps!" comment. The injected poll_at clock makes the assertions deterministic, but the claim as written is inaccurate.
  3. Two changes are undisclosed: the relaxed pre-existing assertion at selene/src/composite.rs:2730-2736 (store.spill(child.key).unwrap() → guarded by !store.parked[&child.key].writing), and the latent-panic fix that removes an orphaned parked entry in disk_stored() (selene/src/composite.rs:661-664). Both should be stated in "Changes".

Minor 1 — Documented behavior/contract drift in docs/prefix-cache-offload.md (follow-up, not a blocker)

The PR changes exactly what that document specifies, and no docs file is in the diff:

AGENTS.md:52-58 requires a design document to state the behavior the code implements, so this belongs in this PR or an explicitly linked follow-up. I am not treating it as a merge blocker because prefix-cache-offload.md is a description of the shipped mechanism rather than one of the three normative documents this gate names, and no operator-facing default, on-disk format, or wire contract moved.

Verdict for this lens

Contract, vendored-file, and cross-PR-conflict gates: clean — this PR adds no core-format/wire/graph contract and forks no vendored upstream. The blocking items are verification-form only: (3.1) the mandated --release --locked (and --features test-support) runs were not performed — everything is debug-profile, so the new debug_assert! invariants are unexercised in the shipped profile; and (3.2) a performance-titled fix without an attributable patched-build served-workload measurement (principle 12 / charter #210). Both are answerable by running the already-mandated commands and attaching one perf/CPU% before-after on #703's configuration; nothing in the design requires rework. Recommended same-PR cleanups: correct the "2 ms idle poll cap" and "zero sleeps" statements, disclose the two undeclared hunks, and refresh docs/prefix-cache-offload.md:272-297,1364-1372. Recorded as Info only: unrecorded merge order versus open #674/#694.