Skip to content

MAINT: Unify OpenAI realtime event routing - #2319

Merged
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-unify-realtime-event-routing
Aug 4, 2026
Merged

MAINT: Unify OpenAI realtime event routing#2319
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-unify-realtime-event-routing

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

OpenAI realtime atomic and streaming paths independently classified the same provider events and accumulated audio/transcript deltas, making alias handling prone to drift. This change introduces a private shared classifier/accumulator while deliberately keeping termination and state ownership in their existing paths.

Atomic receiving retains its soft-finish timing, first-event stale-response heuristic, failed-response validation, and connection-close fallback. Streaming retains per-turn futures, response-ID stale filtering, committed-audio callbacks, cancellation/truncation, and barge-in semantics. Public APIs and connection lifecycles are unchanged.

Tests and Documentation

Added focused regression coverage for provider aliases, lifecycle and unknown events, empty deltas, atomic timeout and connection-close behavior, stale response IDs, streaming state guards, missing payloads, commit callbacks, and pre-item cancellation.

  • 140 realtime target, dispatcher, streaming-session, and barge-in tests pass.
  • Shared event router and streaming dispatcher have 100% statement and branch coverage.
  • All 69 changed production lines have 100% differential coverage against origin/main.
  • Ruff, ty, pre-commit hooks, and git diff --check pass.

Documentation: N/A. This is an internal behavior-preserving refactor with no public API or usage changes.

JupyText: N/A. No documentation notebooks changed.

Copilot AI added 3 commits August 3, 2026 09:31
Centralize OpenAI realtime event aliases and response delta accumulation while keeping atomic soft-finish and streaming barge-in termination policies in their existing owners.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: be81055b-39ed-494c-94ca-c7656200a344
Pin shared event classification, provider aliases, atomic termination fallbacks, and streaming state guards with focused regression cases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: be81055b-39ed-494c-94ca-c7656200a344

@varunj-msft varunj-msft 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.

looks good!

@varunj-msft varunj-msft self-assigned this Aug 4, 2026
@romanlutz
romanlutz added this pull request to the merge queue Aug 4, 2026
Merged via the queue into microsoft:main with commit 53073e5 Aug 4, 2026
54 checks passed
@romanlutz
romanlutz deleted the romanlutz-unify-realtime-event-routing branch August 4, 2026 19:18
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