[Bug] Telegram album debounce exceeds the maximum wait
维护者通常 1 天内回复
评估
调研方向
从 TelegramPlatformAdapter.handle_media_group_message 开始,这里根据 telegram_media_group_timeout 和 telegram_media_group_max_wait 调度收集任务。检查同一相册有新更新到达时,替换任务的 run_date 是如何计算的。完成标准是:迟到的更新被调度到不晚于原始截止时间(若已超过截止时间则立即调度),并附带一个测试,在第 9 秒的合成更新之后读取已调度的 run_date。
由索引模型根据 Issue 内容生成。
描述
Bug description
Telegram media-group collection can schedule processing after the configured maximum wait. An album whose last part arrives shortly before the deadline is given a new full debounce delay.
Reproduction
- Use
telegram_media_group_timeout = 2.5andtelegram_media_group_max_wait = 10.0, the defaults. - Deliver an album update at elapsed time zero to
TelegramPlatformAdapter.handle_media_group_message. This schedules its collection job for 2.5 seconds. - On a busy event loop where that job has not run, deliver another update for the same album at elapsed time 9 seconds. Continuous updates in smaller gaps can also keep rescheduling the job until this point.
- Read the scheduled
run_dateof the replacement job.
Actual result
The new run time is 11.5 seconds after the first update, beyond the configured 10-second cap.
Expected result
The new run time is the earlier of the debounce time and the original deadline. An album received after its deadline should be scheduled for immediate processing.
Environment
AstrBot source at 23db1ad08064a8330a09077138ce8ecc05362219 on macOS, Python 3.12. Reproduced with synthetic Telegram updates and the actual adapter handler. No Telegram bot token or network call is needed.
- 主要语言
- Python
- 星标
- 46.4k
- 派生
- 3.4k
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 111
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AstrBotDevs/AstrBot 的其他 Issue
-
[Bug] Sending a Telegram message chain twice duplicates mentions可能已有人在做 @123XieC 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
AstrBotDevs/AstrBot#11125 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
AstrBotDevs/AstrBot#11038 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
AstrBotDevs/AstrBot#11034 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
AstrBotDevs/AstrBot#10999 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug] OpenAI-compatible Gemini 工具 schema const 导致 400可能已有人在做 @arccat-114 于 21 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 77/100
AstrBotDevs/AstrBot#10720 · 1 条评论 ·
维护者通常 1 天内回复
查看 AstrBotDevs/AstrBot 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"可能已有人在做 @0z5a 今天认领。 未关闭needs-triage
难度 2/5 半天 新手友好度 72/100
维护者通常 2 天内回复
-
plot_graph crashes when a mesh node has no m2m edge可能已有人在做 @tygvi 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
mllam/neural-lam#883 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
future-agi/future-agi#4092 · 1 条评论 ·
维护者通常 1 天内回复
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld whole未关闭
难度 1/5 1 小时以内 新手友好度 82/100
WingedGuardian/GENesis-AGI#4641 ·
维护者通常 1 天内回复