lacuna.diagnostics
Installation diagnostics, the engine of `lacuna doctor`.
Generated from Lacuna 0.14.3. For what these do and when to use them, read the guide.
Classes
DiagnosticCheck
class DiagnosticCheck(
code: str,
state: DiagnosticState,
message: str,
evidence: Mapping[str, JsonValue] = {},
) One stable, actionable installation check.
| Field | Type | Default |
|---|---|---|
code | str | required |
state | DiagnosticState | required |
message | str | required |
evidence | Mapping[str, JsonValue] | {} |
DiagnosticCheck.to_dict
def to_dict() -> dict[str, object] Return a JSON-compatible check record.
InstallationDiagnostics
class InstallationDiagnostics(
checks: tuple[DiagnosticCheck, ...],
distribution_version: str | None,
native: NativeStatus,
configuration: Mapping[str, JsonValue],
dependencies: Mapping[str, JsonValue],
runtime: Mapping[str, JsonValue],
schema_version: str = '1',
diagnostic_version: int = 1,
) Versioned snapshot of an installed Lacuna runtime.
| Field | Type | Default |
|---|---|---|
checks | tuple[DiagnosticCheck, ...] | required |
distribution_version | str | None | required |
native | NativeStatus | required |
configuration | Mapping[str, JsonValue] | required |
dependencies | Mapping[str, JsonValue] | required |
runtime | Mapping[str, JsonValue] | required |
schema_version | str | '1' |
diagnostic_version | int | 1 |
InstallationDiagnostics.status
status: DiagnosticState Return the worst diagnostic state.
InstallationDiagnostics.healthy
healthy: bool Return whether no release-blocking diagnostic failed.
InstallationDiagnostics.to_dict
def to_dict() -> dict[str, object] Return a stable machine-readable payload while preserving legacy doctor fields.
InstallationDiagnostics.to_json
def to_json(*, indent: int | None = 2) -> str Serialize diagnostics with deterministic key ordering.
Functions
diagnose_installation
def diagnose_installation() -> InstallationDiagnostics Inspect the installed runtime without reading user data or activating plugins.
Enums
DiagnosticState
class DiagnosticState(StrEnum) Outcome of one operational diagnostic check.
| Member | Value |
|---|---|
PASS | 'PASS' |
WARN | 'WARN' |
FAIL | 'FAIL' |
Types and constants
DIAGNOSTIC_VERSION
DIAGNOSTIC_VERSION = 1