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
- No proto, core-format, captured-graph, or wire changes. The diff touches no
.proto, nohelios/src/model/contract*, no core metadata, no executor/transport file. No enum variant, graph kind, or operation contract is added, sodocs/design-review.md:22-26(graph-family approval) and principle 13 (core compatibility) are not engaged, and no live export/serve or legacy-core replay is required. - The one public API addition is contract-safe.
HostStore::can_retry_slabsis a defaulted method returningtrue(selene/src/store.rs:324-329), so every out-of-tree implementor compiles and behaves exactly as before;spillable_slots()was private (selene/src/composite.rs, removed at diff hunk-718,14). No removed Protobuf field, no reserved wire id, no behavior change for the default path. Forwards inPooledStore(selene/src/pool/store.rs:615-616(not opened)) andTiers(selene/src/pool/local.rs:45-48(not opened)) are pure delegation. - No shipped default changed.
MAX_SPILLS(8) and the 50 ms backoff constants are untouched; no CLI flag, config key, or environment variable is added (principle 10 respected). The retry-cadence refinement is internal policy, not a new operator-visible default. - No contradiction of the named normative docs.
docs/scheduling-theory.md(not opened),docs/scheduling-runtime-design.md, anddocs/core-format-design.md(not opened) contain no material onRetry/Slabs/held/parked-spill cadence (grep forRetry|slabs|parked|held|spillindocs/scheduling-runtime-design.mdreturns no matches), so no normative invariant in the documents this gate names is contradicted.
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
- No vendored upstream file is touched (no
helios/native/roce_proxy.c(not opened), nothird_party/, no vendored C). All six files are first-party Rust. - No dependence on an unmerged external recipe or PR: no
Cargo.toml(not opened)/Cargo.lockchange anywhere in the file list, no new dependency, no recipe pin introduced. - The overlap with open PRs #674 and #694 (
selene/src/composite.rs,helios/src/server/runtime.rs,selene/src/store.rs; #694 also adds aStoreOutcomevariant and a siblingHostStoremethod) is a sequencing/logistics matter, not a vendored fork. Recorded here as Info / Nit per calibration: unrecorded merge order is worth a reviewer comment, but it is not a hard gate violation and neither PR is a dependency of this one.
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)
- No TLA+/Kani gate is triggered.
docs/design-review.md:209-220requiresverification/helios-lifecycle/check.pyfor changes to admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering/ownership, offload aggregation, readiness, or rank coordination.Worker::service_storepublication retry/parking is none of those: the check's models map toLifecycle(scheduler admit/commit/complete/cancel),RankProtocol/DispatchRing/RankDispatch(executors),OffloadTransfer(helios/src/offload/transfer.rs(not opened) aggregation, untouched),CacheOwnership(helios/src/cache.rs(not opened)PrefixCheckpointCache, untouched),Speculation,ResponseLifecycle,CheckpointReservation(verification/helios-lifecycle/check.py:18-35). No model transition is added or redefined, so no model/fixture update is owed. The pin discipline in the touched code is unchanged (pin athelios/src/server/runtime.rs:2902, unpin unlessQueuedat :2917-2919). Runningcheck.pyas a regression is still advisable for a change inhelios/src/server/runtime.rs(a mutation target atcheck.py:653), and its phase_tests conformance suites live in the same module the PR extends — recommend the author run it and report the result. - No Kani gate: no completion-vector validation, prepared completion contract, state-view extent arithmetic, or sequential-validator change.
- No GPU/CUDA/VMM or transport gate:
selene/has no CUDA dependency (docs/prefix-cache-offload.md:27-30); no file underhelios/src/execution/is touched.
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"):
- "
Worker::run… enforces a 2 ms idle poll cap so theretry_afterexpiry 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 whenexecutor.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. - "9 new unit tests (all deterministic, zero sleeps)" —
enospc_retry_after_expiry_wakes_sole_deferred_store_deterministicallycontains a 10-second wall-clock loop (while Instant::now() < deadline { … std::thread::yield_now(); }) despite its "no sleeps!" comment. The injectedpoll_atclock makes the assertions deterministic, but the claim as written is inaccurate. - 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 orphanedparkedentry indisk_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:
- §2.2 store interface lists the
HostStorecore operations and omitscan_retry_slabs(docs/prefix-cache-offload.md:272-284). - The worker retry contract still reads "The worker retains only checkpoint IDs for retries after store progress and discards IDs that have left the GPU cache" (
:293-297), while the worker now also gates non-freshSlabsretries oncan_retry_slabs(helios/src/server/runtime.rs:2880-2888) and no longer setsprogressunconditionally. - Retention-metrics text (
:1364-1372) still describesflare_host_cache_held_total{tier}per holding event andstore_skippedincluding "retries", which the PR's own "Narrow Metric and API Shifts" section changes (held[0]now accounted on progress-gatedpoll()ticks; deferredSlabspublications skipped bycan_retry_slabs()no longer reachstore()).docs/api.md:366(not opened) also namesflare_host_cache_held_total{tier}.
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.