#1 [high] PR 505 map: what changed
PR #505 "Bind core-declared FP32 parameters into text forward graphs" (merged, head ef94d62, 32 files, +2393/-261). Adds ModelContract.core_parameters=8, ValueSource::CORE_PARAMETER=43, ValueBinding.parameter=7.
Key code points:
- helios/src/model/contract.rs:
CoreParameter{name,default_value,range}(+CoreParameterRange{min,max}),canonical_core_parameter,is_text_forward_graph,CoreParameter::validate/resolve_value/validate_value,validate_core_parameter_declarations,validate_resolved_core_parameters,PreparedContract::{core_parameter,resolve_core_parameters,validate_core_parameters};PreparedContract::validategains core-param binding rules (~lines 665-735, 828-832). - helios/proto/runtime_core.proto lines ~270-283, 379-403.
- helios/src/runtime_core/{mod.rs:46, protobuf.rs:54-73,85}: load-time validation;
serving_contractrestructured tolet Some(contract) else. - heliopause/src/export/binding.rs:1044-1049 export-time validation via
helios_core::runtime_core::validate_core_parameters. - helios/src/cache/hash.rs:37-65
PrefixHistory::with_core_parameters(new() delegates with empty iter); hashes len,name bytes,canonical f32 bits afterflare-prefix-root-v1\0+identity. - helios/src/scheduler.rs:268/272 LiveRequest.core_parameters+getter; 601-604 AdmissionPlan.core_parameters; 1526-1528 plan_admission wrapper; 1532-1580 plan_admission_with_core_parameters; 1584-1590 refresh; 1632-1635,1827 admission destructure.
- helios/src/model/admission.rs:62,76,118,139 validate core params on Admission::validate/validate_prompt.
- helios/src/model/packing.rs:50 field, 139-145 indexing rule, 162-168 value_offset rule, 236-245 dtype rule, 286-293 prealloc, 533-549 submission-row resize, 560-618 destination checked arith + CoreParameter bit-equality check, 924-935 write, new write_floats helper 936-960.
- helios/src/server/: runtime.rs Prompt.core_parameters (37), begin_pool_lookup(2738-2771) and admit helpers take defs+values; request.rs:333-335 resolve at prepare; decode.rs:49-75 core_parameter_map + 614-616 options; models.rs:72-88,123
flare.core_parameters; inference.rs Options.core_parameters. - Python: ignition/preparation/contract.py
_wire_fp32,binding(...,parameter=),core_parameter(),model_contract(core_parameters=); ignition/direct/{packing,scheduler,server}.py; tests/direct/test_scheduler.py. - Docs: helios/model-contract.md, docs/api.md, docs/direct-execution.md.
Charter/docs read: AGENTS.md (no per-model flags; model core compatibility; "don't silently ignore API fields"; protobuf additions preserve existing behavior), docs/design-review.md (principles 1,3,7,12,13; testing hierarchy mandatory layers incl. TLA+/Kani for scheduler/admission changes).
#2 [high] Research summary
I read the project rules (AGENTS.md, docs/design-review.md, the charter) and the whole PR diff, plus the surrounding code for every changed Rust/Python unit and its callers (contract validation, protobuf load/export validation, prefix hashing, scheduler admission, packing, HTTP decode/requests/models, and the three ignition/direct modules).
Findings (all verified in code; none block the wire-format or packing work, which is internally consistent):
-
Should fix — declaration-free admission silently bypasses core-parameter validation.
RequestScheduler::plan_admission(helios/src/scheduler.rs:1526-1528) delegates with&[]/Default::default(), sovalidate_resolved_core_parameters(contract.rs:484-497) sees two empty collections and accepts. On a core that does declare parameters,admit/admit_plannedtherefore succeed with an emptyLiveRequest.core_parameters, and the failure only surfaces later as an execution-path error inInputs::pack_step("core-parameter admission plan is incomplete", packing.rs:587-592) on every forward launch. Admission is supposed to reject unsupported configurations explicitly (design-review principle 2). Fix: carry the declarations (e.g. onSchedulerLimits/ModelConfig) and always validate, or makeplan_admissionreject when declarations exist. -
Should fix — export-time validation covers only declarations, not bindings, so invalid bindings are still exported.
heliopause/src/export/binding.rscalls onlyruntime_core::validate_core_parameters, which checks names/defaults/ranges (runtime_core/protobuf.rs:54-73). The binding invariants (text-forward-only, completeness, width-one FP32, zero offset/padding/tensor) live inPreparedContract::validate(contract.rs:693-728), reached only throughInputs::newat serve time. A recipe can therefore export successfully and only fail when the core is loaded and packed, contrary to the load-time/export-time symmetry claimed in the description. Fix: run the contract validate (or a shared binding validator) fromserving_metadata. -
Nit —
Admission::validate/validate_prompt(model/admission.rs:74-76, 137-139) require the resolved map length to equal the declared count. Any embedder that constructs anAdmissionwithDefault::default()for a declaring core gets "core_parameters does not match the model core's resolved parameters", which reads as a contract mismatch rather than "this path cannot supply required parameters"; the error would be clearer if it named the missing parameters. -
Nit — packing.rs:162-168 now includes
CoreParameterin thevalue_offset != 0guard but keeps the message "value offset requires an integer value source", which is wrong for float sources; it will mislead anyone reading a rejected recipe. -
Nit —
/v1/modelsemits"range": nullfor parameters declared without a range (models.rs:72-88, asserted by its test), while the rest of the serving metadata strips JSON nulls (runtime_core/protobuf.rs:87). Clients must handle a null object; either omit the field or document it in docs/api.md (not opened).
Things I checked and found correct: PrefixHistory::new still produces the exact previous root (flare-prefix-root-v1\0 || identity) because the parameter iterator is empty; declaration-order hashing includes zero values and canonicalizes -0.0; refresh_admission_plan and the park/requeue readmission paths rebuild plans from incoming.prompt, which retains the resolved map, so preemption and pool-lookup retries keep identity consistent; the SubmissionRow staging buffer is written per binding before the next binding clears it, so multiple parameters per graph are safe; write_floats/write_raw/write_integers extent and overflow checks are sound; the Python direct path validates the same binding set and pads inactive rows with 0.0, matching the documented behaviour; and serving_contract's restructured let Some(...) else is behaviourally identical to the previous is_none_or check.
Unrun/limits: I did not execute the test suites, TLA+ conformance, or Kani; findings are from reading code paths only. Item 1 and 2 would be settled by a test that loads a declaring core and admits through RequestScheduler::admit, and by an export test with a binding in a non-text-forward graph.
#3 [high] Should fix: plan_admission bypasses core-parameter validation
Severity: should fix.
helios/src/scheduler.rs:1526-1528:
pub fn plan_admission(&mut self, spec: &RequestSpec) -> Result<AdmissionPlan> {
self.plan_admission_with_core_parameters(spec, &[], &Default::default())
}
validate_resolved_core_parameters (helios/src/model/contract.rs:484-497) rejects only when values.len() != parameters.len() or a value fails validate_value; with both sides empty it returns Ok. So on a core whose contract.core_parameters is non-empty, RequestScheduler::admit / admit_planned (scheduler.rs:1519-1522, 1616-1622) succeed with an empty LiveRequest.core_parameters (set at scheduler.rs:1827).
The failure then surfaces only in the execution path: helios/src/model/packing.rs:587-592
.get(&binding.parameter).copied().ok_or("core-parameter admission plan is incomplete")? on every forward launch, and also Admission::validate/validate_prompt (model/admission.rs:74-76, 137-139) would reject such a request if reached.
Why it matters: docs/design-review.md principle 2 ("Admission reserves resources and rejects unsupported features ... explicitly") and AGENTS.md "Reject weakened guarantees ... do not silently substitute execution paths". The PR description claims shared, load-time-consistent validation; serving-side admission does not enforce it for these callers.
Fix: pass the model's declarations into admission (e.g. through SchedulerLimits or ModelConfig) so plan_admission validates against them, or reject in plan_admission when declarations exist but none were supplied.
Would be settled by: a test that loads a core with core_parameters and admits via scheduler.admit(...) (no declarations passed) — currently unbounded-ok, later error.