feat(ui): confidence-calibration curve card on the analytics dashboard (#2192) - #4818
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4818 +/- ##
=======================================
Coverage 94.23% 94.23%
=======================================
Files 441 441
Lines 38793 38809 +16
Branches 14129 14131 +2
=======================================
+ Hits 36556 36572 +16
Misses 1577 1577
Partials 660 660
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 02:26:11 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
… before downgrading a label (#4818) (#4980) A pull_request_review/_comment/_thread webhook's embedded PR snapshot can predate an imminent merge by a few ms; if that pass then gets delayed behind other queued work long enough for the real merge (and the linked issue's consequent auto-close) to land first, isLinkedIssueTrustworthy saw a closed issue with a null prMergedAt and silently treated it as a confirmed negative, downgrading a correctly-propagated gittensor:feature/priority label to gittensor:bug. Resolve that one ambiguous case with a fresh live check of the PR's own merge state instead of trusting whichever webhook happened to trigger the pass. Closes #4975
#4987) pull_request_review/_comment/_thread events can never change a PR's title or its linked-issue list -- the only two inputs the type-label decision depends on -- yet each was still reaching the recompute with its own independently stale embedded PR snapshot, which is exactly the mechanism #4818 exploited. Exclude all three event families from the type-label block entirely rather than continuing to patch individually-discovered staleness paths; a genuine change is still caught by the next pull_request-native event or the sweep. Closes #4986




Summary
Adds a read-only Confidence calibration card to
/app/analyticsvisualizing predicted merge-confidence bands vs realized kept-rate fromcomputeCalibration, plus the recommended confidence floor. ExtendsCalibrationwith per-bin aggregates and surfaces the payload on the operator dashboard.Closes #2192, Part of #1967.
Changes
src/review/ops.tsCalibrationBin+buildCalibrationBins();binsonCalibrationsrc/services/operator-dashboard.tscalibrationviacomputeCalibrationapps/gittensory-ui/src/components/site/app-panels/calibration-card-model.tsapps/gittensory-ui/src/components/site/app-panels/calibration-card.tsxapps/gittensory-ui/src/routes/app.analytics.tsxcalibration-card.test.tsx,ops.test.ts,operator-dashboard.test.tsUI Evidence
Required before opening the PR — upload screenshots via GitHub drag-and-drop (do not commit images):
/app/analyticsTest plan
CalibrationCard— empty binsCalibrationCard— single populated binCalibrationCard— full multi-bin curve + recommended floorbuildCalibrationBins— empty / single / full-curve casescomputeCalibration— bins folded from merged + reverted samplescalibration.binsnpm run ui:test—calibration-card.test.tsx(8/8)npm run ui:typechecknpm run test:unit -- test/unit/ops.test.ts test/unit/operator-dashboard.test.ts(44/44)/app/analyticsvisual)Notes
visual(owner-led). Confirm eligibility before opening a contributor PR.BoundaryBadge boundary="private-api"— operator-only tuning signal.