Explore report · NVIDIA/hyperflare-inference #621

Raw Markdown for agents: https://autobot.eidonix.com/p/3d3e2f69-310d-494d-9f9e-dc2c4de6ab23.md

Case file — PR #621 "Validate scheduler admission against the core parameter declarations"

Link: https://github.com/NVIDIA/hyperflare-inference/pull/621 Author: jcartu (CONTRIBUTOR; Discord: jcartu) · State: open, ready for review · Head: cbb7a4f · Base: main (PR base commit 2147cd4c) · Size: 25 files, +148/−117 · Reviews: none · CI on head: no checks · Labels: none


Key findings

  1. It is a one-day follow-up to #505, not a new feature. #505 (merged 2026-11-28 by lukealonso, same author) introduced core-declared FP32 parameters. Its Autobot review (2026-11-29 04:03, "Changes Requested", 0 blockers / 2 should-fix) asked for exactly two things: fix "the latent unsalted-admission trap on RequestScheduler" and add a docs/TODO.txt qualification record with stated scope in user-facing docs. #621 does both — nothing more, nothing less, in scope terms.
  2. The trap is real and the fix is structural, not a guard bolt-on. On main, plan_admission(spec) called plan_admission_with_core_parameters(spec, &[], &Default::default()); validate_resolved_core_parameters only requires values.len() == parameters.len() (helios/src/model/contract.rs:471-485), so an empty pair passed on a declaring core, PrefixHistory::with_core_parameters hashed nothing, and the prefix root fell back to the declaration-free hash. Now the declarations come from self.capabilities.core_parameters (helios/src/scheduler.rs:1565) and plan_admission passes &Default::default() (scheduler.rs:1553-1555), which fails the length check. Rejection precedes self.free_slot() (scheduler.rs:1587) and self.cache.lookup(&history) (scheduler.rs:1602).
  3. Undeclared in the description: a real breaking Rust API change. SchedulerCapabilities gains a required public field with no Default impl and no #[non_exhaustive] (helios/src/scheduler.rs:110-111; searched, no such impls exist), breaking every struct literal in and out of tree; and the public symbol helios_core::runtime_core::validate_core_parameters was renamed to validate_core_parameter_declarations (helios/src/runtime_core/mod.rs:48-50; callers helios/src/runtime_core/protobuf.rs:54,85,952,966,1012 and heliopause/src/export/binding.rs:1046). The description only says "Rust callers … must update". Blast radius is in-tree today because the crates are unpublished (charter roadmap item 6).
  4. The verification bundle is largely re-run evidence, and there is no CI. The 13 Kani harnesses cited include two named harnesses that are #505's own pre-existing proofs (helios/src/model/contract/kani_proofs.rs:85-142); #621 adds no harness and no TLA+/verification/ change. The "593,669 observed Rust transitions across eight replay suites" is the same checker run #505 reported as 593,660. With "no checks" on cbb7a4f, every suite number (Helios 1,785; Heliopause 211; Flare 242; CLI 226) is self-reported.
  5. A concrete, checkable friction between #621's verification method and the repo's new CI. The description admits "The first CLI run set CUDA_VISIBLE_DEVICES to an empty string, which made the missing-core test reject the device list before reaching the file check… The complete CLI suite passed with that override unset" — but the CPU CI that landed the same day (#608) runs CUDA_VISIBLE_DEVICES="" python -m pytest tests/ -q. The reported green CLI run therefore does not correspond to how CI will run it.
  6. The base is stale on the exact files it touches. 2147cd4c is ~10 merges behind main, with #608 (edits ignition/direct/scheduler.py), #620 (edits helios/model-contract.md; most recent helios/src commit), #619, #613, #615, #582, #540, #586, #618, #617 landing since. No CI has proven a clean merge. The GraphKind::samples() → is_text_forward() move keeps the same seven kinds, so it is a pure relocation, not a reversal of anyone's work.
  7. Zero human engagement. No comments, no reviews, no reactions on #621. The only prior human interaction with this line of work is lukealonso merging #505 and yatesdr's substantive CHANGES_REQUESTED on the author's #461 — the review style this PR will likely meet is "show me the exact behavioural diff and the evidence".
  8. Charter-wise it lines up on principle and lags on matrix evidence. It is model-agnostic (declarations move into the scheduler, no per-model branch), it makes an omission fail loudly instead of silently hashing an unsalted prefix (the "#417 no silent drop" spirit), and it fixes a root cause plus a docs imprecision. Against that, the charter's "Supported matrix & compatibility" line expects checks across cache schemes, parallel layouts and GPU targets, and this PR (like #505) has never run on GPU; the whole feature's GPU half is deferred to a new docs/TODO.txt:10-16 gate.

