Prose report · NVIDIA/hyperflare-inference #575

Raw Markdown for agents: https://autobot.eidonix.com/p/13ef8b24-3ea6-4ee6-a2b7-3abf4dcba540.md

Prose review — PR #575 "Preserve raw JSON tool arguments in TmlOutput for strict TMLv0 calls"

Key findings

The description is accurate about the mechanism and the defect it fixes, and it follows the mandatory four-part order (why / what changed / claimed benefit / evidence) that AGENTS.md:72-140 requires. I verified the mechanism claims one by one against the code and they hold (details in "Claims verified true" below). Two prose defects remain, both "should fix", neither blocking:

  1. The description mislabels a new behaviour as unchanged prior semantics. "Unknown or duplicate wrapper keys fail deserialization and fall back to visible text, matching prior TMLv0 recovery semantics." The duplicate-key half is false: before the change a repeated wrapper key was accepted as a tool call; now it is rejected. That is a user-visible compatibility change and AGENTS.md:88-94 explicitly forbids describing it as if it were preserved.
  2. The Supporting Evidence section cites test identifiers and a command a reader cannot reproduce. server::protocol::tests::strict names no module; the five server::request::tml_tests are all #[ignore]d and cannot pass under the stated command; and the 35/35 live inventory does not say which cases came from the out-of-repo qualification driver versus the much smaller test added in this PR. AGENTS.md:103-112 covers exactly this.

Nothing in the changed comments or the added test prose exceeded its evidence. The Discord: line follows AGENTS.md:142-153 (username woooflet, no leading @).


Should fix

1. helios/src/output/tml.rs:330-347 (behaviour) / PR description, "What Changed", first bullet — duplicate keys are described as prior semantics but are a new rejection

What the description says: "Unknown or duplicate wrapper keys fail deserialization and fall back to visible text, matching prior TMLv0 recovery semantics."

What the code did before (helios/src/output/tml.rs at main, lines 328-341):

fn call(&mut self, body: &str) -> Option<Vec<Event>> {
    let value: Value = serde_json::from_str(body).ok()?;
    let object = value.as_object()?;
    let name = object.get("name")?.as_str()?;
    let args = object.get("args").filter(|v| v.is_object())?;
    if object.len() != 2

The pre-change path parsed into serde_json::Value, required the map to have exactly two entries, and read name / args out of the map. serde_json's map deserialization keeps the last value of a repeated key, so {"name":"lookup","name":"lookup","args":{}} produced a two-entry map and was accepted as a tool call. The object.len() != 2 guard rejected unknown keys only.

What the code does after (this PR, helios/src/output/tml.rs:330-347): the derived #[serde(deny_unknown_fields)] struct RawCall<'a> { name: String, args: &'a RawValue } rejects a repeated field with serde's "duplicate field" error, so serde_json::from_str(body).ok()? yields None, call_or_text falls through, and the body is emitted as visible content (helios/src/output/tml.rs:318-327).

The PR's own test asserts the new behaviour: helios/src/output/tml.rs:619-628 feeds {"name":"lookup","name":"lookup","args":{}} and asserts the duplicate text surfaces as content (.1, the visible-text field), i.e. the call is refused.

Why it matters: for a TMLv0 core, a model that repeats a wrapper key now yields prose instead of a tool call. Where the request declared a strict tool with require_call, that turns into the "no completed call" failure rather than a call — a real behaviour change for existing cores, and one AGENTS.md:88-94 says must be named as such ("Make the before/after explicit … Identify material numerical, compatibility, and resource-lifetime changes"). AGENTS.md:129-132 additionally forbids assurances that add no technical evidence; "matching prior semantics" is exactly such an assurance, and here it is also wrong. .agents/skills/repo-prose/SKILL.md (not opened):40-43 requires PRs to state the compatibility impact.

Fix: state it as a change, and scope the "prior semantics" claim to the part that is unchanged (unknown keys, and the fall-back-to-visible-text path). Example: "Unknown or duplicate wrapper keys fail deserialization and fall back to visible text. Unknown keys were already rejected by the previous two-entry length check; a repeated key was previously accepted, because the map-based parse kept the last value, and is now rejected." If the rejection of duplicates is not wanted at all, drop deny_unknown_fields and keep the two-entry check — but then the test at tml.rs:619-628 must change too.

2. Supporting Evidence section — three unreproducible items

(a) server::protocol::tests::strict: 2/2 passed names no module. search_code "mod strict" over helios/src returns only helios/src/grammar.rs:20. The two strict protocol tests are plain functions in helios/src/server/protocol/tests.rs: strict_function_tools_decode_and_gate_streaming_and_buffered_output_across_protocols (line 1751) and strict_tool_wires_reach_encoder_only_after_parser_completion (line 2026). A reader cannot map the cited filter onto anything runnable.

(b) server::request::tml_tests::: 5/5 passed against the Inkling 2 checkpoint tokenizer — all five tests in helios/src/server/request/tml_tests.rs carry #[ignore = "requires FLARE_INKLING2_TEST_SNAPSHOT with the Inkling 2 tokenizer"] (lines 103, 161, 247, 264, 313). Under the stated command (cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server) they are reported as ignored, not passed. They only run with --ignored and FLARE_INKLING2_TEST_SNAPSHOT pointing at a snapshot containing tokenizer.json (not opened) (the module docs at tml_tests.rs:9 and the read at line 40 say so). AGENTS.md:103-112 requires that passed-versus-skipped differences be explained so they do not look contradictory, and that reproduction commands identify required inputs directly.

(c) The live 35/35 inventory does not say where it ran from. The only in-repo test added by this PR is tests/server/test_inkling2.py:121-209, gated by FLARE_RUN_CUDA_TESTS=1 and FLARE_INKLING2_TEST_URL (tests/server/test_inkling2.py:23-26) and it asserts far fewer cases than the 35 listed — one buffered Chat Completions call, one streamed, two truncation cases, one Responses call (verified in the diff). The remaining listed coverage (parallel and single-call enforcement, multi-turn roundtrips, mixed strict plus non-strict tools, the six HTTP 400 admissions, nested/recursive $ref, the four 30-digit runs) has no reference at all, so it came from the out-of-repo qualification driver. AGENTS.md:110-112 ("Reproduction commands must identify the required inputs and configuration directly or through a precise reference; placeholder arguments alone do not explain a measurement") and AGENTS.md:194-199 (identify missing inputs and unrun checks).

Fix: name the two protocol test functions (or give a filter such as server::protocol::tests::strict_ that actually matches them), state that the tml_tests were run with --ignored and FLARE_INKLING2_TEST_SNAPSHOT set, and split the live inventory into "tests/server/test_inkling2.py::test_strict_tml_tool_calls_and_truncation" versus "out-of-repo qualification driver (five cases …)" so the reader knows what the repository can reproduce.


Claims verified true (no action)

Open questions / not verified

Rules applied

AGENTS.md:72-140 (required four-part description, explicit before/after, reproduction inputs, disclose skipped checks), :142-153 (Discord line), :43-70 and :29-38 (prose review and commit review), :512-517 (TODO.txt as the home for follow-ups); docs/design-review.md principle 16 (four-part scheme and explicit transition) and principle 17 (Discord line); .agents/skills/repo-prose/SKILL.md (not opened) (whole file: describe the system as it exists, no changelog, implementation versus qualification, evidence as conditions/measurement/result/conclusion, commits state compatibility impact).