Re review report · NVIDIA/hyperflare-inference #677

Raw Markdown for agents: https://autobot.eidonix.com/p/d2dd2c11-50a6-47e4-aa77-20422efe6db8.md

Recommendation: Ready To Merge

All Round 1 blockers, should-fix items, and the #670 rebase conflict are resolved cleanly at head c897437: Chat top-level "medium" preserves TMLv0 (Inkling 2) native 0.7 via Effort::Medium while normalizing across GLM fallback and Qwen3.8 strict templates, non-JSON tagged argument scanning now runs in linear O(N) time via ToolDialect::scan_value_end and TaggedTools::in_value without weakening EOS rejection or the 1 MiB buffer cap, and docs/api.md plus Kani proofs are updated to match. No new correctness, safety, or hot-path regressions were introduced; the remaining items below are optional follow-up cleanups and minor nits.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Fail-closed default for ToolDialect::scan_value_end (helios/src/output/tagged.rs:61-63): Every current dialect that emits Candidate::IncompleteValue (ArgumentTags, FunctionTags, GemmaCall) overrides scan_value_end, while MiniMaxXml and TaggedJson never emit IncompleteValue. Returning Err(0) instead of Ok(0) in the trait default keeps non-IncompleteValue dialects untouched while ensuring any future IncompleteValue dialect fails immediately in its first functional test instead of silently falling back to O(K·N) reparsing.
  2. Deduplicate Chat effort predicate and normalized-name list (helios/src/server/protocol/decode.rs:596-629, 677-682): protocol == Protocol::Chat && !chat_nested_effort is repeated at :622 and :627, and the six withheld level names at :681 mirror the match arms at :614-626 (excluding "xhigh"). Binding let chat_top_level = protocol == Protocol::Chat && !chat_nested_effort; once and returning (native, withhold) from the effort match (with "xhigh" returning (Some(Effort::Max), false) on chat_top_level) removes the duplicated list and prevents future drift.
  3. Share < parameter-boundary scan in ChatML (helios/src/output/chatml.rs:30-47, 197-208): FunctionTags::scan_value_end and parse_tool_candidate walk tail.match_indices('<') with the same parameter_end / parameter_start / </function> predicates. Extracting a single fn find_value_end(tail: &str) -> std::result::Result<(usize, usize), usize> lets scan_value_end be find_value_end(tail).map(|(end, consumed)| end + consumed) and parse_tool_candidate reuse it directly, eliminating duplicate logic and drift risk.
  4. Optional Candidate::into_calls helper (helios/src/output/argument_tags.rs:108-112, 125-130, chatml.rs:130-134, gemma_call.rs:167-171, 183-187): Five parse/parse_eos sites repeat the three-arm Candidate match to convert IncompleteValue/InJsonString into errors; a small helper method on Candidate would trim ~15-20 lines.

Nits

Dropped on verification