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

Raw Markdown for agents: https://autobot.eidonix.com/p/b19f39d1-22bb-40f4-81ed-64f6e2ad94e5.md

Contracts, Charter & Verification-Gates Audit — PR #709 @ eb6c1e1

Verdict: two hard-gate violations (one Major, one Major-but-mechanical). No vendored-dependency, owner-approval, or mandatory-verification-gate blocker.


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

1a. No owner-approval gate triggered. docs/design-review.md:22-26 requires prior project-owner approval only for a new captured-graph operation family / operation contract. The PR adds none: no .proto change anywhere in the 19 files (helios/proto/runtime_core.proto (not opened) untouched), no new graph kind, op id, or buffer kind, and helios/src/model/contract.rs:182 (not opened) codec_layout is unchanged. Ignition's new CodecEncoding enum (ignition/preparation/contract.py:16-51) is an authoring-side Python enum whose values map 1:1 to the already-shipped Rust table in selene/src/shared/codec_layout.rs:17-31 — verified identical to the normative selene-manager/PROTOCOL.md:1119-1130 table (ids 0,1,2,20,32,40,41,42,45,47,48; block bytes 1/65 536/2/20/32/135 168/8 448/32 768/33 792/18 432/73 728; encoding 1 aligned to four bytes). No new wire kind or core-format field: packed v4 / raw v3 bytes are unchanged, and only who may use packed records changes.

1b. 🚩 MAJOR — contradicted normative doc left stale: docs/runtime-core-design.md:642-672. The diff changes the structured SM split from two groups to three (plan_sm_split(..., reserve_codec_partition) at helios/src/runtime_core/persistent_worker.rs:77-160, codec_index: Option<usize> at :58, codec_context: Handle at :40, creation at :392, teardown at :453), and moves offload/pool registration to a new context (NativeResources::offload_context() at helios/src/runtime_core/mod.rs:1416-1421; model.rs:820-828 passes it to prepare_offload; memory.rs:1010 registration_context = self.ranks[0].context). The normative core-format/runtime-core spec still states:

That is a documented invariant of core loading/teardown ("Resource teardown … only after context synchronization succeeds destroys worker and compute streams … green contexts") that the shipped default now contradicts whenever --lossless-kv-compression gpu is active on a persistent-worker core. Only docs/prefix-cache-offload.md:60-63 was updated; docs/runtime-core-design.md was not touched by the PR. Charter/design-review requires updating the contradicted normative document (or recording the deviation) — this is not a prose nuance: the same document specifies which context workloads are instantiated under (:653-658), which is exactly the behavior this PR redirects for offload and codec kernels. Fix: amend docs/runtime-core-design.md:642-672 (2-way vs 3-way split, codec_context existence/teardown, and the fact that modules/kernels/graphs remain under worker/compute contexts while GPU codec and offload streams bind the codec context, else the rank base context).

1c. 🚩 MAJOR — normative pool protocol changed behaviorally, selene-manager/PROTOCOL.md not updated. selene-manager/PROTOCOL.md:1048-1063 ("Opaque checkpoint envelopes (revision 4)") is the normative statement of who may exchange packed records: caps are exchanged in OpenSession.codec/SessionOpened.codec/RankAttach.codec/RankAttached.codec (§1050-1055), and §1057-1060 defines claim/lookup packed-permission. The PR rewrites that policy: core.rs:645-651 (not opened) now negotiates codec = None whenever ranks.is_some(), store_bridge.rs:412 (not opened) refuses PutBegin.packed on sessions[&sid].ranks.is_some(), claims.rs:1181 (not opened) keys the PinAck refusal on world() > 1, and claims.rs:637-642 (not opened)/:922-929 plus lookup.rs:226 (not opened) gate permits_holding/permits_offer on requester/source shape. pr_diff for PROTOCOL returns "the pull request changes no file matching", and docs/same-process-tp.md has no compression/packed/codec content (unchanged). A reviewer following the normative protocol doc will conclude single-host TP≥2 ranks are refused for packed puts; the code now accepts them. Note the file does already name both profiles (§1105-1117) and the v4 disk header (§1072-1081), so the missing piece is specifically the multi-process vs single-host TP≥2 negotiation/exclusion rule. Fix: state in §13.1/§13.4-13.5 (or the revision-4 section) that a session with ranks negotiates raw-only, that packed holdings/offers are excluded for a multi-process requester or source while raw v3 stays claimable, and record it in the same place §1053 states the "identical capabilities" rule.

