from pathlib import Path from core.config import settings def service_scan_root() -> Path: configured = settings.SERVICE_SCAN_ROOT if configured: return Path(configured).expanduser() return Path.home()