[Bug] Telegram album debounce exceeds the maximum wait
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in TelegramPlatformAdapter.handle_media_group_message, where the collection job is scheduled from telegram_media_group_timeout and telegram_media_group_max_wait. Check how the replacement job's run_date is computed when a new update arrives for the same album. Done when a late update is scheduled no later than the original deadline (immediately if already past it), with a test that reads the scheduled run_date after a synthetic update at 9 seconds.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 46.4k
- Forks
- 3.4k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 111
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AstrBotDevs/AstrBot
-
[Bug] Sending a Telegram message chain twice duplicates mentionsPossibly taken @123XieC claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AstrBotDevs/AstrBot#11125 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AstrBotDevs/AstrBot#11038 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AstrBotDevs/AstrBot#11034 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AstrBotDevs/AstrBot#10999 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] OpenAI-compatible Gemini 工具 schema const 导致 400Possibly taken @arccat-114 claimed this 20 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
AstrBotDevs/AstrBot#10720 · 1 comment ·
Maintainers usually reply within 1 day
All issues in AstrBotDevs/AstrBot
Similar issues
-
plot_graph crashes when a mesh node has no m2m edgePossibly taken @tygvi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mllam/neural-lam#883 · 1 comment ·
Maintainers usually reply within 2 days
-
enhancement possible-duplicate
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/PictoPy#1715 · 2 comments ·
Maintainers usually reply within 6 days
-
SQLite connector omits generated columns from the catalog, and drops relationships sourced on themOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA/auto-ontology#511 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ethereum/execution-specs#3996 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cpp-best-practices/project_validator#267 ·
Maintainers usually reply within 1 day