#1 [high] PR #575 core facts: diff, layer, verified behaviour
PR #575 "Preserve raw JSON tool arguments in TmlOutput for strict TMLv0 calls", head 07955d7 (also cited c7fae93), 3 files +237/-10:
- helios/src/output/tml.rs (+41/-10): production change.
TmlOutput::call(tml.rs:329-363) replacesserde_json::Valueround-trip (value.as_object(),object.len() != 2,args.to_string()) with local#[derive(Deserialize)] #[serde(deny_unknown_fields)] struct RawCall<'a> { name: String, #[serde(borrow)] args: &'a RawValue }. Guards:let args = parsed.args.get().trim();then!args.starts_with('{')(tml.rs:339-340), tool-name membership (:341-344), recipient-header equality (:345). EmitsEvent::ToolArguments { text: args.to_owned() }(:357-360). Failures return None ->call_or_text(tml.rs:317-327) emitsEvent::Content(body)(visible text). - helios/src/grammar/strict.rs (+105): test only,
mod tests, newtml_strict_parser_preserves_30_digit_integersat :3819-3922. - tests/server/test_inkling2.py (+91): new
test_strict_tml_tool_calls_and_truncation:121-209.
Verified in code:
raw_valueANDpreserve_orderalready enabled, helios/Cargo.toml:52 (features = ["preserve_order","float_roundtrip","raw_value"]);arbitrary_precisionNOT enabled. So no dependency change, and the old Value round-trip indeed lost >64-bit integers to binary64.- Downstream raw text preserved: Chat accumulator keeps arguments as String (server/output.rs:70-105, message() at :140 emits the String); only parses at ToolEnd to assert is_object (:113-121). Responses
function_call.argumentsemitsarguments.as_str()verbatim (protocol/encode.rs:313). - Strict validator sees same bytes: Encoder holds strict call in
pending_strict_calls, validates at ToolEnd (encode.rs:517-553), error "{subject} does not match its grammar". - Duplicate wrapper keys: old path accepted (Value map len stayed 2), new path rejects -> visible text. Pinned by new test tml.rs:619-628. Real (undocumented) acceptance tightening, non-strict TMLv0 only; strict grammar cannot emit duplicates.
- Residual re-serialization NOT covered by this PR: Anthropic Messages
tool_use.inputusesserde_json::from_str::<Value>(arguments)(protocol/encode.rs:334) -> binary64 rounding persists; Responses custom-toolinputpath encode.rs:299-303.strict: trueon Messages rejected at admission (decode.rs:373), so the reported HTTP 500 cannot recur there.
#2 [high] Hardware feasibility: live Inkling 2 TP4 test is not reproducible on cn5/cn7
Feasibility of a live hardware test for PR #575 — the decisive constraint.
What the PR's own live evidence claims: "35/35" on a live 4× GB10 TP4 Inkling 2 Small NVFP4 serving qualification, Chat Completions + Responses, buffered/streamed, max_tokens/max_output_tokens truncation.
What the committed re-runnable test needs (tests/server/test_inkling2.py:4-26, 29-68): FLARE_RUN_CUDA_TESTS=1 and FLARE_INKLING2_TEST_URL pointing at an exported core served by flare run with max_concurrency >= 8, prefill_chunk_size in (4096, 8192), and "image" in flare.input_modalities; model id must contain "inkling".
TMLv0 is Inkling-only. ToolParserKind::TmlJson is selected by the model contract, and OutputPipeline::new routes to TmlOutput only for TmlJson (helios/src/output/pipeline.rs:78). No other model family uses it — GLM uses GlmArgumentTags (:86), Qwen uses QwenCoder (:80/83), DSML (:89/92), Muse/others differ. So there is no substitute model that exercises the changed parser.
Inkling 2 recipe is NOT in this repository: ignition/recipes has no inkling2 path at main or at the PR head (list_files/search_code on ignition/recipes and ignition/recipes/inkling2 return nothing). docs/model-preparation.md:310-330 states official recipes live in the external repo local-inference-lab/hyperflare-recipes, and lists inkling-2-small-nvfp4 / inkling-2-mini there.
Inkling 2 Small is TP4 and its multi-host form needs one rank per host: docs/roce-ring.md:9 "Inkling 2 Small NVFP4 prepares multi-host TP4 cores." #304 prepared it on four DGX Sparks (GB10, 121 GiB unified memory, one rank per host); the checkpoint is 344 GB and each rank holds a quarter (~86 GiB). #304 evidence: full 32-request core was a 351 GB export; even a reduced core loaded 82.91 GiB per rank.
Available hardware vs. that requirement:
- cn5: 4 × RTX PRO 6000 Blackwell 96 GiB (SM120, amd64), 48 CPUs, 125 GiB RAM, 16 GiB scratch. GPU architecture is right (4× SM120 single host was Inkling 2's original supported path per #304), 4×96 GiB ≈ 384 GiB is marginal for a 344 GB checkpoint spread over 4 ranks, BUT: 16 GiB scratch and 125 GiB host RAM cannot hold the 344 GB NVFP4 checkpoint download, the prepared weights, or the ~351 GB core file. Models staged on cn5 (dinov2, GLM-5.3-Flash-NVFP4, vit) contain no Inkling.
- cn7: 1 × GB10, 10 CPUs, 60 GiB RAM, 16 GiB scratch, arm64. A single GB10 cannot host 4 TP ranks, and 60 GiB < 86 GiB needed for one rank. Models staged: Qwen3.8, GLM-5.3 — no Inkling.
Conclusion: the specific live qualification this PR claims CANNOT be reproduced on the available hardware. Staging it would require a 344 GB checkpoint plus a multi-rank export on a host with far more scratch/host memory than 16 GiB/125 GiB, and on cn7 four GB10 hosts rather than one.
#3 [high] Change isolation and regression surface for PR #575
Scope of the production change and what it can/cannot regress (all verified by reading code).
Production change is confined to TmlOutput::call (helios/src/output/tml.rs:329-363), reached only via OutputPipeline::new -> Self::Tml for ToolParserKind::TmlJson (helios/src/output/pipeline.rs:78). Other parsers are separate match arms (GLM :86, Qwen :80/:83, DSML :89/:92, XTML :95, MiniMaxXml :99, GemmaCall :102, None :105). So no non-TML model family can regress from this edit.
helios/src/grammar/strict.rs is test-only (+105 inside mod tests).
Downstream path verified intact:
- Chat accumulator: arguments kept as a String, only parsed at ToolEnd to assert is_object (helios/src/server/output.rs:78-123); message() re-emits the String (server/output.rs:140).
- Responses function_call arguments emitted from
arguments.as_str()(helios/src/server/protocol/encode.rs:313). - Strict validator consumes exactly the emitted bytes:
pending_strict_callsaccumulate Event::ToolArguments then validate at ToolEnd (encode.rs:517-553). - Truncation: a call body publishes only at
Termination::Eos(tml.rs:377-384), so a limit-truncated strict call emits no tool_calls -> matches the new Python truncation assertions.
.trim() at tml.rs:339 is very likely a no-op: serde_json RawValue::get() returns the value's raw JSON span and does not include surrounding whitespace. So the "verbatim" wording is effectively accurate and the trim is dead code, not a behaviour gap. (Not verified by execution.)
Duplicate wrapper keys: old object.len() != 2 on a serde_json::Value map (preserve_order) accepted {"name":..,"name":..,"args":..}; deny_unknown_fields now rejects it -> falls back to visible text via call_or_text (tml.rs:317-327), pinned by the new test at tml.rs:619-628. Real but narrow acceptance tightening on non-strict TMLv0 output only; the strict TMLv0 wrapper grammar cannot emit duplicate keys.
Residual, pre-existing and outside this PR's claim: Anthropic Messages tool_use.input re-serialises through serde_json::Value (encode.rs:334), and the Responses custom-tool input path (encode.rs:299-303), so >64-bit integers still round there. strict: true on Messages is rejected at admission (decode.rs:373), so the reported HTTP 500 cannot recur on that API.
Prompt-side TML renderer (helios/src/frontend/tml.rs:148-174) sorts top-level arg keys and re-serialises; that is the prompt/inbound direction, not the output parser, and is unrelated to this fix.
#4 [high] Pre-test gates, live-test quality problems, and test-value reasoning
Pre-test gates and test-plan reasoning for PR #575.
Merge-readiness gates found (none require a hardware run to resolve):
- DCO sign-off missing (probable merge blocker). CONTRIBUTING.md:9-11 "Any contribution which contains commits that are not Signed-Off will not be accepted";
git commit -srequired. The repo's own hook (.githooks/commit-msg) only enforces theDesign-Signed-Off-By: <name>; design-review=<4hex>trailer (hook:56-63), which the commit has, but that is not the DCO trailer. Independent of hardware. - docs/TODO.txt:5-8 untouched although the PR says it "addresses" that entry; AGENTS.md:512-517 requires completed entries be updated/removed and the entry's own closing condition is a recorded served-core result. Three independent review lenses flagged it. Whether closing is legitimate depends on the 35/35 evidence being accepted; if not, the description must not imply closure.
- Description inaccuracy: "duplicate wrapper keys ... matching prior TMLv0 recovery semantics" is false — duplicate wrapper keys were accepted before (Value map collapsed them) and are rejected now (pinned by tml.rs:619-628). AGENTS.md:88-94 requires behaviour changes be stated.
- Live test quality: tests/server/test_inkling2.py:121-209 bypasses the module's
servicefixture (tests/server/test_inkling2.py:29-68) for 4 of 6 requests — no HTTPError->pytest.fail(body) wrapping, hardcoded reasoning_effort="none" so the fixture's default-effort parameter never reaches the strict path, re-fetches /v1/models, one test asserts ~5 independent contracts (buffered chat, streamed chat, chat max_tokens truncation, Responses buffered, Responses max_output_tokens truncation). For hardware use this is the wrong instrument: the exact failure this PR fixes is an HTTP 500, and it would surface here with no response body. - CI/ordering risk: no CI checks reported on the head commit; .github/workflows/native-serving.yml:56-68 runs
cargo test --manifest-path helios/Cargo.toml --features runtime-core,serveron Linux and Windows, which would run both added Rust tests automatically. Also PR #457 (open) rewrites the sameTmlOutput::calland strict TMLv0 grammar, so landing order may force a rebase.
Test-value analysis:
- The Rust unit tests ARE the regression guard and already run in CI on two OSes; they are the right instrument for this fix and cost no GPU time.
- A/B throughput testing is NOT applicable: no kernel, scheduler, decode, cache or graph change; the PR makes no performance claim.
- The only additional coverage a GPU could give is a real Inkling 2 core emitting a >64-bit integer through strict TMLv0. That requires the external recipe (not in this repo; docs/model-preparation.md:310-330) plus a 344 GB NVFP4 checkpoint and a TP4 export (~351 GB core per #304), against 16 GiB scratch on both hosts and 125 GiB (cn5) / 60 GiB (cn7) RAM. cn5 has 4× SM120 96 GiB (architecturally correct for single-host TP4) but cannot stage the weights; cn7 has one GB10 (60 GiB) which cannot hold one ~86 GiB rank.
- Considered and rejected: hand-building a synthetic core declaring TmlJson syntax to exercise the parser on cn5. The fixture frontend is a 2-token WordLevel tokenizer (helios/tests/fixture_frontend.py:10-20) and TML framing needs the 14 control markers as real tokens (helios/src/output/tml.rs:42-45, envelope_markers at pipeline.rs:132); such a core would validate parser plumbing, not served behaviour, and the plumbing is already covered by the in-repo Rust test tml_strict_parser_preserves_30_digit_integers (strict.rs:3819-3922).
#6 [high] Hardware fit verdict for run 2: cn5 + Inkling 2 Mini TP1 is the only viable slot
Changed code path: TmlOutput::call (helios/src/output/tml.rs:342-376) runs ONLY for cores whose contract declares ToolParserKind::TmlJson (helios/src/output/pipeline.rs:98; enum at helios/src/model/contract.rs:67, TML_JSON=8 at helios/proto/runtime_core.proto:464). Only Inkling 2 recipes declare TMLv0 (docs/roce-ring.md:9; docs/TODO.txt:5-8 "e.g. Inkling 2").
Recipes are OUT OF REPO: AGENTS.md:383-396 + docs/model-preparation.md:310-330 → local-inference-lab/hyperflare-recipes (hyperflare_recipes/recipes/...). ignition/ here has no recipes dir (list_files ignition/recipes → nothing); uv sync --extra prepare (pyproject.toml:20-36) does NOT pull them. So the engineer must install the external recipe package.
Two Inkling 2 options:
(a) Inkling 2 Small NVFP4 — INFEASIBLE on cn5 and cn7. 344 GB checkpoint, TP4 only, full core 351 GB, ~90 GiB resident per rank (#304 merged). Qualified on 4× GB10/SM121 hosts, one rank per host. cn7 has 1 GB10 (60 GiB RAM, 22 GiB/rank weights alone needs ~90 GiB) — cannot host TP4. cn5 (4× SM120 96 GiB, 125 GiB RAM, 16 GiB scratch) is architecturally right but cannot hold 344 GB checkpoint / 351 GB core with 125 GiB RAM + 16 GiB scratch.
(b) Inkling 2 Mini — VIABLE on cn5 with ONE GPU. ~19.5 GB checkpoint (19,525,870,752 bytes, #468), TP1 supported (MINI_WORLD_SIZES = (1,2,4), hyperflare-recipes PR #17 / closed #467); end-to-end flare run on one SM120 RTX PRO 6000 qualified in #468 (132 graphs, ~11.8k kernels; 6 passed in each of plain/fixed/adaptive draft modes). Fits 96 GiB VRAM easily.
cn5 vs cn7: cn5 = amd64 + SM120 (matches #468's qualified SM120 single-GPU path), 125 GiB RAM. cn7 = 1× GB10 SM121, 60 GiB RAM, 16 GiB scratch — Mini TP1 would fit in 60 GiB unified RAM but cn5 is the safer, already-qualified-baseline host. cn7 is a fallback only.
Open pre-flight risk: 16 GiB scratch on both hosts vs 19.5 GB checkpoint + a multi-GB prepared core → must stage into the model cache (--core-cache) on a filesystem with ≥60 GiB free, and confirm Hugging Face access to thinkingmachines/Inkling-2-Mini (token/gated) BEFORE the slot is allocated.
#7 [high] Concrete test matrix, commands, and A/B design for PR #575 on cn5
Head a0d9065 (rebased onto 571a4471), +237/-10, 3 files. Fix is SERVER-side only: no core-format change → a core exported before the change exercises the new code; NO re-export needed for the A/B.
A/B binaries from the same base: git checkout 571a4471 && cargo build --locked --release --manifest-path flare-cli/Cargo.toml → save as /tmp/flare-base git checkout a0d9065 && cargo build --locked --release --manifest-path flare-cli/Cargo.toml → /tmp/flare-fix
CPU-only gates (do first, ~15-30 min, no GPU):
cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib output::tml::
... --lib grammar::strict::
... --lib server::protocol::tests::strict (matches strict_function_tools_* :1751 / strict_tool_wires_* :2026)
Note: server::request::tml_tests:: are all #[ignore] (tml_tests.rs:103,161,247,264,313,356) and need FLARE_INKLING2_TEST_SNAPSHOT= + -- --ignored. They are CPU-only + golden refs (tests/frontend/inkling2_tml.json) — cheapest real TMLv0 end-to-end check available, no GPU.
Service (Mini TP1 on cn5, one GPU): export: .venv/bin/ignition export inkling-2-mini --gpus 0 --max-concurrency 8 --prefill-chunk-size 8192 serve: /tmp/flare-fix run <CACHE_ENTRY> --gpus 0 --max-concurrency 8 --host 0.0.0.0 --port 8000 (prefill_chunk_size must be 4096 or 8192 for the committed python test's fixture assertion at tests/server/test_inkling2.py:37; max_concurrency >= 8 at :35; model id must contain "inkling" at :34.)
Core request (strict Chat, unbounded integer) — T1, the ONLY test that proves the fix on hardware: POST /v1/chat/completions {"model":"","messages":[{"role":"user","content":"Call record_city with big_id=123456789012345678901234567890 and city='Paris'."}], "tools":[{"type":"function","function":{"name":"record_city","strict":true,"parameters":{"type":"object", "properties":{"big_id":{"type":"integer"},"city":{"type":"string","minLength":2}}, "required":["big_id","city"],"additionalProperties":false}}}], "tool_choice":"required","temperature":0,"max_tokens":256} PASS (fix): HTTP 200, finish_reason=="tool_calls", exactly 1 call, arguments contain the 30-digit literal byte-for-byte. FAIL baseline: HTTP 500 with body containing "strict tool arguments does not match its grammar" (produced at helios/src/grammar.rs:654 via helios/src/server/protocol/encode.rs:539-541). Non-strict variant (drop "strict":true) shows the rounding symptom in the baseline instead: args contain 1.2345678901234568e29; fix emits literal. Deterministic, high-signal, no 500 needed.
Other GPU cases (all <10 s each): T2 strict Responses buffered → function_call.arguments literal (encode.rs:313). T3 strict Chat streamed → exactly one arguments delta containing the literal. T4 truncation max_tokens=10, tool_choice:"auto" → finish_reason=="length", no tool_calls (tml.rs:377-384 semantics). T5 non-strict Chat → 200 both binaries; argument text now verbatim (disclosed side effect in PR body).
Or reuse the committed driver: FLARE_RUN_CUDA_TESTS=1 FLARE_INKLING2_TEST_URL=http://... .venv/bin/python -m pytest tests/server/test_inkling2.py::test_strict_tml_tool_calls_and_truncation -q
SKIP (saves GPU time):
- No throughput/perf A/B: no perf claim; CPU-side parse; the change removes one serde_json Value allocation per TMLv0 tool call. Benchmarking measures noise.
- No re-export of cores for the A/B (server-side fix).
- Do not attempt Inkling 2 Small NVFP4 (344 GB, TP4, needs 4 GB10 hosts).
- Do not attempt to reproduce the PR's "35/35 live" (4 Sparks, unavailable).
- Don't chase Messages/Anthropic
tool_use.inputrounding (helios/src/server/protocol/encode.rs:334) or the prompt-side renderer (helios/src/frontend/tml.rs:148-174): pre-existing, out of scope, strict is rejected on Messages at admission.
Time budget: CPU gates 30 min; staging/export ~1 h (check flare models list and the Hub for a prebuilt inkling-2-mini SM120 TP1 core first — biggest saving); serving + all 5 cases ~10 min of GPU.
Abort criteria: if the Mini core cannot be staged (recipe unavailable, gated weights, <60 GiB free for cache), stop — the CPU Rust tests are the authoritative guard for this fix; do not improvise a synthetic TML core (fixture frontend is a 2-token WordLevel tokenizer, helios/tests/fixture_frontend.py:10-20; TML framing needs 14 real control markers).