"""路由装载注册表。 moldinsight/api/__init__.py 的 _safe_include 将装载结果登记于此, 由 /api/health 对外呈现——路由装载失败不再只是 WARNING 日志(此前 业务路由加载失败会被静默跳过,进程照常 healthy,功能残缺不可感知)。 本模块保持零依赖,供聚合入口与 health_router 双向引用而不产生循环导入。 """ from typing import Dict, List route_load_status: Dict[str, List[Dict[str, str]]] = { # 装载成功:{"label", "module"} "loaded": [], # 装载失败:{"label", "module", "error"}——存在条目时 /api/health 返回 degraded "failed": [], # 有意不注册(如 DEBUG 关闭时的调试路由):{"label", "module"} "disabled": [], }