(self, summary: dict[str, Any], item: dict[str, Any])
| 507 | } |
| 508 | |
| 509 | def _accumulate_health_summary(self, summary: dict[str, Any], item: dict[str, Any]) -> None: |
| 510 | status_insights = item.get("statusInsights") or {} |
| 511 | reasons = status_insights.get("reasons") or [] |
| 512 | severity = status_insights.get("severity") |
| 513 | state = status_insights.get("state") |
| 514 | |
| 515 | if severity in {"danger", "warning"}: |
| 516 | summary["healthAttentionCount"] += 1 |
| 517 | if severity == "danger": |
| 518 | summary["healthDangerCount"] += 1 |
| 519 | if severity == "warning": |
| 520 | summary["healthWarningCount"] += 1 |
| 521 | if severity == "success": |
| 522 | summary["healthyCount"] += 1 |
| 523 | if state == "permanent": |
| 524 | summary["permanentCount"] += 1 |
| 525 | if "expires_soon" in reasons: |
| 526 | summary["expiringSoonCount"] += 1 |
| 527 | if "storage_metadata_incomplete" in reasons: |
| 528 | summary["storageIssueCount"] += 1 |
| 529 | if "never_retrieved" in reasons: |
| 530 | summary["neverRetrievedCount"] += 1 |
| 531 | |
| 532 | async def build_file_health_summary( |
| 533 | self, file_codes: list[FileCodes], now: Optional[datetime] = None |
no outgoing calls
no test coverage detected