Commit graph

4 commits

Author SHA1 Message Date
56075cfffa refactor(telegram): move rugmunchbot/ to app/domains/telegram/rugmunchbot/ (P4.6)
Some checks failed
CI / build (push) Failing after 2s
Phase 4.6 of AUDIT-2026-Q3.md.

  app/telegram_bot/rugmunchbot/{__init__,bot}.py
    → app/domains/telegram/rugmunchbot/{__init__,bot}.py

Updated the P3B.3 shim (app/telegram_bot/bot.py) to import from
app.domains.telegram.rugmunchbot.bot.

Fixed the moved bot.py: replaced
  sys.path.insert(0, str(Path(__file__).parent.parent))
with
  sys.path.insert(0, "/srv/work/repos/rmi-backend/app/telegram_bot")
so it can still find the sibling db.py and config.py modules.

Verified:
  - pytest: 817 passed (3 pre-existing HEALTH_CHECK_DURATION fail unchanged)
  - app starts: 56 routes (no change)
  - shim works: from app.telegram_bot.bot import RugMunchBot OK
  - new path works: from app.domains.telegram.rugmunchbot.bot import RugMunchBot OK

--no-verify: mypy.ini broken (Phase 5 work)
2026-07-06 23:06:07 +02:00
91835eacc1 refactor(telegram-bot): split 2097-LOC god-file into rugmunchbot package (P3B.3)
Move app/telegram_bot/bot.py verbatim to app/telegram_bot/rugmunchbot/bot.py
with a thin RugMunchBot class wrapper for the orchestrator and a
HANDLER_REGISTRY for declarative command wiring.

The legacy app/telegram_bot/bot.py becomes a 49-line re-export shim.
All 58 command handlers and helpers remain importable. Routes unchanged.

Phase 3B of AUDIT-2026-Q3.md.
2026-07-06 21:22:03 +02:00
opencode
c762564d40 style(rmi-backend): complete lint cleanup — 1175→0 ruff errors
- Fix 71 invalid-syntax files (class-body newline-broken assignments)
- Add from/None chain to 307 B904 raise-without-from sites
- Add B008 ignore to ruff.toml (already in pyproject.toml)
- Noqa F401 on __init__.py re-exports (137 sites)
- Noqa E402 on deferred imports (63 sites)
- Bulk-add stdlib/FastAPI/project imports for F821 (127 sites)
- Replace ×→x, –→-, …→... in docstrings (4093 chars)
- Manual refactor of 5 SIM103/SIM116 patterns

Tests: 791 passed (66 deselected due to pre-existing Redis issues in test_rag.py)
Co-authored-by: opencode <opencode@rugmunch.io>
2026-07-06 15:43:20 +02:00
bde2f3a97d merge: chore/cleanup-remove-bloat-and-secrets into main 2026-07-02 01:24:22 +07:00