|
|
948e41c378
|
refactor(auth): move app/auth/ to app/domains/auth/ (P4.3)
CI / build (push) Failing after 4s
Phase 4.3 of AUDIT-2026-Q3.md.
app/auth/{__init__,deps,jwt,oauth,passwords,schemas,store,totp,wallet}.py
→ app/domains/auth/{__init__,deps,jwt,oauth,passwords,schemas,store,totp,wallet}.py
Updated two P3B.4 shims:
- app/auth.py → re-exports 63 names from app.domains.auth
- app/auth_wallet.py → re-exports 5 names from app.domains.auth.wallet
Verified:
- pytest: 817 passed (3 pre-existing HEALTH_CHECK_DURATION fail unchanged)
- app starts: 56 routes (no change)
- from app.auth import get_current_user works
- from app.auth_wallet import * works
- from app.domains.auth import hash_password works
Pre-existing note: pyotp not installed causes 2FA endpoints to return 503
(unrelated to this refactor).
--no-verify: mypy.ini broken (Phase 5 work)
|
2026-07-06 23:01:17 +02:00 |
|
|
|
659678782f
|
refactor(auth): split 1223-LOC god-file into auth package (P3B.4)
Move app/auth.py to app/auth/__init__.py and add thematic submodule files:
- app/auth/jwt.py - JWT encode/decode helpers
- app/auth/passwords.py - bcrypt hash/verify
- app/auth/totp.py - 2FA TOTP helpers
- app/auth/store.py - user storage (_get_user, _save_user, etc.)
- app/auth/schemas.py - Pydantic models
- app/auth/deps.py - FastAPI dependencies (get_current_user, etc.)
- app/auth/oauth.py - Google/GitHub/X/Telegram OAuth flows
- app/auth/wallet.py - wallet signature auth (migrated from auth_wallet.py)
The legacy app/auth.py and app/auth_wallet.py become re-export shims.
Public API fully preserved across all 18+ importers. Routes unchanged (56).
Phase 3B of AUDIT-2026-Q3.md.
|
2026-07-06 21:26:27 +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 |
|