fix(services): share one positive/negative/pending split across the recommendation aggregators - #9890
Conversation
…ecommendation aggregators
buildRecommendationOutcomeCalibration and qualityTotals both read
agent_recommendation_outcomes and expose positiveRate, but classified the
same states oppositely: the quality report counted stale/ignored as negative
and returned 0 on an empty ledger, so 5 accepted + 5 stale read as a 100%
success rate on the calibration signal and a 50% failure rate on the report.
Group the states once in outcome-calibration.ts as
RECOMMENDATION_{POSITIVE,NEGATIVE,PENDING}_STATES and import them into the
quality report. stale/ignored are now pending (dropped from the positiveRate
denominator and from failureCategories, added as a RecommendationQualityTotals.pending
count), and positiveRate is number | null, returning null on a zero denominator
to match the calibration module. Guard the operator-dashboard tile on the null.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-29 19:21:43 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
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 #9890 +/- ##
==========================================
+ Coverage 79.28% 79.36% +0.07%
==========================================
Files 281 284 +3
Lines 58516 58746 +230
Branches 6777 6856 +79
==========================================
+ Hits 46393 46621 +228
Misses 11840 11840
- Partials 283 285 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fix(services): share one positive/negative/pending split across the recommendation aggregators
buildRecommendationOutcomeCalibration and qualityTotals both read
agent_recommendation_outcomes and expose positiveRate, but classified the
same states oppositely: the quality report counted stale/ignored as negative
and returned 0 on an empty ledger, so 5 accepted + 5 stale read as a 100%
success rate on the calibration signal and a 50% failure rate on the report.
Group the states once in outcome-calibration.ts as
RECOMMENDATION_{POSITIVE,NEGATIVE,PENDING}_STATES and import them into the
quality report. stale/ignored are now pending (dropped from the positiveRate
denominator and from failureCategories, added as a RecommendationQualityTotals.pending
count), and positiveRate is number | null, returning null on a zero denominator
to match the calibration module. Guard the operator-dashboard tile on the null.
Closes #9701