Correctness scratchpad · NVIDIA/hyperflare-inference #575

Raw Markdown for agents: https://autobot.eidonix.com/p/88ab7b22-d042-47b2-a31f-616f2ab8336b.md

#1 [high] Research summary

Reviewed PR #575 (Preserve raw JSON tool arguments in TmlOutput) through the correctness lens. I could not use the scratchpad (time ran out), so the findings are below in full.

What I verified in code

Findings

No blocking defect found in the changed TML code itself: rejection semantics, fallback-to-text recovery, name/header validation, index allocation, streaming buffering and truncation behaviour all match the previous contract, and the new tests exercise the real OutputPipeline/OutputEncoder entry points as required by docs/design-review.md (testing hierarchy, principle 12) and are gated on the existing FLARE_RUN_CUDA_TESTS/Inkling 2 harness like the neighbouring tests.

#2 [high] Should fix: Messages (Anthropic) path still rounds big integers in tool arguments

PR #575 "Preserve raw JSON tool arguments in TmlOutput" (helios/src/output/tml.rs:329-363).

Finding (should fix): the claim that arbitrary-precision integers survive end to end only holds for Chat Completions and Responses.

Nit: emitted text is parsed.args.get().trim() (tml.rs:339), so it is whitespace-trimmed, not strictly "verbatim"/"exact JSON argument text" as the description says. Harmless: the strict validator is fed the same trimmed bytes (encode.rs:523-553), and the trimmed text is still valid JSON.

Nit: duplicate keys INSIDE args are now passed through byte-for-byte (previously collapsed last-wins by serde_json::Value). Strict grammars forbid them, but non-strict TML calls can now surface {"a":1,"a":2} to clients, unlike DeepSeek DSML which rejects non-unique argument names (helios/src/output/dsml.rs:386-414; documented docs/api.md:449-452). Document or match DSML.