fix(miner): resolve prediction correct/incorrect in metrics CLI#8510
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8510 +/- ##
==========================================
+ Coverage 81.11% 89.61% +8.50%
==========================================
Files 791 99 -692
Lines 79348 22777 -56571
Branches 23970 3899 -20071
==========================================
- Hits 64364 20412 -43952
+ Misses 12171 2187 -9984
+ Partials 2813 178 -2635
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 17:27:25 UTC
Review summary Nits — 4 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.
|
Summary
buildOutcomeDecisionMapandresolvePredictionCorrectnessfromcalibration.ts(same join rules asbuildCalibrationReport; no second implementation).collectPredictionMetricRowsnow pairs each prediction-ledger row with realizedpr_outcomeevents viatoPredictionRecords/toOutcomeRecordsand setscorrect: true | false | undefined.runMetricsopens the event ledger (read-only, closed infinally) the same way barecalibrationdoes, then passes resolved rows torenderMinerPredictionMetrics.holdand pending predictions leavecorrectunset; only directional merge/close predictions with a realized merge/close outcome are scored.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run build:minernpx vitest run test/unit/miner-metrics-cli.test.ts test/unit/miner-calibration.test.ts— 20 passednpm run build:miner && npx vitest run --changed=origin/main --coverage.all=false --coverage— 100% changed lines/branches oncalibration.ts+metrics-cli.tsnpm run test:coverage(full unsharded gate)npm run test:cinpm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
packages/loopover-miner/lib/**). Compiledlib/*.jsis gitignored and rebuilt by CI viabuild:miner. Tests import.tssources via variable specifiers (same pattern asminer-replay-snapshot.test.ts) socodecov/patchgrades the.tspaths under--coverage.all=false.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.