You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(stats): bound the accuracy denominator to the window its numerator survives in
#9718 gated accuracy on whether a reversal is observable at all, and fixed the
weekly trend's Orb-folded denominator. It did not fix the third asymmetry in
#9676: `merged`/`closed` come from `github_app.pr_public_surface_published`,
the single retention-EXEMPT audit event type, so they are lifetime and never
shrink -- while `reversal_*` rows prune with the rest of audit_events at 90
days. Pairing an immortal denominator with a 90-day numerator makes
`1 - reversed/decided` drift toward 100% as the ledger ages, independent of
real reversal behavior.
Confirmed live after #9718 deployed: byProject still published 100% for all
three repos on 2377/602/508 reviewed with 0 reversals, because the reversal
signal IS observable on that deployment -- the gate passed and the ratio was
still meaningless.
The accuracy denominator is now a second, retention-windowed disposition query
that shares BOTH of the numerator's bounds: own-ledger only, and inside
audit_events' retention window. `reviewed`/`merged`/`closed` keep publishing
lifetime volume, which is measured and correct. That display-vs-denominator
split is the same shape #7449 established for the Orb fold and #9718 carried
into the weekly trend; the #7449 snapshot it supersedes is removed rather than
left dead, with its reasoning folded into the new comment.
Boundary case, stated rather than hidden: a PR published before the window but
reversed inside it contributes to the numerator and not the denominator.
accuracyPct's existing clamp already handles that (it is the same shape as the
reopened-auto-close case its comment describes), and the alternative -- an
unbounded denominator -- is the bug being fixed.
Refs #9676
0 commit comments