1. The change — what it does, in plain terms, and its size

25 files, +148/−117. Five behavioural pieces plus tests and docs (per-file anchors at the end).

  1. The scheduler owns the declarations. SchedulerCapabilities gains pub core_parameters: Vec<crate::model::contract::CoreParameter> (helios/src/scheduler.rs:110-111), and RequestScheduler::new validates them with crate::model::contract::validate_core_parameter_declarations (helios/src/scheduler.rs:714). scheduler_capabilities() fills the field from config.contract.core_parameters.clone() (helios/src/model.rs:340); the manifest-aware variant builds on it (helios/src/model.rs:344-377).
  2. Admission takes only resolved values. plan_admission_with_core_parameters(spec, core_parameters) no longer receives a declaration slice; it reads &self.capabilities.core_parameters (helios/src/scheduler.rs:1560-1565). plan_admission delegates with &Default::default() (scheduler.rs:1553-1555) and admit inherits the rejection (scheduler.rs:1544-1549). Because validate_resolved_core_parameters requires equal lengths (helios/src/model/contract.rs:471-485), a parameterless call on a declaring core now fails at the validation if (scheduler.rs:1566-1586) — before self.free_slot() (:1587) and before self.cache.lookup (:1602).
  3. All production call sites lose the extra argument: begin_pool_lookup (helios/src/server/runtime.rs:2732-2749), admit_with_checkpoint_accounting (:2766-2772), admit_with_host_store (:2779-2792), and their four callers (:1242-1246, :1378-1381, :1422-1425, :1446-1463). They no longer consult self.config.contract.core_parameters — a net −36/+8 in that file.
  4. Predicate relocation: the free is_text_forward_graph(kind) is deleted from helios/src/model/contract.rs (+1/−14) and becomes GraphKind::is_text_forward() at helios/src/execution/manifest.rs:93-102, with GraphKind::samples() delegating (:90); callers updated at contract.rs:652 and helios/src/model/packing.rs:140. Same seven kinds, pub(crate) visibility preserved.
  5. Python FP32 narrowing unified: ignition/preparation/contract.py:15-28 promotes _wire_fp32 to public wire_fp32(value, label="value") with a docstring; ignition/direct/scheduler.py deletes its private _wire_fp32 and _FP32_MAX (net −21/+6) and imports it at line 44, using it at :122, :132, :225.
  6. Public validator rename: validate_core_parameters → validate_core_parameter_declarations (helios/src/runtime_core/mod.rs:48-50, protobuf.rs:54/85). Note PreparedContract::validate_core_parameters — the values validator — survives (helios/src/model/contract.rs:521); the near-identical names remain a caller hazard.

Details present in the diff but not in the description (see §1a below and "Change" note): the _cache_key(self, request, tokens=None) → (self, request) dead-parameter removal in ignition/direct/scheduler.py:875-882; new doc comments on admit/plan_admission ("Rejects cores that declare core_parameters", scheduler.rs:1544-1552); a stale-looking comment at helios/src/model/tests.rs:144; and inconsistent line wrapping in the rewritten docs/prefix-cache-offload.md paragraph (:772-785).

What the description says that the change does not do: nothing contradicted. The "no HTTP or protobuf changes" claim holds for this diff (only helios/src/server/runtime.rs and phase_tests.rs change under server/; no decode/models/proto files appear in the file list). What the description does not say, but the diff does, is the breaking API surface in Key finding 3.

2. The why — the problem, and how long/widely it was wanted

