Repository navigation
test(deepseek-web): pin the buffered streaming tool-call contract (#14628) - #14686
Merged
diegosouzapw merged 2 commits intoSep 24, 2026
Conversation
…egosouzapw#14628) Issue diegosouzapw#14628 reports that a streamed deepseek-web reply carrying DeepSeek's double-pipe DSML tool-call markup reached the client as visible content with finish_reason stop, so tool execution silently never happened. At the current tip the buffered tool path already routes the whole reply through parseDeepSeekToolCalls(), which understands the DSML grammar (the diegosouzapw#14208 lineage), so the defect as described is fixed - but nothing pins that contract, and the issue's v3.8.50 build shows how easily the streaming and non-streaming shapes drift apart. This suite drives DeepSeekWebExecutor.execute() end-to-end with a stubbed upstream (auth, session, PoW and completion all answered from a scripted fetch; the PoW challenge is a self-consistent difficulty-1 pair so the real solver answers nonce 0 in one hash) and asserts: - a double-pipe DSML block with two invokes streamed across two ANSWER fragments becomes two tool_calls deltas with finish_reason tool_calls, and no U+FF5C/DSML markup reaches the content deltas; - the tool-free streaming path still emits plain content and finish_reason stop. No production change: the suite exists to keep the contract from regressing the way it did between v3.8.50 and the diegosouzapw#14208 fix.
gonisulaimann
force-pushed
the
test/deepseek-web-streaming-dsml-contract
branch
from
September 23, 2026 20:02
61220ab to
d2ae0c2
Compare
Owner
|
This is a clean, well-scoped regression guard — thanks for tracing #14628 back to the #14208 |
The repo's ESLint config makes @typescript-eslint/no-explicit-any an error under tests/ (since diegosouzapw#6218), so the two `as any` casts turned the lint job red. Cast through the executor's own parameter type instead; behaviour is unchanged.
diegosouzapw
merged commit Sep 24, 2026
1a9b928
into
diegosouzapw:release/v3.8.51
9 of 16 checks passed
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.
Why
#14628 reports that a streamed
deepseek-webreply carrying DeepSeek's double-pipe DSML tool-call markup reached the client as visiblecontentwithfinish_reason: "stop"- the tool never executed and nothing in the stream hinted at failure.At the current tip the buffered tool path already routes the full reply through
parseDeepSeekToolCalls(), which understands the DSML grammar (the #14208 lineage), so the defect as described no longer reproduces. But nothing pins that contract, and the v3.8.50 build shows exactly how the streaming and non-streaming shapes drift apart.What
A new suite (
tests/unit/deepseek-web-streaming-dsml-14628.test.ts) drivesDeepSeekWebExecutor.execute()end-to-end with a stubbed upstream - auth, session, PoW and completion all answered from a scriptedfetch; the PoW challenge is a self-consistent difficulty-1 pair so the real solver answers nonce 0 in one hash - and asserts:tool_callsdeltas withfinish_reason: "tool_calls", and noU+FF5C/DSML markup reaches the content deltas;finish_reason: "stop".No production change: the suite exists to keep the contract from regressing the way it did between v3.8.50 and the #14208 fix.
Verification
deepseek-web-autorefresh-401-response,deepseek-web-auth-semantics,web-tools-translation,deepseek-pow-slot-leak-13094)Closes #14628 as verified-fixed-at-tip (with the regression guard the issue asked for).
release/v3.8.51tip; none touch this PR's scope. (PR #14693 fixes two of the stale-test failures; #14683 owns the cliproxy typecheck + env-doc pair.)