Flaky: test_voice_note_is_transcribed_and_answered misses the sendVoice reply under load

オープン
#546 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@PruthviRajSolase がすでに取り組んでいます。

2026年11月2日 から。

  • #549 @PruthviRajSolase による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, testing-qa
領域
testing

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
718
フォーク
135
平均マージ
16時間 34分
マージ済み PR(30日)
215

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

existence-master/Sentient のほかの issue

existence-master/Sentient の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。