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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
//! The vocabulary every judge is written in.
//!
//! Before this module existed, each of these lived wherever it was first
//! needed and the others reached across for it: `doctor` reached into
//! `field` for `producer_of`, `expect` and `condition` reached into
//! `doctor` for `is_synthetic_marker` and the check ids, `retired` reached
//! into `cutover` for the new-plane prefix, and `doctor` reached into
//! `budget` for a cap. Each reach was individually reasonable and
//! collectively said that the judging layer had no shared vocabulary — only
//! a first-mover for every word in it.
//!
//! What belongs here: the things **more than one judge must agree about**.
//! A marker that decides whether traffic is real, the prefix that defines
//! "the new plane", the ceilings on how many offenders a report names. What
//! does not: the id vocabularies, which went to [`crate::report`] with #347
//! because they are serde-pinned wire shapes and that is where those live;
//! any check's own logic; and
//! any sentence written in one judge's voice — `cutover::scope_note` and
//! `retired::scope_note` stay where they are, because they are two different
//! O5 statements about two different windows, not one statement said twice.
use ;
use crateSliceSet;
use crate;
// The stable id vocabularies used to live here as two `[&str; N]`. They are
// `report::CheckId` and `report::RungId` now (#347) — serde-pinned wire
// shapes, so `CLAUDE.md`'s placement rule puts them under `report/`, with
// their stability tests beside them.
// ─── the caps ───────────────────────────────────────────────────────────────
//
// Three ceilings over three different populations. They are here because
// more than one judge uses each — not because they are one number: the
// values are three separate policies that today happen to be 20, 5 and 3,
// and a future change to one must not drag the others. The *mechanism*
// (count everything offered, keep the first `cap`) is
// [`Examples`](crate::model::examples::Examples)'s and always was.
/// How many offending keys a check names before it says "… and N more".
///
/// Shared by the doctor's per-check findings, `field`'s per-path ones,
/// `expect`'s violations and `cutover`'s leaked keys — four judges that had
/// four constants of the same value under two different names.
pub const FINDING_CAP: usize = 20;
/// How many evidence lines one `why` rung carries. Smaller than
/// [`FINDING_CAP`] on purpose: a rung's evidence is read as prose under the
/// answer, not scanned as a table.
pub const EVIDENCE_CAP: usize = 5;
/// How many example expansions a budget finding or cell carries — enough to
/// recognise the family member that exploded, without pasting the
/// population.
pub const EXPANSION_CAP: usize = 3;
// ─── the shared judgements ──────────────────────────────────────────────────
/// Does an attachment carry the RFC 09 §5.3 synthetic-traffic marker
/// (`{"synthetic": true, …}`, #162)?
///
/// Generated traffic judged as real would be a self-inflicted finding, so
/// every judge that watches a window counts it separately — the doctor's
/// listen phase (#161) and the watchdog's windows (#227) alike. One
/// spelling, because two would eventually disagree about what a rehearsal
/// looks like.
///
/// Gated with its callers: every judge that watches a window is
/// `decode`-gated, so without the feature this is dead code and says so.
pub
/// The producer name behind a key's facts — a service origin's slice is
/// found by the origin it serves (RFC 03 §1.5).
///
/// Used by `field` to attribute a path and by `doctor` to attribute a
/// finding, and the two must attribute identically or the same key gets two
/// producers in one report. Gated with them.
pub
/// The stated meaning of "the new plane": keys under `<base>/v1/`.
///
/// `cutover` asserts traffic on it; `retired` asserts a replacement under
/// it. Two judges, one definition — a second spelling would let a migration
/// pass one check and fail the other over the same bus.
/// The data-plane scopes a passive observation must watch: the three data
/// classes for host origins, plus each declared service origin's three —
/// `**` never crosses an `@` chunk (RFC 03 §4 D2), so the service planes
/// must be named to be seen. This is the O5 scope statement the doctor's
/// listen phase and the `--budget` observation share (#161, #221).