Commit Graph
34 Commits
Author SHA1 Message Date
dependabot[bot] f6c9e06f1b build(deps): bump denoland/deno from 2.9.4 to 2.9.6 (#93)
Bumps denoland/deno from 2.9.4 to 2.9.6.

---
updated-dependencies:
- dependency-name: denoland/deno
  dependency-version: 2.9.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-08 16:30:38 +03:00
dependabot[bot] 85df6f9dae build(deps): bump denoland/deno from 2.3.0 to 2.9.4 (#78)
Bumps denoland/deno from 2.3.0 to 2.9.4.

---
updated-dependencies:
- dependency-name: denoland/deno
  dependency-version: 2.9.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-26 16:34:12 +03:00
Mak5er 1988c3315b fix: harden YouTube media extraction 2026-07-20 01:50:23 +03:00
Mak5er ac682fdba6 fix: handle mounted youtube cookie permissions 2026-06-26 03:24:44 +03:00
Mak5er a259250200 chore: speed up Docker and CI dependency installs 2026-06-26 02:55:32 +03:00
Mak5er 62050a0f2c perf: comprehensive production audit and hardening (Phase 1-4)
43 files changed, 828 insertions, 408 deletions. Key changes:

== Phase 1 - Critical fixes ==
- Fix shared mutable state in ResilientDownloader (class-level _inflight_downloads)
- Add threading.Lock to request dedup (race condition on concurrent claims)
- Fix ban_middleware fail-closed: DB error -> fallback to 'active' instead of 'restricted'
- Fix COUNT(*) anti-pattern: 5 methods fetched entire user table into memory
- Remove 6 duplicated function definitions in user_messages.py (silent shadowing)
- Extract metadata from Cobalt responses (Instagram no longer discards descriptions)
- Add SSRF validation for COBALT_API_URL (private IP blocking, scheme enforcement)
- Docker: healthcheck, resource limits, restart: on-failure:5
- Fix migration crash-loop (try/except guardrails + dialect detection bug)

== Phase 2 - Performance hardening ==
- Exponential backoff+jitter in cobalt_client and retry_async_operation (removed 9 fixed delays)
- Add asyncio.wait_for timeouts to Instagram/Pinterest downloads
- TikTok preflight size check before download
- SQLAlchemy pool event listeners (perf metrics on checkout/overflow)
- DownloadedFile TTL cleanup (date_added index + daily cron cleanup)
- Per-request UUID request_id in ChatTrackerMiddleware for end-to-end tracing
- private_chat_guard caching (60s TTL, reduces Telegram API calls)
- Antiflood O(k) eviction instead of O(n) full scan
- TikTok: Semaphore(3)+sliding-window rate limiter instead of global asyncio.Lock

== Phase 3 - CI hardening ==
- CI: lint job (ruff + mypy), docker smoke tests migrations, --cov-fail-under=80
- Upgrade dependency-audit Python 3.12 -> 3.14
- Fix 7 '# type: ignore' decorators with ParamSpec
- Migration 000005: ix_analytics_events_user_id + ix_downloaded_files_date_added
- Race-condition tests for dedup, queue shutdown, per-user slots

== Phase 4 - Architecture ==
- .dockerignore (exclude .git, tests, __pycache__, .env from Docker image)
- Consolidate 3 FakeYoutubeDL/DummyYDL classes into conftest.py
- Extract _download_youtube_media() from 70-line closure
- BasePlatformMediaService ABC in services/platforms/__init__.py
- Remove empty profiling/ directory

Tests: 349 passed, 0 failed (4 skipped: PostgreSQL-dependent)
2026-06-16 01:01:06 +03:00
Mak5er 77c4cda0b8 Refactor logging paths and stabilize db tests 2026-04-10 00:42:21 +03:00
Mak5er ce110de0a8 fix: repair docker volume permissions on startup 2026-04-09 16:49:06 +03:00
Mak5er a115061ca8 Add CI test workflow and improve coverage 2026-04-06 13:59:27 +03:00
dependabot[bot] bfa8d881f6 Bump python from 3.10-slim to 3.14-slim
Bumps python from 3.10-slim to 3.14-slim.

---
updated-dependencies:
- dependency-name: python
  dependency-version: 3.14-slim
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 10:53:39 +00:00
Mak5er 8adca9f43d Refactor inline delivery, cleanup dependencies, and overhaul logging
What changed:

- unified inline media delivery across TikTok, Instagram, Pinterest, SoundCloud, YouTube, and Twitter around a single editable-message flow with chosen-inline auto start and callback fallback

- added reusable inline request state/services, service icons, album deep links, and single-message inline progress/edit helpers

- enabled inline support for regular YouTube videos, Twitter inline media, and Twitter multi-photo album deep links; aligned Pinterest/Instagram/TikTok inline behaviors

- cleaned dead duplicated inline code, extracted shared inline request guards, and expanded tests around TikTok, Pinterest, SoundCloud, and YouTube handlers

- optimized project setup with trimmed runtime requirements, requirements-dev split, .dockerignore, Docker/compose improvements, and README updates

- rebuilt logging with structured context-aware adapters, request scoped flow decorators, JSONL event/perf logs, queue/download/cobalt timing events, and safer extra field sanitization to avoid LogRecord key collisions
2026-03-13 00:18:29 +02:00
Mak5er bc0c276967 Update Dockerfile 2026-03-01 23:21:15 +02:00
Mak5er c1a3eafba4 Optimize pip installation with cache mount 2026-03-01 22:47:50 +02:00
Mak5er ffb9c7c58a Remove cache mount from pip install command 2026-03-01 21:56:48 +02:00
Mak5er b99edbe8ce Update Dockerfile 2026-03-01 21:46:17 +02:00
mak5er 246ce80096 Update Dockerfile to change Debian mirror and set pip mirror for installation 2025-12-25 18:12:43 +02:00
Mak5er 55bd0bf03e Add ChatTrackerMiddleware for user and chat tracking, update analytics event handling, and improve admin functionalities 2025-11-03 11:08:55 +02:00
Mak5er 7722dc542f Update Dockerfile to copy application code to the current directory and adjust env.py for proper module path handling 2025-11-02 21:58:26 +02:00
Mak5er b81ca1d13b Update Dockerfile to copy application code to /app directory 2025-11-02 21:55:46 +02:00
Mak5er 00181f53d0 Update Dockerfile 2025-07-17 11:50:00 +03:00
Mak5er baf960c5d9 Update Dockerfile and Python SDK version; refactor TikTok and YouTube video handling for async support 2025-04-22 21:02:28 +03:00
Mak5er fa057b8452 refactor Dockerfile to remove unnecessary package installations 2025-02-16 13:07:19 +02:00
Mak5er 48b5ae69bd Update Dockerfile 2024-07-29 16:30:28 +03:00
Mak5er 8e2c59368e Update Dockerfile 2024-07-29 14:51:17 +03:00
Mak5er d27bd4c25d Update Dockerfile 2024-07-29 14:48:49 +03:00
Mak5er f972a541aa Update Dockerfile 2024-07-29 13:33:48 +03:00
Mak5er 2ff93f430f Update Dockerfile 2024-07-29 13:15:15 +03:00
Mak5er fabd3f9a95 Update Dockerfile 2024-07-29 13:13:44 +03:00
Mak5er 3c0887d6be Update Dockerfile 2024-07-29 12:58:54 +03:00
Mak5er 09cb4c840d Update Dockerfile 2024-07-29 12:57:26 +03:00
Mak5er ed1c851f49 Update Dockerfile 2024-07-29 12:49:36 +03:00
Mak5er 8acbad9989 Update Dockerfile 2024-07-29 12:49:27 +03:00
Mak5er 56e5c43a31 Update Dockerfile 2024-07-21 14:58:26 +03:00
Mak5er dfc4dfb80a add docker 2024-06-21 17:24:00 +03:00