Repository navigation
fix(msteams): prevent duplicate replies after streaming failures - #115669
Merged
Merged
Conversation
steipete
force-pushed
the
codex/s07-teams-91723-acknowledged-stream-prefix
branch
from
July 29, 2026 06:59
46d97cd to
8876cc3
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 30, 2026
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.
Fixes #91723
What Problem This Solves
Fixes an issue where Microsoft Teams users receiving a streamed reply longer than 4,000 characters would see the already delivered text a second time when Teams rejected a later streaming chunk.
Why This Change Was Made
Use the Microsoft Teams SDK's real provider-acknowledged
chunkevent as the only evidence that a cumulative text prefix was delivered. On a non-cancellation failure, deliver only the remaining text after that exact acknowledged prefix. Without a provider acknowledgement, preserve the existing full-reply fallback. Cancellation, later tool-round payloads, media, and the existing delivery-trace goldens retain their existing behavior.The change stays inside the Microsoft Teams plugin and adds no public SDK types, configuration, or changed fallback goldens.
User Impact
Long streamed Teams replies are delivered completely without duplicating text that Teams already acknowledged. Users who press Stop do not receive an unwanted fallback message, and unacknowledged failures still recover the complete reply.
Evidence
tbx_01kyp6smx6dv0a5q1csv97p7m3: exact final remote timing reportsexitCode=0for all 95 focused tests and the complete changed gate.@microsoft/teams.appsHttpStreamagainst a real loopback HTTP provider: a 4,000-character acknowledged chunk followed by a rejected 4,200-character chunk produces exactly the 200-character fallback; a first-write HTTP 403 produces no false acknowledgement; a real HTTP cancellation produces no fallback.tsgolanes, type-aware lint, formatting, plugin-boundary, public SDK, import-cycle, dependency, and all other changed-file guards pass.gpt-5.6-sol,xhigh: no actionable findings; confidence 0.93.