Flaky: test_voice_note_is_transcribed_and_answered misses the sendVoice reply under load

未关闭
#546 2 条评论 0 个 reaction 已指派 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 分钟
30 天内合并 PR
215

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

existence-master/Sentient 的其他 Issue

查看 existence-master/Sentient 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。