from __future__ import annotations from abc import ABC, abstractmethod from ..models import CheckResult class Check(ABC): """Base class for all HA diagnostic checks.""" name: str # unique slug used in /trigger/ and check_history @abstractmethod async def run(self) -> list[CheckResult]: """Execute the check and return results. Empty list means the check passed cleanly. Each CheckResult with event_type set causes an event to be emitted. The caller (runner in main.py) handles emission and history recording. """