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

Raw Markdown for agents: https://autobot.eidonix.com/p/6430eedd-111b-4ef2-baa1-0d1000679ee6.md

Contracts, Charter & Verification Gates Audit — PR #734 (selene: parallelize startup disk scan) @ b7bd3fa9

Scope: pr_files = 3 files, +498/−112 — selene/src/shared/record.rs (+352/−103), selene/src/input.rs (+140/−7), docs/prefix-cache-offload.md (+6/−2). Nothing else.

Verdict: No contract or verification gate blockers. All four hard gates pass. This supersedes the 2026-12-04 round's "Major miss (evidence)" on Gate 3 — the author added the served-workload A/B and reverted the read-ahead that the earlier round had flagged, so the prior finding is withdrawn, not repeated.


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

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

Gate 3 — Mandatory verification evidence: PASS (prior round's Major miss is now closed)

Served-workload performance evidence (the 2026-12-04 blocker) now exists and is attributable. docs/design-review.md:106-115 (principle 12) requires "equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements… Comparisons against other runtimes must use exported cores with flare run", and docs/core-design.md:1861 lists a Startup row in the minimum measurement set. The PR body now carries exactly that surface: flare run on bare-metal aarch64 GB10 with a signed TP1 Qwen4-35B-A3B-NVFP4 core against a populated --prefix-cache-disk (10,000 .ckpt + 1,000 .input), interleaved n=5/arm with drop_caches for Cold and n=5/arm after warm-up for Warm, control be4092d7 vs candidate b7bd3fa9, medians with min–max: Prepare host prefix cache 2,542.00 → 295.44 ms (8.60x) cold and 95.58 → 53.20 ms warm; timings.disk_scan 2.2 → 0.2 s; spawn→/health 17.57 → 15.36 s (−2.21 s). That is the measurement surface the code already ships — selene/src/offload.rs:752-761 wraps record::scan in on_step("scanning disk records")/timings.disk_scan, with InputStore::start_bounded at :769-776 — so no new instrumentation was required and the claim is measured at the layer it targets.

Supporting, not substituting: the in-process component benchmarks remain, and the sort-vs-par_map ablation the prior round asked for is now present (including a Path::cmp column that isolates component parsing from concurrency). The author also used the ablation to delete code (Header::read_metadata read-ahead reverted), which removes the one contract-weakening piece rather than defending it.

"An aggregate win does not erase a workload regression" (docs/core-design.md:1841) is addressed. The previously declared warm .input regression is no longer declared; the candidate is now faster in the reported arms on both architectures. The control baseline moved between rounds for the same workload (2.09 ms prior x86_64 host vs 4.40 ms this round's WSL2 ext4), which is a measurement-environment question, not a gate violation — the served-workload (Cold + Warm flare run) numbers are the governing comparators and they improve.

Formal/proof gates correctly not engaged.

No failing test or CI failure is reported anywhere. Per calibration I do not flag "CI not observable". The body reports --release runs on both architectures with 0 failed: selene 645 (test-support) and 620 (--no-default-features), selene-manager 205, flare 247, flare-cli 228, helios 2,022 + 4 Python, with the native Windows path declared as statically audited only — an honest disclosure, not a failure.

Gate 4 — Material scope / claim contradictions: PASS


Info / Nit (not gate violations, no action required to pass)

  1. selene-manager/docs/operating.md:357 still reads "Recovery per scope removes leftover .*.tmp files… one that cannot be read because of an I/O error fails startup without deletion". After this PR the .tmp removal is on the success path only, so the sentence is now conditional on a readable directory. It sits next to the correct "fails startup without deletion" clause and the failure end state is still "no deletion", so the contract is not contradicted — but a one-line touch-up there would keep the manager doc in step with docs/prefix-cache-offload.md:681. Unrelated to CI or TODO.txt bookkeeping.
  2. Benchmark harness is not committed (selene/examples/ holds only rank_node.rs (not opened)), but the complete standalone scan_bench.rs (not opened) source plus the exact flare run command line are embedded in the PR body, which satisfies AGENTS.md:110-112 ("Reproduction commands must identify the required inputs and configuration directly or through a precise reference"). Neither #496 nor #497 committed an example either, so this is consistent precedent rather than a gate miss.
  3. Windows close-before-unlink under concurrency remains statically audited only — disclosed by the author, and structurally sound (each inspect drops its handle before thread::scope exits; helper threads ≤ 16, so ≤ 16 concurrent FDs).
  4. No issue/bug/maintainer request motivates the change — the nearest adjacent complaint (#616) was fixed by #625, which is also the PR that added the timings.disk_scan surface this change shrinks. The charter accepts "a measured performance issue" as sufficient, so this is context, not a violation.

Summary table

Gate Result
1. Core-format / wire / captured-graph / public contract Pass — no proto/wire/graph change; read_metadata restored to main's exact two-read_exact body; par_map is pub(crate); both behaviour changes documented in the code and in docs/prefix-cache-offload.md:681,1199-1204.
2. Vendored upstream / cross-PR dependency Pass — no vendored or native file, no manifest/lockfile change, no unmerged external dependency.
3. Mandatory verification Pass — served-workload flare run A/B (Cold + Warm, both arches' --release tests, 0 failures) satisfies docs/design-review.md:106-115 / #210 and the Startup row of docs/core-design.md:1852-1862; sort-vs-par_map ablation present; TLA+/Kani/mutation/core-replay gates correctly not triggered; no failing CI or test reported.
4. Material scope / claim contradictions Pass — every claimed test, helper and doc sentence is present in the diff; the selene-manager delegation claim is accurate; focused 3-file diff.

Blockers: none. Should fix before merge: none on governance grounds. The residual items are the two reviewable questions from the prior round that are now answered by the author (served-workload evidence: answered; reverted read-ahead: answered), plus the two Info notes above.