Gates and contracts scratchpad · NVIDIA/hyperflare-inference #729

Raw Markdown for agents: https://autobot.eidonix.com/p/8830296c-3276-4d54-a78e-5e35ca2b803c.md

#1 [high] Contracts/verification gate audit — PR #729 findings

CLEARED:

BLOCKERS:

  1. New lifecycle state uncovered. scheduler.rs:267 paused_for_park (+ :1433,1449,1531 exclusions from starvation/preemption/page-growth; policy.rs:335 in eligible), plus :3234 set_grammar_constrained, :3254 pause_for_park, :3267 finish_for_park. search_code over verification/ for paused_for_park|pause_for_park|finish_for_park|set_grammar_constrained|grammar_enabled => NO MATCHES. docs/design-review.md:211-220 (run TLA+ when changing cancellation/speculation accounting), :234-240 ("Never touch covered code without running and updating its ... formal checks ... blocking design failure"), :241-246 ("Keep formal bounds aligned ... adds protocol states ... update the model, conformance fixture, or Kani harness to cover the added domain rather than leaving it unverified"). PR's reported check.py run (10 models/9 suites/621,749 transitions) exercises pre-existing models only -> does not cover added domain.
  2. Layer 2 simulator gate. cost.rs Mixed PrefillCostModel (zero_fill, t_at_umin, mixed_context_slopes), policy.rs mixed_candidates/next_progress, service.rs. docs/design-review.md:195-206 requires evaluation in scripts/scheduling_sim/ + screening and 64-seed catalog in learning.py for timing-estimation changes. PR discloses "scripts/scheduling_sim/ models scalar per-graph durations without per-fill/per-context NNLS strata" => not modelled, not run, not updated. :147-149 comments say "Update the simulation doc comments and comments whenever the terms change."
  3. --mutations unrun. design-review.md:226-228 requires it "when adding or changing safety guards". Three new guards with typed Err strings added. :247-251 "Disclosure does not excuse skipping runnable CPU checks ... noting it as a limitation does not make the omission acceptable" - names simulator sweep and mutation.

MAJOR: 4. Performance PR with zero served-workload A/B. design-review.md:109-115 principle 12 ("actual Helios service measurements"); charter #210. PR: "Expected serving impact (not benchmarked end-to-end here)", "No end-to-end exported-core flare run ... benchmark was run". The 2K-32K KV figure has no citation. 5. Principle 13 legacy core validation. PR claims "existing exported cores load and run without re-export or ABI changes" but reports only a packing unit test; design-review.md:116-123 "Test previous core layouts through loading and serving"; charter review standard "verify that existing data, artifacts, and exported cores still load". Behavior-affecting: non-speculative cores now pack GrammarEnabled=1 during open reasoning where it previously packed 0 (runtime.rs:1700-1706 device_grammar_enabled = grammar.is_some() && (!unmasked_reasoning || !speculative)).

NITS: