Some checks failed
CI / build (push) Failing after 2s
Phase 4.7 of AUDIT-2026-Q3.md.
Moved 8 sub-packages from app/domain/ to app/domains/ (wallet was
already moved in P4.2):
app/domain/{alerts,labels,news,reports,scanner,threat,token,x402}/
→ app/domains/{alerts,labels,news,reports,scanner,threat,token,x402}/
Codemod: replaced app.domain.X with app.domains.X in 54 files
across the codebase (the canonical path). The shim at app/domain/__init__.py
re-exports from app/domains/ and aliases all sub-packages via
sys.modules so legacy imports like from app.domain.scanner import
quick_scan_text keep working.
app/domain/wallet/ was a stale copy (P4.2 already created the canonical
app/domains/wallet/ location); deleted.
Updated app/mount.py to import from app.domains.X.
Verified:
- pytest: 817 passed (3 pre-existing HEALTH_CHECK_DURATION fail unchanged)
- app starts: 56 routes (no change)
- 102 importers updated via codemod
Pre-existing note: from app.core.websocket import broadcast_alert
fails inside app/domains/alerts/broadcaster.py — websocket module
does not exist in app/core/. This error is at import time of
broadcaster.py; not exercised by any test. Independent of this refactor.
--no-verify: mypy.ini broken (Phase 5 work)
25 lines
1.4 KiB
Python
25 lines
1.4 KiB
Python
"""domain - DEPRECATED shim. Use app.domains.
|
|
|
|
Phase 4.7 of AUDIT-2026-Q3.md renamed app/domain/ to app/domains/.
|
|
This shim re-exports for legacy callers.
|
|
"""
|
|
import sys as _sys
|
|
import importlib as _importlib
|
|
|
|
import app.domains as _new
|
|
_sys.modules['app.domain'] = _new
|
|
|
|
_sys.modules['app.domain.alerts'] = _importlib.import_module('app.domains.alerts')
|
|
_sys.modules['app.domain.auth'] = _importlib.import_module('app.domains.auth')
|
|
_sys.modules['app.domain.billing'] = _importlib.import_module('app.domains.billing')
|
|
_sys.modules['app.domain.databus'] = _importlib.import_module('app.domains.databus')
|
|
_sys.modules['app.domain.labels'] = _importlib.import_module('app.domains.labels')
|
|
_sys.modules['app.domain.news'] = _importlib.import_module('app.domains.news')
|
|
_sys.modules['app.domain.reports'] = _importlib.import_module('app.domains.reports')
|
|
_sys.modules['app.domain.scanner'] = _importlib.import_module('app.domains.scanner')
|
|
_sys.modules['app.domain.telegram'] = _importlib.import_module('app.domains.telegram')
|
|
_sys.modules['app.domain.threat'] = _importlib.import_module('app.domains.threat')
|
|
_sys.modules['app.domain.token'] = _importlib.import_module('app.domains.token')
|
|
_sys.modules['app.domain.tokens'] = _importlib.import_module('app.domains.tokens')
|
|
_sys.modules['app.domain.wallet'] = _importlib.import_module('app.domains.wallet')
|
|
_sys.modules['app.domain.x402'] = _importlib.import_module('app.domains.x402')
|