The problem is stated in #505's own review thread rather than in an issue. #505 (merged 2026-11-28 23:59 by lukealonso) added core-declared FP32 forward parameters and a plan_admission_with_core_parameters(spec, parameters, values) API. The Autobot review on that PR requested two changes; #621, opened the next day, implements both. There is no separate issue, no user bug report, and no recorded production incident — the PR itself says "no production cache mix-up was observed", and the HTTP server already passed declarations explicitly, so served traffic never hit the trap.

The trap, in code terms, was: plan_admission(spec) on main passed &[] declarations and &Default::default() values. The lengths matched (0 == 0), so validation passed; PrefixHistory::with_core_parameters with an empty iterator hashes only flare-prefix-root-v1\0 || identity (helios/src/cache/hash.rs:41-53), identical to PrefixHistory::new (hash.rs:37-39). A declaring core could therefore publish and join checkpoints keyed as if it had no parameters, so two requests with different parameter values could share prefix state. The reach of that in practice is the shared host/pool prefix cache (docs/prefix-cache-offload.md §2.7), i.e. Selene cross-instance sharing — not a single-request bug.

The requirement is thus one review old, scoped to a Rust API that has no external consumers yet, and the PR author is also the author of the code being hardened.

4. Recent activity in the touched areas

Base 2147cd4c is "Fix flare-cli/selene-manager test flakes and parallelize helios-lifecycle checks (#614)" (Luke Alonso, 2026-11-29). Since then main advanced by at least #608 (catalog.rs (not opened), ignition/direct/scheduler.py), #620 (c146d7be, "Remove copy drafts and history drafts while keeping legacy cores loadable" — helios/model-contract.md and graph-kind-adjacent helios/src code), #613 (0c25e88f), #619 (6cb7e3b7), #615, #582, #586, #618, #617, #540.

Consequences for this PR: (a) helios/src/execution/manifest.rs is rewritten here (samples() → is_text_forward()) while helios/src has moved on — a rebase check is warranted and no CI has run to prove a clean merge; (b) ignition/direct/scheduler.py gained Request.__deepcopy__ from #608 after this base; (c) docs/TODO.txt and docs/api.md are append-hot files (#461 and others).

No reversal: the GraphKind change keeps the same seven text-forward kinds (manifest.rs:93-102 vs the deleted list at old contract.rs:421-433), so no recent behaviour is undone. Nothing in this diff conflicts semantically with #608's repairs — #608 fixed the breakage #505 left in catalog/cost/selection, while #621 fixes the admission-safety gap; they are complementary halves of cleaning up after #505, landed on different days by different people.

5. People

6. Community

Zero. No comments (pr_comments → "No comments"), no reviews ("Reviews: none yet"), no reactions, no labels. The only external signal is indirect: #505's Autobot review, which #621 answers, and #599 citing #505's commit 85de9ea — #599 does not mention #621.

7. Claims and evidence

