1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// SPDX-License-Identifier: MIT
// Copyright 2026 Tom F. (https://github.com/tomtom215)
//! Whether a run judged anything at all, and what to say when it did not.
// `unreachable_pub` (rustc) and `redundant_pub_crate` (clippy nursery) make
// opposite demands about items in a binary crate's private modules; this
// follows the rustc lint and quiets the clippy one, per its known-problems note.
use MultiReport;
use Totals;
/// Refuses a run in which no requirement could be judged.
///
/// The parser deliberately accepts an empty document — it is well-formed JSON
/// Lines — and the engine then answers honestly: nothing was judged, so there
/// are no findings, so the verdict is `pass` and the exit code is `0`. Every
/// number in that report is true and the conclusion a CI job draws from it is
/// false, because the overwhelmingly likely cause is that the capture failed.
/// This project has been bitten by exactly that: the server tap keyed on a
/// session ID the `2026-07-28` revision had removed and dropped every exchange,
/// leaving "an empty trace directory, indistinguishable from a server nobody
/// talked to".
///
/// The condition is the honest one — zero clauses judged, rather than zero
/// bytes — so a recording carrying only a transport opening and closing is
/// caught too. It cannot fire on a real session: any message at all judges the
/// envelope clauses.
///
/// Two other ways to judge nothing are deliberately *not* this. A registry
/// naming checks the build lacks reports `unsupported` and already exits
/// non-zero with a report that says which; a registry of nothing but exclusions
/// has no judgeable clause for any trace to reach. Both are properties of the
/// registry, and blaming the recording for them would be a wrong diagnosis
/// dressed as a helpful one — so the trace is only accused when there were
/// judgeable clauses and every one of them reported *not observed*.
///
/// `EXIT_USAGE`, because asking for a verdict on a session that was never
/// recorded is a mistake in the asking. The library still answers for anyone
/// who genuinely wants the empty report.
/// Returns the diagnostic to print, or `None` when the run is judgeable.
///
/// Split from the printing so the decision and its wording are both reachable
/// from a unit test: routed only through the binary, every arm of the condition
/// and both halves of the sum survived mutation, because the corpus happens not
/// to contain a trace that separates them.
pub
pub
/// Every judged revision's totals summed.
///
/// Only for the "judged nothing at all" question, where the sum is the right
/// reading: one revision judging nothing is ordinary — a `2025-11-25` session
/// says little about `2026-07-28`'s clauses — while none of them judging
/// anything is a trace with no content. It is not a report anyone should read,
/// which is why it stays here rather than becoming a method on `MultiReport`.
pub