Shared human and JSON renderers for inbound operator results (D-49-04).
Cloned from Mailglass.Deliverability.Formatter (render_human/2 +
render_json/1), adapted to the locked D-49-05 finding shape
%{check, status, title, observed, remediation, evidence} (no :why_it_matters,
no :area). The summary line is "N pass, N warn, N fail", plus a trailing
", N cannot diagnose" only when the summary carries a non-zero
:cannot_diagnose count (WR-04 — a cannot-diagnose state is a distinct
disposition from a failed check, so it is no longer folded into the fail
tally). It also still drives the doctor's exit code (2).
render_json/1 emits ONE machine-parseable object
%{summary: %{pass, warn, fail}, findings: [...]} — never a bare list.
Summary
Functions
Render a doctor result as human-readable text: a summary line followed by every
finding ([status] title + observed/remediation), joined with blank lines. When
verbose?: true, findings carrying :evidence append a pretty-printed dump.
Render a doctor result as one JSON object %{summary, findings}.
Types
Functions
Render a doctor result as human-readable text: a summary line followed by every
finding ([status] title + observed/remediation), joined with blank lines. When
verbose?: true, findings carrying :evidence append a pretty-printed dump.
Render a doctor result as one JSON object %{summary, findings}.