mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 05:30:26 +08:00
* test(partners): telegram message parsing, chunking and typing contract suite Red-first coverage for deeptutor/partners/channels/telegram.py (coverage gap: 418 missing / 30.2%). 28 green tests pin current behavior; 2 red tests encode real defects for a fix card: 1. media-group straggler arriving while _flush_media_group dispatches is buffered but never flushed (message dropped, buffer leaks) 2. typing indicator for an ACL-denied sender runs forever No product code changed. Evidence in evidence/telegram-tests-20261003/. * fix(partners): stop telegram typing loop for denied senders and dropped media-group stragglers - start the typing indicator only for senders passing is_allowed: a denied sender never receives a reply, so the 4-second send_chat_action loop used to run until channel restart - release the media-group task slot before dispatching the buffered album, so a straggler item arriving mid-dispatch schedules its own follow-up flush instead of being silently dropped (and leaking its buffer); the finally guard only drops the task's own registration * test(partners): telegram suite lint polish; drop internal evidence dir - fix ruff F541 (redundant f-string) and apply ruff format - reword red-test docstrings: both defects are fixed on this branch - remove evidence/telegram-tests-20261003/ (internal tracking artifacts, kept on the v1 branch) so the tree matches upstream conventions --------- Co-authored-by: XZH <cto@xzh.ai>