Correctness, Contracts & System-Level Consequences — PR #688 @ 879dc01
Key findings
- The code change is behaviourally inert and correct. Only two
Err(...)literals changed; the predicates around them are byte-identical, proven by the literals sitting at the same line numbers onmainand at head (helios/src/execution/manifest.rs:830,:871). No accepted shape, wire format, ABI number, default, or core-compatibility rule moves. The PR-body claim "No accepted shapes, wire formats, or core compatibility rules changed" is accurate. - No system-level consequence. The touched path allocates nothing new and runs once at manifest validation; there is no lock, queue, buffer, retention, cache, or I/O change, and no rate/latency/admission metric's sampling scope changed, so the metric-span check does not apply. No platform surface (Unix/Windows) is touched.
- Docs are now fully aligned — seven prose sites use
[2, request_capacity, draft_capacity]+Execution.max_active.next_power_of_two(); a repo-wide search forrequest_slots, draft_capacityreturns zero matches, so the base case file's "biggest finding" stays retracted and #542's all-specs bar is met. - Finding 1 (Minor, substantive): the PR leaves two adjacent diagnostics using opposite index vocabulary with no explanation —
manifest.rs:823"per request slot" vs the new:830/:871"submission row" — recreating, eleven lines apart, exactly the apparent contradiction #440 was filed for. - Finding 2 (Minor): both new strings template
1..=completion_token_capacity - 1, which renders the impossible range "1..=0" for the explicitly supportedT = 1configuration, where the correct action is to omit the buffer. - Finding 3 (Minor):
manifest.rs:830printsmax_activeunqualified while all seven prose sites sayExecution.max_active— the reviewer's qualification nit was not carried through in the one place an operator reads first. - Finding 4 (Minor, editorial):
docs/core-design.md:1228-1229now reads "completion frames indexed by completion frame" — the new wording was grafted onto the old sentence. - Finding 5 (Minor, process): the 1879 / 254 / 245 test totals are self-reported, identical across two heads, with no CI status and no attached log.
- Test gaps: the new test is well targeted (each of four buffer cases trips a distinct predicate, both negatives asserted in both loops) but never pins the valid depth boundary
[2,4,15]nor theT = 1omission path, i.e. the degenerate case in Finding 2 is untested.
Area 1 — Correctness, Safety & Platform Parity: sound
1.1 Verified: the predicates were not touched (line-number proof)
The changed file is +2/−2. On main, helios/src/execution/manifest.rs:830 is "proposal confidence requires two float32 frames indexed by request slot and draft prefix" and :871 is "confidence output requires [2, request_slots, draft_capacity] float32 frames"; at head the same lines carry the new text. Identical numbering proves the surrounding logic is unchanged:
// helios/src/execution/manifest.rs:826-832 (head)
if let Some(buffer) = self.buffers.iter().find(|buffer| buffer.name == "proposal_confidence") {
if buffer.dtype != Dtype::Float32 || buffer.shape.len() != 3
|| buffer.shape[0] != 2 || buffer.shape[1] != self.request_capacity()
|| !(1..self.completion_token_capacity).contains(&buffer.shape[2]) {
return Err("proposal confidence requires [2, request_capacity, draft_capacity] float32 frames indexed by submission row (sized to max_active.next_power_of_two()) and draft depth 1..=completion_token_capacity - 1".into());
}
}
// helios/src/execution/manifest.rs:861-873 (head)
if graph.confidence_width > 0 {
let confidence = self.buffer("proposal_confidence")?;
if graph.kind != GraphKind::Speculative
|| graph.confidence_width != graph.draft_tokens
|| confidence.dtype != Dtype::Float32
|| confidence.shape.len() != 3
|| confidence.shape[0] != 2
|| confidence.shape[1] != self.request_capacity()
|| confidence.shape[2] < graph.confidence_width
|| confidence.shape[2] > self.completion_token_capacity - 1 {
return Err("confidence output requires a speculative graph whose confidence_width equals draft_tokens and [2, request_capacity, draft_capacity] float32 submission-row frames covering confidence_width within draft depth 1..=completion_token_capacity - 1".into());
}
request_capacity() is still max_active.next_power_of_two() (manifest.rs:583-585), ABI_VERSION is still 6 and COMPLETION_METADATA_FIELDS still 16 (manifest.rs:11-12). No stale state, reset, race, panic path, or error-handling gap is introduced: the only allocation on the path is the pre-existing Err(... .into()), produced once at load.
1.2 Verified: the row-indexed claim in the new text is factually correct
The new wording asserts submission-row indexing; that matches every consumer I opened:
helios/src/execution/transport.rs:375-378: "/// Confidence by proposal batch row; rows and columns outside the graph shape are zero." / "/// Verification prefix survival by physical slot; -1 marks an unobserved prefix."helios/src/execution/transport.rs:381-405(validate_speculative_survival) loopsfor (slot, row) in rows.iter().enumerate()— slot-indexed for survival, the contrasting buffer.- Prose:
helios/model-contract.md:232-233"Frame index selects the completion frame, and submitted rows retain their lane order. There is no unframed confidence layout."
So the diagnostics now describe the layout the runtime actually enforces. No correctness finding.
1.3 No metric / rate / admission-pricing span change
Nothing in this PR samples time or scope. The metric check asked for by the task (whether a measured span shrank, rank-0 vs all shards, buffered vs O_DIRECT) is not applicable: the diff is two string literals plus Markdown, and docs/scheduling-runtime-design.md:86-89 ("Rank zero's confidence drives host decisions; peer estimates must be valid probabilities but need not agree bitwise") is untouched prose, not a measurement change.
Area 2 — Unintended System-Level Consequences: none
- No hot-path code.
manifest.rs:826-830and:861-871execute insideExecutionManifest::validate, once per core load. Error strings are constructed only on the failure branch. - No contention/buffering/failure-propagation change. No lock, queue, channel, retry, or coalescing logic appears in the diff; a longer message cannot poison a peer or stall a waiter.
- No allocation or memory amplification: static
&strpayloads inside an already-failingErr. - No downstream string coupling, verified repo-wide: the literals "proposal confidence requires" and "confidence output requires" appear only at
manifest.rs:830and:871— no test, CLI, metric, or doc parses these messages, so lengthening them cannot break a caller or a log-scraping threshold. - Small/uncontended path parity: nothing here can slow a common or partial-hit path.
Area 3 — Architecture, Contracts & Charter Compliance: compliant
Finding 1 below is the only contract-adjacent issue, and it is a documentation-vocabulary gap, not a rule change.
Finding 1 — Minor (substantive): adjacent diagnostics use opposite index vocabulary, unexplained
helios/src/execution/manifest.rs:820-825 (unchanged by this PR, seven lines above the changed :830):
if let Some(buffer) = self.buffers.iter().find(|buffer| buffer.name == "completion_speculative_survival") {
if buffer.dtype != Dtype::Float32
|| buffer.shape != [2, self.request_capacity(), self.completion_token_capacity - 1] {
return Err("completion_speculative_survival requires two float32 frames of completion_token_capacity minus one prefixes per request slot".into());
}
}
Both statements are true — survival really is physical-slot indexed (helios/manifest.md:347-349: "a contiguous float32[2,capacity,T-1] output indexed by completion frame, physical request slot, and draft-prefix depth"; transport.rs:377 "Verification prefix survival by physical slot").
Impact: after this PR a core author who trips both checks in one session reads "per request slot" at :823 and "by submission row" at :830, with nothing in docs/ or the PR body saying these are different buffers with different index bases. docs/runtime-core-design.md:696-697 says only "Optional survival storage uses one fewer position" — no docs/ page names the slot-vs-row distinction, so a reader of docs/ alone cannot resolve the apparent contradiction and will assume one diagnostic is stale. That is the exact defect class of #440.
Fix: leave the predicate untouched; change :823 to "per physical request slot", and add one clause to helios/model-contract.md:227-233 stating that survival storage is indexed by physical request slot while proposal_confidence is indexed by submission row.
Finding 2 — Minor: both new strings print the impossible range "1..=0" for a legal T = 1 core
// helios/src/execution/manifest.rs:829-830 (head)
|| !(1..self.completion_token_capacity).contains(&buffer.shape[2]) {
return Err("proposal confidence requires [2, request_capacity, draft_capacity] float32 frames indexed by submission row (sized to max_active.next_power_of_two()) and draft depth 1..=completion_token_capacity - 1".into());
Same templating in the graph arm at manifest.rs:870-871 ("… within draft depth 1..=completion_token_capacity - 1").
helios/manifest.md:169 and docs/runtime-core-design.md:702 both state "Cores with T=1 omit these zero-depth outputs", so completion_token_capacity == 1 is an explicitly supported configuration. With T = 1 the predicate (1..1) is empty, so any proposal_confidence buffer is rejected and the operator is told the requirement is "1..=0" — an empty range that is not actionable, at precisely the boundary where the layout degenerates. The one correct action (omit the buffer) is never stated.
Fix: special-case the empty range instead of templating completion_token_capacity - 1, e.g. when self.completion_token_capacity == 1 return "cores with completion_token_capacity = 1 must omit proposal_confidence", mirrored in the graph arm.
Finding 3 — Minor: the reviewer's max_active qualification was not carried into the literal
helios/src/execution/manifest.rs:830 reads "(sized to max_active.next_power_of_two())" while all seven prose sites write Execution.max_active: docs/core-design.md:1230, docs/runtime-core-design.md:700 and :720, docs/scheduling-runtime-design.md:84, helios/README.md:303, helios/manifest.md:167, helios/model-contract.md:230. Defensible inside the impl (self.max_active is in scope), but the reader of this message is whoever authors the JSON core and only has the field name Execution.max_active. Fix: one-word edit.
Finding 4 — Minor (editorial): docs/core-design.md:1228-1229 reads "completion frames indexed by completion frame"
// docs/core-design.md:1227-1231 (head)
submitted lane limits. Confidence producers declare `confidence_width` and write
FP32 `[2, request_capacity, draft_capacity]` completion frames indexed by
completion frame, submission row (sized to
`request_capacity = Execution.max_active.next_power_of_two()`), and draft depth
`1..=completion_token_capacity - 1`.
The new "indexed by completion frame, submission row, …" clause was grafted onto a sentence that already said "completion frames", producing a doubled phrase. Harmless, but it is the one site that reads as machine-patched. Fix: "write FP32 [2, request_capacity, draft_capacity] storage indexed by completion frame, submission row (…), and draft depth …".
Charter fit
- "What gets merged: … bad docs" is satisfied (reproducible report #440, maintainer-confirmed as a wording defect).
- "Smallest footprint in shared code": two literals; no new code path.
- "Captured-graph op contracts" owner sign-off is not triggered — no new op, no shape, no
ABI_VERSIONchange (manifest.rs:11still6). - "Check interactions across every supported … layout": now satisfied by the six corrected specs.
- No performance claim is made, so the #210 served-workload A/B requirement does not apply.
- Remaining gap is procedural only: unbacked evidence (Finding 5) and zero human review.
Area 4 — Tests & Claim Accuracy
The new test is sound and well targeted
helios/src/execution/tests.rs:1334-1398:
let mut value = manifest();
value.max_active = 3;
assert_eq!(value.request_capacity(), 4);
(tests.rs:1336-1338) — max_active = 3 genuinely exercises the power-of-two rounding, so a slot-capacity regression cannot hide behind an already-power-of-two max_active.
Each of the four buffer cases trips a distinct predicate and reaches the buffer arm at manifest.rs:826-830 before graph validation at :861:
Case (tests.rs:1354-1359) |
Predicate hit |
|---|---|
[2, 3, 5] |
shape[1] != request_capacity() == 4 |
[1, 4, 5] |
shape[0] != 2 |
[2, 4, 16] |
depth 16 excluded from 1..16 (manifest() sets T = 16) |
Int32 |
dtype |
The three graph cases (tests.rs:1374-1397: width_exceeds, width_mismatch, non_speculative) each hit the graph arm, and both negatives are asserted in both loops (tests.rs:1370-1371 and :1395-1396), closing the asymmetric-assertion nit:
assert!(!error.contains("request slot"), "{error}");
assert!(!error.contains("request_slots"), "{error}");
The PR body's description of the test is accurate.
Test gaps (Minor)
- No case pins the valid boundary
[2, 4, 15](maximum accepted depth atT = 16), so the new text is only asserted on rejection paths. - No case covers
T = 1omission, i.e. the degenerate range in Finding 2 is untested; acompletion_token_capacity = 1manifest withproposal_confidencepresent would surface the "1..=0" wording, and no test would catch a future change to it. - Fix: add
[2,4,15]as an accepted shape and aT = 1manifest asserting the omission message.
Finding 5 — Minor (process, not code): the test evidence is self-reported
PR body: "helios (--features runtime-core,server): 1879 passed (1817 unit tests + 62 integration tests), 0 failed, 84 ignored… flare: 254 passed… flare-cli: 245 passed". The identical totals were claimed for the previous head 7503941; there is no CI status on either head, no attached log, and I found no in-repo artifact backing the run. A diagnostics/docs change cannot plausibly move these numbers, so the risk is low — but the claim is unverifiable and is the review bot's single pre-merge warning. Fix: attach the raw cargo test output or land the CI check.
Open questions / could not be found
- Rendered diff and commit history unavailable.
pr_diffandsearch_historyboth fail at head879dc017("Could not readc513e46a79f3b6ac510235aaf09bcf055b841958"), so per-file counts come frompr_files(+100/−15 over 8 files) and the wording from head files. Whether the branch was rebased ontomain's 2026-12-02 moves (ef38cb93, #661) is unknown. - No CI and no human review. Labels
triage:review, branchfix/confidence-manifest-messages→main; trail is bot case file 20:52, bot Changes Requested 21:08, one author reply 21:53.yatesdrtriaged #440 but has not commented here; none of thehelios/srcowners (237 / 52 / 49 commits in 180 days) has reviewed. - No GPU run and none needed: validation predicates and runtime execution paths are unchanged, so the skipped CUDA/checkpoint/exported-core tests do not bear on this diff.
- Issue #440's body still carries an embedded "CLAIMS (internal only; cut before posting …)" block with internal record ids. Re-noted, not acted on — it is a reporting-pipeline artifact, not an instruction to me.