Explore scratchpad · NVIDIA/hyperflare-inference #621

Raw Markdown for agents: https://autobot.eidonix.com/p/35a9bd6f-dc61-49c5-9466-eb6fa48652e6.md

#1 [high] Change: what PR #621 does, file by file

PR #621 "Validate scheduler admission against the core parameter declarations", author jcartu, head cbb7a4f, base main, 25 files +148/−117, no reviews, no CI checks (orientation packet).

Core of the change (5 behavioural pieces):

  1. SchedulerCapabilities gains pub core_parameters: Vec<CoreParameter> (helios/src/scheduler.rs:110-111) and RequestScheduler::new validates them via crate::model::contract::validate_core_parameter_declarations (helios/src/scheduler.rs:714). scheduler_capabilities() fills it from config.contract.core_parameters.clone() (helios/src/model.rs:340).
  2. plan_admission_with_core_parameters drops its parameters: &[CoreParameter] argument and reads &self.capabilities.core_parameters instead (helios/src/scheduler.rs:1560-1565). plan_admission(spec) delegates with &Default::default() (helios/src/scheduler.rs:1553-1555); since validate_resolved_core_parameters requires values.len() == parameters.len(), a parameterless call on a declaring core now fails at admission (helios/src/model/contract.rs:471-485). admit(spec) inherits the rejection through plan_admission (helios/src/scheduler.rs:1544-1549). Rejection happens on the validation branch before self.free_slot()/ensure_resources, so no slot/page reservation (scheduler.rs:1566-1587) — asserted by assert_eq!(scheduler.free_slot_count(), 4) in helios/src/model/tests.rs:142.
  3. All production call sites lose the extra slice argument: begin_pool_lookup, admit_with_checkpoint_accounting, admit_with_host_store in helios/src/server/runtime.rs (now at lines 2732-2749, 2766-2772, 2779-2792); they no longer consult self.config.contract.core_parameters.
  4. helios/src/model/contract.rs deletes the free function is_text_forward_graph(kind) and moves the predicate to GraphKind::is_text_forward() in helios/src/execution/manifest.rs:93-102, with GraphKind::samples() now delegating to it (manifest.rs:90). Callers updated: contract.rs:652, model/packing.rs:140.
  5. FP32 narrowing helper unified: ignition/direct/scheduler.py deletes its private _wire_fp32 (and _FP32_MAX) and imports wire_fp32 from ignition/preparation/contract.py (scheduler.py:44, calls at 122/132/225); contract.py renames _wire_fp32→public wire_fp32(value, label="value") (ignition/preparation/contract.py:15-28).
  6. Rename: helios_core::runtime_core::validate_core_parameters→validate_core_parameter_declarations (helios/src/runtime_core/mod.rs:48-50, protobuf.rs:54/85), caller heliopause/src/export/binding.rs:1046. Note PreparedContract::validate_core_parameters (values, contract.rs:521) still exists — the rename only touched the declaration validators.
  7. Docs: docs/TODO.txt gains a GPU-qualification item (+8), docs/api.md and docs/direct-execution.md add "GPU pending qualification" notes, docs/prefix-cache-offload.md rewrites the admission paragraph (lines 772-783), helios/model-contract.md rewrites the resolution/clamping sentence (lines 128-135).
  8. Tests: new assertions in helios/src/model/tests.rs:138-142, phase_tests.rs:6818-6831, scheduler/tests.rs:2630-2644 (duplicate-name declaration rejected by RequestScheduler::new), tests/direct/test_scheduler.py:998-1025 test_wire_fp32_binary32_boundaries_and_type_gate. All other test files only add core_parameters: vec![] to SchedulerCapabilities literals.

#2 [high] Why: #621 answers #505's review should-fix items (unsalted admission + TODO qualification)

#621 is the follow-up to the Autobot review on #505 (read_item 505, review comment 2026-11-29 04:03, "Recommendation: Changes Requested", 0 blockers / 2 should-fix): (a) "the latent unsalted-admission trap on RequestScheduler" and (b) "the missing docs/TODO.txt qualification record with stated qualification scope in user-facing docs". #621 fixes exactly (a) — capability-owned declarations + rejection of parameterless admission on a declaring core — and (b) — docs/TODO.txt:9-16 GPU qualification item plus "pending qualification" sentences in docs/api.md:768-771 and docs/direct-execution.md:86-89.

The trap in code terms: on main before this PR, plan_admission(spec) called plan_admission_with_core_parameters(spec, &[], &Default::default()) (old helios/src/scheduler.rs). validate_resolved_core_parameters only requires values.len() == parameters.len(), so [] vs {} passed, PrefixHistory::with_core_parameters hashed no parameters, and the prefix root fell back to the declaration-free hash while the core still declared parameters — different resolved values would share checkpoints. Now parameters comes 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 on a declaring core (helios/src/model/contract.rs:471-485).

#505 was merged 2026-11-28 23:59 by the same author (jcartu); #621's head commit cbb7a4f is 2026-11-29. So this is a one-day-later merge-blocker follow-up, not a delayed finding.