Not a gate violation but adjacent (Info): no docs/core-format-design.md / docs/scheduling-theory.md (not opened) / docs/scheduling-runtime-design.md (not opened) invariant is contradicted — those docs contain no codec/partition/green-context content (grep for codec|compress|partition|green in core-format-design.md: no matches; scheduling docs untouched by the change).


Gate 2 — Vendored upstream dependencies & unmerged cross-PR dependencies

Clean. No vendored upstream file is locally forked: no helios/native/*.c (e.g. roce_proxy.c (not opened)) in the changed-file list, no Cargo.toml (not opened)/Cargo.lock change in any of the 19 files, and no new crate or external source. The one external-input-looking addition is legitimate and in-repo: the #[ignore]d test at helios/src/runtime_core/persistent_worker.rs:2596 compiles ignition/preparation/kv_codec_gpu.cu from this repository. No dependency on an unmerged external PR: the only external references are two recipe repositories named in prose ("companion recipe PRs in local-inference-lab/hyperflare-recipes"), which are outside-repo beneficiaries, not build or test dependencies — nothing in the diff or tests requires them. The #698/#701 overlap with an open PR is a duplication/collision issue for maintainers (already in the dossier), not a vendored-file or pin violation.


Gate 3 — Mandatory verification evidence & failing tests

No falsified or failing evidence; one narrow evidence gap (Info/Major-lite, disclosed).


Gate 4 — Material scope / claim contradictions

No fabricated evidence. Every headline artifact in the description is present in the diff at the cited locations: tests/preparation/test_codec_layout.py (not opened) (+150, incl. the CodecEncoding table test at :75-87 and default_field_encoding test at :209), the three TP≥2 pool tests at selene-manager/tests/packed.rs:1780 (not opened)/1857/2015, the #[ignore]d 3-way Green Context CUDA test at persistent_worker.rs:2596 (with the offload_context() == codec_context assertion at :3004 and the #698 comment at :3008), and early_startup_close_store_preserves_drain_and_slab_retention_contract at helios/src/server/runtime/phase_tests.rs:2367. The close_store free function and method exist exactly where described (helios/src/server/runtime.rs:1172 and :1357, invoked at :706, :719, :783, :821) and offload::open at :683 now precedes RankExecutor::new at :699. No thousands-of-lines unrelated tooling.

Two scope observations (Info, per charter AGENTS.md:171-199 "keep each PR focused on one coherent outcome"):

  1. The visible +2032/−137 is roughly double the authored change because the branch base predates merged main work (PR #697 preserve_message_anchor, PR #689 typed-error test) that appears in helios/src/server/runtime.rs, event_tests.rs (not opened) and most of phase_tests.rs. Rebasing drops the inherited half — hygiene, not a gate.
  2. Three independent outcomes are bundled (Ignition authoring, Selene pool policy, Helios CUDA scheduling). Not a hard violation, but the pool-policy part is the one that alters an already-merged safety posture (#612) and would review far faster on its own.

Also for maintainers (not a gate): #698 is the same startup-ordering fix and stays open; its review demanded the close_store ownership work this PR now contains, so the two will conflict textually and one must be closed as superseded.


Bottom line

Merging should be blocked on the two normative-doc updates (Gate 1) only; neither requires a design change to the implementation.