Repository navigation
Contain nested calls within legacy DSML envelopes - #684
Merged
Merged
Conversation
This was referenced Oct 11, 2026
Closed
Owner
|
Thank you, @akol1. This is careful work, and the tests pin every edge you listed. Your commit What we checked:
Two changes on our side, in commits after yours:
One idea for a follow-up, if you are interested. When the streamer meets a |
BobClawblaw
pushed a commit
to BobClawblaw/TensorFold
that referenced
this pull request
Oct 12, 2026
… move) stream_preflight_test.zig passed 600 lines once ashhart#684's tests met the candidate's thinking-budget tests; the five DSML tests and their three constants move unchanged, and the helpers they share (TestText, CallEngine, Seen.content, sendWith) become pub.
BobClawblaw
pushed a commit
to BobClawblaw/TensorFold
that referenced
this pull request
Oct 12, 2026
Closed
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
… move) stream_preflight_test.zig passed 600 lines once ashhart#684's tests met the candidate's thinking-budget tests; the five DSML tests and their three constants move unchanged, and the helpers they share (TestText, CallEngine, Seen.content, sendWith) become pub.
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
ashhart#684 landed above as 7684087fe (the author's commit, rebased onto this candidate). This keeps the PR's own head commit in the history, with no change to the tree.
Merged
7 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Fixes legacy
<|DSML|tool_calls>containment in whole parsing, final completion and streaming. Nested XML/JSON call-looking payloads remain arguments or unfinished text, never independent executable calls.<prose cannot swallow later valid calls.tool_stream_test.zigto keep production modules below 600 lines; their assertions are retained.Before / after
Clean upstream whole and SSE HTTP replies incorrectly promoted a complete nested
<tool_call>inside an unfinished DSML envelope intolookup({}). A valid outer envelope produced its literal q argument in whole replies but streamed the nested empty call instead.Freshly built scripted HTTP server now agrees in whole/SSE replies: incomplete outer produces zero calls; valid outer produces exactly one call with literal nested text. Mixed formats, malformed/unoffered middle envelopes, literal less-than prose and quota cases retain the exact expected calls and arguments. Review-discovered regressions were reproduced over HTTP, corrected and kept as consumer regression cases before publication.
Receipt
e7c523eb; candidate6c82f740. Apple M3 Ultra, macOS 26.6.2, Zig 0.17.0. Model-free scripted engine uses the real HTTP server; no checkpoint, MLX or PyTorch.zig build test test-golden -Dcpu=apple_m1 --summary all: 143/143 steps succeeded. Final run executed 272 checks, 0 failures, 0 new skips: 136 server checks each through Metal and CUDA-host roots. Unchanged targets were cached. The unchanged clean-base host run separately passed 1290 checks with 2 dependency skips; those are inherited, not claimed newly executed.parallel_tool_calls:falsecases, asserting call counts, order and exact argument values. Includes unfinished/valid/malformed outers, unfinished inner literals, adjacent formats in both orders, unoffered JSON/XML, empty/malformed closed XML and literal<prose.closeCall, whole/SSE consumers with incremental/batched delivery, release of preparing state and quota precedence.zig fmt --checkpassed. Lean checker: 534 inherited findings, exactly pinned baseline; zero added findings. Exit 1 is explicitly not a clean checker result. Source/test file limits are respected.Checklist