#1 [high] The change: LENIENT_EOS_CLOSE trait const + GLM EOS recovery
PR #514 (jannerchang, open, ready for review, opened 2026-11-25, head 732b868, base main @ 2771618, +61/-0, 2 files, no reviews, no CI checks). Diff (pr_diff, result 2):
- helios/src/output/tagged.rs: adds
const LENIENT_EOS_CLOSE: bool = false;totrait ToolDialect(default false, doc comment lines 38-40), and inTaggedTools::finish(tagged.rs:293-331) inserts before the unconditional error:if cause == Termination::Eos && D::LENIENT_EOS_CLOSE { let raw = std::mem::take(&mut self.buffer); if let Ok(calls) = D::parse(&raw, &self.tools) && !calls.is_empty() { return Ok(<ToolBegin/ToolArguments/ToolEnd triples, index = self.index + offset>); } }then falls through toErr(format!("incomplete {} tool call", D::NAME).into())(unchanged line 330). - helios/src/output/argument_tags.rs:29 adds
const LENIENT_EOS_CLOSE: bool = true;toimpl ToolDialect for ArgumentTags(GLM). - helios/src/output/argument_tags.rs:346-376 new test
unclosed_glm_tool_call_at_eos_emits_parsed_call: pushes</think><tool_call>run<arg_key>text</arg_key><arg_value>ok</arg_value>, finish(Eos), asserts one callrunwith{"text":"ok"}; second half asserts<tool_call>(empty name) still errors. Size/scope: 61 added lines, 0 removed; no doc change, no package/format change, no config/default change. It does NOT touch chatml.rs, dsml.rs, xtml.rs, minimax_xml.rs, gemma_call.rs — those keep false. Note the new code path duplicates the event-construction block that already exists inTaggedTools::push(tagged.rs:269-287) — same flat_map/enumerate/index+offset shape.
#3 [high] The why: problem statement, linked issues, how long wanted
Claimed problem (PR #514 description): with GLM models (e.g. GLM-5.3-Flash), multi-turn tool calling occasionally produces a complete <tool_call>name<arg_key>..</arg_key><arg_value>..</arg_value> then EOS without </tool_call>; TaggedTools::finish unconditionally errors with "incomplete GLM tool call", aborting the stream.
Evidence offered in the PR: NO reproduction, no captured stream, no model/log, no frequency, no before/after count. Only a unit test with hand-written text. This contrasts with the repo charter ("Bug fixes need to address the root cause… Bring real evidence") and with how comparable PRs document live evidence (e.g. #67 had captured Qwen streams; #133 had measured frequencies).
Earlier traces of the same symptom class (found in the orientation leads):
- #67 (merged, 2026-10-25) "Keep prose tool-tag mentions in function-tag and GLM output as text": states "At finish an undecided opener is still parsed as a call, so a truncated call keeps failing at EOS and is dropped at the output limit as before" — i.e. the EOS error is deliberate, and it also notes Qwen3.8 Flash sometimes ends its turn where it would write a literal
</tool_call>(7 of 20 logprob requests) — the same "model stops before the close tag" behavior, there in prose. - #133 (closed, eduffd, 2026-10-28) surfaced the asymmetry as an undetermined behavior: "an open
<tool_call>at natural EOS errors withincomplete GLM tool call, while the same open call at max_tokens is silently dropped with finish_reason=length (helios/src/output/tagged.rs:251-263)". Maintainer reply (original-el8, 2026-11-05, comment in #133) says this asymmetry was introduced deliberately in99cfcd5be, pinned by the testoutput_limits_allow_incomplete_tools_but_eos_rejects_them(xtml.rs:576-596), and restated in #67; changing it is "a maintainer policy decision that would edit docs/api.md, not a defect fix". - Documented contract: docs/api.md:441-444 "The model parsers buffer tool envelopes until they are complete… Truncated tool envelopes are omitted and the response reports its output limit; recognized but incomplete calls at natural completion are errors." docs/api.md:501-502 "A tag still undecided when generation ends is parsed as an incomplete call." So the behavior PR #514 changes is documented, and the PR does not touch docs/api.md. No open issue in the tracker asks for lenient EOS close specifically; searches for "unclosed tool call", "unterminated closing tag", "lenient parse tool call" returned only this PR.
#4 [high] Claims and evidence: test claim verified in shape but not run here; CI absent
PR "Verification" section claims: cargo test --manifest-path helios/Cargo.toml --features runtime-core,server --lib -- output::argument_tags:: output::chatml:: on main (2771618): 24 passed, 0 failed, including unclosed_glm_tool_call_at_eos_emits_parsed_call, malformed_calls_fail, and chatml::tests::terminal_cause_preserves_incomplete_call_errors_and_never_fabricates_calls.
Observations:
- Orientation packet: "CI on the head commit: no checks" — the repo's workflow is
.github/workflows/native-serving.yml(runscargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,serveron ubuntu-24.04 and windows-2022). Nothing has run for this head, so the claim is self-reported only (as with most fork PRs; #67 reported the same "PR CI has not run" for fork PRs). - The claimed command omits
--lockedand is a filtered subset; the CI-equivalent command is the one in AGENTS.md:317 and native-serving.yml:63. - The cited test names exist and match the code (argument_tags.rs:347
unclosed_glm_tool_call_at_eos_emits_parsed_call, argument_tags.rs:205malformed_calls_fail, chatml.rs:855terminal_cause_preserves_incomplete_call_errors_and_never_fabricates_calls), and those chatml assertions still hold because FunctionTags keeps LENIENT_EOS_CLOSE=false. - Not covered by the author's verification: dsml/xtml/minimax/gemma paths, the strict-tool suites (#418) which assert EOS errors on unfinished GLM calls (grammar/strict.rs:3343-3348
assert_unfinished_at_eos, used at :3681, :3689 on GLM text such as "Avoid <tool_call>weather" / "Avoid <tool_call>weather<arg_"), which should be unaffected because such text has no<arg_key>…</arg_value>body —ArgumentTags::parseerrors and the branch falls through to the error — but this is traced by reading, not tested. helios/src/server/protocol/tests.rsand other suites are not named in the PR's verification.
#5 [high] The change: what the lenient branch actually accepts, strict-path interaction, docs left unchanged
Verified by reading the code at PR head 732b868 (results 3, 28, 29, 60, 76, 90; argument_tags.rs:24-118):
- The branch calls
D::parse(&raw, &self.tools), which for GLM isArgumentTags::parse=parse_candidate(...).ok_or("incomplete JSON argument").parse_candidatetrims the body, requires a non-empty name before<arg_key>, requires every key to be closed and followed by<arg_value>, and requires each value to be terminated by</arg_value>; it returnsOk(None)for a JSON-container argument still inside a string. So a body whose last<arg_value>is unterminated, or whose<arg_key>is unterminated, still errors → falls through to "incomplete GLM tool call". Only a body complete up to the last</arg_value>(and nothing else pending) recovers. - Non-strict type mismatches pass through
parameter_value(tagged.rs:937-943) which retains invalid values, so lenient recovery can emit arguments that do not match declared types — but that is already main's behavior for closed calls (#179). - Strict calls are unaffected in the visible outcome: strict tool events are held in
OutputEncoder::pending_strict_calls(server/protocol/encode.rs:496-553) and validated with the compiledTextGrammar;Encoder::finisherrors with "incomplete strict tool call {name:?} at end of generation" only if a strict call is still pending at EOS (encode.rs:599-603). A recovered GLM call produces ToolBegin/ToolArguments/ToolEnd in one batch, so it is completed and validated rather than pending → a schema-valid recovered call now succeeds under strict, and a recovered-but-invalid one fails validation with a different error ("tool arguments…" / TextGrammar::validate) instead of "incomplete ... tool call". So forstrict: trueGLM tools the observable failure changes from an incomplete-call error to either success or a validation error. - Under a strict generation grammar, the wire grammar requires
</tool_call>(grammar/strict.rs:2280-2301), so a model that stops early would normally be prevented by the grammar from stopping there — the lenient branch is a belt-and-braces path for the non-grammar-constrained (non-strict) case. - No docs/api.md, docs/TODO.txt, AGENTS.md, or CHANGELOG update: the documented contract at docs/api.md:441-444 stays as-is while GLM behavior changes. AGENTS.md:230 requires reading docs/api.md for "Change CLI, API, or configuration behavior"; reviewer expectations in the repo (cf. autobot review of #457) treat undocumented user-visible behavior changes as a "should fix".
- Trait-level:
LENIENT_EOS_CLOSEis a default-false const on a typed dialect trait, which is the documented pattern in AGENTS.md:362-364 ("Tool/reasoning parsers … use independent typed enum identifiers"), so it is a dialect trait constant rather than a per-model boolean flag on the contract — but it is enabled only for GLM, so behavior differs only by model dialect; the charter's "no per-model special cases or flags" (read_charter) is a live consideration. Also a "don't silently change stream semantics" tension: charter says bug fixes need root cause, and maintainers called this a policy decision (#133 comment).
#6 [high] Related work: #418/#67/#179/#59/#228/#102 overlap and the reversal of #67's EOS rule
Related items found via related_items(514) (result 67) and items_touching(tagged.rs) (result 68):
- #418 (merged 2026-11-22, jcartu) "Add strict function-tool schemas for DSML, Qwen, GLM and TML parsers" (+6048/-128) — same two files. It added, per its own description, "reject trailing unresolved
<tool_call>, bare tool names, and proper prefixes of<arg_key>or</tool_call>at EOS in GLM strict prose", and its testglm_prose_may_mention_the_tool_call_tag(grammar/strict.rs:3595-3721) asserts "accepting undecided GLM<tool_call>tails at EOS fails glm_prose_may_mention_the_tool_call_tag (rc=101)". That test's negative cases are prose+<tool_call>(+name/arg prefix) with no complete arg/value pair, so #514's branch should not flip them — but #514 adds an EOS-recovery path into the same dialect that #418 deliberately made stricter at EOS for the prose case. Direction: adjacent, not clearly contradictory; worth noting as the closest prior deliberate decision about GLM EOS behavior. - #67 (merged, mark-yong) — introduced
ToolDialect::starts_calland the default-deny/undecided-then-call-at-finish rule; explicitly kept "a truncated call keeps failing at EOS". #514 partially reverses that EOS half for GLM only (not the prose half). - #179 (merged 9d1e0137, mark-yong) "Retain GLM tool arguments that do not match their declared type" — closed #39; makes GLM argument parsing non-strict on types, which means #514's recovered calls can carry off-schema values.
- #59 (open, aarongiuffre, opened 2026-10-23, updated 2026-11-25) "Fix GLM tool-call argument tag parsing" — same two files, older proposal touching GLM argument parsing (array coercion + diagnostics). Autobot auto-review on 2026-11-25 marked it "Review Stopped: It was already fixed another way (merged or on the main branch)". Conflict area: both rewrite
ArgumentTagsargument parsing /TaggedToolsfinish semantics; #59 is stale with merge conflicts on tagged.rs (reported by original-el8 on 2026-11-13). #514 does not supersede #59's coercion goal. - #405 (merged, yatesdr) "Treat declared markers as controls…" touches argument_tags.rs; #228 (merged, voipmonitor) adds
OutputEnvelope.message_closein tagged.rs for XTML — the nearest existing precedent for "accept a closing envelope at EOS", but implemented as grammar permission for a parser-recognized closure, not as lenient post-hoc recovery. - #102 (merged, mark-yong) and xtml test
output_limits_allow_incomplete_tools_but_eos_rejects_them(xtml.rs:576-596) pin the OutputLimit-drops/EOS-errors asymmetry, which #514 leaves intact (its branch is EOS-only; OutputLimit is handled earlier by the guard at tagged.rs:294-303). - Unrelated-but-same-author: #513 (open, jannerchang, 2026-11-25) "helios: suppress prompt-only special tokens from output and stop matching" — targets the
[gMASK]leak from #133; #397 (open, jannerchang, 2026-11-19) kernel-node attributes; #514 is his third open PR, none merged.
#7 [high] People and community: new outside contributor, no engagement, parser area owned by mark-yong/jcartu/yatesdr
Facts gathered:
- Author: jannerchang, GitHub association with the repo: NONE (orientation packet). In the last 180 days: 0 merged, 0 closed, 2 (now 3) open PRs — #513 (suppress prompt-only special tokens, 2026-11-25), #397 (skip zero-valued kernel-node attributes the replay driver rejects, 2026-11-19), #514 (this one). No comments, issues, or reviews by the author in the local copy; no engagement on #514 at all.
- Who normally works these files: helios/src in the last 180 days is Luke Alonso (207 commits), Martin Vit (45), yatesdr (43). The output-parser area is mostly driven by external contributors with maintainer review: mark-yong (#67, #179, #102, #94, #162 — the main author of the current EOS/mention semantics), jcartu (#418 strict tools), yatesdr (maintainer, #405), voipmonitor (#228), original-el8 (triage reviews), brandonmmusic-max (#457).
- Recent activity in helios/src (orientation packet, last 8 commits): 27716185 Luke Alonso "Deprecate RebuildManifest…", fd6c0f3b Luke Alonso (#510), f646bebc Luke Alonso (#507), 7b04dd1e Jason Cook (#473), cb787f29 Jason Cook (#470), da578c5c Jason Cook (#426), adb9687c Jason Cook (#424), d0adb958 PCCessna (#499). None touches the output parsers; no commits on main since 2771618 touch the two changed files (orientation packet).
- Last commits touching argument_tags.rs (search_history): 0b09434d (2026-11-22, #418), a2bf7860 (#405), 9d1e0137 (#179), 28f0833b (licensing), a5b6ed26 (#67), 905735a5, 2a4fcb9f, bcd6b249. So #418 (3 days before this PR) was the most recent change to the file, and #514 builds directly on the strict-tool EOS work.
- Community: PR #514 has zero comments and zero reviews (result 1), opened today; no reactions found. In contrast #67 had a cross-reference comment from its author, #59 has triage commentary, and #418 had multiple maintainer review rounds.
- Priority contributors per charter: @voipmonitor, @original-el8, @lukealonso carry extra weight; jannerchang is not among them.
#8 [high] Project fit: charter evidence rule, model-agnostic rule, docs rule, and #228 as leniency precedent
From read_charter (result 65) and AGENTS.md (results 63, 64):
- Aligns: charter goal "fast local inference engine … heavy tool use"; "Serve the documented Chat Completions, Completions, Responses and Messages APIs". A stream abort on a recoverable GLM call is exactly the agentic-loop failure class the project prioritizes. Charter: "Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)" — this is the sharpest tension: #514 makes the parser accept an unterminated envelope, i.e. it changes a rejection into acceptance, and offers no root-cause evidence for why the model stops before
</tool_call>(no sampling trace, no logprob evidence, no frequency measurement). - Tension: "No per-model special cases or flags" / "Keep the runtime small and model-agnostic … shouldn't accumulate per-model branches". The change is a trait constant enabled for exactly one dialect (GLM). AGENTS.md:362-364 permits typed dialect identifiers for tool parsers, so the mechanism is arguably in-pattern, but the behavior switch is model-scoped.
- Tension: "Don't silently ignore API fields… Be explicit and pin everything" and AGENTS.md:230 requiring docs/api.md updates for API-behavior changes. Behavior now differs from documented docs/api.md:441-444 and :501-502 for GLM only, with no doc edit.
- AGENTS.md 3-way review demands: "Supported matrix & compatibility: Check interactions across every supported model, cache scheme…"; PR description standard requires four parts: why / what changed / claimed result / evidence. #514 has why + what changed + a claim ("24 passed"), but no live evidence, no model-frame capture, and does not say which dialects/paths it checked beyond the two test modules.
- Non-goal note: nothing here is a new model recipe or graph op, so no owner approval gate applies.
- Precedent in project history for this kind of lenient acceptance: #228 (XTML message closure) added the closure to the grammar and to the parser's envelope, i.e. made the accepted language explicit and documented it, with native replay evidence. #359 "Retain DeepSeek tool values that are not valid JSON" is a similar leniency precedent that came with parser tests + doc lines.
#9 [high] Reach: GLM-only, compiled-in, no flag; client-visible finish_reason and required-tool-choice changes
Reach of PR #514:
- Affected users: anyone serving a GLM recipe (
ToolParserKind::GlmArgumentTags, contract enum value 2, helios/src/model/contract.rs:66) — GLM-5.3-Flash and other GLM-5.3 recipes. Pipeline mapping: helios/src/output/pipeline.rs:86-88 (OutputPipeline::ArgumentTags), syntax declared in helios/tests/support/contracts/glm53.json. - Not affected: Qwen/ChatML/MiMo/Step/Nemotron-H (FunctionTags, chatml.rs:17-29), DeepSeek DSML (dsml.rs own state machine), XTML (xtml.rs:576-596), MiniMax (minimax_xml.rs:143), Gemma (gemma_call.rs:108), Atem/TML recipient parsers, plain text. All keep LENIENT_EOS_CLOSE=false.
- No configuration surface: no request field, no CLI flag, no contract/protobuf field, no default changes. Not overridable by operators; it is compiled-in per dialect. Nothing to configure to opt out.
- Compatibility: existing packages/cores keep working (no package re-export needed, as with #67/#418: "Existing packages pick up the fix with the new Flare build"). Only the Flare/helios binary changes.
- Client-visible behavior change for GLM: a turn that previously ended in an SSE error / HTTP 5xx (no finish_reason, no [DONE]; see #133's measured client behavior) can now complete with
finish_reason: "tool_calls"(encode.rs:622-628 sets "tool_calls" when cause != UserStop and outputs.has_tools()) and delivered arguments. That changes finish_reason on a class of previously-failing responses, and fortool_choice: required/namedit converts "required tool choice was not satisfied" failures into successes when the recovered call is valid. - Downstream effect on conversation history: the recovered call's arguments are now what the model emitted, possibly type-mismatched (see #179 semantics), so clients receive calls they previously never saw. Tool-result round-trip in the next turn uses those arguments.
- Documentation affected but unchanged: docs/api.md:441-444 and :501-502. docs/TODO.txt has no entry.
- Tests/CI affected:
output::argument_tags::(all ArgumentTags tests must still pass;malformed_calls_failat argument_tags.rs:205-218 uses directArgumentTags::parse, unaffected),chatml::tests::terminal_cause_preserves_incomplete_call_errors_and_never_fabricates_calls(unaffected),grammar::strict::tests::glm_prose_may_mention_the_tool_call_tagandassert_unfinished_at_eos(expected unaffected; traced, not run),server::protocol::testsGLM cases (all use closed calls). - No new dependency, no kernel/GPU impact, no perf claim, no memory impact beyond the existing 1 MiB parser bound.
#11 [high] Research summary
Case file for PR #514 (helios: allow lenient EOS close for GLM argument-tag tool calls) is assembled in the scratchpad, with every angle covered and every orientation lead followed.
What the change is: a default-false const LENIENT_EOS_CLOSE: bool on ToolDialect (tagged.rs:38-40), enabled only for GLM's ArgumentTags (argument_tags.rs:29), plus a branch in TaggedTools::finish (tagged.rs:304-329) that on Termination::Eos retries D::parse on the buffered body and returns ToolBegin/ToolArguments/ToolEnd if it parses non-empty, otherwise falling through to the unchanged incomplete {NAME} tool call error. One unit test. 61 added lines, 2 files, no deletions, no docs, no config surface.
Findings a reader could not get from the description: (1) the behavior being changed is documented in docs/api.md:441-444 and :501-502 and was called a deliberate maintainer policy decision in #133's thread (99cfcd5be, pinned by output_limits_allow_incomplete_tools_but_eos_rejects_them), and #67 explicitly kept truncated calls failing at EOS — so this partially reverses that rule for GLM, with no doc edit; (2) the evidence is a hand-written unit test only — no captured GLM stream, no frequency, no before/after, against a charter that demands root-cause evidence for bug fixes; (3) for strict: true GLM tools the failure mode changes from an incomplete-call error to either success or a TextGrammar::validate error, because recovered events bypass OutputEncoder::pending_strict_calls; (4) the closest prior work is #418 (merged 3 days earlier), which deliberately tightened GLM EOS handling, plus #59 (open, stale, same two files) and #179; (5) zero reviews, zero comments, no labels, no CI on the head, author has no merged PRs and no repo association.
Angles with entries: the change (what it accepts, strict interaction, docs), the why (problem claim, prior reports #67/#133, undocumented), related work, recent activity (last touches to argument_tags.rs; nothing on main since branch point), people/community, project fit (charter, AGENTS.md rules, #228 precedent), claims and evidence, reach (GLM recipes only; finish_reason and required-tool-choice changes), process.
#13 [high] Claims and evidence: existing EOS-error tests per dialect; no GLM test pinned the flipped case
Tests elsewhere in the tree that pin the EOS-error contract, and what #514 does to each (all traced by reading, none run):
- ChatML/Qwen: chatml.rs:702-723 loops over partial inputs (
<function=lookup>,<tool_call>,<tool_call><parameter=…etc.) and assertsfinish(Termination::OutputLimit)is empty butfinish(Termination::Eos)is an error; chatml.rs:855-887terminal_cause_preserves_incomplete_call_errors_and_never_fabricates_callsasserts EOS error for<tool_call><function=lookup>. Unaffected: FunctionTags keeps LENIENT_EOS_CLOSE=false. - XTML: xtml.rs:576-596
output_limits_allow_incomplete_tools_but_eos_rejects_them(OutputLimit/UserStop ok, Eos err). Unaffected (separate parser). - Atem recipient parser: recipient.rs:576 and :614 assert EOS errors. Unaffected.
- GLM prose at EOS, strict (#418): grammar/strict.rs:3595-3721
glm_prose_may_mention_the_tool_call_tagrejects prose ending in<tool_call>,<tool_call>weather,<tool_call>weather<arg_…and callsassert_unfinished_at_eos(strict.rs:3343-3348). Under #514 these texts reach the lenient branch only if the parser is in Mode::Tool with a body thatArgumentTags::parseaccepts; they have no</arg_value>, soparseerrors and the EOS error stands — expected unaffected, worth a reviewer runninggrammar::strict::tests::glm_prose_may_mention_the_tool_call_tagandoutput::chatml::tests::terminal_cause_preserves_incomplete_call_errors_and_never_fabricates_calls. - Notably,
output::argument_tags::contains no test pinning the "incomplete GLM tool call" error for a body that is complete up to the last</arg_value>— the case this PR flips.malformed_calls_fail(argument_tags.rs:205-218) only covers unterminated/empty-name bodies, andtruncation_and_structured_output_keep_protocol_semantics(argument_tags.rs:324-344) coversrun<arg_key>text</arg_key>under OutputLimit only. So the PR's new test is the only coverage of the flipped case, and nothing records the old behavior as intentional in a test.
#14 [high] The change: description-vs-diff audit (nothing claimed missing; consequences undeclared)
Checking the PR description against the diff (pr_diff result 2) item by item: Description says → diff does:
- "Add
const LENIENT_EOS_CLOSE: bool = false;toToolDialectin helios/src/output/tagged.rs" → yes, at tagged.rs:38-40 with a two-line doc comment. - "Enable
trueonly forArgumentTags" → yes, argument_tags.rs:29; grep shows every otherimpl ToolDialect(chatml FunctionTags, gemma_call, minimax_xml, pipeline PlainText) leaves the default. - "attempt D::parse and emit ToolBegin/ToolArguments/ToolEnd if valid and non-empty; otherwise fall through" → yes, tagged.rs:304-329, identical event shape to the existing push-path block at tagged.rs:269-287 (duplicated code, ~20 lines).
- "Add unit test unclosed_glm_tool_call_at_eos_emits_parsed_call" → yes, argument_tags.rs:346-375 (includes a negative half:
<tool_call>still errors). - "Other dialects keep false and retain strict incomplete-call errors" → yes by default; nothing in the diff touches them. Description omits → diff contains:
- Nothing beyond the above in code. But the description omits the consequences: docs/api.md:441-444 / :501-502 are not updated; the strict-tool path (
OutputEncoder::pending_strict_calls, encode.rs:496-553, 599-603) changes failure mode;finish_reasonfor these turns becomes "tool_calls" (encode.rs:622-628);tool_choice: required/named"not satisfied" errors (encode.rs:617-621) disappear for recovered calls; no captured model output, no frequency, no statement of which suites were run besides two filtered modules. - Also omitted: the trait gets a per-dialect behavior switch enabled for exactly one model family, which touches the charter/AGENTS.md "no per-model special cases" line (AGENTS.md:338-364) even though the mechanism lives on the typed dialect trait. No overreach found: the description does not claim anything the diff fails to do.
#2 [medium] The change: buffer-drain detail and the skip-change mismatch
Reading the surrounding code (result 3, 4, 28, 29):
TaggedOutput::finish(tagged.rs:513-540) clears pending delimiters, callspush(Input::Text(""))first, then dispatchesMode::Tool => self.tool.as_mut().unwrap().finish(cause). SoTaggedTools::finishis only reached while the parser is inside a tool envelope (Mode::Tool), andself.bufferthere holds exactly the call body text after<tool_call>(open tag already drained at tagged.rs:739-747).- Consequence: the lenient branch only fires for a call that was already opened (the
<tool_call>opener was consumed) and never closed. A<tool_call>that appears in answer text but whosestarts_callwas still undecided at finish is resolved bypush("")at tagged.rs:712-720 (None if !self.finishing => undecided, else treated as a call), i.e.finishingforces the call interpretation first, and then Mode::Tool is entered — so a bare trailingrunname would be handled by the lenient parse too. Termination::OutputLimitis excluded earlier by thematches!guard infinish(tagged.rs:294-303) which returns Ok(vec![]) and clears the buffer, so the lenient path cannot interact with output-limit truncation. UserStop/Cancelled/ExecutionError likewise unaffected.- The buffer is
std::mem::taken at the top of the lenient branch, so on a failed lenient parse the buffered body is dropped before the error is returned. No behavioural difference is visible since the error aborts the response. - 1 MiB bound from
push(tagged.rs:228-230) still applies to the buffer.
#10 [medium] Process: ready-for-review, unlabeled, unreviewed, no CI, <1 day old
Process facts for PR #514 (orientation packet + pr_comments result 1):
- State: open, marked "ready for review"; opened 2026-11-25 and last updated 2026-11-25 (same day, so age < 1 day).
- Base main, head commit 732b868; single commit "helios: allow lenient EOS close for GLM argument-tag tool calls" by JannerChang (search_history shows commit 732b8687 as the newest commit, i.e. the PR head).
- Size: 2 files, +61/−0.
- Labels: none (no area:api, no model:glm-5.3, no triage:* — compare #59 which carries area:api, model:glm-5.3, triage:verify-for-closure; #418/#228 carried priority/triage labels). No triage has occurred.
- Reviews: none; comments: none; CI: no checks on the head commit.
- No DCO/
Signed-off-byverification done here; other PRs in this repo went through signed-off commits (#418 discussion shows maintainers demandingSigned-off-byon every commit). - No discord/attribution line, no AI-assistance disclosure (several other PRs in this area carry one, e.g. #67 "Written with AI assistance", #418 "AI disclosure").
- Branch name not visible in the packet; the PR is from a fork (association NONE), so the
Native servingworkflow likely sits at action_required for fork PRs (as #67 reported).
#12 [medium] Recent activity: GLM parser changed 4x in 6 weeks, #514 stacks on #418, main quiet in these files
Facts for the "recent activity" angle (search_history results 34, 61; orientation packet):
- Commits touching helios/src/output/argument_tags.rs, newest first: 732b8687 (this PR, 2026-11-25), 0b09434d (#418 strict function-tool schemas, 2026-11-22), a2bf7860 (#405 declared markers as controls, 2026-11-20), 9d1e0137 (#179 retain off-schema GLM arguments, 2026-11-11), 28f0833b (Apache-2.0 licensing + upstream templates, 2026-10-30), a5b6ed26 (#67 prose mentions, 2026-10-26), 905735a5, 2a4fcb9f, bcd6b249. So the GLM parser was changed four times in the 6 weeks before this PR, twice within the last week; #514 stacks on #418.
- Commits touching helios/src/output/tagged.rs in the last 180 days: also #94, #162, #167, #228, #179, #67, #405, #418 (items_touching result 68).
- Main has not moved in these files since the PR's branch point 2771618 (orientation packet: "Commits on the default branch since this pull request branched (2771618), touching its changed files: none"), and the newest main commit is 27716185 (Luke Alonso, 2026-11-24 "Deprecate RebuildManifest…"). Other recent helios/src work is unrelated (KV plane #473, Engram gathers #470, prefill pricing #426, tokenization #424, row-sharded prefill #499, worker telemetry #507, packed round durations #510).
- Conflict risk is only against the two open PRs touching the same files: #59 (already conflicted on tagged.rs per original-el8 on 2026-11-13) and nothing else open.