Screening report — PR #457 (NVIDIA/hyperflare-inference)
Title: Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with TmlOutput
Author: brandonmmusic-max (CONTRIBUTOR) · State: open, ready for review · head aacbca1, base main · 4 files, +431/−7 · no labels, no reviews, no CI checks.
Key findings
- Result: All Clear. No prompt injection, no instructions addressed to an agent or LLM, and no hidden agentic behavior anywhere in the diff, the description, or the (empty) discussion. (scratchpad #1, #2)
- Everything in the code matches the description. The
AnswerStatetracker inTmlOutputfires only for non-empty model headers that close with no content kind and no visible answer or tool call; onTermination::Eosthat state becomes an error (helios/src/output/tml.rs:78-83, 282-288, 338, 399-401). - The grammar relaxations are narrow, not a loosening of validation.
tool_unnamedvalidates the tool body against a nameenumover registered tools withadditionalProperties: false(helios/src/grammar.rs:372-417), andcompile_strict_tml's unnamed rule keys on each active tool's strict/default wrapper schema while keeping per-toolconstpairing for named headers (helios/src/grammar/strict.rs:1565-1620). - Rejections the description promises are still enforced in code and covered by added tests: unregistered tools, named-header/body mismatch, schema-violating or non-object arguments, duplicate
@answerframes (strict_tool_wire_grammars_enforce_constraintswith a newTML_unnamedcase;strict_tml_grammar_allows_unnamed_headers_and_preamble_before_tools;content_headers_grammar_allows_preamble_before_tools). - Parse bounds are untouched. The existing 1 MiB header/call limits and all surrounding sanitization in
TmlOutputremain; no bounds were removed. - No capability creep. No new imports, network calls, process spawning, filesystem writes, or environment reads in production code; the only
std::env/std::processhits are pre-existing test-fixture lines (helios/src/grammar.rs:1379, 1752, 1757, 2009;helios/src/grammar/strict.rs:4366). - Only unverifiable (and benign) element: the description's testing provenance — live SM120 GPU runs,
agentic_suite.py(not opened), 178-tool prompt results, a Discord credit for @madarkadonk. These are claims about evidence, not directives, and none of them live in the diff.
1. Suspicious prompt injections
Nothing found.
Searched the added code and the PR description for: imperative text addressed to an agent/assistant/LLM, "ignore previous instructions"-style overrides, instructions to fetch URLs or run commands, encoded payloads, and text smuggling:
- No agent-directed prose in added comments, doc strings, or test names. Added identifiers are ordinary Rust and test-fixture names (
AnswerState,HeaderWithoutContent,tool_unnamed,payload_any,content_headers_grammar_allows_preamble_before_tools,strict_tml_grammar_allows_unnamed_headers_and_preamble_before_tools). - No encoded payloads: a search for base64-like/hex runs in the added code produced no matches.
- No bidi/homoglyph smuggling: all non-ASCII matches in the touched files are pre-existing lines or ordinary text — e.g.
"café 世界", a U+00A0 whitespace test athelios/src/grammar/strict.rs:3678, 3696, and a U+FF5C full-width-bar escape check athelios/src/grammar/strict.rs:49. - No injection surface in the discussion:
pr_commentsreturns no comments and no reviews; the PR has no CI checks. The only untrusted prose is the PR description itself, which reads as a conventional engineering write-up (Why / What Changed / Claimed Result / Supporting Evidence / Unrun Checks / Attribution). - The description's "Attribution" and "Discord: no username provided" lines are social context, not instructions, and were treated as material to review only.
2. Behavior the diff actually introduces (does it do more than it says?)
Nothing found beyond the stated change; the code is semantically what the description claims.
helios/src/output/tml.rs.AnswerState { Empty, HeaderWithoutContent, Emitted }is added at lines 78-83. TheState::Headerhandler recordsHeaderWithoutContentat lines 282-288 under exactly the documented guard —model && at > 0 && (marker == END || marker == TURN_END) && answer == Empty— so empty model headers, non-model role frames, and turns that already emitted visible text or a call are unaffected.Emittedis set inemit()'s non-thinking branch (line 219) and incall_or_textafter the empty-body early return (line 338).finish()returns an error forTermination::EoswithHeaderWithoutContentat lines 399-401, and does not disturbOutputLimit,UserStop,Cancelled, orExecutionError. Verified by reading the file at head (helios/src/output/tml.rs:300-403).helios/src/grammar.rs.compile_content_headersgains a factoredtool_unnamedrule (<|content_invoke_tool_json|> @payload_any <|end_message|>) withpayload_anyas a single JSON schema whosenameis anenumover registered tools,argumentsan object, andadditionalProperties: false; the tool-enabled ending becomes(answer ({restart} thinking* tool)* | tools)(helios/src/grammar.rs:372-417). This admits preamble-then-tool framing, as described, without admitting arbitrary tool names or arbitrary argument shapes.helios/src/grammar/strict.rs.compile_strict_tmladdspayload_refs+ atool_unnamedalternation over per-tool strict/default wrapper schemas, and the non-required ending becomes(answer ({restart} thinking* tool)? | tools)undersingle_calland(answer ({restart} thinking* tool)* | tools)otherwise (helios/src/grammar/strict.rs:1565-1620). Strict-mode rejections are preserved and are asserted by the addedTML_unnamedcase instrict_tool_wire_grammars_enforce_constraintsand bystrict_tml_grammar_allows_unnamed_headers_and_preamble_before_tools.- Tests only assert behavior. The new unit tests (
helios/src/output/tml.rs:589+region) and the snapshot-replay tests inhelios/src/server/request/tml_tests.rs(lines ~246, 392, 442, all#[ignore]d behindFLARE_INKLING2_TEST_SNAPSHOT) contain no hidden side effects. - Provenance is plausible. Four commits on the branch by Brandon M. Music (2026-11-21/22), including a
Merge main (b9cac839)commit; no default-branch commits since branching touched these files, consistent with the "merged cleanly" claim. Related PRs #304, #405, #418, #433 are real and merged; #458/#468 share the author. Prior merged helios work by this author (#162, #154) supports a legitimate contributor track record.
3. Open questions and what could not be found
- No human discussion to inspect. Zero comments and zero reviews, and no CI on the head commit, so no independent verification of the change exists in the PR record. This is a review-coverage gap, not a security finding.
- Live GPU results are not reproducible from the repository. The "Live SM120 GPU verification" section, the 178-tool
grammar: "start: /(?s:.+)/"runs, and theagentic_suite.py(not opened)SUITE: PASSclaim have no artifacts in the diff or the repo listing I checked. They are unverified evidence claims, not instructions. - Non-TMLv0 families (ChatML, DSML, XTML, GLM, Qwen, Gemma) are, by the author's own statement, covered only by
grammar::tests/grammar::strict::testsrather than live serving — a residual-risk note for the reviewers. - No malicious content was missed as far as the diff allows — the PR's entire untrusted surface is four Rust source files plus a text description, all of which were read.
Verdict
All Clear. PR #457 contains no prompt injection or other content aimed at causing unwanted agentic behavior. Its code implements exactly the described TmlOutput termination fix and the two grammar alignments, with validation strictness and parse bounds intact.