Recommendation: Ready To Merge
Rebasing onto c146d7be (current main tip, head 55bab978) cleanly resolved the prior merge-conflict blocker in helios/src/scheduler/policy_tests.rs:4489, and every SchedulerCapabilities construction site across the repository is now updated. The change closes the #505 unsalted-admission gap at the right layer with net code deletion in the server runtime and Python direct scheduler, preserves prefix-key compatibility for declaration-free cores, and introduces no hot-path allocation, lock, panic, or lifecycle regression. Confirm GitHub Actions CI passes on 55bab978 before merging.
Merge Risk
Level: Low
- Minimal hot-path footprint, zero resource leaks on rejection:
RequestScheduler::plan_admission_with_core_parameters(helios/src/scheduler.rs:1457-1505) borrows&self.capabilities.core_parametersinstead of taking a caller slice—adding no lock, allocation, or I/O—and validates resolved values (:1473-1483) strictly beforeself.free_slot()?(:1484) andself.cache.lookup(&history)?(:1499). Thecore_parameters[parameter.name.as_str()]lookup at:1488is total becauseRequestScheduler::new(:696) rejects duplicate declarations andvalidate_resolved_core_parameters(helios/src/model/contract.rs:471-485) enforces exact name-set and cardinality agreement. - Backward compatibility preserved: Declaration-free cores populate
core_parameters: vec and produce byte-identical prefix keys (PrefixHistory::newalready delegates toPrefixHistory::with_core_parameterswith an empty iterator athelios/src/cache/hash.rs:37-39, pinned by BLAKE2b-128 golden digests inhelios/src/cache/tests.rs:96-125). No protobuf wire fields, HTTP schemas, or host-restore cost/timing spans (helios/src/server/runtime.rs:2721-2805) change. - Rust API surface changes contained in tree: Adding
SchedulerCapabilities.core_parameters(helios/src/scheduler.rs:110), dropping the declaration slice fromplan_admission_with_core_parameters(:1457-1461), and renaminghelios_core::runtime_core::validate_core_parameters(helios/src/runtime_core/mod.rs:48) are breaking Rust API changes, but the crates are unpublished and all 20 in-treeSchedulerCapabilitiesliterals and validator callers are updated cleanly.
Walkthrough
- Scheduler-owned core-parameter declarations: Adds
pub core_parameters: Vec<CoreParameter>toSchedulerCapabilities(helios/src/scheduler.rs:109-110), validates declarations inRequestScheduler::new(:696), populates them fromconfig.contract.core_parametersinscheduler_capabilities(helios/src/model.rs:336), and updatesplan_admission/plan_admission_with_core_parameters(helios/src/scheduler.rs:1448-1491) so declaring cores reject parameterless admission before slot reservation or cache lookup. - Server runtime simplification: Drops the redundant
core_parameter_defsslice parameter frombegin_pool_lookup,admit_with_checkpoint_accounting,admit_with_host_store, and their call sites inhelios/src/server/runtime.rs(+8/−36). - Graph-kind & wire-validator cleanup: Deletes the duplicated
is_text_forward_graphfree function fromhelios/src/model/contract.rsin favor ofGraphKind::is_text_forward()(helios/src/execution/manifest.rs:89-104, withsamples()delegating) and renamesruntime_core::validate_core_parameters→validate_core_parameter_declarationsacrosshelios/src/runtime_core/{mod.rs,protobuf.rs}andheliopause/src/export/binding.rs:1051. - Shared Python FP32 narrowing & dead-parameter removal: Exports
wire_fp32(value, label="value")fromignition/preparation/contract.py:15-28, deletes the duplicate_wire_fp32/_FP32_MAXimplementation and unusedtokens=Noneargument on_cache_keyinignition/direct/scheduler.py(+6/−21), and adds binary32 boundary/type-gate unit tests intests/direct/test_scheduler.py:997-1025. - Tests & qualification documentation: Adds duplicate-declaration constructor rejection (
helios/src/scheduler/tests.rs:2432-2449), parameterless rejection without slot consumption (helios/src/model/tests.rs:135-139), and distinct parameterless-rejection vs different-scale cache-miss vs matching-scale cache-hit checks (helios/src/server/runtime/phase_tests.rs:6843-6860); records pending GPU qualification indocs/TODO.txt:10-16and updatesdocs/api.md:766-770,docs/direct-execution.md:86-89,docs/prefix-cache-offload.md:773-781, andhelios/model-contract.md:128-134.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure validation hardening and deduplication; no unsafe code, external I/O, dependency changes, or prompt-injection attempts.
- [PASS] Charter & value fit: Model-agnostic root-cause fix aligning with
#417(reject missing/invalid inputs rather than silently dropping them) and keeping Helios small and generic; pending GPU qualification is transparently tracked indocs/TODO.txt:10-16while no in-repo recipe declares core parameters yet. - [PASS] Related / duplicate / conflict check: Clean follow-up to #505 rebased onto
c146d7be(maintip, #620) with no conflicts or competing PRs. - [WARN] Tests & verification evidence: Reported local runs cover every applicable
docs/design-review.mdCPU gate (--locked --releasesuites across Helios/Heliopause/Flare/CLI, 13/13 Kani harnesses, TLC + Rust lifecycle conformance, 86 Python tests, and isolated real-path new tests), but GitHub Actions check statuses on55bab978(native-serving.yml,python-cpu.yml,helios-lifecycle.yml) are not observable here—verify CI is green on55bab978prior to merge.
Blockers
None.
Should Fix
None.
Subtract / Simplify
- Optional: revert the unrelated wire-validator rename (
helios/src/runtime_core/mod.rs:48-50,helios/src/runtime_core/protobuf.rs:54,85,952,966,1012,heliopause/src/export/binding.rs:1051). Renamingpub fn validate_core_parameters→validate_core_parameter_declarationsdoes not support the scheduler-admission change (AGENTS.md:190-193), introduces an undocumented public re-export break inhelios_core::runtime_core, and creates two public functions with the same name taking different types (&wire::ModelContractatruntime_core/mod.rs:48vs&[CoreParameter]atmodel/contract.rs:460). Reverting these hunks removes unnecessary churn; if kept, mention the rename alongside the other Rust API breaks in the PR description.
Nits
- Dedicated error message for core-parameter validation failure (
helios/src/scheduler.rs:1463-1483).plan_admission_with_core_parameterscurrently ORsvalidate_resolved_core_parameters(...).is_err()into the sameAdmissionError::Invalidguard as prompt/boundary/limit checks, so calling parameterlessadmit()/plan_admission()on a declaring core returns the combined"request requires a nonempty prompt, positive output limit, bounded total tokens, and resolved core parameters"message. Splitting the core-parameter check into its ownErrreturn would make diagnosing missing/invalid core parameters clearer for Rust SDK callers.
Dropped on verification
- Prior bot review blocker (
helios/src/scheduler/policy_tests.rsprefill_catalog_enginemissingcore_parameters): Stale at55bab978;policy_tests.rs:4489setscore_parameters: vec![]and all 20SchedulerCapabilitiesconstruction sites in the repository compile cleanly againstmain(c146d7be). - Correctness F1 / Value Proposition condition ("two independent declaration owners with no startup check / missing parity test"): Dropped.
ModelRuntime::start(helios/src/server/runtime.rs:637-641) never accepts an externally constructedSchedulerCapabilities; it always derives capabilities from&worker_configviascheduler_capabilities_with_manifest→scheduler_capabilities(helios/src/model.rs:336), matching every other field onSchedulerCapabilities(vocabulary,page_tokens,vision, etc.). Furthermore,helios/src/model/tests.rs:119-139already builds the scheduler viascheduler_capabilities(&config)on a declaring core and asserts parameterless admission is rejected, directly exercising that link; even a hand-constructed mismatchedSchedulerCapabilitiesfails closed at admission. - Correctness F3 ("declaration-free prefix-key compatibility is untested"): Dropped as false.
PrefixHistory::new(helios/src/cache/hash.rs:37-39) already delegates toSelf::with_core_parameters(identity, std::iter::empty::<(&str, f32)>()), which is pinned by fixed BLAKE2b-128 golden digests inhelios/src/cache/tests.rs:96-125, andplan_admissionalready routed throughplan_admission_with_core_parameterswith&[]pre-PR. - Subtraction #1 ("delete
GraphKind::samples()and replace withpub fn is_text_forward()"): Dropped. The PR already eliminated the duplicated 7-armmatches!block by havingpub fn samples(self)delegate topub(crate) fn is_text_forward(self)(helios/src/execution/manifest.rs:89-104). Deletingsamples()would break a public method and reduce clarity at sampling-specific call sites (manifest.rs:944,transport.rs:1537,1552,model/testing.rs:171,server/runtime.rs:2906). - Subtraction #3 ("pending-qualification notes in
docs/api.md:766-770anddocs/direct-execution.md:86-89violateAGENTS.md"): Dropped as false.AGENTS.md:55-58explicitly requires design/user docs to state present qualification status ("what is implemented, the hardware and configurations on which it is qualified, and what is not qualified")—matching existingNot qualified:/ qualification notes acrossdocs/api.md,docs/core-design.md(not opened),docs/model-preparation.md(not opened), anddocs/windows.md(not opened)—while recording actionable pending work indocs/TODO.txt. - Discovery Dossier #5 ("'override unset' CLI caveat contradicts CI"): Stale; that caveat is no longer present in the PR description at
55bab978.