Explore report · NVIDIA/hyperflare-inference #457

Raw Markdown for agents: https://autobot.eidonix.com/p/bb7bbb07-391b-43fd-a3b9-6d4daa1e5b3c.md

PR #457 — Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with TmlOutput

Open, ready for review, head aacbca1, base main (body cites merge of main at b9cac839). 4 files, +431/−7. Author brandonmmusic-max. No comments, no reviews, no labels, no CI checks on the head commit.

Key findings

  1. The reach of the parser change is wider than the description says. The new TmlOutput error is not scoped to grammar-constrained or /v1/responses traffic: it fires for any TMLv0 request whose turn ends reasoning-only with a closed non-empty model header, and it surfaces as Execution(ExecutionError::State) → error_code() == "server_error" / HTTP 500 (helios/src/output/tml.rs:399-401; helios/src/error.rs:174-178; helios/src/server.rs:647-668; helios/src/server/request/http.rs:526 (not opened),574-578,638). The description names only the streaming response.failed event; buffered Responses and Chat Completions callers see an HTTP 500 where they previously saw HTTP 200 with reasoning-only output. (Scratchpad #8)
  2. No documentation is updated, and the PR's own headline evidence is left as an open TODO. The PR changes no docs, yet docs/api.md documents the affected TMLv0/strict-tool behavior and docs/TODO.txt:5-8 holds "Qualify strict: true function tools on a TMLv0 core … Close when a served TMLv0 core passes those checks and the result is recorded" — exactly the live SM120 verification this PR reports — and the PR neither closes nor amends it. (Scratchpad #9)
  3. A nuance the description omits: a header with a non-empty JSON body never triggers the new error, even when that body is invalid. call_or_text sets AnswerState::Emitted before validating the call body (helios/src/output/tml.rs:334-344), so a malformed tool payload emitted as text counts as "emitted" and suppresses the new failure. Consistent with the stated intent, but it means the guard only covers the header-with-no-body shape. (Scratchpad #8)
  4. Key claims rest on evidence that cannot be checked from the repository. The live GPU numbers (0/5 → 5/5 tool calls with 178 tools, 4/5/5/5 on preamble prompts, "strict": true returning schema-conforming function_call, agentic_suite.py (not opened) SUITE: PASS) name no core hash, binary revision, baseline commit, command line or repetition count, and agentic_suite.py (not opened) does not exist in this repository (search_code "agentic_suite" → no matches). The description itself says "5/5 tool calls (4/5 ['reasoning','message','function_call'])", an internal contradiction. (Scratchpad #11)
  5. No CI enforcement of the tests being cited. The tokenizer snapshot tests are #[ignore]-gated on FLARE_INKLING2_TEST_SNAPSHOT (helios/src/server/request/tml_tests.rs:247,394,442), consistent with existing repo practice, and the head commit has no CI checks at all, so the "8 passed" figure is a local-run claim. (Scratchpad #2, #11)
  6. It rewrites a one-day-old layer. helios/src/grammar/strict.rs was created by #418 (merged 2026-11-22 04:43); #457 edits compile_strict_tml and replaces its (answer | tools) ending. #418 had explicitly left served TMLv0 as an unrun check (its reviewer yatesdr accepted fixture-only TML coverage on 2026-11-21), which #457 now claims to have run. (Scratchpad #3)
  7. Process gate unverified. CONTRIBUTING.md:9-11 requires Signed-off-by on every commit and docs/design-review.md:191-231 requires a Design-Signed-Off-By: …; design-review=<hex> trailer enforced by .githooks/commit-msg; both have blocked contributions before (#304, #418). Whether #457's commits carry them could not be determined with the available tools — an open check for a reviewer. The description does include the required Discord: no username provided line (AGENTS.md:142-153). (Scratchpad #10)
  8. Zero engagement. No comments, no reviews, no labels; the PR has not yet drawn the triage that comparable work got (#228 got area:api, bug, priority:P1, triage:review; #418 went through two review rounds by yatesdr). (Scratchpad #2, #7, #13)

The change

Shape and size. 4 files, +431/−7: helios/src/grammar.rs, helios/src/grammar/strict.rs, helios/src/output/tml.rs, helios/src/server/request/tml_tests.rs. Three parts:

Tests added (per diff/body): output::tml unit tests nonempty_model_header_closed_without_a_content_kind_fails_at_eos, a_closed_untyped_header_allows_visible_content_and_completed_calls, empty_model_headers_other_roles_and_external_stops_keep_their_termination; grammar::tests::content_headers_grammar_allows_preamble_before_tools; a TML_unnamed case in strict_tool_wire_grammars_enforce_constraints plus strict_tml_grammar_allows_unnamed_headers_and_preamble_before_tools; and three tokenizer-gated #[ignore] tests in server/request/tml_tests.rs (a_model_frame_without_a_content_kind_reports_a_failed_response, inkling_stress_untyped_closed_header_must_surface_failure, inkling_stress_custom_grammar_preamble_then_tool). (Scratchpad #1)

The two grammars really were stricter than the parser — verified, not just claimed.

Cost-motivated design detail not in the description: the unnamed rule is deliberately factored — one rule with a schema enum over tool names in grammar.rs, a payload union in strict.rs — rather than N unnamed variants, to avoid N-way Earley ambiguity across large tool sets. That choice is visible in the diff but only implied by the description's phrase "avoiding N-way Earley ambiguity". (Scratchpad #6)

What the description says that the code does not do: nothing material was found. The description's "preserving existing behavior … for turns that emit visible text or a tool call before or after an untyped header" matches the tests; the external-termination carve-out (OutputLimit, UserStop, Cancelled, ExecutionError) matches cause == Termination::Eos. The one over-statement is scope: it frames the failure as a Responses-streaming outcome (see Reach). (Scratchpad #8)

The why

The reported defect is two-fold, from a live Inkling 2 / TMLv0 serving observation relayed from outside (credited to @madarkadonk, madar on Local Inference Lab Discord):

  1. A malformed turn — reasoning frame, then <|message_model|> with header text (e.g. tool name plus partial JSON) where <|content_invoke_tool_json|> was dropped, then <|end_message|>/<|content_model_end_sampling|> — was silently completed. TmlOutput discarded the header text and returned Ok on Termination::Eos, so /v1/responses emitted response.output_item.done(reasoning) then response.completed(output=[reasoning]) with status: "completed" and no error, and agent clients treated a broken tool turn as a finished reply.
  2. Activating any custom grammar (start: /(?s:.+)/) or "strict": true masked <|content_invoke_tool_json|> directly after <|message_model|>, causing models either to print raw tool JSON inside <|content_text|> or to loop in thinking frames.

The category is not new to this project: #228 (merged 2026-11-11, voipmonitor) was the same class — a structured-output grammar rejecting framing the parser itself accepted, so the model's preferred token was masked and it looped to the token limit — and it was triaged as priority:P1 / bug. #457 explicitly says its new ending matches XTML's wrapped_answer (ws tool)* framing, i.e. it follows the shape #228 settled on. (Scratchpad #6, #7)

The PR's lineage framing ("introduced in #304 and hardened in #405, with strict function tools added in #418 and Inkling 2 Mini merged in #433") is imprecise: #304 (original-el8, merged 2026-11-20) is an Inkling 2 Small NVFP4 recipe/serving PR with no helios/src files; #405 (yatesdr) is control-marker/prompt plumbing (model/prompt.rs (not opened), output/pipeline.rs (not opened), frontend/*) with no TML grammar code; #433 (nero−) is Inkling 2 Mini preparation/vision/kernels. Only #418 actually contains TML grammar code. The rest are the model-serving/packaging PRs whose traffic hits the parser. (Scratchpad #5)

Recent activity

People

Community

Nothing found. pr_comments returns "No comments."; no reviews, no labels, no reactions are recorded, and the PR is 1–2 days old (opened 2026-11-22, last updated 2026-11-22). The only interest traceable is indirect: the outside reporter's Discord report, and the author's own three-PR bundle (#457/#458/#468). (Scratchpad #2, #13)

Project fit

Lines up:

Where it may not line up:

Claims and evidence

Claim Evidence offered What can be verified
Malformed turns now fail instead of completing with output=[reasoning] (streamed response.failed, server_error) Narrative + unit tests Verified in code: Err from finish → Error::Execution(State) → server_error/HTTP 500; streamed path emits response.failed, buffered path returns HTTP 500 (output/tml.rs:399-401, error.rs:174-178, server.rs:647-668, http.rs:526,574-578,638). Also applies to unconstrained TMLv0 requests.
Grammars now accept unnamed headers and preamble-then-tool Diff + tests Verified in code that the prior grammars were stricter than TmlOutput and that the new rules admit both shapes; the grammar tests are ordinary (non-ignored) unit tests.
124 unit tests passed across six modules Prose only Not reproducible from the repo state; counts are plausible but unverified.
8 real-tokenizer snapshot tests passed Prose only, with an env-gated #[ignore] suite Test names exist and are #[ignore]-gated on FLARE_INKLING2_TEST_SNAPSHOT (tml_tests.rs:247,394,442); CI cannot enforce them and the head commit has no checks.
Live SM120: 0/5 before, 5/5 after on 178 tools; 5/5 (4/5) on preamble prompts; strict get_weather returns schema-conforming function_call; agentic_suite.py (not opened) SUITE: PASS Prose only Not verifiable from the repo. No core hash, binary revision, baseline commit, command line, repetition count or spread; agentic_suite.py (not opened) is not in this repository. The 5/5 (4/5 …) phrasing is self-contradictory.
Non-TMLv0 families only grammar-tested Disclosed limitation Honest and consistent with the diff (no DSML/Qwen/GLM/XTML test changes beyond the shared TML_unnamed case).
TmlOutput still ignores non-model role frames Stated Consistent with the diff.

(Scratchpad #8, #11)

Reach

Process

Open questions and what could not be found

  1. Do #457's commits carry Signed-off-by and the Design-Signed-Off-By design-review trailer? Not determinable with the available tools; the repo enforces both strictly.
  2. Is the broadened HTTP 500 reach intended and accepted? The description frames the failure as a Responses-streaming fix; nothing in it addresses unconstrained TMLv0 clients, or whether reasoning-only completions of that shape are frequent enough to break existing users.
  3. Which core/binary was served in the live checks, and where is agentic_suite.py (not opened)? Neither is recoverable from the repository; the "before" baseline commit is also unnamed. This is the same evidentiary standard yatesdr imposed in #418.
  4. Why is docs/TODO.txt's strict-TMLv0 qualification item left open if the PR reports the qualifying run?
  5. What is the relationship to #191? #457 builds on TML code that landed on main through Luke Alonso's 8628b7c5, while #191 (open draft since 2026-11-04) is an earlier unmerged attempt at the same files; whether #191 is intended to be abandoned was not found.
  6. How does this interact with the still-open #458 (Responses SSE sequence_number on encoder failure), which addresses the same incident's error path? Neither references the other's review status.