Repository navigation
fix: report failed automatic deliveries - #4
Merged
AliZakaee merged 1 commit intoAug 7, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why this is meaningful
Automatic replies can exceed Telegram's single-message limit and be delivered in chunks. The send adapter already reports when a later chunk fails, but the auto-reply pipeline previously allowed that exception to reach a log-only wrapper. A customer could receive a truncated reply while the owner saw no alert. Complete send failures were similarly invisible outside logs. This change makes those system-level outcomes actionable without changing successful sends, approval mode, storage schemas, or public interfaces.
Validation
.venv/bin/pytest— passed, 276 tests.venv/bin/pytest tests/unit/handlers/test_business_updates.py -q— passed, 18 tests.venv/bin/pytest --cov=. --cov-report=term-missing --cov-report=xml --cov-report=html --junitxml=junit.xml— passed, 278 tests; 60% total coverage.venv/bin/python -m compileall -q config.py database.py handlers services telegram_api.py utils.py tests— passedgit diff --check— passedThe local Python 3.9 runtime emitted urllib3's existing LibreSSL compatibility warning; it did not affect the passing suite. Remote CI covers the supported Python 3.10, 3.11, and 3.12 matrix.
Risk and rollback
Risk is low: failure paths now send one additional owner alert, while the success path is unchanged. Roll back by reverting the feature commit.
Prepared with automated assistance by EQ for AliZakaee.