#1 [high] Research summary
I reviewed the full diff against main, the scheduler admission path, every production caller in helios/src/server/runtime.rs and its re-admission/preemption path, the contract/validator helpers, the Python direct+preparation narrowing code, the docs touched, and the tests. Core mechanics check out; the findings are about diagnosability, an untested two-list invariant, doc/test/claim accuracy, and under-stated API breakage.
Verified sound (stated plainly, no issue invented): the rejection really precedes free_slot() (scheduler.rs:1587) and cache.lookup (:1602), so no slot or page is reserved on the parameterless path; declaration-free cores keep byte-identical prefix roots (PrefixHistory::with_core_parameters with an empty iterator equals PrefixHistory::new, cache/hash.rs:37-53); preemption keeps incoming.prompt.core_parameters through park() (runtime.rs:2086-2111, asserted at phase_tests.rs:6798), so declaring cores re-admit with the same identity; GraphKind::samples() and the new is_text_forward() cover the identical seven kinds as main, so that relocation is behaviour-neutral; and nothing is added to the per-admission hot path (the declarations were hashed before and after, and &self.capabilities.core_parameters replaces the caller-passed slice).
Findings
-
Two declaration lists can silently diverge, and the split failure is swallowed before it becomes a rejection (Major). Values are resolved against
config.contract(helios/src/server/request.rs:333-335:.resolve_core_parameters(&opts.core_parameters)?) while admission validates them againstself.capabilities.core_parameters(helios/src/scheduler.rs:1565,1576). Both currently originate fromconfig.contract.core_parameters.clone()(helios/src/model.rs:340), but nothing pins that, andbegin_pool_lookupdiscards the plan error:helios/src/server/runtime.rs:2753-2755—let Ok(plan) = plan else { return; };. Impact: on any divergence the core silently loses its host-pool lookup (incoming.pool_plan/pool_lookupnever set,runtime.rs:2746-2763) and then rejects 100% of requests at admission — a capability regression plus total failure with no metric. Fix: assert the lists agree (ModelRuntime::start/scheduler_capabilities_with_manifest), and havebegin_pool_lookuppropagateAdmissionError::Invalidtoincoming.reject_admissioninstead of returning. -
The parameterless-on-a-declaring-core failure is indistinguishable from an empty-prompt failure (Minor).
helios/src/scheduler.rs:1582-1585returns one compound message for all seven predicates:"request requires a nonempty prompt, positive output limit, bounded total tokens, and resolved core parameters". A Rust SDK caller who usedadmit(spec)on a declaring core (the exact trap this PR closes) getsAdmissionError::Invalidwith no hint that the entry point was wrong. Fix: split the core-parameter predicate out and say e.g. "core declares N core parameters; pass resolved values to plan_admission_with_core_parameters". -
Breaking public API surface is under-described in the description (Minor).
SchedulerCapabilitiesgains a required public field with noDefaultimpl and no#[non_exhaustive](helios/src/scheduler.rs:110-111; I searched and neither exists), breaking every struct literal; and the public symbol was renamed (helios/src/runtime_core/mod.rs:48-50:pub fn validate_core_parameter_declarations(value: &wire::ModelContract), previouslyvalidate_core_parameters, callers atheliopause/src/export/binding.rs:1046andruntime_core/protobuf.rs:85). The description only says "Rust callers constructing capabilities or passing declaration slices must update", which omits the rename. Fix: name both breaking changes explicitly (cheap now, per roadmap item 6). -
The new Python test does not exercise direct execution's use of the shared helper (Minor).
tests/direct/test_scheduler.py:998-1001importsfrom ignition.preparation.contract import wire_fp32and tests that module only; a regression that re-introduced a private copy inignition/direct/scheduler.py(now imported at :44, used at :122/:132/:225) would leave it green. The same test block is also the only coverage for the undeclared_cache_key(self, request, tokens=None)→(self, request)change (ignition/direct/scheduler.py:878-882), whosetokensparameter had no in-repo caller onmain(callers at :620 and :903 are single-argument). Fix: add a direct-scheduler assertion that resolves a bad value throughLayout.resolve_core_parameters/AdmissionError, and either drop the_cache_keychange from this PR or note it. -
Citation of pre-existing proof harnesses as verification of this change (Minor). Both named harnesses exist but prove
CoreParameter::validateandresolve_valueonly (helios/src/model/contract/kani_proofs.rs:85-106and :108-142); nothing inkani_proofs.rsmentions the scheduler,validate_resolved_core_parameters, or the length check this PR relies on, and the diff adds no harness. Fix: say "re-ran the existing proofs; no new proof covers scheduler-owned declarations", rather than presenting them as support for the change. -
Docs left internally inconsistent by the PR's own rewrite (Minor). The new text at
docs/prefix-cache-offload.md:773-779correctly restrictsplan_admission/admitto declaration-free cores, butdocs/prefix-cache-offload.md:833still readsAdmission consults the store after \plan_admission`: `lookup` runs above the GPU hit, which is wrong for declaring cores (the worker usesplan_admission_with_core_parameters,runtime.rs:2748/2772/2792`). The rewritten paragraph also has one line at ~96 characters while the rest wraps near 78. Fix: reword :833 and rewrap :781. -
One "locked release test" claim is not reproducible under the repo's own CI environment (Minor). The description says the CLI suite passed only with
CUDA_VISIBLE_DEVICESunset, but.github/workflows/python-cpu.yml:30-33(not opened) runsenv: CUDA_VISIBLE_DEVICES: ""withrun: .venv/bin/python -m pytest tests/ -q. With no checks oncbb7a4f, the CLI count is not backed by a run matching how CI invokes the suite. Fix: state the exact invocation used, or re-run the CLI suite with the CI environment.
#2 [high] PR #621 lens review: verified-sound areas and 7 findings with citations
PR #621 "Validate scheduler admission against the core parameter declarations" (jcartu, head cbb7a4f, base 2147cd4c). Lens: Correctness, Contracts & System-Level Consequences.
VERIFIED SOUND (report states these plainly):
- Rejection precedes resource work: helios/src/scheduler.rs:1566-1586 validation
if→ :1587self.free_slot()?→ :1602self.cache.lookup(&history)?. No slot/pages reserved on the parameterless path. - Declaration-free cores keep identical prefix roots:
PrefixHistory::newdelegates towith_core_parameterswith an empty iterator (helios/src/cache/hash.rs:37-53), so hash isflare-prefix-root-v1\0 || identityboth ways. - Preemption keeps parameter values:
park()clears pool state but notincoming.prompt(helios/src/server/runtime.rs:2086-2111), asserted at helios/src/server/runtime/phase_tests.rs:6798 (assert_eq!(parked_incoming.prompt.core_parameters, parameters)), so declaring cores re-admit with the same prefix identity. GraphKind::samples()/newis_text_forward()cover the same seven kinds as main's deleted free function; relocation is behaviour-neutral (helios/src/execution/manifest.rs:89-104 vs main; callers helios/src/model/contract.rs:652, helios/src/model/packing.rs:140).- No hot-path cost added: declarations were hashed before this PR too; the slice now comes from
&self.capabilities.core_parameters(scheduler.rs:1565) instead of a caller argument. - Not an "API-pricing/span" issue: no admission/rate/latency metric sampling changed in this diff.
FINDINGS
- MAJOR — two declaration lists can diverge, and the divergence is swallowed before it becomes a rejection.
- Resolution uses config.contract: helios/src/server/request.rs:333-335
let core_parameters = config .contract .resolve_core_parameters(&opts.core_parameters)?; - Admission validates against capabilities: helios/src/scheduler.rs:1565
let parameters = &self.capabilities.core_parameters;and :1576validate_resolved_core_parameters(parameters, core_parameters,). - Both today come from helios/src/model.rs:340
core_parameters: config.contract.core_parameters.clone(),but no test pins agreement (only construction: scheduler.rs:714 validating capabilities atnew). - Swallowed failure: helios/src/server/runtime.rs:2753-2755
let Ok(plan) = plan else { return; };insidebegin_pool_lookup, so a rejected plan silently skipsincoming.pool_lookup = store.begin_lookup(...)/incoming.pool_plan = Some(plan)(:2756-2763). - Impact: on divergence, the core silently loses host/pool prefix lookups (capability regression, no metric) and then rejects every request at admission.
- Fix: assert the two lists agree where capabilities are built (scheduler_capabilities_with_manifest / ModelRuntime::start), and make begin_pool_lookup report AdmissionError::Invalid via incoming.reject_admission instead of returning silently.
- MINOR — parameterless-on-declaring-core error is not diagnosable.
- helios/src/scheduler.rs:1582-1585:
"request requires a nonempty prompt, positive output limit, bounded total tokens, and resolved core parameters"is returned for all seven predicates in the :1566-1581if(empty prompt, boundaries, max_new_tokens, token bound, core-parameter mismatch). - Impact: the Rust SDK trap this PR closes now fails with a message that does not mention that
admit/plan_admissionare unusable on declaring cores. - Fix: separate the core-parameter predicate and name the required entry point.
- MINOR — breaking public API under-described.
- helios/src/scheduler.rs:110-111
/// Core-declared FP32 forward parameters validated and hashed into every admission plan.pub core_parameters: Vec<crate::model::contract::CoreParameter>,— noDefaultimpl forSchedulerCapabilitiesand no#[non_exhaustive](searched; none exist), so every struct literal breaks. - Rename: helios/src/runtime_core/mod.rs:48-50
pub fn validate_core_parameter_declarations(value: &wire::ModelContract) -> crate::Result<()>(wasvalidate_core_parameters), callers helios/src/runtime_core/protobuf.rs:85,952,966,1012 and heliopause/src/export/binding.rs:1046. - PR text only says "Rust callers constructing capabilities or passing declaration slices must update" — omits the renamed public symbol.
- Fix: list both breaking changes; cheap now pre-publication (charter roadmap item 6).
- MINOR — new Python test does not exercise direct execution's use of the shared helper.
- tests/direct/test_scheduler.py:998-1001
def test_wire_fp32_binary32_boundaries_and_type_gate(): ... from ignition.preparation.contract import wire_fp32— tests only the preparation module. - ignition/direct/scheduler.py:44
from ignition.preparation.contract import wire_fp32, used at :122/:132/:225, is untested; a re-introduced private copy would stay green. - Same block is the only coverage of the undeclared
_cache_key(self, request, tokens=None)→(self, request)change (ignition/direct/scheduler.py:878-882); main's only callers pass one argument (:620, :903), so the parameter was dead but the change is unmentioned. - Fix: add a direct-scheduler resolution test through Layout.resolve_core_parameters/AdmissionError; note or drop the
_cache_keychange.
- MINOR — pre-existing Kani proofs cited as verification of this change.
- helios/src/model/contract/kani_proofs.rs:85-106
core_parameter_validation_enforces_finite_ordered_boundsproves CoreParameter::validate; :108-142core_parameter_resolution_produces_valid_canonical_valueproves resolve_value. No harness references the scheduler, validate_resolved_core_parameters, or the length check; the diff adds none. - Fix: describe as re-runs; state that no harness covers scheduler-owned declarations.
- MINOR — docs inconsistent after the PR's own rewrite.
- docs/prefix-cache-offload.md:773-779 now restricts
plan_admission/admitto declaration-free cores, but :833 still saysAdmission consults the store after \plan_admission`: `lookup` runs above the GPU hit` — wrong for declaring cores, which use plan_admission_with_core_parameters (helios/src/server/runtime.rs:2748,2772,2792). - Also :781 is one long line in an otherwise ~78-column paragraph.
- Fix: reword :833, rewrap :781.
- MINOR — a "locked release test" claim is not reproducible under the repo's CI.
- PR text: "The first CLI run set
CUDA_VISIBLE_DEVICESto an empty string ... The complete CLI suite passed with that override unset". - .github/workflows/python-cpu.yml:30-33
env: CUDA_VISIBLE_DEVICES: ""/run: .venv/bin/python -m pytest tests/ -q. - With no checks on cbb7a4f, the CLI 226 count is self-reported under an environment CI does not use.
- Fix: give the exact invocation, or re-run under the CI environment.
CONTEXT: AGENTS.md requires PR descriptions to separate claim from evidence and to keep unrun checks in docs/TODO.txt (which this PR does add: docs/TODO.txt:10-16 GPU qualification gate, honestly disclosed in docs/api.md:768-771 and docs/direct-execution.md:86-89). Charter "Supported matrix & compatibility" remains unmet for the cache-identity change (no GPU/multi-host run), which the PR discloses rather than claims.