symfonic.diagnostics.result¶
result ¶
Result and report dataclasses for symfonic doctor (v7.16, item 5).
Pure data with zero runtime dependencies. Used by every check function
to communicate its findings to the runner, and by the runner to render
human-readable + --json output.
AuditReport
dataclass
¶
Aggregate of every :class:CheckResult produced by one run.
The runner builds this object after invoking every check function;
the CLI consumes it to render either human-readable text or
--json output.
counts ¶
Return per-severity counts plus ok (= no findings).
Source code in src/symfonic/diagnostics/result.py
exit_code ¶
Compute the CLI exit code.
Semantics (mypy-style):
- No findings, or only
INFO->0. WARNpresent,ERRORabsent ->0(or2ifstrict=True).ERRORpresent ->1.
Source code in src/symfonic/diagnostics/result.py
to_json_dict ¶
Serialise to the documented --json shape.
Source code in src/symfonic/diagnostics/result.py
worst_severity ¶
Return the highest severity present, or None if clean.
CheckResult
dataclass
¶
Single audit finding emitted by a check function.
Attributes¶
name:
Stable short identifier (e.g. "embedding_provider.stub").
Used in the JSON output and in human-readable headers.
severity:
:class:Severity of the finding.
message:
One-line human-readable summary. Rendered as the headline of
the human output line.
fix_hint:
Optional remediation hint. Rendered on the line after the
message, and surfaced in the JSON payload.