Skip to content

Flaky: test_voice_note_is_transcribed_and_answered misses the sendVoice reply under load #546

Open

Description

@itsskofficial

Test: tests/channels/test_telegram.py::test_voice_note_is_transcribed_and_answered

Where: a local full-suite run (Windows, pytest -n 8, worker gw2) while testing #542. It was not a CI run. The heavy dependency bumps don't look related: the test passed 3 times out of 3 when run alone in the same venv.

Error:

    voices = [kwargs for method, kwargs in sent if method == "sendVoice"]
>   assert len(voices) == 1
E   assert 0 == 1
tests\channels\test_telegram.py:385: AssertionError

Every assertion before it passed: the transcription, the "Heard:" echo, the model call and the text reply "It's sunny.". Only the voice reply was missing.

Likely cause: the spoken reply (voice_replies = True) is sent after the text reply, and the test asserts right after tg.say(...) returns. On a loaded machine the sendVoice call (synthesis or encoding of the reply audio) hadn't landed yet. A fix would wait for the sendVoice call with a bounded poll instead of asserting at once.

Activity

  1. added
    flakyA test that fails now and then without a code change
    on Nov 1, 2026
  2. PruthviRajSolase commented on Nov 2, 2026

    @PruthviRajSolase

    /assign

  3. github-actions commented on Nov 2, 2026

    @github-actions

    @PruthviRajSolase Assigned to you. Open a PR within a week or comment if you need more time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

flakyA test that fails now and then without a code change

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions