Recommendation: Changes Requested
The core design is sound, model-agnostic, and closes the real unsalted-admission trap from #505 cleanly with net code deletion in helios/src/server/runtime.rs and ignition/direct/scheduler.py. However, head cbb7a4f is stale against current main with a verified merge conflict and test compile break in helios/src/scheduler/policy_tests.rs (where main refactored cold_deepseek_16k_engine into prefill_catalog_engine, which lacks the new required core_parameters field), and no CI checks have run on the PR head. Rebase onto main, update prefill_catalog_engine, and get green CI runs across native serving, Helios lifecycle/Kani, and Python CPU suites to merge.
Merge Risk
Level: Low (once rebased and CI-verified)
- Narrow hot-path footprint:
plan_admission_with_core_parametersreads&self.capabilities.core_parameters(helios/src/scheduler.rs:1565) instead of a caller-supplied slice, adding no per-admission allocation, lock, or I/O. Rejection runs beforeself.free_slot()?(:1587) andself.cache.lookup(&history)?(:1602), leaving slots, pages, snapshots, and cache state untouched. - Backward compatibility preserved: Declaration-free and legacy cores initialize
core_parameters: vec![]and produce byte-identical prefix root hashes (PrefixHistory::with_core_parameterswith an empty iterator matchesPrefixHistory::newathelios/src/cache/hash.rs:37-53). No protobuf wire fields orModelContract.versionchange. - In-tree Rust API break + stale base: Adding a required public field to
SchedulerCapabilities(helios/src/scheduler.rs:110-111) and renaminghelios_core::runtime_core::validate_core_parameters(helios/src/runtime_core/mod.rs:48-50) breaks Rust struct-literal and validator callers—currently safe for external consumers because the crates are unpublished, but already collides withprefill_catalog_engineadded onmain.
Walkthrough
- Scheduler-owned core-parameter declarations (
helios/src/scheduler.rs,helios/src/model.rs,helios/src/server/runtime.rs): Addspub core_parameters: Vec<CoreParameter>toSchedulerCapabilities, validates declarations inRequestScheduler::new(scheduler.rs:714), populates it inscheduler_capabilities(model.rs:340), removes the declaration-slice parameter fromplan_admission_with_core_parameters(scheduler.rs:1560-1565), and removes threadedcore_parameter_defsarguments acrossbegin_pool_lookup,admit_with_checkpoint_accounting,admit_with_host_store, and their callers (runtime.rs, net +8/−36). - Validator naming & graph-kind predicate consolidation (
helios/src/runtime_core/{mod,protobuf}.rs,heliopause/src/export/binding.rs,helios/src/execution/manifest.rs,helios/src/model/{contract,packing}.rs): Renamesruntime_core::validate_core_parameterstovalidate_core_parameter_declarations; deletes the duplicatedis_text_forward_graphfree function incontract.rsin favor ofGraphKind::is_text_forward()inmanifest.rs:93-104(withsamples()delegating). - Unified Python FP32 narrowing & dead-param cleanup (
ignition/preparation/contract.py,ignition/direct/scheduler.py,tests/direct/test_scheduler.py): Promotes_wire_fp32towire_fp32(value, label="value"), deletes the duplicate_wire_fp32/_FP32_MAXinignition/direct/scheduler.pyand the unusedtokens=Noneparameter on_cache_key, and adds binary32 boundary/type-gate unit tests (tests/direct/test_scheduler.py:998-1025). - Negative admission tests & qualification docs (
helios/src/scheduler/tests.rs,helios/src/model/tests.rs,helios/src/server/runtime/phase_tests.rs,docs/{TODO.txt,api.md,direct-execution.md,prefix-cache-offload.md},helios/model-contract.md): Tests duplicate-declaration rejection at scheduler construction (scheduler/tests.rs:2630-2646), parameterless rejection without slot consumption (model/tests.rs:138-142,phase_tests.rs:6818), clarifies FP32 representability vs range clamping, and records pending GPU qualification indocs/TODO.txt:10-16and user-facing docs.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure validation hardening and deduplication; no unsafe code, external I/O, dependency changes, or instruction-injection patterns.
- [PASS] Charter & value fit: Model-agnostic root-cause fix aligning with "keep the runtime small and model-agnostic" and "#417 don't silently ignore fields"; GPU qualification gap is transparently tracked in
docs/TODO.txt:10-16(and no in-repo recipe declares core parameters yet). - [WARN] Related / duplicate / conflict check: Clean follow-up to #505 with no duplicate PR, but conflicts with
maininhelios/src/scheduler/policy_tests.rswherecold_deepseek_16k_enginewas refactored intoprefill_catalog_engine(missingcore_parameters). - [WARN] Tests & verification evidence: Local test/Kani/lifecycle/mutation results are plausible and match repo gates (all 13
#[kani::proof]harnesses verified in tree; modified tests are isolated with no shared global state), but no GitHub Actions CI checks exist on headcbb7a4fand currentmainwill not compile cleanly without rebase.
Blockers
- Rebase conflict and compile break on current
main(helios/src/scheduler/policy_tests.rs:4477, 5626) plus missing CI runs oncbb7a4f:- Adding the required field
pub core_parameters: Vec<CoreParameter>toSchedulerCapabilities(helios/src/scheduler.rs:110-111) requires every struct literal to specifycore_parameters. - On PR head
cbb7a4f, this PR patches aSchedulerCapabilitiesliteral insidecold_deepseek_16k_engine(helios/src/scheduler/policy_tests.rs:5626). On currentmain,cold_deepseek_16k_engine(helios/src/scheduler/policy_tests.rs:5648-5664) has been refactored to call a new helperprefill_catalog_engine(helios/src/scheduler/policy_tests.rs:4466-4488), whoseSchedulerCapabilitiesliteral at line4477lackscore_parameters. - In addition, no CI workflows (
native-serving.yml,helios-lifecycle.yml,python-cpu.yml) have run on headcbb7a4f. - Fix: Rebase onto
main, resolve the conflict inhelios/src/scheduler/policy_tests.rs, addcore_parameters: vec![]toprefill_catalog_engine(helios/src/scheduler/policy_tests.rs:4477-4486), and confirm all required CI checks pass on the rebased head.
- Adding the required field
Should Fix
None.
Subtract / Simplify
- Drop redundant
try/exceptwrappers aroundwire_fp32inLayout.__post_init__(ignition/direct/scheduler.py:121-136):wire_fp32already takes alabelargument (ignition/preparation/contract.py:15-28) and raises descriptiveValueErrormessages as used inignition/preparation/contract.py:140-146. The twotry/except ValueErrorblocks inLayout.__post_init__discard that diagnostic context and re-raise generic strings (from None). Passinglabel=f"core parameter {parameter['name']!r} default"/minimum/maximumdirectly removes 4 lines and aligns diagnostics with preparation (verified no tests intests/match the old generic strings). - Optional: call
GraphKind::samples()directly instead of adding a forwarding twin (helios/src/execution/manifest.rs:89-104):GraphKind::samples()and the newpub(crate) fn is_text_forward()match the exact same seven variants, withsamples()reduced to a one-line forwarder. If you prefer a smaller diff surface, you can leavemanifest.rsuntouched and call.samples()athelios/src/model/contract.rs:652andhelios/src/model/packing.rs:140(keepingis_text_forward()is also reasonable if you prefer its naming at core-parameter sites).
Nits
- Document the public validator rename in the PR description: "What changed" notes that Rust callers constructing capabilities or passing declaration slices must update, but omits the public rename
helios_core::runtime_core::validate_core_parameters→validate_core_parameter_declarations(helios/src/runtime_core/mod.rs:48-50). - Keep
docs/prefix-cache-offload.mdinternally consistent (docs/prefix-cache-offload.md:781, 833): Line 773-779 now restrictsplan_admissionto declaration-free cores, while line 833 still saysAdmission consults the store after \plan_admission`` unconditionally; consider rewording to "after admission planning" and rewrapping long line 781. - Dedicated error message for missing/invalid core parameters (
helios/src/scheduler.rs:1576-1585): Evaluatingvalidate_resolved_core_parametersseparately from the prompt/token-limitifblock would let callers who mistakenly calladmit/plan_admissionon a declaring core immediately see that resolved core parameters are required rather than a combined prompt/output/parameter error message.
Dropped on verification
- Correctness Lens #1 ("divergent declaration lists fail silently in
begin_pool_lookup"): Dropped as false/speculative, and its proposed fix would introduce a regression. In production HTTP serving (helios/src/server/runtime.rs:595-599),ModelRuntime::startconstructsRequestSchedulersolely viascheduler_capabilities_with_manifest→scheduler_capabilities(helios/src/model.rs:340, 352), which clonesconfig.contract.core_parameters; neither list is mutated afterward, so they cannot diverge in production. Moreover,begin_pool_lookupintentionally ignoresErr(runtime.rs:2753-2755) becauseplan_admission_with_core_parameterscallsself.free_slot()?(scheduler.rs:1587), which returnsAdmissionError::Capacitywhenever slots are full duringWorker::enqueue(runtime.rs:1234, 1245); callingincoming.reject_admission(error)insidebegin_pool_lookupwould erroneously reject queued requests at slot capacity. On an actualInvaliderror,incoming.awaits_pool(...)isfalse(runtime.rs:1427) and lines1441-1484immediately reject the request viaincoming.reject_admission(error). - Correctness Lens #7 & Dossier #5 ("
CUDA_VISIBLE_DEVICES=""CLI test mismatch withpython-cpu.yml"): Dropped as a false conflation. The author'sCUDA_VISIBLE_DEVICESnote refers to the Rustflare-clisuite (226 tests), which CI runs in.github/workflows/native-serving.yml:69-73(not opened) (cargo test --locked --release --manifest-path flare-cli/Cargo.toml(not opened)) withoutCUDA_VISIBLE_DEVICES="". Only.github/workflows/python-cpu.yml:30-33(not opened) (Pythonpytest) setsCUDA_VISIBLE_DEVICES: "". - Correctness Lens #4 ("new Python test does not exercise direct execution's use of
wire_fp32/ undeclared_cache_keychange"): Dropped as over-flagged. Direct execution'swire_fp32integration is already covered bytest_direct_server_core_parameters_and_model_card(tests/direct/test_scheduler.py:909-930) via_core_parameters(ignition/direct/server.py:111-118) →Layout.resolve_core_parameters(ignition/direct/scheduler.py:225) with-0.0,True,"0.5",1e100, and1e-100. Removing the unusedtokens=Noneparameter from_cache_key(ignition/direct/scheduler.py:878-882; only 2 single-arg callers at lines605and888) is clean dead-code removal. - Correctness Lens #5 ("pre-existing Kani harnesses presented as verification of this change"): Dropped as low-signal.
docs/design-review.md:221-225, 234-240mandates running the existing Kani proofs (13#[kani::proof]harnesses verified inhelios/src/**/kani_proofs.rs) and TLA+ lifecycle conformance suite whenever touching admission or sequential validators; reporting those required regression runs alongside the new negative unit tests and mutation check is accurate. - Subtraction Lens #2.1 ("qualification notes in
docs/api.md:767-771anddocs/direct-execution.md:87-90violateAGENTS.md"): Dropped as over-flagged.AGENTS.md:55-57explicitly instructs stating support as present qualification ("what is implemented, the hardware and configurations on which it is qualified, and what is not qualified"), anddocs/TODO.txt:15-16explicitly pairs with these two-sentence notes; the "exhaustive inventories" prohibition inAGENTS.md:119applies to PR descriptions, not concise qualification statements. - Subtraction Lens #1.1 sub-claim ("
helios/src/execution/manifest.rsis most exposed to merge conflicts withmain"): Dropped as factually false;helios/src/execution/manifest.rs:80-105onmainis unchanged since base2147cd4c.