Skip to content

MAINT: Bound WebSocket initialization receive time - #3239

Merged
Roman Lutz (romanlutz) merged 8 commits into
microsoft:mainfrom
Yudeeswaran:p311-09-websocket-initialization-timeout
Oct 16, 2026
Merged

Roman Lutz (romanlutz) merged 8 commits into
microsoft:mainfrom
Yudeeswaran:p311-09-websocket-initialization-timeout

Conversation

@Yudeeswaran

@Yudeeswaran Aizen__28 (Yudeeswaran) commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Give WebSocket initialization one overall timeout budget across all discarded initial messages using asyncio.timeout.
  • Keep initialization receiving on its own budget, separate from normal response receiving and conversation restoration.
  • Document the timeout behavior for response_timeout_seconds.
  • Add regression coverage showing that individually timely receives still time out when their combined duration exceeds the initialization budget.
  • Add cancellation coverage confirming cancellation propagates and the uninitialized connection is closed.

Issue and claim

Validation

  • Focused test module: 37 passed.
  • Ruff check passed for both changed files.
  • git diff --check passed.

@hannahwestra25 hannahwestra25 self-assigned this Oct 15, 2026
Use a controlled clock to verify the shared receive deadline without wall-clock timing flakes, and fix the cancellation helper return type.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a425452c-c9cd-4304-ad54-a571e79a0488

@romanlutz Roman Lutz (romanlutz) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the shared initialization receive deadline and the updated regression coverage. Both review issues are fixed: the cancellation helper satisfies its return type, and the shared-budget test uses a controlled clock while still rejecting the old per-message timeout behavior. Latest main is merged. Focused tests (37), changed-file type checking, Ruff, formatting, and commit hooks pass.

@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 16, 2026
@hannahwestra25
hannahwestra25 added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 16, 2026
Merged via the queue into microsoft:main with commit fd0220d Oct 16, 2026
64 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.

3 participants