Claim Backing Verdict
Capabilities own declarations; new validates them helios/src/scheduler.rs:110-111, :714; negative test with duplicate names at helios/src/scheduler/tests.rs:2630-2646 Verified
Admission takes only resolved values scheduler.rs:1560-1564; four call sites updated in helios/src/server/runtime.rs Verified
Parameterless call on a declaring core fails before lookup/reservation validation branch scheduler.rs:1566-1586 precedes free_slot() :1587 and lookup :1602; free_slot_count() == 4 assertion at helios/src/model/tests.rs:140-142; helios/src/server/runtime/phase_tests.rs:6818-6835 Verified
Declaration-free cores keep their prefix keys validate_resolved_core_parameters passes for empty/empty; PrefixHistory::with_core_parameters with no iterator == PrefixHistory::new (helios/src/cache/hash.rs:37-53) Verified by construction
No HTTP or protobuf changes No proto/decode/models files in the diff; the two runtime_core/protobuf.rs edits are the rename only Verified
"Rust callers … must update" True but understated: required struct field + renamed public fn (runtime_core/mod.rs:48) Verified, under-described
Shared finite FP32 conversion, nonzero-underflow rejection, −0.0 canonicalization wire_fp32 at ignition/preparation/contract.py:15-28 (wide != 0 and narrowed == 0 → reject; zero → +0.0); used by ignition/direct/scheduler.py:44; new test tests/direct/test_scheduler.py:998-1025 (2**-149, 3*2**-150, 1+2**-24 accepted; 2**-150 rejected; np.float32/np.int64/bool gate; nextafter(f32_max)) Verified
Contract/direct docs distinguish representability from range clamping helios/model-contract.md:128-135 now says non-finite, > f32::MAX and nonzero underflow are rejected rather than "out-of-range numeric encodings" Verified
86 CPU tests, 2 CUDA-only skips, no new Ruff diagnostics No command, no directory list, no artifact given; #505 reported 218 across tests/direct+tests/cli+tests/preparation, so the 86 is not comparable without the invocation Plausible, unverifiable
13 Kani harnesses passed incl. two named ones The two named harnesses are pre-existing (#505's, helios/src/model/contract/kani_proofs.rs:85-142); #621 adds none; #505 said "9 of 9", so totals do not line up across PRs Re-run of #505's proofs
593,669 lifecycle-checker transitions across eight replay suites Matches #505's reported 593,660 near-exactly (1,342+1,291+7,940+8,490+195,492+13,566+365,508+31); no verification/ change in this diff Re-run, not new proof
Mutation experiment on base 44f59df5 (empty declarations → the generic-core test fails at the parameterless assertion; restoring them restores green) Strongest evidence that the new assertion actually bites; but it is a manual experiment with no command or artifact given, so it is not reproducible from the description Not reproducible as stated
Locked release tests: Helios 1,785; Heliopause 211; Flare 242; CLI 226; Heliopause also under --features qualification No CI run on the head; self-reported; #505 reported 1,692/209/236/224 on the same suites, so these are consistent increments Self-reported
No live GPU export, serving, or checkpoint-backed direct run claimed Honest and mirrored in the docs (docs/api.md:768-771, docs/direct-execution.md:86-89, docs/TODO.txt:10-16). The consequence: the whole core-parameter feature has still never been exercised on GPU in any recorded run, and no in-repo recipe declares core parameters Disclosed gap

Not claimed and not done: no test pins that the production HTTP path's two validations agree — helios/src/server/request.rs:333-335 resolves values against config.contract, then the scheduler validates the same values against capabilities.core_parameters (scheduler.rs:1576). A divergence between those two lists is untested.

8. Reach — users, operators, compatibility, deployment, docs

9. Process

10. Project fit (charter, roadmap, docs — as facts)

Lines up:

Does not line up / tension:

11. Open questions / what could not be found

  1. Does the production HTTP path ever validate against a different list than the scheduler? Resolution uses config.contract (helios/src/server/request.rs:333-335); the scheduler now validates against capabilities.core_parameters. Both come from config.contract.core_parameters (helios/src/model.rs:340) in the current constructor path, but no test pins that they cannot diverge (e.g. a future caller building capabilities by hand).
  2. What exactly was the "86 passed" run? No command, no directory, no artifact. #505's equivalent number was 218 across three directories, so the totals are not comparable.
  3. Does the head merge cleanly onto current main? Not answerable without CI; #608 and #620 both landed changes in ignition/direct/scheduler.py and helios/model-contract.md/helios/src after the base.
  4. Did #620 change the graph-kind helpers that #621 relocates? #620 is the most recent helios/src commit and touches graph-draft-adjacent code; the relocation's seven-kind list matches the deleted free function, but a rebase should confirm nothing else changed the set.
  5. No maintainer statement exists about whether this should have blocked #505 rather than landed a day later — nothing in the local copy records a request for this specific follow-up beyond #505's Autobot review text.
  6. #599's hidden-parameter design vs scheduler-owned declarations is unresolved by design here: whichever of #599/#621 lands second must reconcile "the scheduler declares everything the prefix hash covers" with "some parameters are not client-supplied".

Appendix — file map with anchors (head cbb7a4f)

Appendix — orientation-packet leads, disposition

Followed and material: #505 (parent, source of both should-fix items); #608 (repairs #505-adjacent breakage, edits the same scheduler.py, supplies the conflicting CPU-CI environment); #599 (proposal layered on #505's core parameters); #461 (same author, same docs/TODO.txt); #540/#620/#619/#615/#582 (recent activity in helios/src and helios/model-contract.md); #416 and #404 (author's prior work in the same area); #533, #548/#560/#549, #571/#306/#301 (dismissed as file-level rebase risk or unrelated).