Mak5er and Claude Fable 5
caffc343af
refactor: apply full-project audit — bug fixes, performance, deduplication
...
Full-codebase audit (149 raw findings, 57 verified and applied).
Fixes:
- download resume: recompute Range header per retry attempt; never resume
preallocated multipart .part files (silent media corruption)
- inline sends: canonical error tail (rate-limit/queue-busy/timeout/failure)
for all platforms; YouTube inline no longer strands tokens in
'processing' for 6h
- admin mailing: exclude banned users; fix Telegram error-text matching
- middlewares: instantiate once and share across message/callback/inline
so antiflood/ban state no longer fragments
- event loop: move ZIP compression, JSON state persistence, admin FS
walks, PIL/ffmpeg/ffprobe work off the loop
- download queue: prune idle per-user scopes; cancelled leader releases
joined duplicate requests
- worker subprocess: disable log sinks (stderr error protocol and log
rotation no longer race the parent)
- third-party loggers route through app handlers instead of lastResort
- tiktok: fix mojibake reaction emoji; per-user settings in doc callback;
per-URL locks for short-URL expansion; parallel photo-set downloads
- ci: fix broken yt-dlp auto-bump workflow baseline
- db: drop redundant analytics_events indexes (migration 000010)
Refactoring:
- services/inline/send_flow.py: shared inline delivery flow for all five
platforms (~640 duplicated lines removed)
- services/media/audio_flow.py: shared MP3 pipeline (was duplicated 6x
across youtube/youtube_inline/soundcloud/spotify)
- CobaltMediaService base + shared Cobalt response parsing
- services/platforms/ytdlp_helpers.py: shared yt-dlp scaffolding
- register_inline_send_handlers: one chosen_inline_result/callback
registration factory for 8 handlers
- merge pinterest/threads single-media and media-group flows
- logging decorator factory; remove ~11 dead repository methods
Tests: 470 -> 518 passing, coverage 77.3% -> 80.9% (CI gate 74%).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-26 16:25:59 +03:00
Mak5er
9fdc5681d7
fix: resolve 'Too many open files' leak & handle cosmetic chat action errors gracefully
2026-07-08 21:41:02 +03:00
Mak5er
bbb5af1643
fix(downloads): harden media download flows
2026-07-05 22:19:51 +03:00
Mak5er
86712315b3
feat: implement media handler architecture with support for multiple platforms and comprehensive test coverage
2026-07-01 00:45:28 +03:00
Mak5er
4ead6d0710
fix: handle business message dedupe safely
2026-06-26 02:55:32 +03:00
Mak5er
35b626dfc6
Embed bot avatar in audio uploads
2026-04-26 12:40:27 +03:00
Mak5er
77c4cda0b8
Refactor logging paths and stabilize db tests
2026-04-10 00:42:21 +03:00
Mak5er
f4d0f6ccd1
refactor: split handler utility modules
2026-04-09 00:15:38 +03:00
Mak5er
4b813cb1e5
security: sanitize user input in logs
2026-04-08 23:57:41 +03:00
Mak5er
1d4f8a7faa
refactor: share platform settings and progress helpers
2026-04-07 00:04:39 +03:00
Mak5er
3964d96158
Refactor database interactions and improve URL handling
...
- Updated user management in `admin.py` to use `get_all_users_info` and streamline user status updates.
- Refactored TikTok URL processing in `tiktok.py` to use asynchronous HTTP requests and caching.
- Enhanced Twitter handler in `twitter.py` to support async operations and improved error handling.
- Simplified user information updates in `user.py` with a new `upsert_chat` method.
- Optimized utility functions in `utils.py` for better performance and added caching for message edits.
- Updated middleware in `chat_tracker.py` to utilize the new `upsert_chat` method for user tracking.
- Improved test coverage for TikTok and Twitter handlers, ensuring async compatibility and error handling.
2026-03-14 13:43:56 +02:00
mak5er
943d14ccea
chore: refresh bot copy and keyboard flow
2026-02-16 00:39:27 +02:00
mak5er
83b425393c
feat: add adaptive download queue, retries, and session observability
2026-02-11 17:01:46 +02:00
Mak5er
dda200cc0c
Add full quality option to video info keyboard and include full_quality router
2025-12-15 23:58:07 +02:00