feat(orb): publish per-arm precision, coverage, and Wilson intervals with the fleet accuracy - #8839
Merged
Merged
Conversation
…with the fleet accuracy A bare accuracy scalar at unstated coverage is gameable -- because holds are (correctly) excluded from the denominator, raising the hold rate mechanically raises the published number -- and at small samples it is unverifiable: the interval around it is wider than the difference the tuning work is trying to demonstrate. Closes #8829. Part of epic #8828 (Phase 1 -- measurement precedes labels precedes mechanism). - analytics: InstanceMetrics carries the raw confusion counts (ratios cannot be pooled or intervalled); FleetAnalytics.fleet gains counts POOLED over eligible instances plus coverage = verdicts / (verdicts + holds), with policy actions outside both sides; wilsonInterval() as the one shared interval primitive -- Wilson, never Wald, which degenerates exactly where a gate metric lives - public-stats: fleetAccuracy publishes the per-arm split (a wrong merge costs more than a wrong close, so the arms must be separable), Wilson 95% intervals on all three proportions, coveragePct, and decidedCount -- the denominator a reader needs to judge the claim - UI: the hero hint names the coverage the figure was earned at; older backends omit the field and the tile degrades gracefully - openapi regenerated
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
1 similar comment
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 745fbf2 | Commit Preview URL Branch Preview URL |
Jul 26 2026, 10:48 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8839 +/- ##
==========================================
- Coverage 93.83% 92.29% -1.55%
==========================================
Files 800 800
Lines 79851 79879 +28
Branches 24203 24209 +6
==========================================
- Hits 74928 73723 -1205
- Misses 3558 5092 +1534
+ Partials 1365 1064 -301
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every published accuracy figure now carries its per-arm split, the coverage it was earned at, its Wilson 95% interval, and the sample size behind it. Closes #8829 (epic #8828, Phase 1 — the measurement layer everything later phases depend on).
Why
Two structural problems with the bare scalar, both flagged in the epic's research basis:
Per-arm separation matters because the cost structure is asymmetric — a wrong merge costs more than a wrong close — so
mergePrecisionandclosePrecisionmust be separately visible and separately CI'd ahead of the per-arm Neyman-Pearson thresholds (#8835).How
InstanceMetricsnow carries the raw confusion counts — ratios can be neither pooled across instances (Simpson) nor intervalled.fleet.pooledsums them over eligible instances withcoverage = verdicts / (verdicts + holds); policy actions (fix(orb): score enforcement closes as their own class, not quality mispredictions #8827) sit outside both sides.wilsonInterval()is the one shared, pure interval primitive, null on zero trials — no data must render as no claim.fleetAccuracygainsmergePrecisionPct/CiPct,closePrecisionPct/CiPct,accuracyCiPct,coveragePct,decidedCount. Pooled and median views coincide exactly with today's single registered instance.Verification