Objetivo
Section titled “Objetivo”- Detectar archivos runtime críticos (fan-in/fan-out/centralidad) y agregarlos por dominio (carpeta bajo
runtime/). - Correlacionar, de forma explicable y fail-safe, con señales runtime existentes (37A Health, 37B Correlation, SLO, guards, triage) sin mutar routing.
Propiedades
Section titled “Propiedades”- Read-only: no escribe en
runtime/state/*. - Bounded: número de archivos escaneados, edges, top_n y recomendaciones capados.
- Determinista: orden estable, thresholds fijos, sin heurísticas no acotadas.
Endpoints (Gateway :8008)
Section titled “Endpoints (Gateway :8008)”GET /runtime/critical-pathGET /runtime/critical-path?top_n=10GET /runtime/critical-path/summaryGET /runtime/critical-path/modules?top_n=10GET /runtime/critical-path/routesGET /runtime/critical-path/chokepointsGET /runtime/critical-path/blast-radiusGET /runtime/critical-path/dependencies?file=runtime/gateway/openai_gateway.pyGET /runtime/critical-path/recommendationsGET /runtime/critical-path/reset
Todos responden HTTP 200 (fail-safe) con status: ok|degraded.
Métricas
Section titled “Métricas”Expuestas en GET /metrics (sin cardinalidad dinámica):
ailab_critical_path_scoreailab_critical_path_top_modules_totalailab_critical_path_high_totalailab_critical_path_critical_totalailab_critical_path_unknowns_totalailab_critical_path_routes_critical_totalailab_critical_path_recommendations_total
- La granularidad primaria es file-level (paths
runtime/*.py). - La agregación secundaria es por dominio (carpeta inmediata bajo
runtime/).