#1 [high] PR #457 overview and diff facts
PR #457 "Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with TmlOutput", by brandonmmusic-max, open, head aacbca1, +431 -7, 4 files: helios/src/grammar.rs (+81-2), helios/src/grammar/strict.rs (+134-2), helios/src/output/tml.rs (+91-3), helios/src/server/request/tml_tests.rs (+125-0). Only discussion comment is the autobot case-file notice.
Changes:
- tml.rs: new private
AnswerState {Empty, HeaderWithoutContent, Emitted}(tml.rs:78-83), field at :104. Set Emitted in emit() when a visible non-thinking body emits (:219) and in call_or_text for a non-empty body (:338). HeaderWithoutContent set in State::Header whenmodel && at>0 && matches!(marker, END|TURN_END) && answer==Empty(tml.rs:282-288). finish() returns Err at :399-401 whencause==Eos && answer==HeaderWithoutContent; message "TML model header closed without a content kind and the turn produced no answer or tool call". - grammar.rs compile_content_headers: factored
tool_unnamed: <|content_invoke_tool_json|> @payload_any <|end_message|>with one schema whose name is{"enum": tools}(grammar.rs:381-391); ending changed(answer | tools)→(answer ({restart} thinking* tool)* | tools)(grammar.rs:405);tail: thinking* {ending}(:407). - strict.rs compile_strict_tml:
payload_refsvector (:1566, pushed :1586) joined intotool_unnamed: <|content_invoke_tool_json|> (@payload_0 | ... | @payload_k) <|end_message|>(:1599-1604), pushed into tool_rules; ending split: require_call → "tools", single_call →(answer ({restart} thinking* tool)? | tools), else(answer ({restart} thinking* tool)* | tools)(:1613-1619). Tests added: grammar.rscontent_headers_grammar_allows_preamble_before_tools(:1931-1997); strict.rsTML_unnamedcase (:4131-4140) andstrict_tml_grammar_allows_unnamed_headers_and_preamble_before_tools(:4525-4636); tml.rs three unit tests (:589-654); tml_tests.rsa_model_frame_without_a_content_kind_reports_a_failed_response(:246-282),inkling_stress_untyped_closed_header_must_surface_failure(:393-439),inkling_stress_custom_grammar_preamble_then_tool(:441-478), all #[ignore].
#3 [high] PR #457 FULL REPORT — consolidated findings (Blockers / Should Fix / Nits)
Review — PR #457 "Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with TmlOutput"
Author: brandonmmusic-max. Head aacbca1, +431/−7, 4 files (helios/src/grammar.rs, helios/src/grammar/strict.rs, helios/src/output/tml.rs, helios/src/server/request/tml_tests.rs) — no docs touched. Verified at head: tml.rs:78-83/:104/:219/:282-288/:335-338/:399-401; grammar.rs:381-406; strict.rs:1566-1619; tml_tests.rs:246-282, :393-439, :441-478; docs/api.md:443-444, :585-602, :621-625.
Scope, layer and design are right: parser-internal state, no per-model branch, no flag, no weakened guarantee in the named-tool path. No code blocker.
BLOCKERS
None. The three production changes are small, in the correct layer, and each grammar change is a superset of the old language for tool-enabled TMLv0. The docs item (S1) is however required by AGENTS.md:225 and should land in this PR.
SHOULD FIX
S1. docs/api.md does not describe any of the three user-visible TMLv0 behaviour changes. [Architecture A1, Prose P7]
- Finding:
docs/api.md:585-602is the strict-tool/TMLv0 contract but says nothing about an unnamed header (<|message_model|><|content_invoke_tool_json|>), nothing about a visible text preamble followed by tool calls, and nothing about the new EOS failure.search_codeoverdocs/forcontent_invoke_tool_json,unnamed,message_model,preamble→ no matches.docs/api.md:443-444("recognized but incomplete calls at natural completion are errors") is the nearest statement and does not distinguish the new condition. - Request: add one paragraph near
docs/api.md:585-602covering (a) unnamed vs named TMLv0 tool headers, (b) text preamble followed by tool calls, (c) a non-empty model header closed by<|end_message|>/<|content_model_end_sampling|>with no content-kind token and no answer now fails the turn at EOS (response.failed/ HTTP 500server_error), and update:443-444to separate the two conditions. - Why: AGENTS.md:225 lists
docs/api.mdas required reading/editing for API behaviour changes, and AGENTS.md:47-55 requires documents to state present behaviour (so this cannot be deferred todocs/TODO.txt). The same section already documents comparable failure modes (:535-536,:543-545,:621-625), so silence here is an omission, not a style choice.
S2. The EOS guard keys on the header shape, not on the defect's symptom, so two adjacent shapes still complete silently. [Correctness C2]
- Finding:
AnswerState::HeaderWithoutContentis recorded only when a non-empty model header closes on<|end_message|>/<|content_model_end_sampling|>whileanswer == Empty(tml.rs:282-288), andEmittedis set only for non-empty bodies (emitreturns early at tml.rs:207-209;call_or_textreturns early at :335-337). Therefore<|message_model|><|content_thinking|>plan<|end_message|><|message_model|>bash<|content_text|><|end_message|>and…<|message_model|><|content_invoke_tool_json|><|end_message|>stillOkwithoutput=[reasoning],status: "completed"— the exact symptom the PR removes for the header-dropped variant. tml.rs:652-653 shows the reasoning-only turn ending at TURN_END is deliberately stillOk. - Request: either widen the check to "a model frame was opened and no answer or call was emitted at EOS" (still excluding external terminations and empty headers), or state the boundary explicitly in the docs paragraph from S1 and add the two sequences above as tests that pin the intended outcome.
- Why: the description's claim is "…and without any visible text or tool call", but the empty-body variants satisfy that reading and are still silent; leaving it implicit means the next reviewer cannot tell an intentional boundary from a hole.
S3. The strict grammar re-creates exactly the N-way alternation the description says it avoids, and no test or measurement covers realistic tool counts. [Architecture A2, Correctness C1, Simplicity]
- Finding:
compile_content_headersfactors the unnamed header through one schema whosenameis{"enum": &envelope.tools}(grammar.rs:381-391), justified in the description as "avoiding N-way Earley ambiguity across large tool sets".compile_strict_tmlinstead emitstool_unnamed: <|content_invoke_tool_json|> (@payload_0 | … | @payload_k) <|end_message|>(strict.rs:1599-1603), one complete wrapper schema per active tool, pushed at strict.rs:1581-1586 for every tool in the plan. The largest new coverage is two tools (strict.rs:4618-4634, strict.rs:4134-4143); live strict evidence is one tool (get_weather); the 178-tool measurement was taken on the non-strict custom-grammar path only. Size budgets (grammar.rs:22MAX_GRAMMAR_BYTES, admissionmax_lexer_states) bound size, not ambiguity. - Request: either state in the PR (and in one comment above strict.rs:1599) why the alternation is the right shape for strict tools —
embed_schema_in_tml_wrapper(strict.rs:873-892) folds the tool name into each payload as aconst, so name and args cannot be split the way grammar.rs splits them — plus a compile/advance test at a representative tool count, or factor it as the sibling path does. - Why: two grammars that both claim to mirror
TmlOutputnow differ in construction with only half the stated rationale applied, and a strict request with many tools is unmeasured. A comment prevents the next reader from "unifying" the two rules and breaking one.
S4. One of the two new ignored snapshot tests is a strict subset of the other, and both bypass the generated fixture that records tml-renderers' own parse. [Conventions C1, Simplicity, Prose]
- Finding (a):
inkling_stress_untyped_closed_header_must_surface_failure(tml_tests.rs:393-439) sends byte-identical tokens toa_model_frame_without_a_content_kind_reports_a_failed_response(tml_tests.rs:246-282) — same request, onebashtool, only an explicit"tool_choice":"auto"that is already the default (:403) — and asserts a subset of the same events (response.failed,status: "failed"; the first also assertserror.code == "server_error"and the per-push reasoning-only invariant). Both are#[ignore]d, so the duplicate also pays a second snapshot load. - Finding (b): neither test goes through the reference path. The file's own contract is that checkpoint tests compare Helios with
tests/frontend/inkling2_tml.json, generated bytests/frontend/generate_inkling2_fixtures.py(tml_tests.rs:7-12), and that generator records{"error": …}when tml-renderers itself rejects a sequence (generate_inkling2_fixtures.py:399-417), whichoutputs_match_reference_parses(tml_tests.rs:286-299) already asserts against. The new malformed-header case is hard-coded as raw IDs instead, so nothing shows that tml-renderers rejects the same suffix. - Request: delete
inkling_stress_untyped_closed_header_must_surface_failure(fold thetool_choice: "auto"variant into the earlier test if it matters), add oneoutput(...)case for the malformed terminal header togenerate_inkling2_fixtures.py, regenerateinkling2_tml.json, and assert both Helios failure andcase["reference_parse"]["error"]there. If the fixture cannot be regenerated in this PR, say so under "Unrun Checks". - Why: AGENTS.md:189-194 asks for focused, meaningful validation; a second test that cannot fail unless the first does is churn (AGENTS.md:183-188), and an inline token list cannot establish the cross-implementation agreement
tml.rs:7-15claims.
S5. The PR description's evidence is not reproducible from this branch. [Prose P1, P2, P3, P4]
- Finding: live GPU evidence is attributed to "
TML-d24-varloop-researchon RTX PRO 6000 Blackwell", butignition/recipes/inkling2/config.py:88-92rejectsis_varloop: true("Inkling 2 preparation requires a fixed loop pass count"),tests/recipes/test_inkling2_mini.py:87asserts that rejection, and the alias survives only in closed #468 (moved to an external tree). The snapshot command isFLARE_INKLING2_TEST_SNAPSHOT=...although tml_tests.rs:9-12 already states the required input (thinkingmachines/Inkling-2-Small at the fixture revision).agentic_suite.py, cited for the round-trip suites, has no match anywhere in the repository and no path. "124 passed" quotes no filter though the quotedcargo testline has none, and "5/5(4/5…)" leaves the fifth run unexplained. - Request: name the served core as a reviewer could obtain it (checkpoint repository + revision and a recipe alias that exists here) or state plainly that it is external and not reproducible in this repository; give the full snapshot invocation with what the variable must point at plus the
--ignoredrequirement; giveagentic_suite.py's path (or say it lives in the external recipes tree); state the filter behind 124; explain the 4/5. - Why: AGENTS.md:90-107 — scope and material limitations must be attached to a measured result, and reproduction commands must identify required inputs rather than placeholders.
S6. The new unit test compares the parser with itself. [Simplicity]
- Finding:
a_closed_untyped_header_allows_visible_content_and_completed_calls(tml.rs:626-639) computesexpected = run(frame, valid, Eos)and assertsrun(frame, &order.concat(), Eos) == expected— both sides are the function under test, so any uniform behaviour change (the header starting to contribute content, or no longer being tolerated for one order) keeps the test green. - Request: assert literals for each variant, as the neighbouring tests do (tml.rs:543-561):
("".into(), "done".into(), vec![]),("".into(), String::new(), vec![("lookup".into(), "{}".into())]),("".into(), "invalid JSON".into(), vec![]). - Why: the test is the only default-path coverage of "an untyped header is inert", so it has to state the contract, not be self-consistent (AGENTS.md:189-194).
S7. The grammars remain stricter than TmlOutput in the opposite direction. [Correctness C3]
- Finding: both new endings require a
<|message_model|>restart between a visible answer and a following tool call (grammar.rs:405, strict.rs:1616-1618), butTmlOutputopensState::Body { kind: Call, model: true }from acontent_invoke_tool_jsoncontrol token directly after<|end_message|>with no restart (tml.rs:250-258). So<|message_model|><|content_text|>hi<|end_message|><|content_invoke_tool_json|>{…}<|end_message|>parses as a call and is rejected by both grammars. - Request: accept the restart-less form in the grammars, or state in the description and in the S1 docs paragraph that the restart is required under a grammar.
- Why: the PR's headline is alignment with
TmlOutput; a remaining divergence makes constrained requests reject a frame sequence the parser accepts, which is the failure mode this PR fixes in the other direction.
NITS
N1. The wire-token splitter is copied again. The encode closure in strict_tml_grammar_allows_unnamed_headers_and_preamble_before_tools (strict.rs:4572-4588) is character-for-character the one at strict.rs:4205-4221; the same scan is at protocol/tests.rs:466-470 and as pieces() at protocol/tests.rs:2048-2066, and the byte-tokenizer setup at strict.rs:4546-4551 repeats strict.rs:2814-2819. Request: hoist one wire_tokens(controls, wire) helper beside byte_tokenizer_with (grammar.rs:936) and call it from all four sites. Why: a marker-rule change currently means editing several copies (AGENTS.md:183-188).
N2. Test names and #[ignore] wording. inkling_stress_untyped_closed_header_must_surface_failure (tml_tests.rs:395) and inkling_stress_custom_grammar_preamble_then_tool (:443) carry a stress label that names no property (every other test in the file names the behaviour: :104, :162, :286, :352, :248), and their #[ignore] messages read "with an Inkling 2 tokenizer" (:394, :442) where the rest of the file reads "with the" (:103, :161, :247, :285, :302, :351). Request: drop stress and align the article. Why: .agents/skills/repo-prose/SKILL.md forbids lifecycle/experiment labels as identities, and AGENTS.md:38-45 makes that skill mandatory for names.
N3. The new error message narrates cause instead of naming the state: "TML model header closed without a content kind and the turn produced no answer or tool call" (tml.rs:399-401) versus the family's "unterminated recipient header" (recipient.rs:293), "incomplete XTML output envelope" (xtml.rs:246), "incomplete DeepSeek tool call at end of response" (dsml.rs:380). The string is client-visible through Encoder::failure (encode.rs:760). Request: shorten to the family form, e.g. "incomplete TML model frame", updating the three assertions that pin the current wording (tml.rs:608, :622, tml_tests.rs:281).
N4. Small trims in the new tests. empty_model_headers_other_roles_and_external_stops_keep_their_termination re-asserts USER/TOOL/SYSTEM frames (tml.rs:644-646) already covered with a richer frame at tml.rs:548-551; payload_refs (strict.rs:1566, :1586) exists only to feed one format! at :1602; inkling_stress_custom_grammar_preamble_then_tool repeats four accept-only assertions already in content_headers_grammar_allows_preamble_before_tools (grammar.rs:1973-1978). Request: keep one of each pair, and build tool_unnamed inside the existing loop.
N5. Prose in the PR itself. The title leads with an internal type name and stacks three changes ("Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with TmlOutput"); the three commit bodies are subject-only (76c50158, 9b2f2f6a, aacbca18), though docs/design-review.md:137-147 requires the four-part argument in the commit message too. Request: lead the title with the user-visible consequence and put the why/change/claim/evidence in the commit bodies before merge. Why: AGENTS.md:117-123 (explain a component's role before its shorthand) and docs/design-review.md:169-174.
N6. The unrun-checks list omits the strict-TMLv0 combinations this PR's changed single_call ending governs. docs/TODO.txt:25-28 names them: strict: true on a TMLv0 core, Chat Completions and Responses, buffered and streamed, including max_tokens/max_output_tokens truncation. Request: run them or list them as unrun with a pointer to docs/TODO.txt:25. Why: AGENTS.md:189-194 requires unrun checks to be identified, and docs/api.md:621-625 already promises truncation behaviour for a strict call.
Checked and clean (not to be re-raised)
- Layer and scope: parser-internal
AnswerState, no model name/recipe/capability/flag (AGENTS.md:171-176); grammar selection still keyed on the prepared parser kind;compile_recipient's(answer | tools)(grammar.rs:354) belongs to a different parser, so leaving it alone is correct scope. - The new endings are supersets of the old language for tool-enabled TMLv0;
require_callandsingle_callcaps preserved (strict.rs:1606-1616, asserted strict.rs:4633-4634); named headers still reject mismatches; unregistered tools still rejected through theenumat grammar.rs:383 and the per-tool wrappers. - Termination handling:
Cancelled/ExecutionErrorreturn early (tml.rs:378-383),OutputLimit/UserStopare excluded by thecause == Eosgate (:399); empty model headers and non-model roles unchanged;finish()is only reached fromOutputPresentation::finish(server/output.rs:333) andabort(:358), so the newErrcannot strand a caller. - No serialization, checkpoint, recipe or on-disk format change; existing artifacts still load.
call_or_textreordering is behaviour-preserving apart from the newEmittedmarking.- The
Error, Suspicion withdrawnitems:tool_unnamedin grammar.rs is reachable understart: /(?s:.+)/(the user's Lark becomes theanswerbody, grammar.rs:379/:407-415);AnswerState::Emittedis reachable and necessary.
Open questions for maintainers
- Is an answer frame that opens and closes with no bytes legitimate TMLv0? It decides whether S2 is a fix or a documented boundary.
- What is the intended tool-count ceiling under
"strict": true? It decides whether S3 needs a bound, a measurement, or only a comment. - Is a tool frame without a
<|message_model|>restart after a visible answer legal? It decides S7. - Nothing was built or run in review; CI on aacbca1 reports no checks, and the three Inkling 2 regressions are
#[ignore]d behindFLARE_INKLING2_TEST_SNAPSHOT.
#4 [high] PR #457 — SUMMARY REPORT (post-ready)
PR #457 — review summary (GitHub-post form)
Thanks — the fix is small, in the right layer, and each grammar change is a superset of the old language. Nothing here is a code blocker. The items below are what stands between this and merge.
Blockers
- None. The parser change and both grammar changes are correct, parser-local, and free of per-model branches, flags, or weakened guarantees.
Should Fix
docs/api.mdsays nothing about any of the three behaviour changes. No mention of unnamed TMLv0 tool headers, text preamble before tool calls, or the new EOS failure (docs/api.md:585-602,:443-444). → Add one paragraph to the TMLv0 strict-tool section; AGENTS.md:225 requires the API doc for API behaviour changes.- The EOS guard keys on the header shape, not on "no answer produced".
<|message_model|><|content_thinking|>plan<|end_message|><|message_model|>bash<|content_text|><|end_message|>and the emptycontent_invoke_tool_jsonvariant still complete withoutput=[reasoning](tml.rs:282-288,:207-209,:335-337). → Either widen the check or pin the boundary with two tests and a doc sentence. - The strict grammar re-creates the N-way alternation the description avoids.
strict.rs:1599-1603alternates over every per-tool wrapper schema whilegrammar.rs:381-391factors a singleenum; largest new coverage is two tools, live evidence one. → Add a comment atstrict.rs:1599explaining theconst-name reason, plus a test at realistic tool counts (or factor it). - Two new ignored snapshot tests are one test, and neither uses the reference fixture.
tml_tests.rs:393-439replays the same tokens as:246-282with weaker assertions; both hard-code IDs instead of adding a case togenerate_inkling2_fixtures.py, so nothing shows tml-renderers rejects the same suffix. → Delete the duplicate, regenerate the fixture with an error case. - The evidence is not reproducible from this branch.
TML-d24-varloop-researchis rejected here (ignition/recipes/inkling2/config.py:88-92, closed #468);FLARE_INKLING2_TEST_SNAPSHOT=...is a placeholder thoughtml_tests.rs:9-12names the input;agentic_suite.pyhas no path; "124 passed" has no filter; the5/5/4/5pair is unexplained. → Name the core obtainably, give the full snapshot command, paths, filter, and the 4/5 explanation.
Nits
- A self-referential assertion.
a_closed_untyped_header_allows_visible_content_and_completed_callscomparesrun()torun()(tml.rs:626-639). → Assert the literal tuples, astml.rs:543-561does. - Remaining grammar/parser divergence. Both endings require a
<|message_model|>restart before a tool call after text (grammar.rs:405,strict.rs:1616-1618);TmlOutputaccepts it without one (tml.rs:250-258). → Accept it, or state it as intentional. - Copied test helper, fourth time.
strict.rs:4572-4588is identical to:4205-4221; same scan atprotocol/tests.rs:466-470and aspieces()at:2048-2066. → Onewire_tokenshelper besidebyte_tokenizer_with. - Names and error text.
inkling_stress_*names two tests (tml_tests.rs:395,:443) whose#[ignore]strings also say "an Inkling 2 tokenizer" where the file says "the"; the client-visible error attml.rs:400narrates cause instead of state, unlikerecipient.rs:293/xtml.rs:246. → Rename, align the article, shorten the message (update the three assertions that pin it). - Small trims and prose. USER/TOOL/SYSTEM cases in
tml.rs:644-646duplicate:548-551;payload_refsonly feeds oneformat!; four accept-only assertions repeatgrammar.rs:1973-1978. Title leads withTmlOutputand stacks three changes, and the commit bodies are subject-only (docs/design-review.md:137-147). Also list the strict-TMLv0 truncation/stream combinations fromdocs/TODO.txt:25-28as run or unrun.
#5 [high] PR #457 — SUMMARY REPORT (post-ready, final)
PR #457 — review summary (GitHub-post form; case file linked above)
Thanks — the fix is small, in the right layer, and every grammar change is a superset of the previous language. No code blockers. The items below are what stands between this and merge.
Blockers
- None. The parser change and both grammar changes are parser-local, carry no per-model branch or flag, and weaken no guarantee in the named-tool path.
Should Fix
docs/api.mdstates none of the three behaviour changes. No mention of unnamed TMLv0 tool headers, a text preamble before tool calls, or the new EOS failure (docs/api.md:585-602,:443-444). → Add one paragraph to the TMLv0 strict-tool section; AGENTS.md:225 requires the API doc for API behaviour changes.- The EOS guard keys on the header shape, not on "no answer produced". An empty
<|content_text|>frame after the bad header, and an empty<|content_invoke_tool_json|>body, still complete withoutput=[reasoning](tml.rs:282-288,:207-209,:335-337). → Widen the check, or pin the boundary with two tests and a doc sentence. - The strict grammar re-creates the N-way alternation the description says it avoids.
strict.rs:1599-1603alternates over every per-tool wrapper schema whilegrammar.rs:381-391factors oneenum; the largest new coverage is two tools and the live evidence one. → Comment why theconst-named wrappers force this (strict.rs:873-892), and add a test at realistic tool counts — or factor it like the sibling path. - Two new ignored snapshot tests are really one, and neither uses the reference fixture.
tml_tests.rs:393-439replays the identical token stream as:246-282with strictly weaker assertions, and both hard-code IDs rather than adding a case togenerate_inkling2_fixtures.py, which already records tml-renderers' own rejection (:399-417); the newtml.rs:626-639unit test comparesrun()againstrun(). → Delete the duplicate, assert literals in the unit test, regenerate the fixture with the error case. - Grammar and parser still disagree in the other direction. Both new endings require a
<|message_model|>restart before a tool call after text (grammar.rs:405,strict.rs:1616-1618);TmlOutputaccepts the call without one (tml.rs:250-258). → Accept it, or state the restart as required under a grammar.
Nits
- The evidence is not reproducible from this branch.
TML-d24-varloop-researchis rejected here (ignition/recipes/inkling2/config.py:88-92, closed #468),FLARE_INKLING2_TEST_SNAPSHOT=...is a placeholder althoughtml_tests.rs:9-12names the input,agentic_suite.pyhas no path, "124 passed" has no filter, and5/5vs4/5is unexplained. → Name the core obtainably, give the full snapshot command, paths, the filter, and the 4/5 explanation. - Fourth copy of the test wire-token splitter.
strict.rs:4572-4588is character-for-character:4205-4221, with the same scan atprotocol/tests.rs:466-470and aspieces()at:2048-2066. → Onewire_tokenshelper besidebyte_tokenizer_with(grammar.rs:936). - Test names and the client-visible error.
inkling_stress_*(tml_tests.rs:395,:443) names no property, and both#[ignore]strings say "an Inkling 2 tokenizer" where the file says "the";tml.rs:400narrates cause whilerecipient.rs:293/xtml.rs:246/dsml.rs:380name the incomplete state. → Rename, align the article, shorten the message (three assertions pin it:tml.rs:608,:622,tml_tests.rs:281). - Small trims. USER/TOOL/SYSTEM cases (
tml.rs:644-646) repeat:548-551;payload_refs(strict.rs:1566,:1586) exists only to feed oneformat!; four accept-only assertions in the snapshot test repeatgrammar.rs:1973-1978. - Prose and unrun checks. The title leads with
TmlOutputand stacks three changes, and the three commit bodies are subject-only (docs/design-review.md:137-147); the strict-TMLv0 Chat/Responses, streamed and truncation combinations fromdocs/TODO.txt:25-28are neither run nor listed. → Lead the title with the user-visible consequence, fill the commit bodies, list or run those combinations.
#6 [high] PR #457 — SUMMARY REPORT (post-ready, final, 10 bullets)
PR #457 — review summary (GitHub-post form; case file linked above)
Thanks — the fix is small, in the right layer, and every grammar change is a superset of the previous language. No blockers: the parser change and both grammar changes are parser-local, carry no per-model branch or flag, and weaken no guarantee in the named-tool path. What remains:
Should Fix
docs/api.mdstates none of the three behaviour changes. No mention of unnamed TMLv0 tool headers, a text preamble before tool calls, or the new EOS failure (docs/api.md:585-602,:443-444). → Add one paragraph to the TMLv0 strict-tool section; AGENTS.md:225 requires the API doc for API behaviour changes.- The EOS guard keys on the header shape, not on "no answer produced". An empty
<|content_text|>frame after the bad header, and an empty<|content_invoke_tool_json|>body, still complete withoutput=[reasoning](tml.rs:282-288,:207-209,:335-337). → Widen the check, or pin the boundary with two tests and a doc sentence. - The strict grammar re-creates the N-way alternation the description says it avoids.
strict.rs:1599-1603alternates over every per-tool wrapper schema whilegrammar.rs:381-391factors oneenum; the largest new coverage is two tools and the live evidence one. → Comment why theconst-named wrappers force this (strict.rs:873-892) and add a test at realistic tool counts — or factor it like the sibling path. - Two new ignored snapshot tests are really one, and neither uses the reference fixture.
tml_tests.rs:393-439replays the identical token stream as:246-282with strictly weaker assertions, and both hard-code IDs instead of adding a case togenerate_inkling2_fixtures.py, which already records tml-renderers' own rejection (:399-417); the newtml.rs:626-639unit test comparesrun()againstrun(). → Delete the duplicate, assert literals in the unit test, regenerate the fixture with the error case. - Grammar and parser still disagree in the other direction. Both new endings require a
<|message_model|>restart before a tool call after text (grammar.rs:405,strict.rs:1616-1618);TmlOutputaccepts the call without one (tml.rs:250-258). → Accept it, or state the restart as required under a grammar.
Nits
- The evidence is not reproducible from this branch.
TML-d24-varloop-researchis rejected here (ignition/recipes/inkling2/config.py:88-92, closed #468),FLARE_INKLING2_TEST_SNAPSHOT=...is a placeholder althoughtml_tests.rs:9-12names the input,agentic_suite.pyhas no path, "124 passed" has no filter, and5/5vs4/5is unexplained. → Name the core obtainably, give the full snapshot command, the paths, the filter, and the 4/5 explanation. - Fourth copy of the test wire-token splitter.
strict.rs:4572-4588is character-for-character:4205-4221, with the same scan atprotocol/tests.rs:466-470and aspieces()at:2048-2066. → Onewire_tokenshelper besidebyte_tokenizer_with(grammar.rs:936). - Test names and the client-visible error.
inkling_stress_*(tml_tests.rs:395,:443) names no property, and both#[ignore]strings say "an Inkling 2 tokenizer" where the file says "the";tml.rs:400narrates cause whilerecipient.rs:293/xtml.rs:246/dsml.rs:380name the incomplete state. → Rename, align the article, shorten the message (three assertions pin it:tml.rs:608,:622,tml_tests.rs:281). - Small trims. USER/TOOL/SYSTEM cases (
tml.rs:644-646) repeat:548-551;payload_refs(strict.rs:1566,:1586) exists only to feed oneformat!; four accept-only assertions in the snapshot test repeatgrammar.rs:1973-1978. - Prose and unrun checks. The title leads with
TmlOutputand stacks three changes, and the three commit bodies are subject-only (docs/design-review.md:137-147); the strict-TMLv0 Chat/Responses, streamed and truncation combinations fromdocs/TODO.txt:25-28are neither run nor listed. → Lead the title with the user-visible consequence, fill the commit bodies, run or list those combinations.
#8 [high] PR #457 — FINAL FULL REPORT (definitive, supersedes #3 + addendum #7)
FINAL REPORT — PR #457 "Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with TmlOutput"
Author brandonmmusic-max. Head aacbca1, +431/−7, 4 files, no docs touched: helios/src/grammar.rs (+81/−2), helios/src/grammar/strict.rs (+134/−2), helios/src/output/tml.rs (+91/−3), helios/src/server/request/tml_tests.rs (+125/−0). Only discussion comment is the case-file notice. Verified at head: tml.rs:78-83, :104, :207-209, :219, :250-258, :282-288, :335-338, :399-401; grammar.rs:354, :381-406; strict.rs:873-892, :1566-1620; tml_tests.rs:246-282, :393-478; docs/api.md:443-444, :530-545, :585-602, :621-625; docs/TODO.txt:25-28; generate_inkling2_fixtures.py:399-417.
BLOCKERS
None. The three production changes are small, in the correct layer, and each grammar change is a superset of the old language for tool-enabled TMLv0. The docs gap (S1) is required by AGENTS.md:225 and should land in this PR, but it is not a code blocker.
SHOULD FIX
S1 — docs/api.md states none of the three user-visible TMLv0 behaviour changes. [Architecture, Prose]
docs/api.md:585-602 is the strict-tool/TMLv0 contract and says nothing about an unnamed header (<|message_model|><|content_invoke_tool_json|>), nothing about a visible text preamble followed by tool calls, and nothing about the new EOS failure; search_code over docs/ for content_invoke_tool_json, unnamed, message_model, preamble finds no match. The nearest sentence, docs/api.md:443-444 ("recognized but incomplete calls at natural completion are errors"), does not describe the new condition.
→ Request: add one paragraph near :585-602 covering (a) unnamed vs named TMLv0 tool headers, (b) text preamble then tool calls, (c) a non-empty model header closed by <|end_message|>/<|content_model_end_sampling|> with no content-kind token and no answer now fails the turn at EOS (response.failed, HTTP 500 server_error), and update :443-444 to separate the two conditions.
→ Why: AGENTS.md:225 names docs/api.md for API behaviour changes; AGENTS.md:47-55 requires documents to state present behaviour, so this cannot be deferred to docs/TODO.txt. The same section already documents comparable failure modes (:535-536, :543-545, :621-625), so silence is an omission.
S2 — the EOS guard keys on the header shape, not on the defect's symptom, so adjacent shapes still complete silently. [Correctness]
HeaderWithoutContent is recorded only when a non-empty model header closes on <|end_message|>/<|content_model_end_sampling|> while answer == Empty (tml.rs:282-288), and Emitted is set only for non-empty bodies (emit returns at tml.rs:207-209; call_or_text returns at :335-337). Traced consequences, all still Ok with output=[reasoning], status: "completed":
[MODEL, "bash", TEXT, END]— header closes on TEXT,markeris neither END nor TURN_END so the condition never fires; empty visible body;answer == Emptyatfinish.[MODEL, JSON_CALL, END]— header closes on JSON_CALL withat == 0, soat > 0fails; empty call body.[MODEL, THINK, "plan", END, MODEL, "bash", TEXT, END]and…[MODEL, JSON_CALL, END]— the reasoning-only turn the PR is about, still silent once a content-kind token is present. tml.rs:652-653 shows the reasoning-only turn ending at TURN_END is deliberately stillOk, so the empty-answer frame is currently intentional but unstated. → Request: either widen the check to "a model frame was opened and no answer or call was emitted at EOS" (still excluding external terminations and empty headers), or state the boundary explicitly in the S1 paragraph and add the sequences above as tests that pin the intended outcome. → Why: the description claims the guard covers turns with "no visible text or tool call"; these sequences satisfy that reading yet remain silent, so the reader cannot tell an intentional boundary from a hole.
S3 — the strict grammar re-creates exactly the N-way alternation the description says it avoids, with no coverage at realistic tool counts. [Architecture, Correctness, Simplicity]
compile_content_headers factors the unnamed header through one schema whose name is {"enum": &envelope.tools} (grammar.rs:381-391), justified in the description as "avoiding N-way Earley ambiguity across large tool sets". compile_strict_tml instead emits tool_unnamed: <|content_invoke_tool_json|> (@payload_0 | … | @payload_k) <|end_message|> (strict.rs:1599-1603), one complete wrapper schema per active tool pushed at strict.rs:1581-1586. Largest new coverage is two tools (strict.rs:4618-4634; strict.rs:4134-4143); live strict evidence is one tool (get_weather); the 178-tool measurement is non-strict only. Size budgets (grammar.rs:22 MAX_GRAMMAR_BYTES = 262_144; admission max_lexer_states: 32_768) bound size, not ambiguity, and an over-limit grammar is rejected at admission rather than degraded.
→ Request: state in the PR and in one comment above strict.rs:1599 why the alternation is right for strict tools — embed_schema_in_tml_wrapper (strict.rs:873-892) folds the tool name into each payload as a const, so name and args cannot be split the way grammar.rs splits them — and add a compile/advance test at a representative tool count; or factor it as the sibling path does.
→ Why: two grammars that both claim to mirror TmlOutput now differ in construction with only half the stated rationale applied, and a many-tool "strict": true request is unmeasured. The comment also stops the next reader from "unifying" the rules and breaking one.
S4 — two of the three new ignored snapshot tests are one test, and none of them uses the generated reference fixture. [Conventions, Simplicity]
(a) inkling_stress_untyped_closed_header_must_surface_failure (tml_tests.rs:393-439) sends byte-identical tokens to a_model_frame_without_a_content_kind_reports_a_failed_response (tml_tests.rs:246-282) — same request, one bash tool, differing only by an explicit "tool_choice":"auto" that is already the default (:403) — and asserts a subset of the same events (the earlier test also asserts error.code == "server_error" at :280 and the per-push reasoning-only invariant at :273). Both are #[ignore]d, so the duplicate pays a second snapshot load for no extra signal.
(b) Neither goes through the reference path. The file's contract is that checkpoint tests compare Helios with tests/frontend/inkling2_tml.json, generated by tests/frontend/generate_inkling2_fixtures.py (tml_tests.rs:7-12), and that generator records {"error": …} when tml-renderers itself rejects a sequence (generate_inkling2_fixtures.py:399-417), which outputs_match_reference_parses (tml_tests.rs:286-299) already asserts against. The malformed-header case is hard-coded raw IDs instead, so nothing shows tml-renderers rejects the same suffix — while tml.rs:7-15 claims the parser matches it.
→ Request: delete inkling_stress_untyped_closed_header_must_surface_failure (fold the tool_choice: "auto" variant into the earlier test if it matters), add one output(...) case for the malformed terminal header to generate_inkling2_fixtures.py, regenerate the fixture, and assert both the Helios failure and case["reference_parse"]["error"] there. If the fixture cannot be regenerated here, say so under "Unrun Checks".
→ Why: AGENTS.md:189-194 asks for focused, meaningful validation; a test that cannot fail unless another fails is churn (AGENTS.md:183-188), and an inline ID list cannot establish the cross-implementation agreement the module doc claims.
S5 — the description's evidence is not reproducible from this branch. [Prose]
- Live GPU evidence is attributed to "
TML-d24-varloop-researchon RTX PRO 6000 Blackwell", butignition/recipes/inkling2/config.py:88-92rejectsis_varloop: true("Inkling 2 preparation requires a fixed loop pass count"),tests/recipes/test_inkling2_mini.py:87asserts that rejection, and the alias survives only in closed #468 (moved tolocal-inference-lab/hyperflare-recipes). - The snapshot command is
FLARE_INKLING2_TEST_SNAPSHOT=...although tml_tests.rs:9-12 states the required input (thinkingmachines/Inkling-2-Small at the fixture revision), and every one of these tests is#[ignore]d (tml_tests.rs:103, :161, :247, :285, :302, :351, :394, :442) so the separate "124 passed" run does not cover them. agentic_suite.py, cited for the round-trip suites, has no match anywhere in the repository and no path.- "124 passed" quotes module prefixes but the quoted
cargo testline has no filter; "5/5(4/5['reasoning','message','function_call'])" leaves the fifth preamble run unexplained. → Request: name the served core as a reviewer could obtain it (checkpoint repository + revision plus a recipe alias that exists here), or state plainly that it is external and not reproducible in this repository; give the full snapshot invocation with what the variable must point at and the--ignoredrequirement; giveagentic_suite.py's path or say it lives in the external recipes tree; state the filter behind 124; explain the 4/5. → Why: AGENTS.md:90-107 — scope and material limitations must be attached to a measured result, and reproduction commands must identify required inputs rather than placeholders.
S6 — the new default-path unit test compares the parser with itself. [Simplicity]
a_closed_untyped_header_allows_visible_content_and_completed_calls (tml.rs:626-639) computes expected = run(frame, valid, Eos) then asserts run(frame, &order.concat(), Eos) == expected. Both sides are the function under test, so a uniform behaviour change (the header starting to contribute content, or the answer-after-header order changing) keeps it green.
→ Request: assert literals as the neighbouring tests do (tml.rs:543-561): ("".into(), "done".into(), vec![]), ("".into(), String::new(), vec![("lookup".into(), "{}".into())]), ("".into(), "invalid JSON".into(), vec![]).
→ Why: this is the only default-path coverage of "an untyped header is inert", so it must state the contract rather than be self-consistent (AGENTS.md:189-194).
S7 — grammar and parser still disagree, in the opposite direction. [Correctness]
Both new endings require a <|message_model|> restart between a visible answer and a following tool call (grammar.rs:405; strict.rs:1616-1618), but TmlOutput opens State::Body { kind: Call, model: true } from a content_invoke_tool_json control token directly after <|end_message|> with no restart (tml.rs:250-258). So <|message_model|><|content_text|>hi<|end_message|><|content_invoke_tool_json|>{…}<|end_message|> parses as a call and is rejected by both grammars.
→ Request: accept the restart-less form, or state in the description and the S1 paragraph that the restart is required under a grammar.
→ Why: the PR's headline is alignment with TmlOutput; a residual divergence means a constrained request rejects a frame sequence the parser accepts — the same class of defect the PR fixes in the other direction. It only affects requests that set a grammar.
NITS
N1 — the wire-token splitter is copied a fourth time. The encode closure in strict_tml_grammar_allows_unnamed_headers_and_preamble_before_tools (strict.rs:4572-4588) is character-for-character the one in strict_tool_wire_grammars_enforce_constraints (strict.rs:4205-4221); the same scan sits at protocol/tests.rs:466-470 and as pieces() at protocol/tests.rs:2048-2066; the byte-tokenizer setup at strict.rs:4546-4551 repeats strict.rs:2814-2819. → Hoist one wire_tokens(controls, wire) helper beside byte_tokenizer_with (grammar.rs:936) and call all four. Why: a marker-rule change currently means editing several copies (AGENTS.md:183-188).
N2 — test names and #[ignore] wording. inkling_stress_untyped_closed_header_must_surface_failure (tml_tests.rs:395) and inkling_stress_custom_grammar_preamble_then_tool (:443) carry a stress label that names no property, while every other test in the file names the behaviour (:104, :162, :248, :286, :352); their #[ignore] messages read "with an Inkling 2 tokenizer" (:394, :442) where the rest reads "with the" (:103, :161, :247, :285, :302, :351). → Drop stress, align the article. Why: .agents/skills/repo-prose/SKILL.md forbids lifecycle/experiment labels as identities, and AGENTS.md:38-45 makes the skill mandatory for names.
N3 — the new error message narrates cause instead of naming the state. "TML model header closed without a content kind and the turn produced no answer or tool call" (tml.rs:399-401) versus the family: "unterminated recipient header" (recipient.rs:293), "incomplete XTML output envelope" (xtml.rs:246), "incomplete DeepSeek tool call at end of response" (dsml.rs:380). The string is client-visible via Encoder::failure (encode.rs:760). → Shorten to the family form, e.g. "incomplete TML model frame", updating the three assertions that pin the current wording (tml.rs:608, :622, tml_tests.rs:281).
N4 — small trims in the new tests. empty_model_headers_other_roles_and_external_stops_keep_their_termination re-asserts USER/TOOL/SYSTEM frames (tml.rs:644-646) already covered by the richer frame at tml.rs:548-551; payload_refs (strict.rs:1566, pushed :1586) exists only to feed one format! at :1602; inkling_stress_custom_grammar_preamble_then_tool repeats four accept-only assertions already in content_headers_grammar_allows_preamble_before_tools (grammar.rs:1973-1978). → Keep one of each pair; build tool_unnamed inside the existing loop.
N5 — prose in the PR itself. The title leads with an internal type name and stacks three changes ("Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with TmlOutput"); the three commit bodies are subject-only (76c50158, 9b2f2f6a, aacbca18) though docs/design-review.md:137-147 requires the four-part argument in the commit message too. → Lead the title with the user-visible consequence and fill the commit bodies before merge. Why: AGENTS.md:117-123 (explain a component's role before its shorthand) and docs/design-review.md:169-174.
N6 — the unrun list omits the strict-TMLv0 combinations this PR's changed endings govern. docs/TODO.txt:25-28 names them: strict: true on a TMLv0 core, Chat Completions and Responses, buffered and streamed, including max_tokens/max_output_tokens truncation. The PR changes single_call and non-single_call endings (strict.rs:1613-1619) and its live strict evidence is one tool on /v1/responses. → Run them, or list them as unrun with a pointer to docs/TODO.txt:25. Why: AGENTS.md:189-194 requires unrun checks to be identified, and docs/api.md:621-625 already promises truncation behaviour for a strict call.
Checked and clean (do not re-raise)
- Layer and scope:
AnswerStateis parser-internal (tml.rs:78-83, :104); no model name, recipe id, capability boolean or env switch; grammar selection stays keyed on the prepared parser kind. AGENTS.md:171-176 satisfied. compile_recipient's(answer | tools)(grammar.rs:354) serves the ATEM/recipient parser, so leaving it untouched is correct scope.- The new endings are supersets of the old language;
require_callandsingle_callcaps preserved (strict.rs:1606-1616, asserted at :4633-4634); named headers still reject mismatches; unregistered tools still rejected via theenumat grammar.rs:383 and the per-tool wrappers; duplicate@answerstill rejected (grammar.rs:1982). - Terminations:
Cancelled/ExecutionErrorreturn early (tml.rs:378-383, mirroring xtml.rs:236-241);OutputLimit/UserStopexcluded by thecause == Eosgate; empty model headers and non-model roles unchanged; the EOS error has the same shape as recipient.rs:289-294, xtml.rs:242-250, dsml.rs:379-381, tagged.rs:290-302. - Reach:
finish()is called only fromOutputPresentation::finish(server/output.rs:333) andabort(:358), so the newErrcannot strand a caller;self.finished = trueis set before the call, soabortwill not re-run the parser. - No serialization, checkpoint, recipe or on-disk format change; existing artifacts still load; the
response.failed/server_errorpath is the documented failure shape. call_or_textreordering (tml.rs:334-344) is behaviour-preserving apart from the newEmittedmarking;Emittedbeing unreachable was checked and withdrawn — the guard at :285 needs it.tool_unnamedin grammar.rs is reachable understart: /(?s:.+)/:compile_content_headersrenamesgrammars[0]toanswer(grammar.rs:379) and inserts its ownstart:rule at index 0 (:415), so the user's Lark is only the answer body. Withdrawn as a finding.- Node/byte budgets (
grammar.rs:22-24) bound grammar size, not ambiguity — used as context for S3, not as a finding of its own.
Open questions for maintainers
- Is an answer frame that opens and closes with no bytes legitimate TMLv0? Decides whether S2 is a fix or a documented boundary.
- What is the intended tool-count ceiling under
"strict": true? Decides whether S3 needs a bound, a measurement, or only a comment. - Is a tool frame with no
<|message_model|>restart after a visible answer legal? Decides S7. - Whether maintainers want the
docs/api.mdsentence in this PR or a follow-up — AGENTS.md:225 and the density of failure-mode documentation in the same section argue for this PR.
What could not be verified
Nothing was built or run in review; CI on aacbca1 reports no checks; the three Inkling 2 regressions are #[ignore]d behind FLARE_INKLING2_TEST_SNAPSHOT. Per-token cost of the strict alternation needs a benchmark or an admission test at scale. The claim that tml-renderers rejects the captured suffix is unverified — only a regenerated fixture answers it.
#9 [high] PR #457 — SUMMARY REPORT (post-ready, three sections, 10 bullets)
PR #457 — review summary
The fix is small, in the right layer, and every grammar change is a superset of the previous language. Full detail is in the case file.
Blockers
- None. The parser change and both grammar changes are parser-local, add no per-model branch, flag, or configuration switch, and weaken no guarantee in the named-tool path. The code is safe to merge once the Should Fix items below are addressed.
Should Fix
docs/api.mdstates none of the three behaviour changes. No mention of unnamed TMLv0 tool headers, a text preamble before tool calls, or the new EOS failure (docs/api.md:585-602,:443-444). → Add one paragraph to the TMLv0 strict-tool section; AGENTS.md:225 requires the API doc for API behaviour changes.- The EOS guard keys on the header shape, not on "no answer produced". An empty
<|content_text|>frame after the bad header, and an empty<|content_invoke_tool_json|>body, still complete withoutput=[reasoning](tml.rs:282-288,:207-209,:335-337). → Widen the check, or pin the boundary with two tests and a doc sentence. - The strict grammar re-creates the N-way alternation the description says it avoids.
strict.rs:1599-1603alternates over every per-tool wrapper schema whilegrammar.rs:381-391factors oneenum; the largest new coverage is two tools and the live evidence one. → Comment why theconst-named wrappers force this (strict.rs:873-892) and add a test at realistic tool counts — or factor it like the sibling path. - Two new ignored snapshot tests are really one, and neither uses the reference fixture.
tml_tests.rs:393-439replays the identical token stream as:246-282with strictly weaker assertions; both hard-code IDs instead of adding a case togenerate_inkling2_fixtures.py, which already records tml-renderers' own rejection (:399-417). The newtml.rs:626-639unit test comparesrun()againstrun(). → Delete the duplicate, assert literals in the unit test, regenerate the fixture with the error case. - Grammar and parser still disagree in the other direction. Both new endings require a
<|message_model|>restart before a tool call after text (grammar.rs:405,strict.rs:1616-1618);TmlOutputaccepts the call without one (tml.rs:250-258). → Accept it, or state the restart as required under a grammar.
Nits
- The evidence is not reproducible from this branch.
TML-d24-varloop-researchis rejected here (ignition/recipes/inkling2/config.py:88-92, closed #468),FLARE_INKLING2_TEST_SNAPSHOT=...is a placeholder althoughtml_tests.rs:9-12names the input,agentic_suite.pyhas no path, "124 passed" has no filter, and5/5vs4/5is unexplained. → Name the core obtainably, give the full snapshot command, the paths, the filter, and the 4/5 explanation. - Fourth copy of the test wire-token splitter.
strict.rs:4572-4588is character-for-character:4205-4221, with the same scan atprotocol/tests.rs:466-470and aspieces()at:2048-2066. → Onewire_tokenshelper besidebyte_tokenizer_with(grammar.rs:936). - Test names and the client-visible error.
inkling_stress_*(tml_tests.rs:395,:443) names no property, and both#[ignore]strings say "an Inkling 2 tokenizer" where the file says "the";tml.rs:400narrates cause whilerecipient.rs:293/xtml.rs:246/dsml.rs:380name the incomplete state. → Rename, align the article, shorten the message (three assertions pin it:tml.rs:608,:622,tml_tests.rs:281). - Small trims. USER/TOOL/SYSTEM cases (
tml.rs:644-646) repeat:548-551;payload_refs(strict.rs:1566,:1586) exists only to feed oneformat!; four accept-only assertions in the snapshot test repeatgrammar.rs:1973-1978. - Prose and unrun checks. The title leads with
TmlOutputand stacks three changes, and the three commit bodies are subject-only (docs/design-review.md:137-147); the strict-TMLv0 Chat/Responses, streamed and truncation combinations fromdocs/TODO.txt:25-28are neither run nor listed. → Lead the title with the user-visible consequence, fill the commit bodies, run or list those combinations.
#10 [high] Research summary
Review of PR #457 is complete. Both deliverables are on the scratchpad: the full report as entry #8 (with a traced addendum in #7) and the post-ready summary as entry #9.
Verdict: no code blockers. The three production changes are small, in the correct layer, parser-local, free of per-model branches/flags, and each grammar change is a superset of the old language for tool-enabled TMLv0.
Should Fix (7, collapsed to 5 bullets in the summary): (S1) docs/api.md states none of the three behaviour changes — no unnamed-header, preamble-then-tools, or EOS-failure text anywhere in docs/, against AGENTS.md:225 and :47-55. (S2) The EOS guard keys on header shape rather than "no answer produced"; I traced that [MODEL,"bash",TEXT,END], [MODEL,JSON_CALL,END] and the reasoning-then-typed-empty-body variants still return Ok, so the boundary needs widening or documenting. (S3) compile_strict_tml emits the N-way (@payload_0 | … ) alternation the description says it avoids, with max two-tool test coverage and one-tool live evidence. (S4) inkling_stress_untyped_closed_header_must_surface_failure replays the identical token stream as the earlier test with weaker assertions, and neither snapshot test goes through generate_inkling2_fixtures.py, which already records tml-renderers' own rejection; the new tml.rs:626-639 unit test compares run() to run(). (S5) The evidence is unreproducible here: TML-d24-varloop-research is rejected by ignition/recipes/inkling2/config.py:88-92, the snapshot command is a placeholder, agentic_suite.py (not opened) has no path, "124 passed" has no filter, and 5/5 vs 4/5 is unexplained. (S6, folded into the summary's S4 bullet) assert literals instead. (S7) Both endings still require a <|message_model|> restart before a call after text, which TmlOutput accepts without.
Nits (6, collapsed to 5): fourth copy of the wire-token splitter; stress test names plus "an/the Inkling 2 tokenizer"; the client-visible error narrates cause unlike its siblings; duplicated role-frame cases, single-use payload_refs, repeated accept assertions; title/commit-body prose and the unlisted strict-TMLv0 truncation checks from docs/TODO.txt:25-28.
Four open questions for maintainers (empty-answer frames legitimate?, strict tool-count ceiling, restart legality, whether the docs sentence belongs in this PR) are recorded in the full report, along with what could not be verified: nothing was built or run, CI on aacbca1 reports no checks, and the three Inkling 2 regressions sit behind FLARE_INKLING2_TEST_SNAPSHOT.
#11 [high] PR #457 — deliverables index and report front matter
Which notes are the deliverables
- FULL REPORT → entry #8 ("PR #457 — FINAL FULL REPORT (definitive…)"). It is the complete, deduplicated finding set: Blockers (none), Should Fix S1–S7 (each with finding / request / why), Nits N1–N6, "Checked and clean (do not re-raise)", open questions, and what could not be verified. Use it verbatim or near-verbatim as the full report.
- SUMMARY → entry #9 ("PR #457 — SUMMARY REPORT (post-ready, three sections, 10 bullets)"). This is the GitHub post: no blockers, 5 Should Fix bullets, 5 Nit bullets, each with a bold finding and a
→tldr. Paste it under the case-file link. - Entry #7 is the precision addendum to S2 (traced silent-completion cases) — already folded into #8; cite it only if the exact trace is needed.
- Superseded, do not use: #3 (earlier full report), #5 and #6 (earlier summaries; #6 in particular has no Blockers section). #1/#2 are the original overview notes, still accurate.
Front matter the report needs
- PR #457, title "Fail untyped TML model headers at EOS and align TMLv0 content-header and strict-tool grammars with
TmlOutput", author brandonmmusic-max (CONTRIBUTOR), branchtml-untyped-headers-and-content-grammar→main, headaacbca1(aacbca18206cd37d727e35f5ed49bdfa0c379a8e), base/mergeb9cac839, opened 2026-11-22, updated 2026-11-24. Size +431 −7 across 4 files:helios/src/grammar.rs(+81/−2),helios/src/grammar/strict.rs(+134/−2),helios/src/output/tml.rs(+91/−3),helios/src/server/request/tml_tests.rs(+125/−0). No documentation files touched. - Case file link (from the PR's only discussion comment, 2026-11-24, by
flare-autobot):https://autobot.eidonix.com/api/v1/cases/55324286-e803-428d-8c71-9250e0eda2d6.htmlwith intake reporthttps://autobot.eidonix.com/p/bb7bbb07-391b-43fd-a3b9-6d4daa1e5b3c.html. Put the case-file link above the summary so the post can reference it rather than restating evidence. - Related PRs cited by the PR itself: #304, #405, #418, #433 (all merged), #458 (open), #468 (closed — the
TML-d24-varloop-researchalias moved tolocal-inference-lab/hyperflare-recipes). #468 matters for S5: it is where the unbuildable checkpoint reference came from. - Only one discussion comment exists on the PR (the case-file notice). There are no reviews, no inline comments, and no contributor replies, so nothing in the thread needs answering and no finding is contested. State this in the report so the author knows the findings are first-pass.
#7 [medium] S2 precision — typed empty-body frames also stay Ok (traced)
Addendum to Should-Fix S2 (PR #457), verified by tracing TmlOutput::drain:
The silent-completion boundary is wider than "empty untyped header". Because emit returns at tml.rs:207-209 when visible == 0 and call_or_text returns at :335-337 when the body is empty, a typed frame with an empty body also leaves answer == Empty and therefore finish(Eos) == Ok:
[MODEL, "bash", TEXT, END]— traced: MODEL →Header{model:true}; header closes on TEXT withat = 4 > 0butmarkeris neitherENDnorTURN_END, so the condition attml.rs:282-288does not fire;Body{Text, model:true}with zero visible bytes →emitearly-returns;END→Frame. finish:answer == Empty, notHeaderWithoutContent→Ok.[MODEL, JSON_CALL, END]— header closes on JSON_CALL withat = 0, soat > 0fails; empty call body →call_or_text("")early-returns;Ok.
So the guard at tml.rs:399-401 fires only for the header-dropped shape the captured tokens show. Whether that is the intended contract is open question 1; either way it needs a stated boundary and tests, which is what S2 asks for.
Also verified for the report: helios/src/output/dsml.rs:380, helios/src/output/recipient.rs:293, helios/src/output/xtml.rs:246 are the sibling terminal-error strings used in Nit N3, and tests/frontend/generate_inkling2_fixtures.py:399-417 is where reference_parse records {"error": …} for the S4 fixture request.