Key findings
The production change is minimal and needed; there is nothing to cut in it. TmlOutput::call (helios/src/output/tml.rs:329-363) swaps a serde_json::Value round-trip for a 7-line borrowed &RawValue wrapper — the same shape already used at helios/src/frontend/mod.rs:250-259 and Box<RawValue> at helios/src/output/tagged.rs:806,850,859 — with no new dependency (raw_value is already on at helios/Cargo.toml:52), no new option, flag or fallback, and no dead path left behind. The defect is real: docs/TODO.txt:5-8 tracks exactly this qualification, and the old args.to_string() path is what rounded >u64 integers into floats rejected by the strict grammar.
The weight is in the tests and the bookkeeping: ≈133 of the PR's 237 added lines can go without losing any behaviour the fix exists to guarantee. Biggest one alone is a 105-line grammar test that re-derives an adjacent test's schema and assertions.
Verdict: make it smaller first (not blocking — the shipped code is right; the tests and the TODO bookkeeping should shrink in the same change).
1. Should fix — helios/src/grammar/strict.rs:3819-3922, new tml_strict_parser_preserves_30_digit_integers: ~105 lines, delete
The new test builds the same big/big_schema (30-digit integer; top, via_any, via_ref, nested array) as the test directly above it, qwen_and_glm_strict_parsers_preserve_30_digit_integers (strict.rs:3723-3817) — the schema literal at 3828-3848 is a verbatim copy of 3727-3746 — then compiles the strict TML grammar, pushes the payload, runs the same OutputPipeline, the same validate_strict_tool_schema, and the same raw_args.matches(big).count() == 5 assertion as 3796-3815.
Each behaviour it probes is already covered elsewhere in the same tree:
- TML strict grammar compiles, accepts its payload, and the pipeline's arguments pass the strict validator:
tml_json_strict_grammar_rebases_root_ref_and_parses_end_to_end(strict.rs:2802-2930) — samebyte_tokenizer_with(&CONTROL_MARKERS), sameToolParserKind::TmlJson, samecompile_presented_strict_tools+OutputPipeline+validate_strict_tool_schema(...).validate(text)(2809, 2843-2854, 2883-2912), including$ref/anyOf/nested through root rebasing. - Raw argument text survives
TmlOutput::callunchanged, big integers included: the PR's own unit test at helios/src/output/tml.rs:607-617 asserts exact string equality on the same 30-digit value (plus a negative and a nested one). - Two-parser 30-digit pipeline preservation over the identical schema: strict.rs:3723-3817.
So the new test is a third pass over the same contract; its only unique ingredient is feeding the big integer through the TML parser, which is decided in TmlOutput::call and already pinned verbatim by the tml.rs unit test. Nothing is lost by deleting it.
Smaller replacement, if a reviewer wants the big integer inside the TML pipeline test: one assertion on the existing test's payload at strict.rs:2880-2912, e.g.
let payload = r#"{"name":"tree","args":{"label":"root","child":{"label":"123456789012345678901234567890","child":null}}}"#;
with serde_json::from_str::<Value>(text) left as-is plus assert!(text.contains("123456789012345678901234567890")) — ~3 lines instead of 105.
Saves ~105 lines.
2. Should fix — docs/TODO.txt:5-8, the completed entry is left in place: 4 lines, delete
The entry still reads:
[ ] Qualify `strict: true` function tools on a TMLv0 core (ToolParserKind::TmlJson,
e.g. Inkling 2) served by `flare run`. Check Chat Completions and Responses,
buffered and streamed, including max_tokens and max_output_tokens truncation.
Close when a served TMLv0 core passes those checks and the result is recorded.
The PR description says "This addresses the strict TMLv0 tool-calling qualification tracked in docs/TODO.txt" and reports 35/35 live checks across exactly those axes. AGENTS.md:512-517 — "Update or remove entries as work is completed" — and AGENTS.md:57-58 ("Record unresolved defects, unrun checks, and pending measurements in docs/TODO.txt") make the entry's own completion criterion ("Close when a served TMLv0 core passes those checks and the result is recorded") satisfied by this PR's evidence. Leaving it means the list still asks for work the PR claims is done. Delete lines 5-8; if maintainers judge the qualification incomplete, the description should say so instead of the TODO silently disagreeing with it. Nothing else in the tree references this entry (only occurrence: docs/TODO.txt:5).
Saves 4 lines.
3. Nit — helios/src/output/tml.rs:619-628, duplicate-key block: 10 lines, delete
let duplicate = r#"{"name":"lookup","name":"lookup","args":{}}"#;
assert_eq!(run(..., &[MODEL, "lookup", JSON_CALL, duplicate, END], Termination::Eos).1, duplicate);
This only re-asserts the existing "rejected invocation surfaces as visible text" contract, which rejected_invocations_surface_as_text_and_open_calls_complete_only_at_eos (tml.rs:551-573) already pins for four malformed wrappers ({"name":"lookup","args":{},"extra":1}, {"name":7,"args":{}}, wrong name, incomplete) on both OutputStart::RecipientFrame and OutputStart::ToolBody. A duplicate wrapper key is not producible by the strict wrapper grammar (additionalProperties: false, one name, one args), and if a non-strict body did emit one, it lands on the very fallback path those four cases already cover. Keeping lines 607-617 (the exact-string precision assertion, which is the actual regression guard) and dropping 619-628 loses nothing.
Related, 0 lines: .trim() at tml.rs:339 is a no-op — RawValue::get() excludes surrounding whitespace — so it can go as cleanup, but it saves no lines and reads fine; not counted.
Saves ~10 lines.
4. Nit — tests/server/test_inkling2.py:122-123 and 143-152: ~12 lines
- 143-152 (10 lines) asserts that streamed chat strict arguments arrive as one delta containing
big. That contract is already proven at the encoder level by helios/src/server/protocol/tests.rs (argument fragments private untilToolEnd) and by strict.rs:3811-3815 asserting the 30-digit text on the pipeline path; the streaming plumbing of theservicefixture (test_inkling2.py:40-58) is already exercised bytest_streamed_reasoning_and_answer(line 80). The buffered chat case at 135-141 already checks the raw text and property order. - 122-123 (2 lines) re-fetches
/v1/modelsand re-derivesmodel_idalthough the module fixture already did exactly that at 30-38 and exposesmodel["id"](used at 41) plusask.chunk(line 67). Exposing the id the same way (ask.model = model["id"], one line in the fixture) removes the extra HTTP round-trip and theurl = os.environ[...]duplicate at 122.
If streamed strict coverage is wanted, the Responses streaming path is the one with no coverage; keeping chat-streamed too just proves the same thing twice.
Saves ~12 lines.
Checked and deliberately not raised
- The
RawCallstruct andstarts_with('{')check (tml.rs:330-340): needed.deny_unknown_fieldsreplaces the oldobject.len() != 2, and the'{'check replaces the oldfilter(|v| v.is_object())— the function is net +6/−10 lines and reuses existing patterns rather than introducing a helper. - No shared helper was missed:
TmlOutputis the only parser of the TMLv0{"name","args"}wrapper; the other parsers (tagged.rs:806-886) parse fragments, not this envelope. - The Python truncation blocks (test_inkling2.py:154-171, 194-209): kept. The TODO entry explicitly names
max_tokens/max_output_tokenstruncation on a served core, and the encoder-level truncation test (helios/src/server/protocol/tests.rs) is a unit test, not a served-core check. - The whole Python test is not redundant with tests/server/test_protocols.py: strict tools there are asserted to be rejected (400) on a non-TML service; this is the only live strict-TML coverage.
- No dead code, flag or doc left behind by the production change: no caller parses the old wrapper, no config or doc describes the old rounding behaviour (the only
does not match its grammarprose in docs is unrelated XTML text at docs/TODO.txt:317-320), andarbitrary_precisionappears nowhere in the tree, confirming the fix (not a serde feature flag) is the right lever.
Open questions
- Whether maintainers consider the live 35/35 qualification sufficient to close the TODO; the PR's own criterion says yes, and the entry is still there.
- Whether the chat-streamed strict case is wanted for a reason not visible in code (e.g. a different transport path); nothing in the code shows one distinct from the buffered case.