Skip to content

test(deepseek-web): pin the buffered streaming tool-call contract (#14628) - #14686

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
gonisulaimann:test/deepseek-web-streaming-dsml-contract
Sep 24, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
gonisulaimann:test/deepseek-web-streaming-dsml-contract

Conversation

@gonisulaimann

@gonisulaimann gonisulaimann commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Why

#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" - 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) 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 (the multi-invoke shape from the issue), 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 with 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

check result
new suite 2/2 green on the release tip + this test
adjacent suites (deepseek-web-autorefresh-401-response, deepseek-web-auth-semantics, web-tools-translation, deepseek-pow-slot-leak-13094) 30/30

Closes #14628 as verified-fixed-at-tip (with the regression guard the issue asked for).


⚠️ base-red inherited: #14547 — the failing checks (API Route Typecheck, Docs Gates, Unit fast-path shards) also fail on release/v3.8.51 tip; none touch this PR's scope. (PR #14693 fixes two of the stale-test failures; #14683 owns the cliproxy typecheck + env-doc pair.)

…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
gonisulaimann force-pushed the test/deepseek-web-streaming-dsml-contract branch from 61220ab to d2ae0c2 Compare September 23, 2026 20:02
@diegosouzapw

Copy link
Copy Markdown
Owner

This is a clean, well-scoped regression guard — thanks for tracing #14628 back to the #14208
fix and pinning the contract instead of re-fixing something that's already resolved. Verified
locally: 2/2 pass against DeepSeekWebExecutor.execute() with a stubbed upstream, and the
double-pipe DSML → tool_calls / no-leak assertions both hold. Ready to merge.

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
diegosouzapw merged commit 1a9b928 into diegosouzapw:release/v3.8.51 Sep 24, 2026
9 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(providers): deepseek-web streaming tool calls leak as DSML text

2 participants