Contracts, Charter & Verification Gates Audit — PR #729 @ 68fe22f
Verdict: ONE mandatory verification gate blocker (Layer 2 scheduling simulator, bucket 3), plus two Majors (unbenchmarked buckets 2–3 and an ungated 30% MTP-5 regression). Gates 1 and 2 are CLEAR. Two of the three blocking omissions from the 150f705 round are resolved at this head and must not be re-cited.
Scope caveat: the local base is stale, so I audited only the 24 paths in pr_files at 68fe22f. pr_diff for scripts/scheduling_sim and helios/src/model/contract.rs correctly reports no change (results 39, 40), so the stale-base hunks do not affect these findings.
Gate 1 — Signed core-format / wire / captured-graph / public contract boundaries: CLEAR
- No new enum member or wire identifier.
helios/src/model/contract.rsis untouched by this PR;ValueSource::GrammarEnabled = 30pre-exists onmain(result 33,contract.rs:60). NoGraphOperation,BoundaryKind,CacheContract, or Protobuf field is added, and no core-format/ABI change is present. The captured-graph-op approval rule (docs/design-review.md:22-25,AGENTS.md:376-379) is therefore not triggered. - The new grammar representation is host-local.
AdmissionGrammar::{Disabled, UnmaskedEnabled, Masked(Vec<i32>)}is a plain Rust enum (helios/src/model/admission.rs:59-90) replacing the two formerAdmissionfields;Admission::validate/validate_continuation(admission.rs:105-113) are internal reshapes. It is not aValueSourcevariant and is not persisted. - Packed value change is within the existing contract.
helios/src/model/packing.rs:803:GrammarEnabled => values.push(i64::from(admission.grammar.is_enabled()))— same binding, same Int32 dtype (helios/src/model/testing.rs:287(not opened)), still constrained to{0,1}by the consuming kernel's admission validator (ignition/components/sampling.py:735-736). No signature, resource, or capacity change. - Normative docs updated in the same PR, no silent contradiction.
docs/scheduling-runtime-design.md:463-496now specifies the six positive-fill strata, thezero_fillbucket, NNLS fit,pos_u_max - pos_u_min < 0.15upward floor,theta_0-vs-t_at_umindecode-only rule and per-(batch,width)slope borrowing;docs/core-design.md:1729-1736(not opened) anddocs/mtp-design.md:426-440(not opened) describe the toggle/checkpoint-park split;docs/prefix-cache-offload.md:96-107describes gate-before-codec for captures, run partitioning, and the non-blockingtry_enter_offload_batchfallback that "without blocking or consuming a gate wave token". Code matches:helios/src/offload/transfer/codec.rs:879-906andhelios/src/offload/copy_gate.rs:171-210. Parity service rates still excludeMIXED(scheduling-runtime-design.md:252,278) and the PR does not change that. - Branching is structural, not per-model.
can_toggle_grammar_in_placederives fromconfig.speculative_widths.is_empty() || sampling_graphs_bind_grammar_enabled(config)(helios/src/server/runtime.rs:1409-1410, 547), i.e. from core contract bindings, not model identity — consistent with principles 1/3 and the no-hardcoded-enumeration rule.
Info / Nit (not a gate): #628's invariant was "preserve strict lock ordering (
gpu.codecbeforeCopyEngineGate)" (PR #628 body, result 26). This PR keeps that order for the blocking capture path and adds a codec-first, gate-second try path. The new order is stated in the code comment atcodec.rs:879-880, 891-894and behaviourally indocs/prefix-cache-offload.md:96-106; nodocs/sentence names "gate before codec" as an invariant (grep 'lock order' docs/→ no hits). Worth an@yatesdrack, but the deadlock question is answered in code (both try acquisitions are non-blocking, so no inversion against the blocking capture path).
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: CLEAR
No helios/native/* (e.g. roce_proxy.c (not opened)), no Cargo.toml (not opened)/Cargo.lock, no .cu/PTX, no Protobuf, no recipe or unmerged-PR dependency, no new dependency to pin. Open #715 touches the same cost.rs gating lines and the same docs/scheduling-runtime-design.md paragraph — that is a textual merge-conflict risk, not a gate violation, noted as Info (see the dossier's merge-order analysis; unchanged).
Gate 3 — Mandatory verification evidence: ONE BLOCKER, no failing tests
Fixed since the previous round (do not re-flag)
- TLA+ lifecycle coverage for the new park state now exists.
verification/helios-lifecycle/Lifecycle.tlaaddsPaused == 3(:11),PauseForPark(:65-68),FinishForPark(:70-73),ToggleGrammar(:75-78), wires them intoNext(:90-92) andAllowedEdgeactions 7/8/9 (:174-176), and widensWellTyped/Cancelto the paused domain (:60, :99). The Rust↔model map is documented atverification/helios-lifecycle/README.md:52-54, 63-65. The PR reports 10 models passing and 623,904 observed Rust transitions checked. check.py --mutationswas run and now covers the new guards: six Rust mutations includingset_grammar_constrainedpending-work rejection,pause_for_park/finish_for_parkpredicates, thepaused_for_parkscheduling exclusion inpolicy.rs(not opened), thepublish()preemption ordering, andCopyEngineGate::try_enter_offload_batch(verification/helios-lifecycle/check.py:458-508).docs/design-review.md:226-228is satisfied.docs/design-review.md:234-246("keep formal bounds aligned with runtime capabilities") is satisfied for the added lifecycle domain.
BLOCKER — Layer 2 scheduling-simulator gate unmet for the GraphKind::Mixed timing-estimation change
docs/design-review.md:195-206 is explicit and directly on point: "Changes to graph selection, service pricing, timing estimation, refresh or exploration budgets … must be evaluated against the Python simulator and reference solvers in scripts/scheduling_sim/… Changes to timing estimation … require running the screening and 64-seed validation catalog in scripts/scheduling_sim/learning.py." And :234-240 makes it blocking: modifying Helios scheduling "without running—and updating when behavior, transitions, or supported bounds change—the applicable TLA+ models, Rust conformance fixtures, Kani harnesses, and scheduling simulator is a blocking design failure, regardless of whether CPU unit tests pass." :247-251 forecloses the disclosure defense.
Concrete state at 68fe22f:
- The PR changes timing estimation and graph selection for
MIXED: a six-stratum NNLS model pluszero_fill(helios/src/scheduler/cost.rs:288, 346, 68-70), pos-fill floor (cost.rs:145-149), anchored decode-only intercept (cost.rs:191), and rewiresmixed_entry/mixed_durationthroughmixed_candidates,next_progress,continuation_candidate,resize_prefill, andservice_rates. scripts/scheduling_sim/is not touched:pr_diffover that path returns "the pull request changes no file matching" (result 39), andsearch_history --path scripts/scheduling_simshows the newest commit is merged #645 (result 37).- The simulator's cost model is scalar, not stratified:
scripts/scheduling_sim/model.py:23-39(Graph= oneduration_ms+ capacities), andscripts/scheduling_sim/timing.py:301+(TimingEstimate) has no fill/context strata, no NNLS, nozero_fill, not_at_umin(result 11: no matches forentry|observation|batches|context_slope|strata). So the PR's new pricing rule is unmodelled in the reference implementation. - The PR body states the limitation explicitly ("the Python scheduling simulator models scalar per-graph costs rather than
(fill, kv_context)NNLS curves, so theGraphKind::MixedNNLS fit is verified throughhelioscost and policy unit tests"), i.e. it describes skipping the gate. - No
learning.py --preset screen|validaterun is reported anywhere in the description or dossier (the dossier records "no simulator curve sweep for bucket 3 — the PR says so explicitly").
This is a runnable CPU check (no GPU, no checkpoint: docs/design-review.md:247), the same check the author's own #645 cleared when it introduced the prefill NNLS model — so it is reachable, not hypothetical.
Required: either model the (fill, kv_context) strata incl. zero_fill in scripts/scheduling_sim/model.py/timing.py and run learning.py --preset validate (64-seed catalog), or run the screening + validation catalog against the unchanged scalar model and state which conclusion it supports. Update the simulator comments for the new cost terms (:147-149 of the old numbering — "update simulator comments when the cost terms change") and docs/scheduling-runtime-design.md's assurance statement accordingly.
Not a finding: CI / failing tests
No CI failure is reported for 68fe22f, and no test failure is reported for any crate. cargo kani is declared unrun, but no Kani-governed surface is modified (completion-vector validation, prepared completion contracts, state-view extent arithmetic, sequential validators are all untouched — helios/src/model/contract.rs unchanged), so docs/design-review.md:221-225 does not apply. Layer 1 is claimed green across eos, selene, selene-manager, helios (--lib 1,919 + --test '*' 59), flare, flare-cli and the named pytest suites.
MAJOR — buckets 2 and 3 carry no served-workload A/B
Principle 12 (docs/design-review.md:106-115) and docs/verification.md:15 require "actual Helios service measurements" on exported cores for a performance claim; charter #210 says the same.
- Bucket 1 is now properly evidenced (this retracts the prior round's finding):
flare runA/B on a signedQwen4-35B-A3BSM120 core,main f705086bvs68fe22fd,</think>→first-content median 41.2→12.4 ms (6,382 tokens) and 58.5→12.9 ms (20,648 tokens), countess prefill-token and snapshot-page reductions, 6/6 schema-valid JSON — including on a core lackingValueSource::GrammarEnabled, which doubles as partial principle-13 evidence. - Bucket 2 (KV codec batching/locking) has only four ignored
offload::transfer::codec::tests::GPU tests plustests/test_kv_codec.py(not opened).docs/design-review.md:263-269allows documentation-only changes to skip GPU tests but this is a hot-path restore change; it has no end-to-end measurement. The PR explains the SM120 core withcodec_layoutwas unavailable — a material limitation, honestly disclosed, so Major rather than Blocker, but it must be resolved before aperformancelabel is justified. - Bucket 3 (Mixed NNLS) has unit-test-only coverage plus the unmet Layer 2 gate above.
MAJOR — measured default-configuration regression is disclosed but ungated
Same A/B, default MTP 5 at 20,648 prompt tokens: main 40.9 ms median vs PR 54.1 ms (~30% slower); the 6,382-token cell is flat (39.1 vs 39.0). The mechanism is stated (pause_for_park waits one speculative frame that then overshoots and rolls back), and the claim/result section distinguishes it from the measured win — so principle 12's "report evidence honestly" is met at the description level. But every default-MTP-5 structured-output deployment pays it, and there is no stated guard (e.g. skip parking when the frontier is within a speculative burst of the transition). This is a claim-vs-benefit contradiction of the "claimed result" section's framing as an overall win; it needs either a heuristic + re-measure, or an explicit statement that the default path is expected to regress.
Gate 4 — Material scope / claim contradictions: CLEAR of hard contradictions
Every artifact the description claims exists and is where it says:
helios/src/scheduler/cost.rs:1764mixed_cost_model_tracks_zero_fill_partial_fill_deep_context_and_peer_slope;helios/src/offload/transfer/codec.rs:1618partition_restore_pages_continues_gpu_batching_after_literal_and_cpu_pagesand:1694copy_engine_gate_before_codec_mutex_leaves_mutex_unheld_while_waiting_on_peer_graph;helios/src/offload/copy_gate.rs:662try_enter_offload_batch_returns_none_without_blocking_or_burning_wave_tokens;helios/src/server/runtime/phase_tests.rs:9074preemption_coincident_with_grammar_transition_preserves_grammar_mode_and_reasoning_budget(the exact guard thecheck.pymutation at:483-492targets);helios/src/scheduler.rs:3238, 3258, 3271for the three new scheduler operations.
No unrelated standalone tooling is bundled: all 24 files are Helios runtime/scheduler/offload code, its tests, the TLA+/mutation fixtures, and five normative docs. The bundle is large (+2954/−591 across four review surfaces), which is a focus concern for the value lens, not a scope contradiction.
Info / Nits: (a) the description lists
delivery_referencesamong updated functions while theservice.rs(not opened) hunks are inservice_rates/the continuation path — the auditor note thatdelivery_referencesdelegates todelivery_references_and_decode_batchmakes this a wash, not a contradiction. (b) Thedocs/scheduling-runtime-design.mdanchor-budgeting hunk belongs to already-merged #697/#655 and should not read as #729 work. (c)ToggleGrammaris modelled as an identity transition overphase = Live ∧ not-queued(Lifecycle.tla:75-78), weaker than the Rust guard which also excludespending != 0and a terminalSnapshot(scheduler.rs:3244-3251); conformance is one-directional there — a model-fidelity nit, since the Rust-side rejection guards are separately mutation-tested.
Required before this can pass the mandatory gates
- Run the Layer 2 simulator gate for bucket 3 (
docs/design-review.md:195-206, 234-251): model the(fill, kv_context)strata incl.zero_fillinscripts/scheduling_sim/and runlearning.py --preset validate(64 seeds), or run screening+validation against the existing scalar model and report what it establishes. Disclosure is not a waiver. - Add a served-workload measurement for bucket 2 on a core exporting
codec_layout(restore latency / first-token after restore), or drop theperformancejustification for that bucket. - Resolve or gate the MTP-5 30% regression at ≥20K prompt tokens so the default configuration does not silently regress.
No contract or vendored-dependency gate blockers. The single mandatory-verification blocker is the unrun Layer 2 scheduling-simulator / 64-seed validation for the GraphKind::Mixed timing-estimation change.