#1 [high] PR #573 core diff facts (head 701ddd4, merged)
PR #573 "helios: tolerate omitted closing tags on complete tagged tool calls at EOS", by lukealonso, merged 2026-11-28 21:17, head 701ddd4, 13 files +1937/-104. Only discussion: flare-autobot case-file bot comment (no human review).
Key code (verified by reading files):
- helios/src/output/tagged.rs:31-51 ToolDialect trait:
fn parserequired (:38), defaultparse_candidate(:40-42) =Self::parse(..).map(Some), new REQUIREDfn parse_eos(:43-45) with doc "Accepts only structurally complete, self-delimited, non-strict calls." - tagged.rs:213-223 TaggedTools fields: new
confirmed(:219),outer_closed(:220). - tagged.rs:224-244
EosDecisionenum +select_candidate-> (end, consumed, outer_closed). - tagged.rs:246-286 helpers
eos_decision(Omit for Cancelled/ExecutionError/UserStop/OutputLimit; Reject if !confirmed||in_json_string; else ParseEos),emit_calls(&self, index = self.index+offset),incomplete_error. - tagged.rs:314-333 push: select_candidate, sets self.outer_closed = outer_closed (:329) after parse_candidate succeeds.
- tagged.rs:339-353 finish: decision first, then take buffer, reset search_from/in_json_string/escaped, Omit->[], Reject->Err, ParseEos->D::parse_eos (:349) + emit_calls.
- tagged.rs:553-560 TaggedOutput::finish Mode::Tool:
self.calls += events.iter().filter(ToolBegin).count()(new). - tagged.rs:610-614 push-path identical counting (pre-existing).
- tagged.rs:624-627 outer_tool_pending = D::FUNCTION.is_some() && !outer_closed.
- tagged.rs:746-756
confirmed = decision == Some(true); :791 passes confirmed into TaggedTools. - tagged.rs:853-870 partial_marker rewritten to reverse scan w/ is_char_boundary.
- Dialects: argument_tags.rs:25-95 parse_body(..,eos) with eos guards (:36 name charset, :45 strict, :48 empty body); :103-111 parse/parse_candidate/parse_eos. chatml.rs:24-32 (parse strict false, parse_candidate lenient true, parse_eos lenient true) + parse_tool/parse_tool_candidate flag
allow_unclosed_function(:85-100), lenient break at :127-129. gemma_call.rs:108-136 parse_body(..,eos) strict check at :127 with error "incomplete strict Gemma call tool call"; :144-149. minimax_xml.rs:144-188 parse_body(..,allow_unclosed_invoke), :197-205 parse/parse_candidate/parse_eos. - pipeline.rs:46-51 PlainText::parse and parse_eos both
Err("tool parsing is not configured"). - docs/api.md:447-451 general rule; docs/api.md:514-525 per-dialect restatement (duplicate); :524-525 says "cut off by output limits or stop sequences" (omits Cancelled/ExecutionError).
- New tests: protocol/tests.rs:2350-2664 (5 dialects x 3 protocols x 6 steps, 348 lines); logprobs.rs (+101); per-dialect unit tests with every-UTF-8-split loops; four copies of non-EOS cause loop (argument_tags.rs ~:599, chatml.rs ~:1070, gemma_call.rs ~:319, minimax_xml.rs ~:403).
- Also: helios/src/output/tagged/kani_proofs.rs (new, 176 lines, 4 harnesses); lib.rs:20-21 cfg(any(feature="server", all(kani, feature="runtime-core"))); .github/workflows/helios-lifecycle.yml adds --features runtime-core; verification/helios-lifecycle/README.md docs.
- Only TaggedOutput::calls readers: tagged.rs:761 (calls==0 newline trim), :794 (index), :555/:610 increments — all inside parse/finish; search over helios/src/output shows no other reader. Note finish() is entered via push(Input::Text("")) at :550 BEFORE the increment, so the increment is not read by that same finish.
#2 [high] Surviving candidates + dropped noise for PR #573 brief
Verified quotes (current head 701ddd4):
- BLOCKER-EVIDENCE: PR body asserts 4 dialects omit closers; no captured generation/checkpoint for any. #514 (GLM-only, proposed const LENIENT_EOS_CLOSE) was stopped by auto-review as "low value or does not align with the project charter", closed by lukealonso "Superseded by #573".
- SHOULD-FIX dup parse_eos: chatml.rs:27-32 (
parse_candidate= parse_tool_candidate(..,true).map(vec),parse_eos= vec![parse_tool(..,true)?]) — identical composition (parse_tool at chatml.rs:85-93 is candidate+ok_or_else); minimax_xml.rs:200-205 (parse_body(..,true).map(Some)vsparse_body(..,true), so trait's documented None at tagged.rs:39 unreachable); pipeline.rs:46-51 (bothErr("tool parsing is not configured")). - SHOULD-FIX parse_eos no default: tagged.rs:38-51; PlainText pipeline.rs:46-51. Subtractive#5 + Architecture nit agree; Simplicity D1 opposes only a default that DELEGATES to
parse(lenient). Recommendation: default = Err(incomplete/not configured). - SHOULD-FIX strict lookup x4: argument_tags.rs:40-47, chatml.rs:109-113, gemma_call.rs:123-130, minimax_xml.rs:162-171; precedents dsml.rs:288-291, recipient.rs direct indexing.
strictis now the anti-fabrication gate. - SHOULD-FIX docs one rule twice: docs/api.md:444-451 vs 514-525 (divergent exclusion lists; :524-525 omits Cancelled/ExecutionError though tagged.rs:248-254 omits all four non-EOS causes); "tagged tool parsers" over-general (DSML/XTML/TML/recipient don't implement parse_eos; check docs/api.md:511-512); "natural completion" undefined.
- SHOULD-FIX scope framing: lenient flag passed from parse_candidate for FunctionTags (chatml.rs:27-29) and MiniMax (minimax_xml.rs:200-202), so recovery also fires at outer
</tool_call>mid-stream, not only EOS; title/changelog say "at EOS". - SUBTRACT tests ~700: protocol/tests.rs:2350-2664 (5 dialects x 3 protocols x 6 steps; steps 5-6 at :2606-2660 duplicate tagged.rs:248-254 branch); four copies of non-EOS cause loop (argument_tags.rs:600-614, chatml.rs:1100-1106, gemma_call.rs:308-314, minimax_xml.rs:401-407) duplicating chatml.rs:886-899; every-UTF-8-split loops (argument_tags.rs:419/470, chatml.rs:976/1005, gemma_call.rs:250, minimax_xml.rs:331) duplicating chatml.rs:363-style split tests; logprobs.rs:362-462 GLM-only (+101).
- SUBTRACT triple entry points + 3 flag names:
eos(argument_tags.rs:25-29, gemma_call.rs:109),allow_unclosed_function(chatml.rs:85-100),allow_unclosed_invoke(minimax_xml.rs:144-148). CORRECTION to Subtractive#2:parseis NOT production-dead — GemmaCall and PlainText rely on the trait defaultparse_candidate=Self::parse(..).map(Some)(tagged.rs:40-42), so only ArgumentTags/FunctionTags/MiniMaxXmlparseimpls are test-only. - NITS: "incomplete strict Gemma call tool call" (gemma_call.rs:127-129) / "incomplete strict GLM tool call" (argument_tags.rs:45-47); dead resets tagged.rs:341-344 (search_from/escaped have no later reader; in_json_string replace is read at :355 decision taken earlier at :340); ToolBegin counting tagged.rs:555-558 vs 610-614 (recipient.rs:273-274 third copy); name-char predicate argument_tags.rs:36 vs :119; trait doc doesn't say recipient.rs:270-272 / tml.rs:374 / xtml.rs:243 own EOS recovery (recipient has no strict gate).
DROPPED: (a) GemmaCall::parse_eos
remove(0)panic — impossible, parse_body always returns exactly one element (gemma_call.rs:135); (b) Kani/CI workflow noise (.github/workflows/helios-lifecycle.yml, README) — PR's own change, CI green; (c) Prose lens "14 passed" dispute — withdrawn, counts verified; (d) Subtractive#3confirmedredundancy — self-caveated, guarded by test at tagged.rs:1090-1096 + Kani proof kani_proofs.rs:87-133, not safely removable; (e) Subtractive#4 unobservablecallsbump — listed as nit only (tests read it: tagged.rs:1076-1079). NOTE for adjudicator: PR IS ALREADY MERGED (2026-11-28 21:17, head 701ddd4, 13 files +1937/-104). Reviews targeted 09cc524 (9 files, +1423/-70); Kani proofs landed after that. Verified all findings still present at 701ddd4. No human review; only flare-autobot case-file comment. No prompt-injection content in PR text/comments.
#3 [high] PR #573 candidate brief (final, for adjudicator)
PR #573 — Candidate Brief (deduplicated from 6 lenses)
Status note: PR was MERGED 2026-11-28 21:17 at head 701ddd4 (13 files, +1937/−104). All reviews targeted earlier head 09cc524 (9 files, +1423/−70); the Kani-proof commit landed after. Every finding below was re-verified against 701ddd4. Only comment on the PR is a flare-autobot case-file notice; no human review. No prompt-injection content in PR text.
KEY FINDINGS
The mechanism is right and belongs where it is: one shared ToolDialect::parse_eos in helios/src/output/tagged.rs, no per-model boolean flag (the rejected shape of #514), leniency gated on the request's strict field rather than model identity, EosDecision split into Omit/Reject/ParseEos, and two genuine pre-existing defects fixed as a side effect (call counting during finish; outer_tool_pending after an already-consumed </tool_call>). No lens found a correctness defect. What survives is one evidence/scope blocker, five duplication/contract should-fixes, and ~700 lines of redundant tests.
CANDIDATE BLOCKERS
C1. Four dialects are relaxed on assertion, not on evidence; #514 set the opposite precedent
PR body asserts, with no captured generation, checkpoint, or reproduction, that "GLM omitting </tool_call> after </arg_value>, Qwen/MiMo omitting </function></tool_call> after </parameter>, Gemma 4 omitting <tool_call|> after }, or MiniMax XML omitting </invoke></tool_call> after a closed parameter element". The Evidence section only enumerates tests written for the behaviour — those prove the code does what the author decided, not that the models do it. AGENTS.md:103-112 requires each material claim be bound to behaviour tested/configuration/result/limits; charter "Bring real evidence" wants a reproducible bug. Weight: #514 was a GLM-only version of this change and auto-review stopped it as "low value or does not align with the project charter"; lukealonso closed it "Superseded by #573". So this PR reverses a prior scope decision while adding no model evidence.
Fix: one captured generation per dialect, or narrow to the dialect(s) with a demonstrated defect.
CANDIDATE SHOULD FIX
S1. parse_eos re-implements parse_candidate byte-for-byte in 3 of 5 dialects
helios/src/output/chatml.rs:24-32 — and parse_tool (:85-93) is just parse_tool_candidate(..)?.ok_or_else(|| "incomplete JSON parameter".into()), so the two compositions are identical:
fn parse(body: &str, tools: &[Value]) -> Result<Vec<(String, String)>> {
Ok(vec![parse_tool(body, tools, WRAPPING_NEWLINES, false)?])
}
fn parse_candidate(body: &str, tools: &[Value]) -> Result<Option<Vec<(String, String)>>> {
Ok(parse_tool_candidate(body, tools, WRAPPING_NEWLINES, true)?.map(|call| vec![call]))
}
fn parse_eos(body: &str, tools: &[Value]) -> Result<Vec<(String, String)>> {
Ok(vec![parse_tool(body, tools, WRAPPING_NEWLINES, true)?])
}
helios/src/output/minimax_xml.rs:200-205 — same expression twice, so the trait's documented None signal ("None means the apparent closing tag is text inside a JSON string", tagged.rs:39) is now unreachable for this dialect, which is what push relies on to set in_json_string:
fn parse_candidate(body: &str, tools: &[Value]) -> Result<Option<Vec<(String, String)>>> {
Self::parse_body(body, tools, true).map(Some)
}
fn parse_eos(body: &str, tools: &[Value]) -> Result<Vec<(String, String)>> {
Self::parse_body(body, tools, true)
}
helios/src/output/pipeline.rs:46-51 — the same error body twice:
fn parse(_: &str, _: &[serde_json::Value]) -> Result<Vec<(String, String)>> {
Err("tool parsing is not configured".into())
}
fn parse_eos(_: &str, _: &[serde_json::Value]) -> Result<Vec<(String, String)>> {
Err("tool parsing is not configured".into())
}
Fix: have each parse_eos delegate (Self::parse_candidate(..)?.ok_or_else(..) / Self::parse(..)) rather than restate the rule; add a test for MiniMax's streaming </tool_call>-without-</invoke> case so the changed non-EOS path is intent, not accident. Note argument_tags.rs:25-111 is the counter-example that gets it right (its eos flag carries checks with no streaming counterpart: name charset :36, strict :45, non-empty body :48).
S2. parse_eos is a required trait method with no default; PlainText proves the default body is writable
helios/src/output/tagged.rs:31-51:
pub trait ToolDialect {
const NAME: &'static str;
...
fn parse(body: &str, tools: &[Value]) -> Result<Vec<(String, String)>>;
/// `None` means the apparent closing tag is text inside a JSON string.
fn parse_candidate(body: &str, tools: &[Value]) -> Result<Option<Vec<(String, String)>>> {
Self::parse(body, tools).map(Some)
}
/// Parse an unclosed call body at natural end-of-sequence (`Termination::Eos`).
/// Accepts only structurally complete, self-delimited, non-strict calls.
fn parse_eos(body: &str, tools: &[Value]) -> Result<Vec<(String, String)>>;
pub trait ToolDialect lives in pub mod tagged, re-exported from the crate's server feature (helios/src/lib.rs:20-23), so every implementor must now write it; the conservative body is exactly what PlainText writes twice (quoted in S1). Making it required (rather than defaulting to parse, which would silently make a new dialect lenient) is defensible — but that rationale is unwritten, and the duplicated PlainText body is free to delete. Fix: default to Err(...) / delegate PlainText::parse_eos to Self::parse, and say in the doc comment why there is no lenient default.
S3. The "find function by name, then read strict" idiom now has four copies — and strict just became the anti-fabrication gate
helios/src/output/argument_tags.rs:40-50:
let function = tools
.iter()
.filter_map(|tool| tool.get("function"))
.find(|function| function.get("name").and_then(Value::as_str) == Some(name));
let strict = function.is_some_and(|f| f["strict"].as_bool() == Some(true));
if eos && strict {
return Err("incomplete strict GLM tool call".into());
}
if eos && rest.trim().is_empty() {
return Err("incomplete GLM tool call".into());
}
helios/src/output/chatml.rs:109-113:
let function = tools
.iter()
.filter_map(|tool| tool.get("function"))
.find(|function| function.get("name").and_then(Value::as_str) == Some(name));
let strict = function.is_some_and(|f| f["strict"].as_bool() == Some(true));
helios/src/output/gemma_call.rs:123-130 (new in this PR — refactored from find(..).and_then(get("parameters")) to keep the function just to test strict):
let function = tools
.iter()
.filter_map(|tool| tool.get("function"))
.find(|function| function.get("name").and_then(Value::as_str) == Some(name));
if eos && function.is_some_and(|f| f["strict"].as_bool() == Some(true)) {
return Err("incomplete strict Gemma call tool call".into());
}
let schema = function.and_then(|function| function.get("parameters"));
helios/src/output/minimax_xml.rs:162-171 (also new):
let function = tools
.iter()
.filter_map(|tool| tool.get("function"))
.find(|function| function.get("name").and_then(Value::as_str) == Some(name));
let strict = function.is_some_and(|f| f["strict"].as_bool() == Some(true));
let schema = function.and_then(|tool| tool.get("parameters"));
let (mut parameters, next, closed) = match tail.split_once(INVOKE_END) {
Some((parameters, next)) => (parameters, next, true),
None if allow_unclosed_invoke && !strict => (tail, "", false),
None => return Err("unterminated XML invocation".into()),
};
Two more variants already exist: dsml.rs:288-291 (precomputed strict names) and recipient.rs (direct indexing tool["function"]["name"]). Four hand-written truthiness checks on a field that now decides whether a call may be fabricated is a drift hazard. Fix: one pub(super) fn function(tools, name) -> Option<&Value> + is_strict(Option<&Value>) -> bool next to the existing super::tagged helpers (strict_nonstring_raw :915, container_parameter :932).
S4. docs/api.md states the new rule twice, with divergent exclusion lists and an over-general subject
First statement, docs/api.md:444-451:
its output limit. At natural completion, tagged tool parsers accept a non-strict
call whose inner arguments are structurally complete and self-delimited when
only its closing wrapper tag is omitted; undecided openers, bare headers
without a closing argument delimiter, unclosed arguments, trailing text, and
unclosed strict calls remain errors.
Second, docs/api.md:514-525:
When a non-strict tagged call omits its closing wrapper tag at natural
completion, each dialect accepts it only when its argument body is
self-delimited with no trailing non-whitespace: GLM requires at least one closed
`<arg_key>...</arg_key><arg_value>...</arg_value>` pair without `</tool_call>`,
function-tag parsers require at least one closed `<parameter=...>...</parameter>`
without `</function>` (also accepted when closed by `</tool_call>`), Gemma 4
requires a balanced `{...}` argument object without `<tool_call|>`, and MiniMax
XML requires at least one closed parameter element without `</invoke>` (also
accepted when closed by `</tool_call>`). Bare headers without a closing argument
delimiter, undecided openers, unclosed arguments, strict calls missing their
wire closer, and calls cut off by output limits or stop sequences are never
recovered.
Three defects in one item: (a) the two exclusion lists differ; (b) the second says "output limits or stop sequences" and silently omits Cancelled and ExecutionError, which also omit (tagged.rs:248-254), so the enumeration reads as exhaustive when it is not; (c) "tagged tool parsers" over-generalises — recipient, tml, xtml (their own envelope machines) and DSML do not implement parse_eos, while docs/api.md:511-512 only names DSML/XTML as exempt. Also "natural completion" is never defined in the doc although the code condition is exactly Termination::Eos. Fix: keep the per-dialect paragraph, reduce 444-451 to a pointer, name the four dialects, and add cancellation/execution error to the exclusion clause.
S5. The leniency also fires mid-stream at the outer closer, not only at EOS — the title and changelog say "at EOS"
FunctionTags::parse_candidate and MiniMaxXml::parse_candidate pass the lenient flag, and parse_candidate is what push calls at the outer closer (tagged.rs:326, reached from select_candidate at :319): chatml.rs:27-29, minimax_xml.rs:200-202 (both quoted in S1). So <tool_call><function=lookup><parameter=city>Paris</parameter></tool_call>Done. now succeeds during ordinary generation where it previously failed with "tool function requires parameter or closing tag", while argument_tags.rs:106-108 and gemma_call.rs:144-146 stay false on the push path and recover only at EOS. That asymmetry is a modelling choice, not a bug, and it is tested — but the PR title/framing and docs/api.md describe the recovery as uniform. Fix: state it in the title/changelog and mark the two dialects that also recover at </tool_call>.
CANDIDATE SUBTRACT / SIMPLIFY
X1. ~700 of the 1423 added test lines re-assert coverage that already exists
(a) helios/src/server/protocol/tests.rs:2350-2664 (348 lines) runs 5 dialect configs × 3 protocols × 6 steps; steps 5-6 (:2606-2660) assert that OutputLimit/UserStop omit an unclosed call — that is the single dialect-independent early return in EosDecision::Omit, already covered at chatml.rs:886-899 and elsewhere in this file (:321, :366, :407, :724, :1461, :1550). The genuinely new fact is one line per dialect. Keep glm × Chat buffered+streamed.
(b) The "non-EOS causes always omit" loop is copy-pasted four times for one shared branch — argument_tags.rs:600-614:
// Non-EOS termination causes always omit unclosed calls, even when arguments are closed.
for cause in [
Termination::OutputLimit,
Termination::UserStop,
Termination::Cancelled,
Termination::ExecutionError,
] {
let mut parser = ArgumentTagOutput::new(config());
parser
.push(Input::Text(
"</think><tool_call>run<arg_key>text</arg_key><arg_value>ok</arg_value>",
))
.unwrap();
assert!(parser.finish(cause).unwrap().is_empty(), "{cause:?}");
}
plus chatml.rs:1100-1106, gemma_call.rs:308-314, minimax_xml.rs:401-407. chatml.rs:886-899 already asserts Cancelled/ExecutionError/UserStop omission. Keep one; move it to tagged.rs where the branch lives.
(c) Every new per-dialect case list is wrapped in char_indices() and re-run at every UTF-8 split (argument_tags.rs:419, :470; chatml.rs:969, :998; gemma_call.rs:250; minimax_xml.rs:331), duplicating split-invariance tests that already exist (chatml.rs:363, argument_tags.rs:318). One recovery case per dialect per split suffices.
(d) helios/src/server/logprobs.rs:362-463 (+101) asserts content-logprob arrays, reasoning token counting, worker-vs-local byte equality and Responses streaming — machinery this PR never touches, already covered for a closed GLM call (logprobs.rs:166-360). Delete it or drop the duplicate GLM case from the protocol matrix.
Keep the strict-tool and partial-value assertions — those do prove new behaviour.
X2. Three entry points per dialect with three names for one flag; the triplication is what keeps parse alive
tagged.rs:26-29 (eos: bool), chatml.rs:89 (allow_unclosed_function: bool), minimax_xml.rs:147 (allow_unclosed_invoke: bool) all mean "accept the omitted wrapper at natural completion", but they are not equivalent: chatml and minimax also pass true from parse_candidate (S5) while argument_tags and gemma pass true only from parse_eos. Correction to the subtraction lens: parse is not production-dead — GemmaCall and PlainText have no parse_candidate impl and rely on the trait default Self::parse(body, tools).map(Some) (tagged.rs:40-42), so only the ArgumentTags/FunctionTags/MiniMaxXml parse impls (argument_tags.rs:103-105, chatml.rs:24-26, minimax_xml.rs:197-199) exist solely for their own unit tests. Fix: one flag name, make the parse_candidate/parse_eos relationship explicit, and either delete the three test-only parse bodies (moving tests onto the production entry points) or document why parse stays.
CANDIDATE NITS (mechanical, all verifiable, none blocking)
- Error strings are garbled by splicing into the generic
"incomplete {} tool call"format (tagged.rs:279-285):gemma_call.rs:127-128yields "incomplete strict Gemma call tool call" (doubled "call", doesn't say what is missing); same shape atargument_tags.rs:45-46. Prefer "strict Gemma call requires <tool_call|>". - Dead resets in
TaggedTools::finish—helios/src/output/tagged.rs:339-344:search_fromandescapedhave no reader after the buffer is taken andin_json_stringis consumed into the decision already computed at :340 (thein_json_stringreset must stay only iffinishis meant to leave the parser reusable, whichToolCallParsernever states).
fn finish(&mut self, cause: Termination) -> Result<Vec<Event>> {
let decision = self.eos_decision(cause);
let body = std::mem::take(&mut self.buffer);
self.search_from = 0;
self.in_json_string = false;
self.escaped = false;
ToolBegincounting exists three times: newtagged.rs:555-558, pre-existingtagged.rs:610-614, andrecipient.rs:273-274. Afn begun(events: &[Event]) -> usizenext toemit_calls(tagged.rs:262-278) replaces them.- The name-terminator predicate is spelled twice in
argument_tags.rs::36name.chars().any(|c| c == '<' || c == '>' || c.is_whitespace())vs:119text.find(|c: char| c == '<' || c == '>' || c.is_whitespace()). - Trait doc doesn't say who else owns EOS recovery:
recipient.rs:270-272(if matches!(self.state, State::Tool) && cause == Termination::Eos, with nostrictgate and no self-delimiter check),tml.rs:374,xtml.rs:243. One sentence in theparse_eosdoc (tagged.rs:43-45) plus the matching clause indocs/api.mdwould stop a reader treating the omission as a bug. - PR-description/prose mechanics, combined as one item: the description is complete and its "14 passed" count checks out (10
#[test]+ 4#[tokio::test]inhelios/tests/deepseek_output.rs), unrun checks are honestly disclosed, and the bot'sDiscord: no username providedline is present. Remaining mechanical tweak only: the "What changed" list names 6 source files + docs but notoutput/tagged/kani_proofs.rs, which the description claims as a headline deliverable.
DROPPED AS NOISE (for the adjudicator's audit trail)
GemmaCall::parse_eosremove(0)panic (correctness lens open question): impossible —parse_bodyreturns exactly one element orErr(gemma_call.rs:135), never an empty vec.- Kani/CI infrastructure:
.github/workflows/helios-lifecycle.yml(--features runtime-core) andverification/helios-lifecycle/README.md; the PR's own change, CI green, no compile break. - Prose lens's withdrawn "evidence not reproducible" finding — the test count was verified correct.
- Subtractive item on
confirmedbeing redundant withparse_eos' own validation: the lens self-caveats it, and the PR defends it with a direct test (tagged.rs:1090-1096) plus a Kani harness (kani_proofs.rs:87-133). Not safely removable. - Subtractive item that the
callsbump attagged.rs:555-558is unobservable: kept only as a nit, because the PR's own test reads it (tagged.rs:1076-1079); all readers (:761newline trim,:794index) are pre-finish, so worth one verify-or-delete question, not a fix request. - Low-value nitpicking of useful new unit tests (e.g.
pipeline.rs:1421-1438plain-text</think>block): dropped per pre-filter rules.
#5 [high] Final brief structure + merges to apply
Apply these merges when emitting entry 3 as the brief, so it lands at 12 candidates in the 5 required sections:
MERGE-1 (Should Fix): entries S1 and S2 become one item — "parse_eos duplicates its own dialect's parse_candidate (chatml/minimax/pipeline) and is a required trait method whose conservative default body is already written out twice". Same code, same fix surface (delegate + give the trait a non-lenient default + say why in the doc at tagged.rs:43-45). Keep both code quotes: chatml.rs:24-32, minimax_xml.rs:200-205, pipeline.rs:46-51, tagged.rs:31-51.
Final structure and count:
- Key findings: 1 paragraph (mechanism is right; no correctness defect found; the credit items:
EosDecisionsplit,outer_closedfixing a real double-close defect,callsbump in finish; charter/design-review compliance — no per-model flag, unlike #514). - Candidate Blockers: 1 (C1 evidence/scope, with the #514 precedent).
- Candidate Should Fix: 4 (S1+S2 merged; S3 strict lookup x4; S4 docs stated twice; S5 mid-stream leniency vs "at EOS" framing).
- Candidate Subtract / Simplify: 2 (X1 ~700 redundant test lines with 4 sub-items; X2 three entry points / three flag names, incl. the correction that
parseis NOT production-dead). - Candidate Nits: 5 (N1 garbled error strings; N2 dead resets tagged.rs:339-344; N3 duplicated ToolBegin counting AND duplicated name-terminator predicate, merged since both are "extract the one expression"; N4 trait doc doesn't say recipient/tml/xtml own their EOS recovery; N5 the single combined prose/PR-description mechanics item). Total = 1 + 4 + 2 + 5 = 12.
Line-number corrections from entry 4 must be applied to X1(a)/X1(c).
Do not reintroduce anything from entry 3's "DROPPED AS NOISE" section.
#6 [high] Research summary
Brief prepared and saved to scratchpad (entries 2–5): the deduplicated candidate list with exact code quotes, plus an erratum fixing two line-number citations, plus the final merge structure.
Important context the adjudicator needs: PR #573 is already merged (2026-11-28 21:17, head 701ddd4, 13 files, +1937/−104). All six lenses reviewed an earlier head (09cc524, 9 files); the Kani-proof commit landed afterwards. I re-verified every surviving finding against 701ddd4. The only PR comment is a flare-autobot case-file notice — no human review, and no prompt-injection content in the PR text.
Result: 12 candidates in 5 sections.
- Key findings (1 para, no candidate): the mechanism is architecturally right — one shared
ToolDialect::parse_eosintagged.rs, no per-model boolean flag (the rejected shape of #514), leniency gated on the request'sstrictfield. No lens found a correctness defect; two genuine pre-existing defects are fixed as a side effect. - Candidate Blockers (1): C1 — four dialects relaxed on assertion, not evidence; the PR cites no captured generation, and #514 (a GLM-only version) was stopped as "low value or does not align with the project charter" and superseded by this PR.
- Candidate Should Fix (4): S1+S2 merged —
parse_eosduplicates its own dialect'sparse_candidatebyte-for-byte in chatml/minimax/pipeline and is a required trait method whose conservative default body is already written out twice; S3 — the "find function, readstrict" lookup now has four copies precisely asstrictbecame the anti-fabrication gate; S4 —docs/api.mdstates the rule twice with divergent exclusion lists that omitCancelled/ExecutionError, and "tagged tool parsers" over-generalises; S5 — leniency also fires mid-stream at</tool_call>for two dialects while the title says "at EOS". - Candidate Subtract / Simplify (2): X1 — ~700 added test lines re-assert existing coverage (the 348-line 5×3 protocol matrix, four copies of the non-EOS cause loop, every-UTF-8-split loops, the +101 logprobs test); X2 — three entry points with three names for one flag, including a correction to the subtraction lens:
parseis not production-dead, sinceGemmaCall/PlainTextrely on the trait defaultSelf::parse(..).map(Some). - Candidate Nits (5): garbled spliced error strings; dead resets at
tagged.rs:339-344; duplicatedToolBegincounting merged with the duplicated name-terminator predicate; trait doc silent on recipient/tml/xtml owning their own EOS recovery; one combined prose/description-mechanics item.
Pre-filtered out (recorded for audit): the GemmaCall::parse_eos remove(0) panic claim (impossible — parse_body returns exactly one element or Err); all Kani/CI-workflow infrastructure noise; the prose lens's own withdrawn "evidence not reproducible" finding (test counts verified correct); the confirmed-is-redundant subtraction item (self-caveated, and defended by both a test and a Kani harness); and low-value nitpicking of the useful new unit tests.
#7 [high] Provenance, verified policy quotes, and report framing
Provenance of the 12 surviving candidates, and verified policy quotes
Lens → candidate mapping (for showing the dedup honestly)
Six upstream lenses: Architecture, Conventions, Simplicity, Correctness, Prose, Subtractive.
- C1 (Blocker, evidence/scope) — Architecture finding 1 (its only should-fix). Strengthened with facts I verified myself: #514 was GLM-only, its auto-review says "It is low value or does not align with the project charter", and lukealonso closed it "Superseded by #573". Correctness listed the same gap only as an unrun check, Prose confirmed the disclosure is honest — so the merge keeps Architecture's framing and drops the duplicate "unverified end-to-end" wording.
- S1+S2 (parse_eos duplication + no default) — Conventions S2 + S3, Simplicity D1, Subtractive #5, Architecture nit 2. Five lenses, one item. Simplicity D1 contested a lenient default; the merged wording keeps that caveat ("default must be the conservative error, not delegation to
parse"). - S3 (strict lookup ×4) — Conventions S1 only. Kept because the PR makes
strictload-bearing. - S4 (docs rule stated twice) — Conventions S4, Simplicity D5, Subtractive #6, Architecture nit 3, Prose nits 1–3, Correctness nit 2. Seven sightings reduced to one item; the
Cancelled/ExecutionErroromission comes from Prose nit 3 plus my check oftagged.rs:248-254. - S5 (mid-stream vs "at EOS") — Correctness nits 1–2 + Conventions S2 consequence 1. Merged.
- X1 (test bulk) — Subtractive #1 + Simplicity D2. Correctness explicitly found no fault with the tests, which is why the framing is "redundant", never "wrong".
- X2 (three entry points) — Conventions S2 + Subtractive #2, with my correction that
parseis still used by the trait default. - Nits — N1 error strings: Simplicity D4. N2 dead resets: Simplicity D3. N3 counting + predicate: Conventions N1, Subtractive #5, Simplicity D6. N4 recipient/tml/xtml: Conventions N2. N5 prose mechanics: Prose + Architecture (the kani_proofs.rs naming gap is mine).
Dropped at pre-filter: Correctness open question on remove(0); Simplicity D7 and Prose's withdrawn finding; Subtractive #3 (confirmed) and #4 (calls bump, kept as a nit); all CI/Kani workflow churn (Architecture's "CI passed on 09cc524" and Correctness's identical note).
Policy lines quoted in the brief are verified verbatim
- Charter: "Keep the runtime small and model-agnostic. … shouldn't accumulate per-model branches (#267, #334)"; "Bring real evidence. … Bug fixes need to address the root cause"; What gets merged: "PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs"; "Respect contributors" (lukealonso is a named priority contributor).
docs/design-review.md:48"and request handling stay shared; use prepared metadata and frontend assets";:57"frontend metadata; there is no per-model native trait.";:58"Reject per-model boolean policy flags, includingsupports_*,can_*, and".AGENTS.md:103-112(evidence must bind claim → behaviour tested, configuration, result, limits; "Never invent evidence");AGENTS.md:72-79(four questions in order).
Report framing notes
- Lead with: no correctness defect; the mechanism is the right one and supersedes the rejected
LENIENT_EOS_CLOSEflag of #514; the PR is already merged, so these are post-merge follow-ups, not merge gates. - Keep the two credit findings visible:
outer_closed(tagged.rs:220,:329,:624-627) fixes a real double-close defect, andselect_candidate/EosDecisionare covered by Kani (kani_proofs.rs:87-176). - All quoted code is at head
701ddd4; do not re-quote the−70deletion side, which the lenses never disputed.
#4 [medium] Erratum to entry 3 citations
Two citation corrections to entry 3, both verified by reading the files:
-
X1(c): the pre-existing split-invariance test for function tags is
helios/src/output/chatml.rs:364(fn every_utf8_split_preserves_reasoning_tools_and_parameter_types), not :363. The GLM equivalent is not a named function —argument_tags.rs:318is thefor split in text.char_indices()loop inside an existingargument_tagstest, which is what the new tests at :419 and :470 duplicate. Other split-invariance precedents that confirm the pattern is already established:dsml.rs:426,dsml.rs:631,dsml.rs:636,recipient.rs:442,xtml.rs:477. -
X1(a): the existing encoder-level coverage of the non-EOS/limit finish reasons in
helios/src/server/protocol/tests.rsis:1461(failures_have_no_success_terminal_and_stops_remain_exact) and:1550(output_limit_marks_only_the_open_response_item_incomplete), plus:321(required_tool_choice_fails_without_a_completed_call_for_every_termination). Do not cite:1550as covering unclosed-call omission specifically — it coversOutputLimitfinish-reason mapping for an open Responses item; the unclosed-call omission assertions inside the PR's own new test are at:2606-2660.
Everything else in entry 3 stands as written.