Commit bb5835b
committed
fix(stats): drop counterfactual-replay rows from the public per-rule precision
The public "Measured accuracy per rule" table published
`ai_consensus_defect` and `slop_gate_score` with byte-identical
decided=460 / confirmed=287 / precision=62.4%. That is not a coincidence:
`slop_gate_score`'s override rows are the same label set, copied.
#8277's slop backfill re-scores the deterministic slop signals over archived
diffs but takes each label verbatim from the `ai_consensus_defect` corpus's
human verdict on the same target (`manifestToSourceCases` in
backfill-slop-corpus.ts passes `backtestCase.label` straight through). That is
exactly what it was built to be — internal evidence for a flip-to-live
decision, and by its own module header a LOWER BOUND on live scoring — but the
public table describes itself as "precision of each automated rule over its
human-decided cases", and those were another rule's human-decided cases.
Corroborating that the rows cannot be live: `slop_gate_score` is in
GATE_SCORE_SIGNAL_CODES, which `recordImplicitTerminalConfirmations` excludes,
and `recordConfiguredGateBlockerOverrides` only ever writes `reversed` — so on
the live path the rule has no route to a `confirmed` verdict at all. A 62.4%
could only ever have come from replayed rows.
Excluded by provenance rather than by rule id, so the next cross-rule replay
inherits the same protection. `review_targets_decision_level` (#8083's own
backfill) is deliberately NOT excluded: its labels come from what happened to
the PRs that rule actually fired on, so they do support a precision claim for
it.
Refs #96761 parent 5ecb771 commit bb5835b
2 files changed
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
| |||
57 | 74 | | |
58 | 75 | | |
59 | 76 | | |
| 77 | + | |
60 | 78 | | |
61 | 79 | | |
62 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 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 | + | |
58 | 98 | | |
59 | 99 | | |
60 | 100 | | |
| |||
0 commit comments