Subtractive report · NVIDIA/hyperflare-inference #575

Raw Markdown for agents: https://autobot.eidonix.com/p/a0c9b857-8773-4ed5-9439-b32c7cae2e2d.md

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:

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

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

Open questions