Commit 3e198e7
committed
fix(stats): withhold reversal-grounded accuracy where a reversal cannot be recorded
The fairness page showed 100% accuracy for every repository and all eight
weeks of the trend while the headline read 94.6%. Those 100%s are structural
zeros, not measurements.
`recordReversalSignals` has one call site, inside `handlePullRequestWebhookEvent`,
reached only via the `github-webhook` job — a member of
REVIEW_EXECUTION_JOB_TYPES, which a runtime that does not execute reviews
acks-and-drops. So `reversed` is pinned at 0 while merged/closed keep growing,
and `1 - 0/N` renders as a flawless score over a numerator that can never move.
The repo already recorded the outcome: reversal-superseded.ts notes "verified in
production: zero reversal events ever".
`accuracyPct` now returns null unless a reversal is OBSERVABLE on this
deployment — a recorded reversal proves it outright (and short-circuits the
probe), otherwise there must be at least one terminal auto-action in the
retained window for a reversal to attach to. This is the discipline the surface
already applies elsewhere, extended to the case where the numerator's WRITER,
not just its sample, is absent: a sparse rule's precision is null, and
gamingFlagsCaught is null below three instances.
Also fixes the weekly trend's denominator asymmetry: `merged`/`closed` folded in
registered-Orb rows while `reversed` stayed own-ledger-only, so the denominator
grew with every new install while the numerator did not — trending every week
toward 100% independent of real reversal behavior. #7449 fixed exactly this for
the lifetime figure and it was never carried across. Accuracy now divides the
own-ledger pairing; the displayed volume still includes the fleet.
UI: the withheld cells say why rather than leaving a bare em dash next to
healthy volume, and the headline now discloses `basis` — #9168 computes
"single_instance_self_report" precisely so one operator's self-reported number
is not read as fleet corroboration, and the page dropped the field entirely,
along with the sample size and confidence interval. The methodology note also
described the reversal formula while the headline rendered decisionAccuracy;
it now explains both and why they differ.
Refs #96761 parent 3200abc commit 3e198e7
6 files changed
Lines changed: 288 additions & 27 deletions
File tree
- apps/loopover-ui/src/components/site
- src
- review
- services
- test/unit
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
223 | 282 | | |
224 | 283 | | |
225 | 284 | | |
| |||
Lines changed: 47 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | 32 | | |
20 | 33 | | |
| |||
119 | 132 | | |
120 | 133 | | |
121 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
122 | 152 | | |
123 | 153 | | |
124 | 154 | | |
| |||
149 | 179 | | |
150 | 180 | | |
151 | 181 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
157 | 191 | | |
158 | 192 | | |
159 | 193 | | |
| |||
206 | 240 | | |
207 | 241 | | |
208 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
209 | 246 | | |
210 | 247 | | |
211 | 248 | | |
| |||
256 | 293 | | |
257 | 294 | | |
258 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
259 | 301 | | |
260 | 302 | | |
261 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
168 | 202 | | |
169 | 203 | | |
170 | 204 | | |
171 | 205 | | |
| 206 | + | |
172 | 207 | | |
| 208 | + | |
173 | 209 | | |
174 | 210 | | |
175 | 211 | | |
| |||
426 | 462 | | |
427 | 463 | | |
428 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
429 | 469 | | |
430 | 470 | | |
431 | 471 | | |
| |||
445 | 485 | | |
446 | 486 | | |
447 | 487 | | |
448 | | - | |
| 488 | + | |
449 | 489 | | |
450 | 490 | | |
451 | 491 | | |
| |||
573 | 613 | | |
574 | 614 | | |
575 | 615 | | |
576 | | - | |
| 616 | + | |
577 | 617 | | |
578 | 618 | | |
579 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | | - | |
37 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
39 | 50 | | |
40 | | - | |
41 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
42 | 58 | | |
43 | 59 | | |
44 | 60 | | |
45 | 61 | | |
46 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
47 | 68 | | |
48 | 69 | | |
49 | | - | |
| 70 | + | |
50 | 71 | | |
51 | 72 | | |
52 | 73 | | |
| |||
56 | 77 | | |
57 | 78 | | |
58 | 79 | | |
| 80 | + | |
| 81 | + | |
59 | 82 | | |
60 | 83 | | |
61 | 84 | | |
62 | 85 | | |
63 | 86 | | |
64 | | - | |
| 87 | + | |
65 | 88 | | |
66 | 89 | | |
67 | 90 | | |
| |||
169 | 192 | | |
170 | 193 | | |
171 | 194 | | |
172 | | - | |
| 195 | + | |
173 | 196 | | |
174 | 197 | | |
175 | 198 | | |
| 199 | + | |
176 | 200 | | |
177 | 201 | | |
178 | 202 | | |
179 | 203 | | |
180 | 204 | | |
181 | 205 | | |
182 | 206 | | |
| 207 | + | |
| 208 | + | |
183 | 209 | | |
184 | 210 | | |
185 | 211 | | |
186 | | - | |
| 212 | + | |
187 | 213 | | |
0 commit comments