Opened by a workflow run, Nov 25, 2026 6:31 AM EST.
screen malicious
Screen Result: All Clear
Evidence:
PR #514 ("helios: allow lenient EOS close for GLM argument-tag tool calls", head 732b868, base main, +61/−0, 2 files) contains no prompt injection or other attempt to steer agentic behavior. The diff is exactly two source hunks: helios/src/output/tagged.rs adds a defaulted trait const const LENIENT_EOS_CLOSE: bool = false; (tagged.rs:40) and a branch in TaggedTools::finish (tagged.rs:304–329) that, only on Termination::Eos and only when a dialect opts in, re-parses the already-buffered body with the existing D::parse and emits ToolBegin/ToolArguments/ToolEnd; otherwise it falls through to the unchanged incomplete {NAME} tool call error (tagged.rs:330). helios/src/output/argument_tags.rs:29 sets the flag to true only for the GLM ArgumentTags dialect and adds one unit test. A repo-wide search for LENIENT_EOS_CLOSE returns exactly three hits, so no other dialect opts in, and the pre-existing early return for Cancelled/ExecutionError/UserStop/OutputLimit (tagged.rs:294–303) is untouched. No new files, dependencies, CI/workflow, build scripts, or tooling changes appear in the PR. Neither the diff, the description, nor the discussion (0 comments, 0 reviews) contains natural-language instructions addressed to an agent or reviewer, and grepping both changed files for instruction-like and capability-escalating terms (agent/instruction/ignore/todo/fixme/secret/http/curl/exec/Command/fs::/unsafe/process) produced no suspicious matches. No network, filesystem, process-spawn, credential, or prompt/system-message behavior is introduced, and there are no hidden or obfuscated blobs.
Reviewer-facing note, not a security finding: by design, a truncated GLM generation whose arg-tag body is already complete will now execute the tool instead of failing the response. It is confined to GLM, cannot fabricate arguments the model did not emit (strict parse still requires closed <arg_key>/<arg_value> tags, argument_tags.rs:52–89), and matches the stated purpose. The author (jannerchang, repo association NONE, 0 merged items) has two other open PRs (#513, #397); #514 has no CI checks, so its "24 passed" verification claim is unverified by me. Related GLM parser work (#59 open, #39/#133 closed issues, #418/#405/#67 merged) suggests a possible sequencing overlap with #59 for maintainers to resolve.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: jannerchang (outside contributor; GitHub association with the repo: NONE; no Discord handle given in the PR)
Motivation: GLM models (e.g. GLM-5.3-Flash) sometimes finish a tool call's arguments and then stop generating (EOS) without writing the closing </tool_call> tag. Today the parser treats that as an incomplete call and aborts the whole stream, so the turn dies instead of returning the call the model had effectively finished. This PR lets the GLM dialect accept such a call at EOS if its body still parses.
Scale: +61 / −0 lines in 2 files (helios/src/output/tagged.rs, helios/src/output/argument_tags.rs)
Proposal:
- Add a default-false trait constant
const LENIENT_EOS_CLOSE: bool = falsetoToolDialect(tagged.rs:38-40). - Turn it on for GLM only:
const LENIENT_EOS_CLOSE: bool = trueinimpl ToolDialect for ArgumentTags(argument_tags.rs:29). - In
TaggedTools::finish, when the cause isTermination::Eosand the flag is set, retryD::parseon the buffered body; if it yields a non-empty call list, emit ToolBegin/ToolArguments/ToolEnd instead of the error (tagged.rs:304-329); otherwise fall through to the unchangedincomplete {NAME} tool callerror (tagged.rs:330). - Add unit test
output::argument_tags::tests::unclosed_glm_tool_call_at_eos_emits_parsed_call, which also asserts an unterminated body still errors (argument_tags.rs:346-375). - All other dialects (ChatML/Qwen FunctionTags, DSML, XTML, MiniMax, Gemma, Atem, plain text) keep the strict EOS error. Touches:
- helios/src/output/tagged.rs —
ToolDialecttrait and the sharedTaggedToolsfinish path used by every tagged dialect - helios/src/output/argument_tags.rs — GLM
<arg_key>/<arg_value>parser and its tests - (indirectly) helios/src/server/protocol/encode.rs — client-visible
finish_reasonand the strict-tool "pending call" error path Related items: - #418 Add strict function-tool schemas for DSML, Qwen, GLM and TML parsers (merged): same two files three days earlier; deliberately made GLM EOS tails reject, so #514 adds leniency into freshly tightened code
- #67 Keep prose tool-tag mentions in function-tag and GLM output as text (merged): introduced the undecided-tag/EOS-error rule ("a truncated call keeps failing at EOS") that #514 partly reverses for GLM
- #179 Retain GLM tool values that are not valid JSON (merged): makes GLM argument typing lenient, so recovered calls can carry off-schema values
- #59 Fix GLM tool-call argument tag parsing (open): older, stale, conflicted proposal on the same two files; not superseded by this one
- #228 Allow XTML message closure after structured answers (merged): the project's existing precedent, implemented as grammar permission plus docs, not post-hoc recovery
Link: https://github.com/NVIDIA/hyperflare-inference/pull/514
Autobot comments: The description does not say that the behaviour it changes is documented policy: docs/api.md:441-444 and :501-502 state that recognized-but-incomplete calls at natural completion are errors, and #133's thread records that this asymmetry was introduced deliberately (
99cfcd5be, pinned byoutput_limits_allow_incomplete_tools_but_eos_rejects_themin xtml.rs:576-596) and that changing it is "a maintainer policy decision that would edit docs/api.md, not a defect fix". The PR touches no docs. The evidence is a hand-written unit test only — no captured GLM stream, no failure frequency, no before/after — against a charter that demands root-cause evidence for bug fixes; the claimed "24 passed" run cannot be checked because there are no CI checks on the head commit and the quoted command is a filtered subset without--locked. Undeclared consequence: forstrict: trueGLM tools the failure mode changes from "incomplete tool call" to either success or aTextGrammar::validateerror, because recovered calls are completed rather than left inOutputEncoder::pending_strict_calls; andfinish_reasonfor these turns becomestool_calls, withtool_choice: required/named"not satisfied" errors disappearing. Zero reviews, zero comments, no labels, no triage, opened and last updated the same day; the author has no merged PRs in the repo and this is his third open PR.
Value Proposition
Verdict: Not worth it (would need a maintainer policy decision and a rewrite before any merge)
The stated problem is real in principle — GLM can emit a complete argument-tag call and then hit EOS without </tool_call> — but this PR is the wrong fix, in the wrong layer, and it breaks a deliberately pinned behavior.
1. It breaks an existing test, and fabricates a tool call from prose
The load-bearing finding. glm_prose_may_mention_the_tool_call_tag (helios/src/grammar/strict.rs:3594-3721) builds a GLM OutputConfig with tools weather and lookup (:3613-3616) and then calls compile_presented_strict_tools(..., Some(&mut out_cfg.content)) (:3637-3639). That function mutates the presentation config: function["strict"] = Value::Bool(true) for every tool with a strict schema (strict.rs:1441-1449). Both tools have strict schemas.
It then asserts assert_unfinished_at_eos(&out_cfg, "Avoid <tool_call>weather") (:3669, helper at :3343-3348, i.e. finish(Eos) must be Err). Trace under this PR:
pushseesstarts_call("weather")→None(no terminator yet,argument_tags.rs:92-117) → text is held back, so nothing is emitted during streaming.finishsetsfinishing = true, sostarts_call'sNonefalls through tomarker = Some((at, true))(tagged.rs:712-721) →Mode::Tool, buffer"weather".TaggedTools::finish(Eos)takes the new lenient path →ArgumentTags::parse("weather")→split == body.len(), soname = "weather",rest = "", the loop is skipped and it returns[("weather", "{}")]—Okand non-empty (argument_tags.rs:31-91).- Events are emitted,
finishreturnsOk, and the test'sassert!(...is_err())fails.
So the model's answer text "Avoid <tool_call>weather" becomes a synthesized zero-argument weather tool call that the model never made, discarding the prose. That parse returns {} for a bare name is not speculative — the existing test at argument_tags.rs:170-201 asserts exactly calls[1]["function"]["arguments"] == "{}". The client then gets finish_reason: "tool_calls" (encode.rs:622-628) and executes a tool nobody asked for. This is precisely the "never fabricate calls" property that chatml::tests::terminal_cause_preserves_incomplete_call_errors_and_never_fabricates_calls (chatml.rs:855-887) guards for the sibling dialect.
Why the PR's verification missed it: the claimed command filters to -- output::argument_tags:: output::chatml::, which excludes grammar::strict::tests even though grammar is enabled transitively by server (helios/Cargo.toml:25). The posted "24 passed" is true but does not cover the affected area, so the PR description's evidence does not support the merge claim under the charter's "bring real evidence" rule.
2. It reverses a deliberate, documented, maintainer-level decision
docs/api.md:438-444: "Truncated tool envelopes are omitted and the response reports its output limit; recognized but incomplete calls at natural completion are errors." The PR does not touch the docs, so it makes the code contradict published behavior.- #133 (closed) documents that this asymmetry "was introduced deliberately in
99cfcd5b, pinned by the testoutput_limits_allow_incomplete_tools_but_eos_rejects_themin03074c11, and restated in #67," and that changing it "is a maintainer policy decision that would editdocs/api.md, not a defect fix." - #418 (merged) deliberately tightened GLM: "reject trailing unresolved
<tool_call>, bare tool names, and proper prefixes of<arg_key>or</tool_call>at EOS in GLM strict prose" — the exact class of output this PR now accepts.
3. It conflicts with the charter's architectural rule
The charter's Code Review Standards say: "No per-model special cases or flags: Keep shared runtime layers general rather than adding model-specific branches or flags." const LENIENT_EOS_CLOSE is a per-dialect policy flag on the shared ToolDialect trait, set true only for GLM (argument_tags.rs:29). Unlike the existing trait consts (OPEN, CLOSE, FUNCTION, TRIM_NEWLINES, TOOL_ENDS_REASONING), which all describe model syntax, this one describes error policy. The result is that byte-identical malformed output yields finish_reason: "tool_calls" on GLM and a terminal stream error on Qwen, DSML, and XTML — a model-dependent API contract, undocumented. That is the "good idea in the wrong place" the charter declines (#404).
4. Who benefits, how much, and the evidence
Little, and it is unquantified.
- Under strict mode the scenario cannot occur: the strict GLM wire grammar always emits the closing tag (
strict.rs:3758,:3883), so the benefit is confined to non-strict GLM requests. - The PR reports no capture, no repro, no frequency — just "occasionally emits." Per the charter ("hypothetical users aren't enough"; bug fixes must address the root cause, #397), that is not sufficient to reopen a settled policy.
- #133's measured data undercuts the premise: GLM tool-parse rejections were 1/84 on a corrupt export and 0/84 after the #129 re-export, with the parser described as "strict and unchanged: a malformed tool call from the model would still be rejected by design, and that documented behavior did not need to change."
- No maintainer request, issue, or roadmap item asks for this (searched; only #514 itself).
5. Cost
Small in lines (~60) and zero in steady-state performance (finish-path only, no decode/grammar cost). But the maintenance and risk cost is disproportionate: a new cross-cutting policy axis on the shared trait, a divergence in API semantics across dialects, docs that now lie, and one broken strict-mode test plus whatever else the author's narrower filter did not run. The self.calls index is also not advanced by the new branch (tagged.rs:304-329 vs the push path at :269-292), which is latent-index-fragile even though it is currently masked by GLM's single-call-per-<tool_call> shape.
6. Simpler ways to the same end
- If this is a real defect, fix the root cause where the data is: capture the failing GLM output and show the frequency on a clean export (post-#129). #133's evidence suggests the observed truncation was the corrupt graph, not the model.
- If the model genuinely truncates, fix it at generation, not presentation: the closing tag is in the template/grammar domain (Ignition recipe or strict wire grammar). That is model-agnostic and needs no runtime flag.
- If it truly must be presentation-level leniency, make it general and documented: apply it to all dialects, gate it on an explicit request/server option, update
docs/api.md:444, and — critically — require that a bare or empty-body envelope with no<arg_key>is rejected, so prose and bare function names can never become{}calls. That last constraint alone would fix the regression in §1 without touching the rest.
What would change the verdict
- A maintainer decision to relax the documented EOS policy (inherently their call, per #133).
- A reproducible capture with frequency on a clean export.
- A general, documented design with no prose/bare-name fabrication.
As written, this PR duplicates an intentional behavior, violates the no-per-model-flags standard, contradicts docs/api.md, and introduces a silent tool-call-fabrication path. Not worth merging. If a priority contributor asks for it, the review to send is: rebase the leniency into a general, documented mechanism, reject empty-body envelopes, and run the full runtime-core,server library suite including grammar::strict::tests.
Full report · Notes Decide Value: no (97%): It is low value or does not align with the project charter. Bypass Low Value Review: No answer in time.
This PR was identified as low value for the following reason.
It is low value or does not align with the project charter. Decision Summary
The auto-reviewer was stopped, but can be re-started manually.
Click "Approve" to override this decision and continue the code review