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): measure accuracy over auto-actioned PRs, not every reviewed PR (#9793)
Live after both #9718 and #9768 deployed: byProject still published 100% for all
three repos, on 2377/602/508 reviewed PRs with zero reversals.
Neither earlier fix could have caught it. Both addressed the WINDOW the
denominator covers -- #9718 withheld the ratio where a reversal was unobservable,
#9768 bounded an immortal denominator to its numerator's retention -- and the
defect is WHICH PRs belong in it.
A reversal is by definition a human overturning an engine auto-action;
recordReversalSignals only records one against a PR the engine merged or closed.
The denominator was `github_app.pr_public_surface_published`: every PR that got a
review surface, including the many the engine only commented on, held, or
advised. None of those could produce a reversal, so each one pushes
1 - reversed/decided toward 100% for reasons unrelated to gate quality.
Both surfaces now divide by the distinct PRs this deployment auto-actioned in the
window -- same event types, same outcome filter, same dry-run exclusion that
loadReversalDayRows already applies when anchoring the numerator, so the two
halves of the ratio are finally drawn from one population. The weekly trend had
the same mismatch, masked only because its own-ledger series currently reports
null for recent weeks; fixing one and not the other would have left two
definitions of "decided" on one page.
Volume columns are untouched: reviewed/merged/closed keep publishing lifetime and
fleet-folded counts, which are measured and correct. Only the ratio's denominator
narrows.
#9718's observability probe is REMOVED rather than left beside the thing that
supersedes it. No auto-actions now means decided is 0 and the answer is null by
construction -- a structural guarantee, where the probe was a heuristic that
could disagree with the denominator sitting next to it.
Six fixtures were made faithful rather than the assertion relaxed: each modelled
a decided PR with no auto-action, which is not a reachable state. The clearest is
the revert-PR regression, which recorded a reversal_reverted with no
agent.action.merge -- a PR cannot be reverted unless the engine merged it.
Closes#9792
0 commit comments