#1 [high] Orientation: PR 505 conventions lens
PR 505 "Bind core-declared FP32 parameters into text forward graphs" (merged, head ef94d62, 32 files +2393/-261). Lens: conventions & duplication vs closest in-repo precedent.
Repository rules: AGENTS.md (charter: keep runtime model-agnostic, no per-model flags; "Reject unsupported abstractions and churn"; "Reuse … rather than duplicate"; testing hierarchy), docs/design-review.md (principle 3 "Reuse …"; principle 10 explicit configuration, clamp request values to recipe-declared ranges).
New constructs to compare with precedent:
- proto: ModelContract.core_parameters = 8; new messages CoreParameter{name,default_value,range}, CoreParameterRange{min,max} (helios/proto/runtime_core.proto:273-284) vs existing SamplingFloatRange{min,max} (runtime_core.proto:561-564).
- ValueSource.CORE_PARAMETER = 43, ValueBinding.parameter = 7 (runtime_core.proto:379-401) vs ValueBinding.tensor = 6 used by IMAGE_TENSOR.
- Rust: model/contract.rs CoreParameter/CoreParameterRange (contract.rs:114-141), canonical_core_parameter, is_text_forward_graph (contract.rs:424-435), validate_core_parameter_declarations, validate_resolved_core_parameters, PreparedContract::{core_parameter,resolve_core_parameters,validate_core_parameters}.
- Type alias CoreParameters = BTreeMap<String,f32> (helios/src/model.rs:29).
- cache/hash.rs PrefixHistory::with_core_parameters (hash.rs:41-65); PrefixHistory::new delegates.
- scheduler.rs plan_admission wrapper + plan_admission_with_core_parameters (1526-1580), AdmissionPlan.core_parameters, LiveRequest.core_parameters.
- packing.rs Inputs.core_parameters, write_floats, checked arithmetic.
- server: Options.core_parameters (inference.rs:147), decode.rs core_parameter_map (+FP32 narrow), request.rs resolve in prepare_validated_inference, runtime.rs threading core_parameter_defs through begin_pool_lookup / admit_with_checkpoint_accounting / admit_with_host_store (+ call sites), models.rs /v1/models flare.core_parameters, model/admission.rs Admission::validate + validate_prompt add contract.validate_core_parameters.
- Python: ignition/preparation/contract.py _wire_fp32/_FP32_MAX/core_parameter/binding(parameter=)/model_contract(core_parameters=); ignition/direct/scheduler.py _wire_fp32 (+numpy _FP32_MAX), _row_contiguous, _core_parameter_rows, _TEXT_FORWARD_KINDS, Layout.core_parameters/validate, resolve_core_parameters, core_parameter_identity, Checkpoint.tokens/cache_key; ignition/direct/server.py _core_parameters + model_cards; tests/direct/test_scheduler.py.
Existing precedent helpers found so far:
- helios/src/engram.rs:926-936
pub(crate) fn consumes(kind)= matches Prefill|TerminalPrefill|ScoredPrefill|Decode|Speculative|Mixed (no Resume) — near-duplicate of new is_text_forward_graph. - helios/src/model.rs:155-168
SamplingRange<T>+SamplingRanges::validate(191-217) clamps/validates ranges containing defaults — precedent for range validation and for clamping request values. - helios/src/server/request.rs:597-675
sampling_parameters/sampling_number— precedent for per-request numeric validation+clamp at HTTP decode. - helios/src/model.rs
scheduler_capabilitiesbuilds SchedulerCapabilities from config; RequestScheduler::new(identity, limits, capabilities) holds no contract. - phase_tests.rs
enable_core_parameterhardcodes the 7 GraphOperation variants instead of using is_text_forward_graph.
Open: check docs (api.md, direct-execution.md, model-contract.md) prose conventions; check packing.py existing validation/dtype checks; check whether LiveRequest stores sampling (precedent for storing core_parameters); check kani_proofs additions; check cache/tests.rs, model/tests.rs, tests/direct/test_scheduler.py additions.
#2 [high] Should fix: text-forward graph set duplicated 5×; GraphKind::samples() already exists
Files/lines verified:
- NEW: helios/src/model/contract.rs:424-435
pub(crate) fn is_text_forward_graph(kind) -> bool { matches!(kind, Prefill|TerminalPrefill|ScoredPrefill|Resume|Decode|Speculative|Mixed) }(used at contract.rs:665 and model/packing.rs:140). - PRECEDENT: helios/src/execution/manifest.rs:89-100
impl GraphKind { pub fn samples(self) -> bool { matches!(self, Prefill | TerminalPrefill | ScoredPrefill | Decode | Speculative | Mixed | Resume) } }— the identical seven-variant set, already a method on GraphKind, already exported (crate::execution::GraphKind) and already used at manifest.rs:940, execution/transport.rs:1537,1552, model/testing.rs:171, server/runtime.rs:2969. - Also pre-existing inline copies of the same set: helios/src/engram.rs:926-936
pub(crate) fn consumes(kind)and helios/src/server/runtime.rs:1681-1689 inlinematches!. - New copies added by this PR (beyond contract.rs:424): helios/src/server/runtime/phase_tests.rs:6640-6653 (
enable_core_parameter, hardcodes the seven GraphOperation variants), helios/src/model/tests.rs:60-73 (bind_text_forward_core_parameters, same list), ignition/direct/scheduler.py:49_TEXT_FORWARD_KINDS = ("prefill", "terminal_prefill", "scored_prefill", "resume", "decode", "speculative", "mixed"), tests/direct/test_scheduler.py_core_parameter_layoutlocaltext_forward = {...}set.
Why it matters: AGENTS.md ("Reject unsupported abstractions and churn"; reuse rather than duplicate) and docs/design-review.md principle 3 "Reuse … shared mechanisms". The graph-kind vocabulary is a prepared-metadata fact the runtime must not re-enumerate per feature; a sixth copy will silently drift when a graph kind is added (e.g. a future kind that samples but is not "text forward", or vice versa). The new helper is also inconsistent in visibility/placement: a model-agnostic GraphKind predicate lives in model::contract rather than beside GraphKind where is_prefill()/samples() already live.
Fix: delete is_text_forward_graph and use descriptor.kind.samples() (or add GraphKind::forward() next to is_prefill/samples if the two must diverge, with a comment saying why Resume/Speculative are included), have engram::consumes and runtime.rs:1681 call it too, and give the Python/direct-execution copies one source (e.g. a tuple in ignition/preparation/contract.py derived from the wire enum). If the set intentionally differs from samples(), the PR must say which and why; as written it is identical.
#3 [high] Should fix: core-parameter declarations threaded through 4 runtime fns instead of SchedulerCapabilities
Verified facts:
- New signature helios/src/scheduler.rs:1532-1540
plan_admission_with_core_parameters(&mut self, spec, parameters: &[crate::model::contract::CoreParameter], core_parameters: &CoreParameters); wrapper plan_admission (1526) passes&[]+Default::default(). - Because the scheduler does not hold the declarations, helios/src/server/runtime.rs adds a
core_parameter_defs: &[CoreParameter]parameter to four functions and updates every call site:begin_pool_lookup(definition 2738-2745, call sites 1239-1246, 1380, 1429),admit_with_checkpoint_accounting(2774-2783, sites 1455-1468, 1470-1479, 2855+),admit_with_host_store(2793-2805, sites 1450-1460, 2806). ~8 threading edits, all passing&self.config.contract.core_parameters. - PRECEDENT: model geometry that the scheduler validates against already travels in
SchedulerCapabilities(helios/src/scheduler.rs:96-110: vocabulary, page_tokens,vision: crate::model::VisionCapabilities, draft_pages_per_request, state_rows_per_request), built bymodel::scheduler_capabilities(config)(helios/src/model.rs:308-341) and consumed byRequestScheduler::new(identity, limits, capabilities)(scheduler.rs:705+). Vision is the direct precedent: a model-declared capability set that the scheduler stores and validates, rather than a parameter on every admission entry point. - Also precedent for the alternative style being avoided:
Admission::validate(model/admission.rs:71-75) andvalidate_prompt(admission.rs:134-138) reach the contract throughconfig, not through an extra argument, and the same config is already available at every runtime call site.
Why it matters: this is the "footprint in shared code" test in the charter/AGENTS.md ("Look for the smallest footprint in shared code") and design-review principle 3's "Native … admission … stay shared; use prepared metadata". Putting the declaration list on SchedulerCapabilities would remove three new parameters and ~8 call-site edits, and would make plan_admission (the documented two-step API in docs/prefix-cache-offload.md:717,775) stay the single admission entry point instead of leaving a public wrapper that production no longer calls and that silently admits with "no parameters declared".
Fix: add core_parameters: Vec<CoreParameter> (or the resolved-name list) to SchedulerCapabilities, populate it in model::scheduler_capabilities, and keep one plan_admission(&spec, &CoreParameters); delete the with/without pair. If the split is kept, plan_admission must at least be #[cfg(test)]-free of the &[] default that lets a caller skip core-parameter validation on a declaring core (see also: validate_resolved_core_parameters accepts a mismatched length only by rejecting — plan_admission with &[] on a declaring core always errors, which is at least safe, but the API invites the mistake).
#9 [high] Research summary
I reviewed PR 505 through the conventions-and-duplication lens: I read the charter (read_charter), AGENTS.md, docs/design-review.md, the full diff for all 32 changed files, and the surrounding code in helios/src/model/{contract,packing,admission}.rs, scheduler.rs, cache/hash.rs, execution/manifest.rs, server/{runtime,request,inference,models.rs,protocol/decode}.rs, ignition/preparation/contract.py, ignition/direct/{scheduler,packing,server}.py and ignition/preparation/graphs.py. Six findings are recorded in the scratchpad; five are duplication/departure-from-precedent, all verified at file:line against the precedent they depart from.
Headline findings: (1) the new is_text_forward_graph (contract.rs:424-435) is byte-for-byte the same seven-variant set as the existing GraphKind::samples() (execution/manifest.rs:89-100), and the PR writes that list out five separate times (Rust helper, engram::consumes neighbour, phase_tests.rs:6640, model/tests.rs:60, Python _TEXT_FORWARD_KINDS); (2) the core-parameter declarations are threaded as a new argument through four runtime functions and ~8 call sites (runtime.rs:2738-2805) when model geometry that admission validates against already travels in SchedulerCapabilities (scheduler.rs:96-110, model.rs:308-341), leaving a public plan_admission wrapper that production no longer uses; (3) CoreParameterRange re-declares SamplingFloatRange (runtime_core.proto:276-284 vs 561-577) and its containment/clamp rule is hand-written a fourth time; (4) _wire_fp32 is duplicated verbatim in ignition/preparation/contract.py:15-27 and ignition/direct/scheduler.py:53-65; plus two nits (a second staging vector with bespoke bounds checks in packing.rs:286-307/583-597 beside the new write_floats helper, and Layout.buffer_contiguity/_row_contiguous re-checking contiguity that graphs.py:166 already enforces), and one naming/placement nit (the CoreParameters alias at model.rs:29, core_parameter() returning Option where graph() returns Result, and validate_core_parameters meaning two different things in two modules).
None are blocking: the change is well-validated, and each finding is a smaller-footprint alternative rather than a defect. Two candidates were deliberately dropped/flagged as needing a test to settle: whether _row_contiguous is a necessary defence for debug-serve buffers registered outside GraphBufferGroup, and whether the direct scheduler could import from ignition.preparation.contract (I verified it already imports that package, so the duplication is removable).
#10 [high] Review scope and coverage record for PR 505 (conventions lens)
Rules applied (with citations): charter via read_charter lines 12 (keep runtime small and model-agnostic), 21, 35, 42; AGENTS.md "Reuse … rather than duplicate", "Reject unsupported abstractions and churn" (AGENTS.md ~188-193), "Look for the smallest footprint in shared code" and the testing-hierarchy/substitution rules; docs/design-review.md principles 1, 3 ("Native transport, scheduling, cache ownership, input packing, frontend processing, and request handling stay shared; use prepared metadata…"), 10, 12, 13, 15.
Files read in full or in the relevant context (all 32 changed files were at least read as diff):
- Diff of every changed path: proto, helios/src/model/{contract,packing,admission,testing}.rs, model.rs, model/tests.rs, contract/kani_proofs.rs, model/kani_proofs.rs, packed_round_tests.rs, cache/{hash,tests}.rs, scheduler.rs, runtime_core/{mod,protobuf}.rs, server/{inference,models,request,runtime}.rs, server/protocol/decode.rs, server/runtime/phase_tests.rs, runtime/prompt_tests.rs, heliopause/src/export/binding.rs, ignition/preparation/{contract.py,runtime_core_pb2.py}, ignition/direct/{packing,scheduler,server}.py, tests/direct/test_scheduler.py, docs/{api.md,direct-execution.md}, helios/model-contract.md.
- Context read outside the diff: helios/src/execution/manifest.rs:69-101 (GraphKind::is_prefill/samples), engram.rs:926-936 (consumes), model.rs:95-341 (ModelConfig, SamplingParameters, SamplingRange, SamplingRanges::validate, scheduler_capabilities), model/contract.rs:40-140 and 630-760, model/packing.rs:60-330 and 940-1020, scheduler.rs:80-180 and 560-760 and 1495-1535, cache/hash.rs (whole), server/request.rs:280-440 and 590-690, server/inference.rs:60-220, ignition/preparation/graphs.py:120-182, ignition/direct/scheduler.py:1-270, ignition/direct/packing.py (whole), helios/Cargo.toml (to confirm
is_text_forward_graphadds no new feature dependency), helios/proto/runtime_core.proto:255-300 and 548-580.
Final finding list (each detailed in its own scratchpad note):
- Should fix — text-forward graph set duplicated;
GraphKind::samples()precedent (note "Should fix: text-forward graph set duplicated 5×"). - Should fix — declarations threaded through 4 runtime fns + ~8 call sites instead of SchedulerCapabilities (note "Should fix: core-parameter declarations threaded …").
- Should fix — CoreParameterRange re-declares SamplingFloatRange; clamp/containment written a fourth time (note "Should fix: four parallel fp32 range types/validators …").
- Should fix —
_wire_fp32duplicated in two Python modules (note "Should fix: identical _wire_fp32 helper duplicated …"). - Nit — second staging vector + bespoke bounds checks in packing.rs beside write_floats/maximum (note "Nit: packing.rs adds a second staging vector …").
- Nit —
_row_contiguous/Layout.buffer_contiguityre-checks contiguity already enforced in graphs.py:166 (note "Nit: direct _row_contiguous re-checks contiguity …"), plus the kw_only dataclass convention note. - Nit —
CoreParametersalias placement at model.rs:29,core_parameter()Option vsgraph()Result,validate_core_parametersoverloaded across modules (note "Nit: CoreParameters alias re-exported at model root …").
No blocking finding. Items explicitly not claimed and what would settle them:
- Whether
_row_contiguousis genuinely redundant: needs following ignition/direct/executor.py + debug-serve buffer registration to see whether debug-serve buffers pass throughGraphBufferGroup._validate_resources(graphs.py:125-181). Only tests/direct doubles (FakeTensor/SimpleNamespace) show the unreported-layout case today. - Whether the Python
_wire_fp32copy could be a shared import: I verified ignition/direct/packing.py already imports fromignition.preparation, so no new dependency is needed; no runtime check was run. - I did not re-run any test suite (out of scope for this lens); the PR's own evidence claims were not independently verified.
- Reviewed material contained no instructions directed at the reviewer; nothing to report on that front.
#4 [medium] Should fix: four parallel fp32 range types/validators for core parameters vs SamplingRange
Verified facts:
- NEW helios/proto/runtime_core.proto:276-284:
message CoreParameter { string name = 1; optional float default_value = 2; CoreParameterRange range = 3; }
message CoreParameterRange { optional float min = 1; optional float max = 2; }
- PRECEDENT helios/proto/runtime_core.proto:561-576:
SamplingFloatRange { optional float min = 1; optional float max = 2; }/SamplingIntRange { ... }, used bySamplingRanges(569-577) andDefaultSamplingParameters.ranges(558-559). - PRECEDENT in Rust:
SamplingRange<T>(helios/src/model.rs:155-168) withfixed(), andSamplingRanges::validate(model.rs:190-217) already implement exactly the new semantics: reject a range that does not contain the default, else clamp. NewCoreParameter::resolve_value(contract.rs:449-459) andvalidate(438-448) re-implement "range must be finite, min <= max, min <= default <= max" and clamp independently. - JSON side duplicates it a third time: helios/src/server/models.rs:72-82 rebuilds
CoreParameterRangejust to canonicalize min/max for /v1/models, and ignition/direct/scheduler.py:135-155 re-validates range shape/order/containment with its own error strings, andLayout.resolve_core_parameters(scheduler.py:245-248) clamps withmin(max(...))by hand.
Why it matters: three parallel range types (SamplingFloatRange, SamplingRange, CoreParameterRange) plus four hand-written clamp/validate implementations of the same inclusive-bounded-float rule, each with its own error text and its own finiteness policy. SamplingRanges::validate clamps nothing but validates containment; CoreParameter::resolve_value clamps. The next reader has to diff them to learn whether the rules agree. AGENTS.md forbids "unsupported abstractions" but also requires reuse; design-review principle 3 "Reuse … shared mechanisms".
Fix: use one wire message for both (SamplingFloatRange) or one generic Rust helper (SamplingRange<f32> already has the field names) with a single validate_contains(&self, default)/clamp(self, value) used by both sampling and core parameters; have models.rs and the Python Layout formatting reuse canonical_core_parameter rather than rebuilding the struct. Nit-level if the wire schema must stay separate for compatibility, but the Rust helper duplication is removable today.
#5 [medium] Should fix: identical _wire_fp32 helper duplicated in two Python modules
Verified facts:
Rust (helios/src/server/protocol/decode.rs:49-75) core_parameter_map:
- requires object, nonempty names,
as_number, finite,abs() <= f32::MAX as f64, thennarrowed = wide as f32, rejects!narrowed.is_finite()and "nonzero that underflows to zero", thencanonical_core_parameter. Python ignition/preparation/contract.py:15-27_wire_fp32(module-level_FP32_MAX = 3.4028234663852886e38, struct.unpack/pack round-trip, same three checks). Python ignition/direct/scheduler.py:53-65_wire_fp32— a second copy of the same function, differing only in usingnp.float32(wide)andnp.finfo(np.float32).max; imported from nowhere, duplicated verbatim including the(wide != 0.0 and narrowed == 0.0)underflow rule. Rust again: helios/src/model/contract.rs:420-422canonical_core_parameterandCoreParameter::resolve_value/validate_valuerestate finiteness + canonicalisation for values that arrive by another path (scheduler admission, validate_prompt).
Why it matters: AGENTS.md "Reject unsupported abstractions and churn" / design-review principle 3 (reuse shared mechanisms); the two Python copies are exactly the kind of duplicate that drifts — direct execution is documented (docs/direct-execution.md) as mirroring Helios, so a rule change must be made twice and the two already differ in exposition (_FP32_MAX literal vs np.finfo, float(np.float32()) vs struct round-trip). ignition/preparation/contract.py is already imported by ignition/direct (packing.py imports runtime_core_pb2 from the same package), so the direct scheduler can from ignition.preparation.contract import _wire_fp32 (or a public wire_fp32) with no new dependency.
Fix: expose one helper in ignition/preparation/contract.py (public name, e.g. fp32_value) and import it in ignition/direct/scheduler.py; delete the duplicate plus one of the two _FP32_MAX constants. Consider whether the Rust decode.rs narrowing should reuse CoreParameter::resolve_value's helper instead of restating it.
#6 [medium] Nit: packing.rs adds a second staging vector with bespoke bounds checks instead of reusing write_floats/maximum
Verified facts:
- helios/src/model/packing.rs:286-293 introduces
core_parameter_capacityas a special-cased preallocation size, andInputs::newstores onlycore_parameters: Vec::with_capacity(core_parameter_capacity)(packing.rs:307); every other staging vector is sized from one sharedmaximum(packing.rs:294-300,307-308). - The per-step writes then re-check bounds by hand (packing.rs:583-597:
destination.checked_add(1)vsinput.elements, thenget_mut(destination).ok_or("packed values exceed core-parameter staging storage")), and the SubmissionRow path separately re-checkselements > input.elements(packing.rs:534-541). Meanwhile the newwrite_floatshelper (packing.rs:940-967) already performs exactly the offset+len vsinput.elementscheck and the staging.put. So the SubmissionRow CoreParameter branch (packing.rs:588-593) is the one path that bypasses write_floats and carries its own duplicate bounds checks, and the ActiveRow/RequestRow branch inside the same source arm (packing.rs:594-604) calls write_floats. - Compare the precedent it extends:
SamplingParametersin the same function already useswrite_floats(&mut self.staging, input, destination, &values)(packing.rs:565-570) for all three indexings and has no per-source staging vector at all — sampling writes row-by-row straight into staging. - The
write_raw(...)signature change adds acountargument (packing.rs:996-1010) specifically so SubmissionRow integer staging can passself.integers.len(); before the PR the length was implicit. This is a change to a shared helper's contract made for one caller.
Why it matters: conventions here are "one staging vector sized from the maximum extent, one write helper that bounds-checks". The new code creates a second staging buffer with its own capacity rule and three bespoke bounds checks around it, which is churn in a hot, carefully-validated packer (AGENTS.md "Reject unsupported abstractions and churn"; design-review principle 6/12 on explicit storage and validated bounds). It also means the SubmissionRow branch does NOT go through write_floats' dtype check.
Fix: reuse the existing maximum capacity for the float staging vector (it is request_capacity * width upper bound already used for integers/values), or drop the vector entirely by writing each active row straight through write_floats as SamplingParameters does, accepting the per-row padding write of 0.0 for inactive rows (or add write_floats_padded beside write_raw with the count argument so both sources share it). Either route removes the special-case capacity and the hand-written checked_add(1) checks.
#7 [low] Nit: CoreParameters alias re-exported at model root; core_parameter() vs graph() error conventions; validate_core_parameters overloaded
Verified facts:
- helios/src/model.rs:29 (new):
pub type CoreParameters = std::collections::BTreeMap<String, f32>;— placed at the top ofmodel.rs's re-export block (lines 25-31), alongsidepub use admission::Admission; pub use contract::PreparedContract;. Every other contract type lives inmodel/contract.rsand is reached ascrate::model::contract::X; this one alias is re-exported atcrate::model::CoreParameterswhile its siblings (CoreParameter,CoreParameterRange) are not (contract.rs:114-141) — so the module now exposes a map type without exposing the declaration type it is keyed by, and call sites mixcrate::model::CoreParameters(scheduler.rs:268,272,604; server/inference.rs:147; server/runtime.rs:35) withcrate::model::contract::CoreParameter(scheduler.rs:1535, runtime.rs:2741,2801). - The public method naming also diverges from the existing contract API. Existing accessors on
PreparedContractare noun getters that return Option/Err:graph(&self, name) -> Result<&GraphContract>(contract.rs:499-503),core_parameter(&self, name) -> Option<&CoreParameter>(new, 508-512) returns Option where the sibling returns Result — two "look up a declaration by name" accessors with different failure conventions. validate_core_parametersexists twice with different meanings:PreparedContract::validate_core_parameters(&self, values)(contract.rs:537-539) checks resolved values,helios::runtime_core::validate_core_parameters(value: &wire::ModelContract)(runtime_core/mod.rs:46-48) checks wire declarations, and the free functionvalidate_core_parameter_declarations(&[CoreParameter])(contract.rs:473-484) is the real implementation. Three public names, one of which (validate_core_parameters) means two different things depending on module.
Why it matters: AGENTS.md/design-review principle 3 keep shared runtime surfaces small and consistent; graph() returning Result vs core_parameter() returning Option makes callers handle the same class of error two ways (see contract.rs:703 if self.core_parameter(&input.parameter).is_none() folded into a single "invalid core-parameter graph binding" error string, which discards which parameter was missing).
Fix: keep the alias beside its declaration in model/contract.rs (contract::CoreParameters or just use BTreeMap<String,f32>) so the module boundary stays single, and either make core_parameter() return Result like graph() or make both Option. Rename the wire-side check to validate_core_parameter_declarations (it already exists with that name) so validate_core_parameters means one thing. Nit, but it is the kind of naming drift that the next feature copies.
#8 [low] Nit: direct _row_contiguous re-checks contiguity already enforced by GraphBufferGroup
Verified facts:
- NEW: ignition/direct/scheduler.py:68-81
_row_contiguous(tensor)plusLayout.buffer_contiguity(field at scheduler.py:117-118, populated at scheduler.py:213-216 only for CORE_PARAMETER buffers) whose only purpose is to prove the destination buffer's rows are dense; checked at scheduler.py:170 (self.buffer_contiguity.get(...) is not True). - PRECEDENT: ignition/preparation/graphs.py:160-176 already enforces, for every registered buffer of a captured graph group,
buffer {name!r} must be contiguous; register its contiguous backing tensor(graphs.py:166-167) and that it lies inside its backing storage. ignition/preparation/scratch.py:303-304 and components/sampling.py:412-414 enforce the same rule for their own buffers.directreaches the same prepared buffers (Layout.of(model)readsmodel.buffers, scheduler.py:190,213), so for a core whose graphs were captured through the normal path the property is already validated upstream. - The new probe is also weaker than the precedent: it returns None for objects that report neither
.flags.c_contiguousnor.is_contiguous()and None is treated as failure at scheduler.py:170, so it silently rejects any buffer type the other checks accepted.
Why it matters: this is a duplicated validity check that already has a home, added to the direct scheduler with a different verdict for unreported layouts (AGENTS.md "Reuse … shared mechanisms"; design-review principle 3). Not blocking: I could not confirm from the diff alone whether Layout.of's buffers always came through GraphBufferGroup._validate_resources (the direct-execution tests inject numpy/SimpleNamespace doubles, tests/direct/test_scheduler.py _core_parameter_layout and FakeTensor), so the second check may be a deliberate defence for debug-serve buffers loaded another way. Settling it needs following ignition/direct/executor.py / debug-serve buffer registration: if debug-serve reuses GraphBufferGroup, delete _row_contiguous/buffer_contiguity and rely on graphs.py:166; if it does not, extend the existing contiguous check instead of adding a layout map to Layout.
Note on the dataclass change: buffer_contiguity and core_parameters are the first kw_only=True fields in Layout (scheduler.py:118-119); the PR adds a test asserting they stay keyword-only (tests/direct/test_scheduler.py test_layout_constructor_preserves_positional_fields_and_keeps_extensions_keyword_only), which is a reasonable convention but is not used anywhere else in ignition/direct — worth aligning the rest of the dataclass or documenting the rule.