Recommendation: Ready To Merge
The production fix in helios/src/output/tml.rs is minimal, idiomatic, and bug-free: replacing serde_json::Value round-tripping with a borrowed &serde_json::value::RawValue preserves >64-bit integers and exact argument JSON verbatim for strict TMLv0 calls without adding dependencies or changing core formats, bringing TMLv0 to parity with Qwen, GLM, and DSML. Only minor non-blocking nits remain around docs/TODO.txt bookkeeping, fixture reuse in the live Inkling 2 test, and test-command disclosure in the PR description.
Blockers
None.
Should Fix
None.
Subtract / Simplify
None.
Nits
docs/TODO.txt:5-8tracking status: The PR referencesdocs/TODO.txtand reports live Inkling 2 Small NVFP4 (4× GB10 ARM64 TP4) strict tool-calling qualification, which matches the closing condition ofdocs/TODO.txt:5-8(note thattests/server/test_inkling2.py:121-209does not include a streamed/v1/responsescheck). PerAGENTS.md:514-517, either remove lines 5–8 if the recorded live run covered all listed axes (including Responses streaming), or note what remains open.tests/server/test_inkling2.py:121-209fixture reuse & HTTP error diagnostics:- Line 123 re-fetches
/v1/models(without awithcontext manager) even though theservicefixture already fetched it (:31-38). - Lines
:168,:188, and:206callurllib.request.urlopendirectly without theexcept urllib.error.HTTPError→pytest.fail(f"HTTP {error.code}: {error.read().decode()}")wrapper at:60-61, so a live HTTP 400/500 drops the server's error body. - Line
:183hardcodesreasoning=dict(effort="none")on the 256-token buffered/v1/responsesrequest inside theparams=[None, "none"]parameterized test, repeating the zero-effort call twice without testingdefault-efforton Responses (hardcoding"none"on themax_tokens=10/max_output_tokens=10truncation cases at:162and:201is reasonable so the 10-token budget truncates inside the tool call rather than reasoning).
- Line 123 re-fetches
- PR evidence command for ignored Inkling 2 tests: All five
server::request::tml_tests::tests (helios/src/server/request/tml_tests.rs:103,161,247,264,313) carry#[ignore = "requires FLARE_INKLING2_TEST_SNAPSHOT with the Inkling 2 tokenizer"], so the listedcargo testinvocation skips them unless-- --ignoredandFLARE_INKLING2_TEST_SNAPSHOTare provided (AGENTS.md:106-112). - Minor cleanups in
helios/src/output/tml.rs:.trim()athelios/src/output/tml.rs:339is a no-op becauseserde_json::value::RawValue::get()already excludes leading and trailing JSON whitespace.- Adding the duplicate-key payload (
:619-628) to the existing rejected-body loop at:553-561would also exerciseOutputStart::ToolBody.
Verified passes
- Root cause and fix (
helios/src/output/tml.rs:329-363,helios/Cargo.toml:52):serde_jsonenables["preserve_order", "float_roundtrip", "raw_value"]withoutarbitrary_precision. Deserializing{"name", "args"}into#[serde(deny_unknown_fields)] struct RawCall<'a> { name: String, #[serde(borrow)] args: &'a RawValue }validates full JSON syntax onbody(including nestedargs), supports JSON-escapednamestrings, rejects unknown/missing/duplicate wrapper keys back to visible text (tml.rs:318-327), gates object-ness viaargs.starts_with('{'), validates tool registration and optional header name, and emitsargs.to_owned()without allocating or re-serializing aValuetree. - Downstream protocol handling (
helios/src/server/protocol/encode.rs:313,517-553,helios/src/server/output.rs:84-122,140):OutputEncoderbuffers strict calls untilEvent::ToolEndand validates the rawargumentsstring againstTextGrammar::validate; the Chat accumulator (output.rs:113-121,140) validates JSON object syntax without overwritingcall.arguments; Responses (encode.rs:313) emitsarguments.as_str()verbatim. Truncation semantics attml.rs:377-384remain intact. - Unit test coverage (
helios/src/output/tml.rs:608-629,helios/src/grammar/strict.rs:3819-3922): Directly covers arbitrary-precision positive/negative 30-digit integers, key-order preservation, duplicate wrapper-key rejection, and end-to-endGrammarCompiler→ token advance with TML control tokens →OutputPipeline→TextGrammar::validateacross top-level,anyOf,$ref, and nested array/object properties. - PR description accuracy at head
c7fae93b: Accurately discloses both non-strict verbatim forwarding and duplicate wrapper-key fallback inWhat ChangedandCaveats, with no unapproved scope expansion or core-format/Protobuf changes.
Dropped on verification
- Missing DCO
Signed-off-by:trailer (Value Proposition Blocker #1): Cited an earlier commit07955d702c; head is nowc7fae93band full commit trailers are not exposed by the available repo tools, so cannot be asserted as missing on head. - PR description misstates duplicate-key rejection as prior TMLv0 semantics (Value Proposition #3 / Prose#1 / Simplicity#1b): Already corrected in head
c7fae93b's PR description, which explicitly discloses the tightening in bothWhat ChangedandCaveats. .trim()invalidates "verbatim" claim (Architecture#3 / Simplicity#1a / Correctness#4):serde_json::value::RawValue::get()excludes surrounding whitespace by contract, so.trim()athelios/src/output/tml.rs:339is a harmless no-op (kept only as a minor nit).- Delete or fold
tml_strict_parser_preserves_30_digit_integers(helios/src/grammar/strict.rs:3819-3922) (Candidate X1): Useful end-to-end regression test exercising TML control tokens throughGrammarCompiler,OutputPipeline, andTextGrammar::validate; theCasetable atstrict.rs:4219-4332never invokesOutputPipeline/TmlOutput, andaccepts_bytescannot encode TML control tokens. - Duplicate keys inside
argsdiverge from DSML /docs/api.md:449-452(Candidate N2):docs/api.md:449-452scopes the unique-key rule specifically to DeepSeek DSML (helios/src/output/dsml.rs:386-414); priorTmlOutputcollapsed duplicate keys viaValuerather than rejecting them, strict TML grammars already forbid duplicate properties, and the PR description discloses verbatim non-strict forwarding. docs/api.md:588-605omits raw-argument preservation and Messagestool_use.inputrounding (Candidate N3a):docs/api.md:588-605does not document raw-token preservation for Qwen/GLM/DSML either (TMLv0 now matches existing parsers), anddocs/api.md:634-635already statesstrict: trueon Messages tools returns HTTP 400 (makingencode.rs:334pre-existing and unreachable on strict paths).server::protocol::tests::strictmodule does not exist (Candidate N3b): False —helios/src/server/protocol/mod.rs:70(not opened) declaresmod tests;, andserver::protocol::tests::strictis a validcargo testsubstring filter matchinghelios/src/server/protocol/tests.rs:1751and:2026.- DCO / CI status & live hardware numbers: No CI run is reported on head
c7fae93band live 4× GB10 TP4 results cannot be re-executed from the repository; not flagged as PR defects.