#1 [high] PR #688 correctness/contracts review findings
PR #688 (jcartu, head 7503941) — 2 error-string literals + 3 helios docs + 1 test. Predicates unchanged.
VERIFIED SOUND (no functional/concurrency/memory change):
- Only literals changed: manifest.rs:830 and :871; predicates at :826-832 and :861-873 byte-identical to main.
- request_capacity() = max_active.next_power_of_two() (manifest.rs:583-585); SchedulerLimits::request_capacity() == request_slots (scheduler.rs:60-63); catalog.rs:44-45 forces limits.request_slots == manifest.request_capacity(); server/config.rs:141-147 sets request_slots from manifest.max_active.next_power_of_two(). So new wording is the real contract.
- Row indexing is submission order in runtime, not producer-only: transport.rs:1331-1347 (vec![vec![0.0; T-1]; request_capacity()], zip .take(graph.batch_capacity) against frame bytes, fill .take(confidence_width)); scheduler.rs:2517-2521 (confidence.len() >= step.batch_capacity, row len == T-1, bounds check on row[..draft_tokens]); server/runtime.rs:1813-1818 slices &confidence[..measured_step.batch_capacity]. Doc comment transport.rs:375 "Confidence by proposal batch row".
- Wire unchanged: parallel/wire.rs:404-435 serializes full flattened rows keyed on slots=request_capacity(); parallel.rs:452-478 unchanged.
- Leaving completion_speculative_survival's "per request slot" (manifest.rs:823) alone is CORRECT: that buffer really is physical-slot indexed (manifest.md:347-355; transport.rs:1279-1290 decodes all request_capacity() rows without truncation; transport.rs:381 validate_speculative_survival keys rows by slot).
- New test (tests.rs:1334-1396) is logically sound and should pass: max_active=3 → capacity 4; [2,4,5] accepted; [2,3,5] fails shape[1]!=4; [1,4,5] fails shape[0]!=2; [2,4,16] fails 1..T (T=16); Int32 fails dtype; width_exceeds (cw=6, shape[2]=5) fails shape[2]<width after passing geometry at :851-857 (24<=4*7=28, 6<=15); width_mismatch fails cw==draft; non_speculative (Decode, w=1) passes :858 else-arm then fails kind check. nbytes/strides in each case are contiguous and self-consistent, spans (0x20000) don't overlap.
- No consumer of the old message text: grep for "proposal confidence requires"/"confidence output requires"/"two float32 frames" finds only manifest.rs:823 (survival) + docs; no test matches on message text (packed_round_tests.rs:207-211, threaded.rs:1533 use is_err/unwrap).
FINDING 1 (Major, contracts/docs incompleteness): the contract's own top-level specs still print the rejected spelling:
docs/runtime-core-design.md:715 — "confidence_width and uses FP32 [2, request_slots, draft_capacity] frames."
docs/core-design.md:1227-1228 — "Confidence producers declare confidence_width and write FP32 [2, request_slots, draft_capacity] completion frames."
docs/scheduling-runtime-design.md:81-82 — "A confidence-producing program declares confidence_width, equal to its actual D. Its FP32 sidecar has shape [2, request_slots, draft_capacity], covering every produced prefix."
None are in the PR's file list, and docs/runtime-core-design.md:697-699 is the paragraph helios/manifest.md:164-171 mirrors (it also omits the row extent). PR text claims "aligned all three specifications on [2, request_capacity, draft_capacity]" which is true only of helios/*. Precedent: #542 was blocked for ~11 stale cross-file doc sites. Fix: add the same one-sentence correction to the three docs/ sites.
FINDING 2 (Minor, doc/diagnostic precision): "max_active" in the new text is unqualified but two different max_actives exist. manifest.rs:830 "(sized to max_active.next_power_of_two())"; model-contract.md:229-231 "request_capacity = max_active.next_power_of_two()". The sized field is Execution.max_active (proto runtime_core.proto:829), while ServingContract.max_active (proto:252) may be strictly smaller (catalog.rs:44 permits limits.max_active < manifest.max_active; server/config.rs:143-147 reads the serving value). For a core prepared at manifest.max_active=8 served with --max-concurrency 3, the buffer really has 8 rows but the stated formula yields 4 — and the message is what the operator sees at load. helios/manifest.md:211-213 already disambiguates ("Request storage capacity is max_active.next_power_of_two(). ... Runtime admission may use a smaller SchedulerLimits.max_active"). Fix: say Execution.max_active in model-contract.md:230 and in the manifest.rs:830 literal.
FINDING 3 (Minor, test gap): negative assertions are per-arm and spelling-specific. tests.rs:1370 assert!(!error.contains("request slot"), ...) for the buffer arm; tests.rs:1394 assert!(!error.contains("request_slots"), ...) for the graph arm. Each catches only the spelling its own message used before, so a regression reintroducing "request_slots" into the buffer message (or "request slot" into the graph message) passes both. Also both arms assert substrings, not the described extent values, so e.g. "request_capacity" is asserted even if the row count reasoning changes. Fix: assert absence of both spellings in both arms.
FINDING 4 (Minor, vocabulary split introduced inside one file): helios/README.md:301-304 now calls the row extent request_capacity, while helios/README.md:386-388 in the same document still says "Batched graphs declare batch capacities in 1..=request_slots" for the same quantity (scheduler.rs:60-63 makes request_slots == request_capacity()). manifest.md:166 vs :183 has the same split. Not wrong, but the PR is a terminology fix and leaves the reader to prove the two names are equal. Fix: one clause in manifest.md:211-213-style wording ("request_capacity(), the same extent request_slots names") already exists at manifest.md:213, so mirror it near README:302 and manifest.md:166.
FINDING 5 (Minor, claim accuracy): the reported totals (helios 1879 = 1817 unit + 62 integration, 84 ignored; flare 254; flare-cli 245) and the run recipe (FLARE_TEST_TEMPLATE_DIR, 64 MiB locked-memory limit) are unverifiable — no CI check on 7503941, no logs attached. Everything structural in the description verifies. The stated limitation (no GPU run) is honest and consistent, since no execution geometry changed.
No concurrency/lock/queue/memory/failure-propagation consequence exists: the diff allocates no memory, copies nothing, and touches no hot path (error construction only on the already-failing branch).
#2 [high] Research summary
Reviewed all five changed files at head 7503941 plus their direct callers and contracts. The change is genuinely confined to two error-string literals; the validation predicates at helios/src/execution/manifest.rs:826-832 and :861-873 are unchanged byte-for-byte, so no accepted shape, wire format, ABI, concurrency path, allocation, or failure-propagation behaviour moves. I verified the new wording describes the runtime's real contract, not just the Python producers': request_capacity() = max_active.next_power_of_two() (manifest.rs:583-585), SchedulerLimits::request_capacity() == request_slots (scheduler.rs:60-63), catalog.rs:44-45 forces the two equal, and readback fills rows in submission order (transport.rs:1331-1347, server/runtime.rs:1813-1818, scheduler.rs:2517-2521). Leaving completion_speculative_survival's "per request slot" message (manifest.rs:823) untouched is correct, because that buffer really is physical-slot indexed (transport.rs:1279-1290, :381). No code consumes the old message text, so nothing downstream breaks.
I filed one Major and four Minor findings on my scratchpad. Major: the PR's claim that it "aligned all three specifications" holds only for helios/* — docs/runtime-core-design.md:715, docs/core-design.md:1227-1228, and docs/scheduling-runtime-design.md:81-82 still print the exact [2, request_slots, draft_capacity] spelling this PR removes, and docs/runtime-core-design.md:697-699 is the paragraph helios/manifest.md:164-171 mirrors; PR #542 was previously blocked for leaving comparable cross-file doc sites stale. Minor findings: the new text's unqualified max_active is ambiguous because ServingContract.max_active may be smaller than the sizing Execution.max_active (so the stated formula can yield a different row count than the actual buffer for cores served at lower concurrency); the new test's negative assertions check only one spelling per arm (tests.rs:1370 vs :1394), so a regression reintroducing the other spelling passes; helios/README.md:386-388 and helios/manifest.md:183 still say request_slots for the same extent the PR renames; and the reported test totals (1879/254/245) rest on the author's word since no CI check or log exists on the head commit.
#3 [high] PR #688 — report framing, sound-area statements, load-path blast radius
VERDICT for the report: the change is correct and safe; it should not be blocked on behaviour. Blocking-or-not question is only about documentation completeness (Finding 1), which has repo precedent (#542 blocked for ~11 stale cross-file doc sites).
SOUND AREAS TO STATE PLAINLY (all verified, no issue to report):
- Correctness/Safety: no predicate changed (manifest.rs:826-832, :861-873 byte-identical); the edited literals are only constructed on branches that already return Err, so no new panic, allocation, lock, or hot-path cost. No
unwrap/expectadded. No unsafe touched. - Platform parity: neither literal is cfg-gated; the same text is produced on Linux and Windows.
transport.rsreadback has#[cfg(target_os = "linux")]blocks nearby (:1259) but none of them change the confidence path; Windows/WinUI builds get identical diagnostics. - System-level consequences: none. No memory amplification (validate() runs once at core load — catalog.rs:25
manifest.validate()?— and the message borrows no buffer); no queue/lock contention; no change toproposal_confidencegeometry consumed by transport/wire/scheduler; failure blast radius unchanged (already a load-time rejection, and only when a core is malformed). - Metric/rate/admission-pricing span check: this PR samples no rate, latency, or admission metric.
confidence_widthand the confidence sidecar feedobserve_packed_forecasts(rounds.rs:640-730) and admission pricing, but neither producer nor consumer changes; the calibration span (per-depth conditional steps,row[..draft_tokens]) is untouched. No threshold retuning needed. - Claim accuracy: every structural claim in the description verifies (see entry 1), including the two named pre-existing tests (
tests.rs:1310-1332,packed_round_tests.rs:200-215) not asserting message text. Only the test totals are unverifiable (Finding 5).
CITED FIXES to quote in the report:
- Finding 1 fix: add the same one-sentence correction to docs/runtime-core-design.md:715, docs/core-design.md:1227-1228, docs/scheduling-runtime-design.md:81-82 (and note docs/runtime-core-design.md:697-699 omits the row extent entirely).
- Finding 2 fix: qualify the field, e.g. "sized to
Execution.max_active.next_power_of_two()" in manifest.rs:830 and model-contract.md:230; helios/manifest.md:211-213 already distinguishes the two max_actives and can be the model. - Finding 3 fix: assert absence of both "request slot" and "request_slots" in both loops (tests.rs:1370 and :1394).
- Finding 4 fix: mirror manifest.md:213's "the same extent
request_slotsnames" clause at README:302 and manifest.md:166, so the two names in the same documents are tied together.
PROTO CITATIONS used for Finding 2: helios/proto/runtime_core.proto:829 uint64 max_active = 2; (Execution, the sizing field) vs :252 optional uint64 max_active = 16; (ServingContract, admission). catalog.rs:44 permits config.limits.max_active < manifest.max_active; server/config.rs:143-147 reads the serving value, while :142 sets request_slots from manifest.max_active.