#3 [high] Related work: #505 parent, #599 builds on it, #608 overlaps files, #461 sibling TODO edit

#7 [high] Claims and evidence: what the diff proves, what the PR re-runs, what is unbacked

Claims and what backs each (PR text vs code/diff):

  1. "SchedulerCapabilities owns the declarations; RequestScheduler::new validates them" — TRUE, scheduler.rs:110-111 + :714; unit test with duplicate names at helios/src/scheduler/tests.rs:2630-2646.
  2. "admission now takes only the request's resolved values" — TRUE: plan_admission_with_core_parameters(spec, core_parameters) (scheduler.rs:1560-1564), 3 call sites in runtime.rs updated.
  3. "A parameterless call on a declaring core fails before lookup or slot reservation" — TRUE: failure is in the validation if at scheduler.rs:1566-1586, before self.free_slot() at :1587 and before self.cache.lookup(&history) at :1602; asserted with free_slot_count() == 4 (model/tests.rs:140-142) and at phase_tests.rs:6818.
  4. "Declaration-free cores retain their prefix keys" — TRUE by construction: with an empty declaration list validate_resolved_core_parameters passes for an empty map, and 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).
  5. "There are no HTTP or protobuf changes" — TRUE for this diff: only helios/src/server/runtime.rs (removing the slice parameter) and phase_tests.rs changed under server/; no decode.rs/models.rs/proto changes in pr_diff.
  6. "Rust callers constructing capabilities or passing declaration slices must update" — TRUE but understated as a breaking API change: SchedulerCapabilities gained a public field with no Default impl and no #[non_exhaustive] (searched: no matches for impl Default for SchedulerCapabilities/non_exhaustive), so every external struct literal breaks; and helios_core::runtime_core::validate_core_parameters was renamed to validate_core_parameter_declarations (runtime_core/mod.rs:48), a public symbol rename not mentioned in "What changed" except implicitly. In-repo callers: heliopause/src/export/binding.rs:1046. No crates are published yet (charter: "the crates aren't published yet", roadmap #6), so blast radius is in-tree only today.
  7. "Preparation and direct execution now share finite FP32 conversion, including rejection of nonzero underflow and canonicalization of negative zero" — TRUE: wire_fp32 in ignition/preparation/contract.py:15-28 rejects wide != 0 and narrowed == 0 and returns +0.0 for zero; now imported by ignition/direct/scheduler.py:44 (replacing private _wire_fp32). Covered by new test tests/direct/test_scheduler.py:998-1025 (subnormals 2**-149, 3*2**-150, 1+2**-24, rejection of 2**-150, np.float32/np.int64/bool types, nextafter(f32_max)).
  8. "The model contract and direct-execution docs distinguish representability from range clamping" — TRUE: helios/model-contract.md:128-135 now says values outside the finite FP32 range are rejected (non-finite, > f32::MAX, nonzero underflow) rather than "out-of-range numeric encodings"; docs/api.md:755-757 unchanged semantics.
  9. "Base 2147cd4c; direct/preparation CPU tests 86 passed, 2 CUDA-only skips; no new Ruff diagnostics" — plausible but the PR never says which command/dirs produce 86; #505 ran 218 across tests/direct+tests/cli+tests/preparation.
  10. "All 13 Kani harnesses passed, including core_parameter_validation_enforces_finite_ordered_bounds and core_parameter_resolution_produces_valid_canonical_value" — those two harnesses are pre-existing, added by #505 (helios/src/model/contract/kani_proofs.rs:85-142); #621 adds no harness. Harness count also differs from #505's "9 of 9", so the totals are not comparable across PRs.
  11. "The lifecycle checker verified 593,669 observed Rust transitions across eight replay suites" — also a re-run, not new verification: #505's own numbers sum to 593,660 (1,342+1,291+7,940+8,490+195,492+13,566+365,508+31). Twice in two PRs the same checker is cited; #621 changes no TLA+ model, no verification/ file.
  12. "On the earlier base 44f59df5, replacing the scheduler's declarations with an empty slice made generic_core_parameters_resolve_pack_and_enforce_text_forward_contracts fail at the parameterless-admission assertion. Restoring the declarations restored the passing result." — this is the strongest evidence offered that the new assertion actually bites; it is a manual mutation experiment, not reproducible from the description (no command given).
  13. "Locked release tests: Helios 1,785; Heliopause 211; Flare 242; CLI 226" — plausible, no CI artifact; #505 reported 1,692/209/236/224 on the same suites.
  14. "No live GPU export, serving, or checkpoint-backed direct run is claimed" — consistent with the docs changes that add the same limitation (docs/api.md:768-771, docs/direct-execution.md:86-89, docs/TODO.txt:10-16). This is the honest gap: the entire feature (#505 and #621) has never been exercised on GPU in any recorded run, and no in-repo recipe declares core parameters (#505 description).
  15. Not claimed and not done: no test pins that the production HTTP path validates against the scheduler's declaration rather than the contract's — it now effectively validates twice (request.rs:333-335 resolves against config.contract, then scheduler validates the same values against capabilities.core_parameters, scheduler.rs:1576). A divergence between the two lists is untested.

#9 [high] Process: ready for review, zero CI, base behind main, verification self-reported and env-sensitive

#11 [high] Research summary

Case file for #621 (jcartu, open, ready for review, head cbb7a4f, base main 2147cd4c, 25 files +148/−117, no reviews, no CI) is complete across all eight angles; ten scratchpad entries hold the detail with file:line and PR/issue citations.

What it is. A one-day follow-up to #505 (merged 2026-11-28 by lukealonso, 32 files +2393/−261) that closes the two should-fix items of #505's Autobot review: the "latent unsalted-admission trap" and the missing docs/TODO.txt GPU-qualification record. Mechanically it moves core_parameters declarations into SchedulerCapabilities (scheduler.rs:110-111), validates them in RequestScheduler::new (:714), drops the declaration slice from plan_admission_with_core_parameters (:1560-1564) and lets plan_admission/admit fail on declaring cores before lookup or slot reservation (:1553-1555, :1566-1587). It also relocates is_text_forward_graph to GraphKind::is_text_forward() (manifest.rs:93-102), unifies Python FP32 narrowing into wire_fp32 (ignition/preparation/contract.py:15-28, used by ignition/direct/scheduler.py:44), renames the public validate_core_parameters→validate_core_parameter_declarations, and adds "GPU pending qualification" notes to four docs plus a TODO gate.

What a reader could not learn from the description. (1) SchedulerCapabilities gained a public field with no Default and no #[non_exhaustive], and a public validation symbol was renamed — a real breaking Rust API change beyond "callers must update", cheap now only because the crates are unpublished (charter roadmap #6). (2) The Kani harnesses and TLA+ numbers cited are #505's, re-run; #621 adds no proof, and its 593,669 transitions are the same run as #505's 593,660. (3) No CI exists on the head, so all suites are self-reported, and the reported CLI pass required CUDA_VISIBLE_DEVICES unset — the opposite of what the repo's own new CI (#608, python-cpu.yml (not opened)) does. (4) plan_admission now takes &Default::default(); the `guard is a length check against the scheduler's declarations — the test at model/tests.rs:138-142 and the mutation experiment on base 44f59df5 are the only evidence it bites. (5) The base is ~10 merges behind main, on files subsequently changed by #608, #620, #613.

Cross-references. #505 is the parent; #599 (open, hughmadden) builds a proposal on #505's core parameters and would interact with scheduler-owned declarations; #608 repaired #505-adjacent breakage and edits the same scheduler.py; #461 (open, same author) appends to the same docs/TODO.txt; open scheduler PRs #548/#560/#549/#571/#306/#301 are mechanical rebase risks only. Charter-wise the change is model-agnostic, loud-failure, root-cause work that answers a review, but its GPU/matrix evidence is deferred to docs/TODO.txt:10-16, and the whole feature line has never run on GPU in any recorded run.

Nothing was found to be actively misleading in the diff; the endangering facts are scope (API break), evidence (re-used verification, no CI), and freshness (stale base).

#4 [medium] Recent activity: base 2147cd4c is ~10 commits behind main, same files touched since

PR says base 2147cd4c ("Fix flare-cli/selene-manager test flakes and parallelize helios-lifecycle checks (#614)", Luke Alonso, 2026-11-29). main has since advanced past it with at least: #608 (9a054b49/3343f13, merges catalog.rs + ignition/direct/scheduler.py changes), #620 (c146d7be, "Remove copy drafts and history drafts while keeping legacy cores loadable" — touches helios/src/execution/manifest.rs-adjacent GraphKind code and helios/model-contract.md), #613 (0c25e88f), #619 (6cb7e3b7), #582, #540, #586, #618, #617, #603 (see search_history main output). So the PR is behind main on the same files:

#5 [medium] People: jcartu owns the core-parameter series; yatesdr and lukealonso are the area reviewers

#6 [medium] Community: no reviews/comments/reactions; only a bot review on the parent PR

#8 [medium] Reach: no HTTP/config change; breaking Rust API surface; unsalted prefix keys prevented in shared caches

#10 [medium] Project fit: aligns with model-agnostic + no-silent-drop rules; GPU matrix evidence still deferred

#12 [medium] Change: details in the diff that the description skips

Undeclared / under-declared details found by reading the diff (beyond entry 1):

#13 [medium] Leads: which orientation-packet items mattered and which are not relevant

Orientation-packet leads, and what became of each:

Followed and material:

Marked not relevant: #571, #306, #301 (scheduler planning/learning, no admission surface); the "82 more" related items in the packet (no core-parameter or admission-API overlap surfaced in searches); the items_touching(ignition/direct/scheduler.py) list beyond #608/#505/#479 (#479 is the fused addend/gated gather work, pre-#505 layout only).

#14 [medium] File map: every touched file with its line anchors

File map of the change with citations, for the report body (all at head cbb7a4f):