Backend: - metrics.decision_outcome_summary(conn, since_days=7): route_decisions count in 7d window + verifications kind='client_outcome' counts (total / succeeded / failed), parameterized like verdict_mix. - admin_snapshot exposes it as "decision_outcomes" (zeros on empty DB). Frontend (renderBoard Decisions tile): - One guarded local `dout` (|| defaults) so a stale tab without the snapshot key cannot throw and blank the board. - Headline = decisions in 7 days; qualifier "routed in 7 days". - Client-outcome line when client_reports > 0: "<n> client reports (P%): <ok> ok, <failed> failed" where P is guarded against decisions===0 (percent omitted, counts kept) and the failed count gets the warn colour when failed/reports > 0.10 (matching the Signal card's >10% threshold), guarded against client_reports===0. - "no client reports in 7 days" when client_reports===0. - The word "verified" no longer appears in the tile; renderLive keeps verdict_mix untouched. Tests: unit tests for the summary (window exclusions, client_outcome scoping, structural verdicts excluded), exhaustive snapshot key + zeros assertion, top-level key list, and static renderBoard/renderLive regex locks. Append-only.
7.2 KiB
7.2 KiB