feat(calibration): Pareto-floor comparator between two BacktestScoreReports - #8108
Conversation
|
Superagent did not 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 #8108 +/- ##
==========================================
- Coverage 92.01% 92.01% -0.01%
==========================================
Files 757 758 +1
Lines 77228 77240 +12
Branches 23346 23351 +5
==========================================
+ Hits 71061 71069 +8
Misses 5061 5061
- Partials 1106 1110 +4
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-22 23:01:06 UTC
Review summary Nits — 3 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
packages/loopover-engine/src/calibration/backtest-compare.tswithBacktestComparisonandcompareBacktestScores(baseline, candidate): the dual-axis no-regression comparator for a baseline-vs-candidate pair ofBacktestScoreReports (calibration: pure confusion-matrix scorer for a candidate rule classifier against the backtest corpus #8085) — a candidate rule change may not regress on ANY measured axis even while improving another; "trading one axis for the other" is a regression, not a net win.nullon either side is excluded from both lists (insufficient decided data is never treated as0or as "no change").verdictis"regressed"whenever even a single axis regressed — the Pareto-floor rule, deliberately NOT a weighted/averaged score — else"improved"when any axis improved, else"unchanged".ruleIds throw a plainErrornaming both rules — comparing scores for two different rules is a caller bug, not a valid comparison.packages/loopover-engine/src/index.tson its own line immediately after thebacktest-score.jsline, per the issue's deliverable.Closes #8086
Test plan
packages/loopover-engine/test/backtest-compare.test.ts(node:test, per the issue's deliverable): both axes improve →improvedwith emptyregressedAxes; the Pareto-floor case — one axis improves while the other regresses →regressed; null on either side excludes the axis from both lists; equal axes land in neither list →unchanged; mismatchedruleIdthrows naming both rulestest/unit/backtest-compare-engine.test.ts(vitest, importing the engine source): same cases plus the both-axes-regressed case — this is what exercises the.tsforcodecov/patch, since@loopover/engineimports resolve todistnpm run test --workspace @loopover/enginegreen;npm run typecheckgreen