Repository navigation
fix(backend): correct stale socket-identity assertion in soniox failover test (#20691) - #20693
Merged
Merged
Conversation
… test #20671 changed _pump_replacement to always adopt the ReplayTailSocket wrapper on replacement legs (including empty-prefix ones), per its receiver.py comment: exposing the raw paced writer stalls receive/disconnect observation behind a buffered client burst. This one test in test_soniox_typed_rejections.py was not updated to match and has asserted receiver.stt_socket is the raw replacement socket ever since, failing deterministically on every main CI run. Fix mirrors the already-updated sibling assertions in test_stt_session_failover.py: assert isinstance(..., ReplayTailSocket) and check .connection for the underlying raw socket instead of identity on stt_socket itself.
kodjima33
deleted the
watchdog/issue-20691-soniox-replaytailsocket-test
branch
October 5, 2026 00:36
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.
What changed and why
tests/unit/test_soniox_typed_rejections.py::test_failover_on_a_typed_402_death_opens_the_selection_circuithas been failing deterministically on every
mainCI run since #20671merged (auto-filed tracker: #20691, "Backend unit shards result was
'failure'").
#20671 changed
ListenReceiver._pump_replacement(receiver.py) toalways adopt the
ReplayTailSocketwrapper on a replacement leg, evenfor an empty prefix — per its own comment, exposing the raw paced
writer there stalls receive/disconnect observation behind a buffered
client burst. This one pre-existing test was not updated to match and
kept asserting socket identity against the raw replacement.
Fix
Mirror the already-updated sibling assertions in
test_stt_session_failover.py: assertisinstance(receiver.stt_socket, ReplayTailSocket)and check.connectionfor the underlying raw socket, instead of identity onstt_socketitself.Test-only change, no production code touched.
What I tested
pytest tests/unit/test_soniox_typed_rejections.pystandalone (matcheshow CI shards run each file in its own process): 35 passed, including
the previously failing test.
origin/mainbefore this change,and is gone after.
(
test_stt_session_failover.py,test_live_recovery_matrix.py,test_live_recovery_canary_regressions.py,test_live_recovery_shutdown_tail.py,test_live_replay_provider_pairs.py,test_listen_speaker_id_failover.py,test_soniox_idle_close.py) —all pass individually. (Running them bundled into one pytest process
produces unrelated cross-file failures from shared-module state; this
repo's own CI runs each test file in its own process for exactly that
reason, so it doesn't apply here.)
🤖 automated by hourly watchdog — tested and merged