#1 [high] The change: shape and size of PR #638
PR #638 (flare-autobot, open 2026-11-30, ready for review, base main, head f414393, 9 files +1316/-33). Fixes #450.
Files (pr_files):
- docs/api.md +10/-2
- helios/src/server/http.rs +21/-1
- helios/src/server/inference.rs +1/-0
- helios/src/server/protocol/decode.rs +282/-27
- helios/src/server/protocol/encode.rs +63/-1
- helios/src/server/protocol/mod.rs +1/-0
- helios/src/server/protocol/tests.rs +683/-0
- helios/src/server/request.rs +13/-2
- helios/src/server/runtime/phase_tests.rs +242/-0
Actual code:
- encode.rs: new
responses_tool_entry()(encode.rs:23-52 in PR head) serializes custom tools as {type:custom,name,format:{type:grammar,syntax,definition}|{type:text}} and function tools as {type:function,name,parameters|null,strict}, adding "description" only when nonempty. Newresponses_tools()(encode.rs:~306-328) groups tools byTool.namespacein first-appearance order, emitting {type:namespace,name,description:"": if None,tools:[...]}.Encoder::response()now emits"tools":self.responses_tools()and"text":{"format":self.text_format}instead of constants (encode.rs:818). New fieldtext_format: Valuedefault{"type":"text"}+set_text_format()(encode.rs:133,187,191). - inference.rs:61 adds
pub namespace_description: Option<String>toTool. - decode.rs:
responses_messages()line 343:is_error: flag(&item,"is_error",false)?instead of literal false.tool()setsnamespace_description: None(decode.rs:442).- New
responses_text_format()(decode.rs:466-505): validates text object, text.format object, type in {text,json_object,json_schema}, json_schema requiresschemaobject or boolean, echoes optional name/description (via optional_id) and strict (bool) ; unsupported type -> unsupported error. options()now returns(Options, Value)(decode.rs:509+); Responses branch uses responses_text_format and sets constraint;has_formatnow gates thegrammarmutual-exclusion check (decode.rs:586-591) — NOTE behavior change: previously the check wasif present(body,"grammar") { if !format.is_null() {...} }; now same semantics but for Responseshas_formatis false for omitted/null format, so grammar+omitted format accepted (documented as intended).decode()(decode.rs:903-926): duplicate Responses namespace name -> HTTP 400duplicate tool namespace "x"; namespace_description read from wrapper, empty -> None; nested tool gets t.namespace_description; no more description concatenation.Decoded.text_formatfield (protocol/mod.rs:67).
- request.rs:517-533
template_inputs()now prepends nonemptynamespace_description+ "\n" to tool description before custom-tool grammar instructions. - http.rs: no_websocket() message changed to "GET /v1/responses and WebSocket transport are not supported; use POST /v1/responses with HTTP JSON or SSE" (http.rs:20-25);
generate()callsencoder.set_text_format(decoded.text_format)at http.rs:371. - docs/api.md: documents GET 400 (line ~231) and echo/is_error contract (~733-739).
- Tests: 6 new tests (2 in tests.rs ~2846-3200, 1 in decode.rs native_prompt_tests ~2260-2450, 1 in http.rs ~706-723, 1 in phase_tests.rs:4696).
#2 [high] Why: issue #450 reproduces all three defects, two confirmed by yatesdr
Issue #450 (shieldstar, opened 2026-11-21, still open, labels area:api+bug) is the only thing PR #638 claims to fix.
- Report gives a full reproducer: 4 modules added to helios at commit 25b49519, all 4 pass, showing wire_tools=[], wire_text={"format":{"type":"text"}} next to tool_choice="required"; Responses tool_result flags [false,false] vs Chat [true]; GET /v1/responses 400 "WebSockets are not supported...".
- Source pointers in the issue: encode.rs:692 (Responses arm), decode.rs:311-318 (is_error literal at :316), decode.rs:170/:227 (Chat/Messages read the flag), server.rs:533 (route), http.rs:19-25.
- yatesdr triage comment 2026-11-21 18:38: items 1 and 2 "Confirmed"; item 3 "Documented" — GET 400 is intentional because WebSocket transport is unsupported, only the wording is at issue. So the GET part is a docs/wording fix, not a product bug, in the maintainer's own reading.
- flare-autobot comment 2026-11-30 11:41 confirms on origin/main c146d7be and pre-announces the fix + PR #638. So the issue is <10 days old, single reporter, one maintainer confirmation; no long-running demand. Second-order defects PR #638 fixes that #450 does NOT report (undeclared by the issue, declared by the PR): duplicate Responses namespace names accepted; namespace description concatenation into Tool.description with a leading newline when empty; text.format json_schema metadata (name/description/strict) dropped; json_schema.schema validated only later at grammar compilation.
#3 [high] The change: undeclared vs described behaviours (gaps both ways)
Undeclared / under-declared in the diff (verified by reading):
- Behaviour change for
Tool.namespace_descriptionsemantics: main concatenated"{namespace description}\n{tool description}"intoTool.description(decode.rs:849-858 on main). PR stores it separately and moves the prepend intorequest::template_inputs()(request.rs:520-532). Net rendered prompt for a NONEMPTY namespace description is the same string ("desc\n" + tool description) only becausetemplate_inputsprepends{prefix}\n{description}— but the tool description now also flows to the model after the grammar instructions? No: order is base=prefix+"\n"+description, then grammar text appended — matches main's order. Equivalent for nonempty; for empty description main produced a leading "\n" (PR fixes). So prompt-compatible, as claimed. Encoderis created in http.rs:358 withdecoded.request.tools;set_text_formatis called at http.rs:371 before start — fine. ButEncoder::newdefaulttext_formatis{"type":"text"}and set_text_format is only called inhttp::generate, so other Encoder construction sites (logprobs.rs:150, protocol/tests.rs, phase_tests.rs:987) never echo a request format. No production path besides generate() reaches Responses responses(), so OK.- New hard 400s not documented in docs/api.md: duplicate Responses namespace name (
decode.rs:909-911), non-objecttext/text.format, missing/invalidjson_schema.schema, invalidname/description/strict. docs/api.md gained only the GET-400 line and a 6-line echo/is_error paragraph; the namespace-duplicate rule and the text.format validation/echo metadata are NOT in docs (the existing docs/api.md:571-572 only says namespaces become namespace__name). - Echo shape detail the description glosses: custom tools are echoed with
formatreconstructed from the stored grammar rather than the request body, so an inputformat: {"type":"text"}echoes{"type":"text"}and a grammar echoes{"type":"grammar","syntax","definition"}; function tools echoparameters: nullwhen undeclared (description does say this) and always echostricteven when the client omitted it (synthesizedfalse). So the echo is not byte-identical to the request — a client diffing request vs response sees extrastrict/omitteddescription. docs/api.mdclaims (PR text) "defaulting to {"type":"text"} when text.format is omitted or null" — true; buttext: {}also defaults (test line 3028), not documented but harmless.- Description claims Responses SSE lifecycle echo on
response.created/in_progress/completed/incomplete/failed— verified: all five callself.response()(encode.rs:288-298, 725-735, 827). - Description's "no Protobuf/model core changes" checks out: inference.rs change is a Rust struct only, not a wire/formats type.
Things the description says that the code does not do: nothing found — the described items all exist. One nuance: the description says
responses_text_format()is a "single-pass" helper; it is a single function butfield(format,"type")is called and then type re-matched inoptions()viaformat["type"].as_str().unwrap()with_ => unreachable!()(decode.rs:552-556), i.e. a second implicit invariant across two functions.
#4 [high] Related work: #548/#560/#458 overlap encode.rs; builds on #418/#333; sibling #637
- Same files, overlapping, open: #548 (WynnD, per-request histograms) and #560 (WynnD, vLLM per-request metrics, stacked on #548) both touch docs/api.md, helios/src/server/http.rs, protocol/encode.rs, protocol/tests.rs, runtime/phase_tests.rs. Conflict risk is real but textual: #560 adds
Encoder::record_times/metrics_valueand another field to Encoder; #638 addstext_formatfield +set_text_formatand edits the sameEncoder::response()json! literal (encode.rs:818) that #560 attachesmetricsto (response.completed/response.incompleteframes). Whoever lands second rebases that one line. - #458 (open, brandonmmusic-max) "Restore Responses SSE sequence_number when Encoder::apply or finish fails" — same file, adjacent area (Encoder SSE frame sequencing), no textual overlap with the tools/text literal.
- Merged work this builds on: #418 (jcartu, merged 2026-11-22) strict function-tool schemas — added
Tool.strictand thestrictreject rules in decode.rstool()that #638's echo now has to serialize ("strict": tool.strict); #333 (yatesdr)parallel_tool_callscompletion; #170 (mark-yong) Responses/Chat usage echo; #167 (yatesdr) reasoning budget + DeepSeek ranges. #626 (lukealonso, merged 2026-11-30 02:39) is the one main commit touching these files since #638 branched: it addsPrompt::grammar_reasoning(helios/src/server/request.rs:408,441 on main) and speculative-grammar phase tests in phase_tests.rs. #638 addsnamespace_descriptionhandling insidetemplate_inputs(request.rs:517-533) — different function region than #626's prepare_inference changes, so no textual conflict, but #638's PR description does not mention #626 and its "Recent activity" claim is silent on it. - Issue #450 is the only item #638 claims; issue is open and PR says "Fixes #450".
- Same-author sibling: #637 (flare-autobot, open 2026-11-30 11:40, +881/-7) "Bound synthesized tool-call IDs to 37 characters across HTTP protocols", fixes #447, and also edits helios/src/server/protocol/tests.rs (+454 lines) as #638 does (+683). Both are autobot-authored, both touch protocol/tests.rs, both edit docs/api.md — likely to conflict in the shared test module if landed near each other.
- Nothing found that #638 supersedes, competes with, or reverses. No revert of prior work identified.
#8 [high] Claims and evidence: all code claims backed by CPU tests; CI on head is red and unexplained
Claim → what backs it (verified by reading the PR/test files):
- "Echoes declared tools and text.format in buffered and SSE" — BACKED in code.
responses_tools()(encode.rs:306-328) +self.text_format(encode.rs:818); all five lifecycle frames route throughresponse()(encode.rs:288,295,297,298,725,730,733,735,827). Tests: protocol/tests.rs:2846-2869 (start/response echo + decode→encode→decode equality), 3125-3133 (text.format on created/in_progress/response/failure), phase_tests.rs:4696 (production http::generate buffered+streamed). Not backed by any live HTTP run —tests/server/test_protocols.pywas not extended: it still only assertsresponse.tool_choice == "required"and output items (test_protocols.py:386-401), and line 623 still asserts GET /v1/responses is 400 only. - "Malformed text/text.format, non-boolean is_error, duplicate namespace requests fail with HTTP 400 before model admission" — BACKED in CPU tests: protocol/tests.rs:3136-3181 (13 rejection cases), 3183-3200+ (grammar exclusion), phase_tests.rs:4696 for pre-admission rejection. Error strings verified in decode.rs:466-505, 909-911.
- "is_error lowers identically to Chat and Anthropic across Jinja, DeepseekV4, DeepseekV41, TmlV0 including multimodal" — BACKED by decode.rs:2261-2450 which renders all four frontends and asserts text/token_ids/image_sources parity plus
Tool execution failed:(non-TML) and<|content_tool_error|>(TmlV0) presence. This is the strongest evidence in the PR. - Test counts 1,805 / 245 / 227 passed — claimed, CPU release aarch64, not independently reproduced here; consistent with neighbours (#626 claims 1,806 at the same time on the same suite, #637 claims 1,803 — the oscillation is consistent with branch content differing, not with a fabricated number).
- "Expected but unmeasured: OpenAI Python SDK v2 Pydantic deserialization of echoed response.tools/response.text" — explicitly declared unmeasured. This is the one claim a reviewer cannot check from the diff. Note the SDK's
Responsemodel requirestextto be aResponseTextConfigwithformat; the PR echoes{"format": {...}}only (noverbosity), matching{"type":"text"}-shaped formats — plausible but unverified. - "Per-request host storage for text_format and namespace_description bounded by max_body_bytes" — true by construction (both derive from the request body), reasonable.
- "No Protobuf/model core/cache/scheduler/CUDA changes; existing cores load unchanged" — verified: inference.rs diff is one struct field (
pub namespace_description), not a serde/Protobuf type; no grammar.rs or runtime.rs change. - CI on head f414393: FAILED per the orientation packet. The PR body does not mention or explain a CI failure at all (unlike #626, whose failing CI was called out by the autobot reviewer as an unexplained blocker). That is the single most checkable discrepancy: local claims of 1,805 passing vs a red CI on the same head.
- Not claimed but worth noting: the PR does not claim, and does not test, that an echo round-trip is byte-identical to the client's request — protocol/tests.rs:2857-2868 asserts semantic equality (decode(re-encoded tools) == decode(original tools)), which is the right invariant, but a client that compares
response.tools == request.toolswill see the addedstrict: falseand dropped unknown keys/emptydescription.
#9 [high] Reach: prompt changes for empty namespace descriptions + six new 400 rejections
- Users: anyone reading back an OpenAI Responses object (Pydantic SDK deserialization, gateways/agents that re-serialize history) and anyone replaying failed tool results through /v1/responses. Clients that only read
output/usageare unaffected except for a slightly largerresponseobject on every SSE lifecycle frame. - Prompt-visible change (matters for users and for prefix cache): for a Responses custom tool inside a namespace with a description, the rendered model prompt is identical to main; for a namespace whose description is empty/absent, main prepended a bare "\n" to the tool description (decode.rs:849-858 on main) and the PR removes it — so the rendered prompt for those requests CHANGES versus main. That silently invalidates prefix-cache reuse for any in-flight/long-lived client sending empty namespace descriptions. The PR description says "namespaced tool prompts render identically to before", which holds only when the namespace description is nonempty.
- Prompt-visible change 2: failed Responses tool results now render error tokens (
Tool execution failed:/<|content_tool_error|>) where they used to render as successes — the description acknowledges "prefix caching naturally separates error and non-error trajectories". - New 400s for existing clients (behaviour change, reject-where-previously-accepted): duplicate namespace names in one request;
textortext.formatnot an object;text.format.type == "json_schema"without a schema object/boolean; non-stringname/description; non-booleanstrict; ajson_schemaname/descriptionsent as e.g. a number. On main, most of these were either ignored or failed later at grammar compilation. Charter #417 endorses reject-or-implement, so this is defensible, but it is a strictness increase on a documented API surface and it is only documented for the GET route, not for these. - Operators/configuration/defaults: no new flags, no config keys, no defaults changed; no dependency changes.
- Compatibility: no Protobuf, no core format, no exported-core change (inference.rs:61 is a Rust-only struct field). Existing cores load unchanged, as claimed.
- Documentation: docs/api.md gains 2 lines in "Transport and admission" (lines 230-233) and 6 lines in "Stateless Responses" (733-738). It does NOT document: duplicate-namespace 400, text.format validation rules/echoed metadata, or that namespace descriptions are now prepended at lowering time.
- Deployment: nothing changes in packaging, Orbit, Ignition, or CLI.
- Also affected:
tests/server/test_protocols.py:623still only checks the GET status code, so the served-contract suite has no coverage of any of this; the Python suite was not extended by the PR.
#10 [high] Process: ready-for-review, CI red on f414393, no reviews, same-day age
- State: OPEN, marked "ready for review" (orientation packet), opened and last updated 2026-11-30 (same day). Base main; head f414393. Not a draft.
- CI on head f414393: FAILED (orientation packet). This is the one hard, checkable fact that sits against the PR's local evidence (1,805 helios / 245 flare / 227 flare-cli passing, 0 failed). The PR description does not mention CI at all — unlike #626, whose red CI was called out by the autobot reviewer as an unexplained blocker.
- Reviews: none. Comments: none. Labels: none.
- Exactly one main commit since branching touches these files: #626 (merged 2026-11-30 02:39, lukealonso). It is not mentioned anywhere in the PR description.
- Reproduce-the-claim gap:
tests/server/test_protocols.py(the served OpenAI/Anthropic SDK contract suite) was not touched; #638's only non-Rust verification is its self-declared "expected but unmeasured" SDK deserialization. - Size: 9 files, +1316/-33, of which +925 are tests (protocol/tests.rs +683, runtime/phase_tests.rs +242) — so ~391 lines of production/doc change across 7 files. Neighbours for scale: #637 (same author, same day) +881/-7 with +454 tests; #626 +1405/-39.
- Open questions for a decider, unanswered by the material: (a) why CI is red on f414393; (b) whether "namespaced tool prompts render identically to before" is meant to include the empty/absent-namespace-description case, where main's leading newline disappears; (c) whether the six new 400 rejections belong in docs/api.md beside the new GET-400 sentence; (d) whether tests/server/test_protocols.py should gain echoed tools/text.format and is_error assertions, since it already asserts Responses tool/choice shapes at lines 386-401.
#5 [medium] People: commit author is "derek", GitHub author flare-autobot with 0 merged PRs
- Repo git author for head commit f4143935 is "derek" (search_history on decode.rs/request.rs shows
f4143935 2026-11-29 derek: Echo Responses tools and text.format and decode tool output is_error). GitHub author/opener is flare-autobot (COLLABORATOR). Signature inside the commit message is the house style: most merged PRs end "Discord: " — #638 ends "Discord: flare-autobot". - flare-autobot's 180-day record: 0 merged, 0 closed, 2 open (#637, #625). So this account has no merged history in the last 180 days; every review so far has come from the autobot apparatus itself (e.g. #626 got an "Autobot Review" comment).
- Authors who usually work these areas (last 180 days, helios/src): Luke Alonso (229 commits), Martin Vit (52), yatesdr (47). This file set's most recent non-autobot author is Frosty40 (#615, thinking_token_budget) and before that jcartu (#418 strict tools) and yatesdr (#167).
- Who has engaged on #638 so far: nobody — pr_comments returns "No comments"; reviews: none; labels: none. The only cross-reference is flare-autobot's comment on #450 announcing the PR.
- #626 (same file area, merged hours before) drew a full Autobot Review with explicit "Changes Requested" citing a failing CI on its head. That is the pattern to expect here.
#7 [medium] Project fit: matches Goals + "#417 don't silently drop fields"; no perf claim so no GPU-bench gate
Where it lines up:
- Charter Goal: "Support the documented Chat Completions, Completions, Responses, and Messages APIs (including token counting)" and Standards: "We target the documented subset of the OpenAI API ... and JSON Schema for structured outputs" — echoing
tools/text.formatper OpenAI's Responses contract and honouringis_erroron tool outputs is squarely inside that goal. - Charter "Don't silently ignore API fields. If a standard request field is passed in, either implement it according to the spec or reject it. Never accept it and quietly drop it (#417)" — main was accepting
is_errorandtext.formatmetadata and silently dropping them, which is exactly the anti-pattern; PR #638 implements instead of drops. Strong fit. - Charter "Keep the runtime small and model-agnostic ... shouldn't accumulate per-model branches" — the change is in the shared HTTP protocol layer (helios/src/server/protocol/*), no per-model branch. Fits.
- Charter "What gets merged: PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs" — #450 is a reproducible bug confirmed by a maintainer (yatesdr) and the docs half is "bad docs". Fits.
- Four-part PR description requirement (why / what / claimed result / evidence): present and thorough. Where it does not line up / needs attention:
- Principle 12 of docs/design-review.md ("Validate the real path and report evidence honestly ... Performance claims require ... actual Helios service measurements") and the charter's "Bring real evidence": #638 makes no performance claim, so the GPU-benchmark gate does not bite, but it also has no live-served evidence; the description honestly lists the unrun OpenAI Python SDK v2 test and the skipped GPU/checkpoint #[ignore] tests. Principle 12's "satisfy every applicable layer of the testing hierarchy" is the open question — the TLA+/kani layers were skipped with a stated reason (no scheduler/lifecycle change), which is consistent.
- Charter "Be explicit and pin everything" — nothing here adds defaults or deps.
- Charter review standard "Supported matrix & compatibility: Check interactions across every supported model, cache scheme ... verify that existing data, artifacts, and exported cores still load": #638 changes the rendered prompt only when a namespace description exists — it argues non-error results render identically. That is a prompt-identity claim that only CPU fixture tests back; it matters for prefix-cache behaviour across clients (description says prefix caching "naturally separates" error/non-error trajectories).
- Non-goal angle: nothing in the change adds model aliases or hardware support.
#11 [medium] Recent activity: #626 alone touches these files since branching; defects date to endpoint introduction
Recent main commits in helios/src and docs (orientation packet, last 60 days), newest first, with relevance to #638:
- 0a8c20f4 2026-11-29 Luke Alonso: Allow speculative reasoning for grammar-constrained requests (#626) — THE ONLY main commit touching #638's files since it branched. Adds
Prompt::grammar_reasoningat helios/src/server/request.rs:408,441 and speculative-grammar phase tests in runtime/phase_tests.rs:7301-8068. Relation to #638: adjacent but not overlapping — #626 changes request.rsprepare_inferenceand #638 changes request.rstemplate_inputs(request.rs:517-533). #638 neither builds on nor reverses it, and does not mention it. - c146d7be 2026-11-29 Luke Alonso: Remove copy drafts and history drafts while keeping legacy cores loadable (#620) — stated base commit; no interaction.
- 59adc480 2026-11-29 PCCessna: Retain bounded timing-refresh and acceptance credit across idle (#540) — no interaction.
- e0290571 2026-11-29 PCCessna: parallelize Engram plane assembly in core export (#586) — no interaction.
- 6cb7e3b7 2026-11-29 Luke Alonso: Unlock multi-token speculation and two-frame pipelining for host stops (#619) — no interaction.
- e4d8eb60 2026-11-29 Frosty40: thinking_token_budget for ContentHeaders + trim incomplete UTF-8 tails on cut (#615) — touched decode.rs/request.rs/docs/api.md before #638; no interaction beyond shared files.
- c3489b23 2026-11-29 PCCessna: avoid splitting prefill on zero-budget checkpoint anchors (#582) — no interaction.
- e80b1f2f 2026-11-29 Luke Alonso: decouple signed bodies, single-pass export, slice synthesis, HF LFS SHA-256 (#618) — no interaction. History of the exact lines #638 touches (search_history):
- encode.rs Responses
response()shape was last meaningfully changed by #333 (yatesdr, parallel_tool_calls) and #170 (mark-yong, usage echo); the hardcoded"tools":[]/"text"literal dates to the original protocol work 99cfcd5b 2026-10-13 (Luke Alonso, "Add native LLM API protocols and reject zero temperature") — so the defect has existed since the Responses endpoint was introduced, ~7 weeks. - decode.rs Responses namespace flattening: introduced with the Responses namespace support; docs/api.md:571-572 is its only documentation ("Responses namespaces become unique
namespace__namenames in the model template and regain their namespace on output; ambiguous names are rejected"). Tool.strictwas added 2026-11-22 by #418 (jcartu); #638's echo is the first code to serialize it back to the client.- is_error on Chat/Messages predates the Responses path; the literal
is_error: falsewas in the Responses arm from introduction (single commit f4143935 is the only commit that has ever touchedis_error, per search_history text search). Authorship of the head commit: git author name "derek" (2026-11-29), i.e. the same human/handle that authored the earlier helios logprobs work (48bae6bb, 2a65f7f3, 7c805294); GitHub PR opener is flare-autobot.
#6 [low] Community: no comments or reviews on #638; issue #450 has 2 comments
- PR #638: 0 comments, 0 reviews, no labels. Community interest so far is nil; the only signal outside the PR itself is flare-autobot's comment on #450 announcing it.
- The originating issue #450 has 2 comments (yatesdr triage confirming 2 of 3 defects, flare-autobot confirmation/announcement) and one reporter (shieldstar). Small, recent audience.
- Nothing in the orientation packet's "possibly related items" list shows reactions/engagement that would indicate wider demand for Responses tools echo: #418 (strict tools, merged, big contributor engagement) is the nearest population-of-users item, and #417 (strict:true rejected, blocker for pydantic-ai) shows client-side pressure for OpenAI-parity tool behaviour generally — #638 is adjacent to that pressure but not required by it.
- Not triggered by CI/review traffic: opened and last updated same day (2026-11-30).