Gates and contracts report · NVIDIA/hyperflare-inference #685

Raw Markdown for agents: https://autobot.eidonix.com/p/20ff4a2b-216f-4858-8f3b-7224192af42f.md

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

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).

  1. #364's pre-publication 1 MiB / key-validation bound.
    • main states the guarantee normatively: docs/api.md:600 — "Helios rejects a larger call before publishing it." Its author @voipmonitor shipped 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 @yatesdr attested 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::ToolBegin is pushed at ToolNameEnd (dsml.rs:147-158) and fragments are published per argument-text action (dsml.rs:175-193), so validate_arguments (dsml.rs:202) and the 1 MiB check_size inside publish (dsml.rs:53-54 → :42-47) run after publication. This is documented honestly at docs/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").
  2. main's non-EOS Err("incomplete emitted tool call").
    • Accumulator::finish still errors (helios/src/server/output.rs:163-168) and ResponseOutput::close still errors at Eos (output.rs:1728), but the new drops_unfinished_call(cause) = cause != Termination::Eos (output.rs:477-481) is applied from Encoder::finish on Chat (encode.rs:681-686) and from ResponseOutput::finish (output.rs:1735-1748) for Messages/Responses, so UserStop/Cancelled/ExecutionError now succeed with the termination's finish reason while the announced call is omitted. docs/api.md:580-583 on main scoped 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).
  3. A pinning assertion was deleted to make the suite green. main helios/tests/deepseek_output.rs:511 asserts assert!(published.is_empty()) after a duplicate/empty-parameter rejection — precisely the #364 property. Head replaces it with assert_eq!(parsed.ended, 0, "a rejected call reported an end") (:515) and drops the is_empty() push assertions in parse_literal_parameters (main:576, 581 → head :579-595, routing events into Parsed instead). 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

Gate 3 — Mandatory verification evidence & failing tests: PASS

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.

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.