mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#555
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/482
Author: @catonooka
Created: 10/25/2026
Status: ❌ Closed
Base:
main← Head:fix/dsml-streamed-arg-closer-prefix📝 Commits (2)
6ddb89dDSML: inside a parameter value, only the complete closing tag is structuralfb2a9d1drop CI workflow from the PR branch (repo-scope token cannot push workflow changes; CI runs on upstream's tree anyway)📊 Changes
3 files changed (+78 additions, -44 deletions)
View changed files
➖
.github/workflows/tests.yml(+0 -39)📝
serve/frontend.py(+37 -5)📝
serve/test_ds41_conformance.py(+41 -0)📄 Description
The bug
The v1.1.26 fix for #403 (a long string argument streams as it is written) scans for
<inside a parameter value (DsmlRewriter.feed). But inside a value, only the complete closing tag is structural — the reference decoder reads until that exact token (parse_tool_callsinserve/ds41_encoding.py).When a string value ends with a partial closing tag — e.g. a file documenting DSML itself, whose last line is
</|DSML| para— the prefix glues onto the real closing tag: the opener scan matches, thenfind(">")lands inside the real closer, and the whole rest of the tool call (the real closing tag,</|DSML| invoke>, everything after) is emitted as argument data. The call's arguments are silently corrupted; nothing errors.Reproducer on v1.1.27 (char-by-char or whole feed, same result):
The fix
Inside
in_param,feednow looks only for the complete closing token and holds back a suffix that could still grow into it (the same hold the parser uses for tags split across deltas). Streaming behavior is unchanged: an 8k-char value still emits more than half its bytes before the closing tag (asserted by the new test). The closing-tag handling moved to a_close()helper; raw (string="false") values still arrive whole, as before.Tests
Three new cases in
serve/test_ds41_conformance.py:tool_callevent (index-compared against the event list — not just concat-and-compare, which is exactly how the buffering bug passed the original #403 test)string="false"values keep arriving wholeserve.test_ds41_conformance: 35/35 green. Full suite: the same 13 pre-existing test-isolation failures as stock main, nothing new.Found while serving DeepSeek-V4.1-Flash-1017 on a 2x RTX 3090 rig with a pi-ai client (the same streamIdleTimeoutMs=300000 class of failures as #403); our measurements from the original fix are in catonooka/maya-s24-turbo,
dsv41-3090/deepseek-campaign-1024/FIX-dsml-tool-args-stream.md.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.