Flaky: test_voice_note_is_transcribed_and_answered misses the sendVoice reply under load

Aperta
#546 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@PruthviRajSolase ci sta già lavorando.

Dal 2/11/2026.

  • #549 di @PruthviRajSolase — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, testing-qa
Ambito
testing

Direzione di ricerca

The failing assertion is assert len(voices) == 1 at line 385 of tests/channels/test_telegram.py, where voices is built from the sent list of recorded (method, kwargs) calls. Start by reading how tg.say(...) reaches the sendVoice path when voice_replies = True, and by running that test under parallel load (for example pytest -n 8) to reproduce. Done means the test waits a bounded time for the sendVoice call before asserting and passes repeatedly under load.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

flaky

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.

Lingua principale
Python
Stelle
716
Fork
132
Merge medio
16h 34m
PR unite (30g)
215

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di existence-master/Sentient

Tutte le issue di existence-master/Sentient

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.