fix: commit semantic repair changes

This commit is contained in:
2026-03-21 11:22:25 +03:00
parent 0900208c1a
commit abee05558f
272 changed files with 4603 additions and 1668 deletions

View File

@@ -34,7 +34,7 @@ class HealthService:
"""
@PURPOSE: Service for managing and querying dashboard health data.
"""
# [DEF:HealthService.__init__:Function]
# [DEF:HealthService_init:Function]
# @COMPLEXITY: 3
# @PURPOSE: Initialize health service with DB session and optional config access for dashboard metadata resolution.
# @PRE: db is a valid SQLAlchemy session.
@@ -43,9 +43,9 @@ class HealthService:
self.db = db
self.config_manager = config_manager
self._dashboard_meta_cache: Dict[Tuple[str, str], Dict[str, Optional[str]]] = {}
# [/DEF:HealthService.__init__:Function]
# [/DEF:HealthService_init:Function]
# [DEF:HealthService._prime_dashboard_meta_cache:Function]
# [DEF:_prime_dashboard_meta_cache:Function]
# @COMPLEXITY: 3
# @PURPOSE: Warm dashboard slug/title cache with one Superset list fetch per environment.
# @PRE: records may contain mixed numeric and slug dashboard identifiers.
@@ -124,9 +124,9 @@ class HealthService:
"slug": None,
"title": None,
}
# [/DEF:HealthService._prime_dashboard_meta_cache:Function]
# [/DEF:_prime_dashboard_meta_cache:Function]
# [DEF:HealthService._resolve_dashboard_meta:Function]
# [DEF:_resolve_dashboard_meta:Function]
# @COMPLEXITY: 1
# @PURPOSE: Resolve slug/title for a dashboard referenced by persisted validation record.
# @PRE: dashboard_id may be numeric or slug-like; environment_id may be empty.
@@ -151,9 +151,9 @@ class HealthService:
meta = {"slug": None, "title": None}
self._dashboard_meta_cache[cache_key] = meta
return meta
# [/DEF:HealthService._resolve_dashboard_meta:Function]
# [/DEF:_resolve_dashboard_meta:Function]
# [DEF:HealthService.get_health_summary:Function]
# [DEF:get_health_summary:Function]
# @COMPLEXITY: 3
# @PURPOSE: Aggregate latest validation status per dashboard and enrich rows with dashboard slug/title.
# @PRE: environment_id may be omitted to aggregate across all environments.
@@ -229,9 +229,9 @@ class HealthService:
fail_count=fail_count,
unknown_count=unknown_count
)
# [/DEF:HealthService.get_health_summary:Function]
# [/DEF:get_health_summary:Function]
# [DEF:HealthService.delete_validation_report:Function]
# [DEF:delete_validation_report:Function]
# @COMPLEXITY: 3
# @PURPOSE: Delete one persisted health report and optionally clean linked task/log artifacts.
# @PRE: record_id is a validation record identifier.
@@ -306,7 +306,7 @@ class HealthService:
)
return True
# [/DEF:HealthService.delete_validation_report:Function]
# [/DEF:delete_validation_report:Function]
# [/DEF:HealthService:Class]