Skip to content

Add Directory.Build.props, apply CPM, use NB.GitVersioning, update package publishing#2

Merged
eiriktsarpalis merged 1 commit intomainfrom
update-infra
Mar 19, 2025
Merged

Add Directory.Build.props, apply CPM, use NB.GitVersioning, update package publishing#2
eiriktsarpalis merged 1 commit intomainfrom
update-infra

Conversation

@eiriktsarpalis
Copy link
Member

No description provided.

@eiriktsarpalis eiriktsarpalis requested review from halter73 and stephentoub and removed request for stephentoub March 19, 2025 15:40
@eiriktsarpalis eiriktsarpalis merged commit a1b2803 into main Mar 19, 2025
4 of 6 checks passed
@eiriktsarpalis eiriktsarpalis deleted the update-infra branch March 19, 2025 15:46
Copilot AI added a commit that referenced this pull request Feb 24, 2026
…rives via background channel

The sse-retry conformance test hangs intermittently because of a race between
the background GET SSE stream and the tools/call POST request at the conformance
server. When the background GET arrives at the server AFTER the tools/call POST
(due to CI scheduling delays), the server sends the tool response on the
background GET stream instead of the foreground retry GET. The foreground retry
GET then blocks forever waiting for data that never comes.

This happens because the server's handleGetSSEStream checks pendingToolCallId
and sends the tool response to whichever GET request is being handled at that
moment. If background GET #1 is delayed and arrives after tools/call sets
pendingToolCallId, it receives the response. The foreground retry GET #2 then
arrives and finds pendingToolCallId=null, so it gets no response.

Fix by creating a linked CancellationTokenSource in SendRequestAsync that
cancels when the response TCS is completed (from any channel). This interrupts
the blocked foreground transport send, allowing SendRequestAsync to proceed
to the TCS await where the response is already available.

The disposal timeout in transport DisposeAsync is kept as defense-in-depth
for cases where the background GET stream doesn't respond promptly to
cancellation during shutdown.

Co-authored-by: stephentoub <[email protected]>
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.

1 participant