Contracts, Charter & Verification Gates audit — PR #685 @ dfe38d4c
Audit scope: the four hard gates only. Read-only static reading at head dfe38d4c05af3005a7d55d12e70003b29789f932 (pr_files, pr_diff, read_file, read_item(364), pr_comments, main refs). Nothing was executed. Prior rounds' verification evidence (## Case File History, five Autobot reviews, pr_comments) was checked before judging Gate 3.
Head shape: 7 files, +869/−59 — docs/api.md (+30/−12), helios/src/output/dsml.rs (+304/−14), helios/src/server/output.rs (+46/−13), helios/src/server/protocol/encode.rs (+35/−12), helios/src/server/protocol/tests.rs (+428/−0), helios/tests/deepseek_output.rs (+15/−6), helios/tests/deepseek_requests.rs (+11/−2).
Verdict: one Gate 1 blocker (authority prong), in one family with two parts. Gates 2, 3 and 4 pass. No vendored-file, dependency-pin, mandatory-verification or material-scope gate is violated.
Gate 1 — Core-format / wire / public-contract boundaries
Mechanical prongs: PASS
- No new proto, core-format enum, captured-graph operation family, wire kind,
Event/Terminationvariant, config switch or environment variable.Event::{ToolBegin,ToolArguments,ToolEnd}already exist onmain; the PR re-times their emission (helios/src/output/dsml.rs:147-158, 175-206) and adds no variant.docs/core-format-design.md,docs/scheduling-theory.md(not opened),docs/scheduling-runtime-design.mdare untouched and unrelated (theirstreamhits are cache/preparation payload streams and scheduler delivery pricing, not the parser). - The one
docs/core-design.mdinvariant in this area is preserved, not contradicted:docs/core-design.md:1695-1697— "The output encoder holds the call until it has validated the complete arguments; a truncated strict call does not publish partial arguments." Strict tools still park inpending_strict_callsbefore anyResponseOutput/Accumulatormutation and re-emit only afterstrict_validators[..].validate(&arguments)(helios/src/server/protocol/encode.rs:592-596, 607-628).docs/api.md:758-762(strict buffering, output-limit/user-stop omission, EOS error, required/named failure) likewise still matches the code. - No captured-graph operation family is introduced, so the
docs/design-review.md:22-26owner-approval requirement is not engaged.
BLOCKER 1 — two previously attested invariants are reversed, and the test that pinned one was weakened, before the maintainer decision the PR itself requests exists (AGENTS.md:182-187, 201-207; docs/design-review.md:135-146)
Both reversals are real, both are disclosed in the description, and both were asked about in the thread — but neither has an answer, and pr_comments shows zero human comments or reviews in the entire thread (three Autobot reviews, plus the author's pings at 2026-12-05 12:10 and 12:22 asking @voipmonitor/@yatesdr to accept them).
- #364's pre-publication 1 MiB / key-validation bound.
mainstates the guarantee normatively:docs/api.md:600— "Helios rejects a larger call before publishing it." Its author@voipmonitorshipped it for exactly that reason (read_item(364)body: "checks the UTF-8 byte count of the name plus the complete argument object before emitting the first tool event"), and its reviewer@yatesdrattested the property on the record (read_item(364), review 2026-11-18 23:54: "The size check now runs after the final value is quoted and the closing text appended, before any event is published").- At head the order is inverted:
Event::ToolBeginis pushed atToolNameEnd(dsml.rs:147-158) and fragments are published per argument-text action (dsml.rs:175-193), sovalidate_arguments(dsml.rs:202) and the 1 MiBcheck_sizeinsidepublish(dsml.rs:53-54→:42-47) run after publication. This is documented honestly atdocs/api.md:573-577("enforced on the append that crosses it, after the call name and earlier argument fragments were published and are not retracted").
main's non-EOSErr("incomplete emitted tool call").Accumulator::finishstill errors (helios/src/server/output.rs:163-168) andResponseOutput::closestill errors at Eos (output.rs:1728), but the newdrops_unfinished_call(cause) = cause != Termination::Eos(output.rs:477-481) is applied fromEncoder::finishon Chat (encode.rs:681-686) and fromResponseOutput::finish(output.rs:1735-1748) for Messages/Responses, soUserStop/Cancelled/ExecutionErrornow succeed with the termination's finish reason while the announced call is omitted.docs/api.md:580-583onmainscoped omission to the output limit ("Truncated tool envelopes are omitted and the response reports its output limit"); head generalises it to every non-EOS cause across all parsers and all three wire protocols (docs/api.md:546-550).
- A pinning assertion was deleted to make the suite green.
mainhelios/tests/deepseek_output.rs:511assertsassert!(published.is_empty())after a duplicate/empty-parameter rejection — precisely the #364 property. Head replaces it withassert_eq!(parsed.ended, 0, "a rejected call reported an end")(:515) and drops theis_empty()push assertions inparse_literal_parameters(main:576, 581→ head:579-595, routing events intoParsedinstead). That is the case AGENTS.md names verbatim.
AGENTS.md:201-207 is explicit that this is a prior decision, not a review-time one: "Resolve conflicts through an explicit maintainer decision on the design before implementing a change to that invariant … Apply these criteria to documentation and test changes that would weaken the rules as well as code." docs/design-review.md:143-146 adds: "Reject changes that bypass validation, conceal unsupported behavior, weaken … contracts … Do not make a violating contribution acceptable by weakening its governing rule." Updating the contradicted doc (docs/api.md:540-577) is required work but is not authorization; honest disclosure in the description is likewise not the recorded decision.
Mitigating context, weighed but not a waiver: omission at OutputLimit was already accepted in #102, and docs/api.md:552-554 correctly discloses the required/named exception implemented at encode.rs:708-712 (pinned by helios/src/server/protocol/tests.rs:4200-4235). That narrows the delta to UserStop/Cancelled/ExecutionError — and Cancelled is genuinely reachable in production (helios/src/server/runtime.rs:326 → finish_cancelled, plus the tool-limit remap at encode.rs:673 and http.rs:527) — but the delta is still unratified.
What closes it: a maintainer comment on this PR (@voipmonitor / @yatesdr, or any repository maintainer) approving (a) post-publication validation and post-publication 1 MiB enforcement for streamed DSML calls and (b) non-EOS omission of an announced-but-unfinished call for all parsers and protocols — including the accompanying doc rewrite and the weakened deepseek_output.rs:515 assertion. If the answer is no to either, the corresponding code must change rather than the rule. triage:design-review (applied after the last review) is consistent with triage classifying this as exactly that decision.
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored upstream file is touched:
pr_filescontains nohelios/native/*(or anynative/) path; the RoCE proxy and other vendored C are absent. - No dependency change:
helios/Cargo.toml:35-37pinsdeepseek-recipe/-core/-encodingto the samerev = "70be62f30c64400229fcdb233a7f19a03a5e8ed6"onmainand at head, and noCargo.toml/Cargo.lockappears in the diff. Thedeepseek-recipeaction stream the PR re-times is consumed from that unchanged pin. - No dependence on an unmerged external recipe/PR.
- Cross-PR conflicts are textual only: #670 (merged,
TAGGED_JSON) landed after the branch point and its semantic staleness is repaired at head —docs/api.md:545-546no longer carries the false "because they build its arguments from parameter syntax …" clause, andhelios/src/output/tagged_json.rsemits noToolBegin/ToolArguments(no matches), so "The tagged tool parsers publish a call only when its envelope is complete" is accurate. #461 (open) edits thetool_choiceparagraph atdocs/api.md:648-687, a different range from #685's:540-577; whichever lands second needs a small rebase. Info only.
Gate 3 — Mandatory verification evidence & failing tests: PASS
- Layer 3 not triggered. No GPU/CUDA/VMM execution path, scheduler, cache, worker lifecycle, admission/fence/generation/speculation, or rank coordination is touched; the diff is confined to a model output parser and per-request HTTP encoder/accumulator state.
verification/helios-lifecycle/README.md:137states "HTTP encoder state is outside the TLA+ projection," anddocs/design-review.md:210-215scopescheck.pyto admission, fences, generations, cancellation, speculation accounting, cache compaction, snapshot aliases, response buffering or ownership, offload aggregation, readiness and rank coordination — the changed types (DsmlOutput,Accumulator,ResponseOutput,Encoder) are the HTTP encoder layer the README excludes.Decoder::drop → abort(Cancelled)(output.rs:471-475) is unchanged by this diff. No Kani surface (completion-vector validation, prepared completion contracts, extent arithmetic, sequential validators) is touched. No mutation-guard (check.py --mutations) obligation, since no safety guard is added. - No performance claim requiring an A/B served benchmark. The claim is frame-arrival timeliness (2 frames → 566 for a 2.2 KB
writeargument), not a throughput/speedup claim (docs/design-review.md:106-115governs performance gains). No core-format change, so no live export/serve or legacy-core replay is required. - Layer 1 evidence is present and honestly reported, so nothing here is flagged. The body gives the exact command (
cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --no-fail-fast), 1848 passed / 20 failed / 84 ignored on this head, and the same command at the branch point1fbcc3c9giving 1776 passed / 17 failed plus the same threemessage_boundariesfailures — i.e. all twenty failures predate the PR. Both failure families are environment-attributed and the CI workflow supplies exactly what they need:.github/workflows/native-serving.yml:62(not opened) (prlimit --memlock=67108864) covers the eleven engramRLIMIT_MEMLOCKfailures and:59, :67(FLARE_TEST_TEMPLATE_DIR) covers the nine chat-template failures.deepseek_output/deepseek_requestsare reported at 15 passed each;flare254 andflare-cli245 passed. Per the calibration rule I do not flag the absence of an observable CI check-run. - No reported failing test or failing check remains about the diff itself. The four
helios/tests/failures of earlier rounds are adapted at head (deepseek_output.rs:499-516, 576-595;deepseek_requests.rs:683-693now concatenates fragments instead of parsing each one) — their adequacy is a Gate 1 question (the:515weakening), not a Gate 3 evidence gap.
Gate 4 — Material scope / claim contradictions: PASS, two Info notes
No unrelated standalone tooling, no bundled refactor, no scope expansion; the +869 lines are dominated by tests (protocol/tests.rs +428, dsml.rs tests +303) that all target the changed behavior. No claimed test or benchmark is absent from the diff.
- Info — coverage wording overstates the custom-call matrix. The body says the tests drive "a truncated custom call and a truncated function call on all three wire protocols and every termination cause." Custom tools exist only on Responses (
helios/src/server/protocol/decode.rs:393,:420-422), soa_truncated_custom_call_closes_incomplete_without_failing_the_request(protocol/tests.rs:4102-4150) is Responses-only (it does now cover all four causes). The function-call matrix is genuinely 3 protocols × 4 causes (:3844-3957). The tests exist; only the sentence is imprecise. Also, "one table per property" describes five hand-written cause literals (dsml.rs:925-931,:958-964,protocol/tests.rs:3846-3851, 3962-3966, 4103-4108), anda_truncated_second_call_keeps_the_completed_first_callomitsExecutionError(:3962-3966). - Info —
docs/api.md:546-550over-reaches slightly on reachability. "Omitted … for every termination other than natural end-of-sequence" is true for OutputLimit, UserStop and tool-limit-remapped Cancelled, which reachEncoder::finish(http.rs:527, 534-540;encode.rs:673). A generation ExecutionError takes the separate failure path (http.rs:562→575-579Delivery::Failed, buffered rejection at:639), so theExecutionErrorrow of the matrix is reachable only by injecting events as the tests do. What ships matches the prose for every production cause; the sentence is one step broader than the code path.
Deliverable verdict
One hard gate violated: Gate 1, authority prong — AGENTS.md:182-187 and :201-207 (weakened guarantee, weakened pinning test, invariant changed before the required maintainer decision), with docs/design-review.md:143-146. Gates 2, 3 and 4: no blockers.
If the maintainer decision lands in the thread accepting both reversals, no further code change is needed for this lens; if it lands against either, the corresponding code, doc sentence and test assertion must revert rather than the rule.