cadrumo.application.diagnostic_models module¶
Typed contracts shared by application diagnostic report producers.
The reports in this module remain independent from the diagnostic probes that populate them. Their forward references are rebuilt only when a repair probe needs the heavy storage and wizard-status types, preserving the import-light version surface.
- class DiagnosticStatus(*values)[source]¶
Bases:
StrEnumHow a single diagnostic check came out.
Ordered by severity in meaning though not by declaration: an overall status is the worst member any check reported.
- OK¶
The check passed and needs no attention.
- WARN¶
The check found something worth reporting that does not block the operation.
- FAIL¶
The check found a condition that blocks the operation it guards.
- DiagnosticStatusValue¶
The same vocabulary for a strict model field or CLI payload surface.
A bare enum under strict validation refuses the plain token a serialised report carries, so those fields take this literal over the members above.
- class CliVersionReport(**data)[source]¶
Bases:
BaseModelVersion payload rendered by root CLI version surfaces.
- Parameters:
data (Any)
- package_name: str¶
- package_version: str¶
- class DiagnosticAudience(*values)[source]¶
Bases:
StrEnumWho a diagnostic check is written for.
Not a severity and not a filter on severity: an internal check can be healthy and an operator check can fail. It says who can act on the result.
- OPERATOR¶
Written for the person running the command, in terms they can act on.
- INTERNAL¶
Written for whoever maintains the installation, not for the operator.
- DiagnosticAudienceValue¶
The same vocabulary for a strict model field or CLI payload surface.
- class DiagnosticFinding(**data)[source]¶
Bases:
BaseModelOne concrete, named sub-finding inside a
DiagnosticCheck.- Parameters:
data (Any)
- summary: str¶
- detail: str | None¶
- requirement: RequirementValue | None¶
- class DiagnosticCheck(**data)[source]¶
Bases:
BaseModelOne concrete config repair check with an unambiguous recovery outcome.
- Parameters:
data (Any)
- name: str¶
- status: DiagnosticStatusValue¶
- summary: str¶
- detail: str | None¶
- precondition_verdict: PreconditionVerdict | None¶
- audience: DiagnosticAudienceValue¶
- findings: tuple[DiagnosticFinding, ...]¶
- diagnostic_action_verdict(*, condition_id, evidence_id, values, action_id, argument_bindings=(), missing_argument_names=())[source]¶
Build one diagnostics-owned actionable failed-condition verdict.
- diagnostic_no_recovery_verdict(*, condition_id, evidence_id, values, outcome)[source]¶
Build one explicit diagnostics-owned closed recovery outcome.
- Return type:
- Parameters:
- resolved_verdict_binding(argument_name, value)[source]¶
Bind a concrete diagnostics fact to one catalogue argument.
- Return type:
- Parameters:
- missing_verdict_binding(argument_name)[source]¶
Declare one catalogue argument diagnostics cannot honestly supply.
- Return type:
- Parameters:
argument_name (str)
- class SecureObjectIntegrityReport(**data)[source]¶
Bases:
BaseModelAggregated decryptability counts across every populated namespace.
- Parameters:
namespaces (tuple[DiagnosticSecureObjectNamespace, ...])
readable_total (int)
unreadable_total (int)
- namespaces: tuple[DiagnosticSecureObjectNamespace, ...]¶
- readable_total: int¶
- unreadable_total: int¶
- class ConfigRepairReport(**data)[source]¶
Bases:
BaseModelComposite report rendered by the bare
aeat config repaircommand.- Parameters:
overall (Literal[DiagnosticStatus.OK, DiagnosticStatus.WARN, DiagnosticStatus.FAIL])
package_name (str)
package_version (str)
python_version (str)
log_file (str)
setup (WizardStatusReport | None)
secure_objects (SecureObjectIntegrityReport)
checks (tuple[DiagnosticCheck, ...])
- overall: DiagnosticStatusValue¶
- package_name: str¶
- package_version: str¶
- python_version: str¶
- log_file: str¶
- setup: WizardStatusReport | None¶
- secure_objects: SecureObjectIntegrityReport¶
- checks: tuple[DiagnosticCheck, ...]¶