feat(engine): add the Pareto-floor comparator for backtest score reports - #8110
feat(engine): add the Pareto-floor comparator for backtest score reports#8110cleanjunc wants to merge 1 commit into
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 #8110 +/- ##
==========================================
- Coverage 92.01% 92.01% -0.01%
==========================================
Files 757 758 +1
Lines 77228 77240 +12
Branches 23346 23350 +4
==========================================
+ 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.
|
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-22 23:03:50 UTC
Review summary Nits — 3 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentDecision 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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR; No linked issue detected). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
Closes #8086.
Adds
packages/loopover-engine/src/calibration/backtest-compare.ts— the pure Pareto-floor comparator between twoBacktestScoreReports (#8085): a candidate rule change that regresses on ANY axis is"regressed", even while improving the other, so a fix can never be gamed by trading precision for recall or vice versa (the no-regression scoring METHOD the issue cites; nothing imported or copied from the external project).Spec-exact:
BacktestComparisontype andcompareBacktestScores(baseline, candidate)exactly as specified; throws on mismatchedruleIds with both IDs in the message.null⇒ the axis is excluded from both lists — insufficient decided data is never treated as0or as "no change"; strictly-less ⇒ regressed, strictly-greater ⇒ improved, equal ⇒ neither.verdictis"regressed"wheneverregressedAxes.length > 0— a regression on even a single axis wins regardless of the other axis (the Pareto-floor rule; no weighted/averaged score anywhere); else"improved"when anything improved, else"unchanged".backtest-score.jsexport inpackages/loopover-engine/src/index.ts, exactly where the issue specifies.Tests land in both suites —
packages/loopover-engine/test/backtest-compare.test.ts(the issue's mandated file: both-improve, the mixed improve/regress Pareto-floor case the issue marks non-optional, null-exclusion both directions, mismatched-ruleId throw with both IDs, all-equal unchanged) plustest/unit/backtest-compare.test.ts, the root-side vitest coverage twin importing the engine src directly (the pattern this module's own merged #8083 root test established: the engine'snode --testsuite runs againstdist/outside root vitest's coverage instrumentation, so the twin is what makes the new file's coverage visible tocodecov/patch).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 test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm 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:
npm run build --workspace @loopover/engine(green), the enginenode --teston the new file (6/6), root vitest on the coverage twin (5/5), andnpm run typecheck(0 errors, run on this exact module during pre-validation). Every conditional's both sides are exercised: null-exclusion per direction, less/greater/equal per axis, the mismatched-ruleId throw, and all three verdicts.actionlint/workers/mcp/ui/audit: untouched surfaces — one new pure engine file, one barrel line, two test files; zero dependency changes.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.The three unchecked Safety boxes are N/A: no auth/session/UI change — a pure, additive engine module plus tests.
UI Evidence
N/A — no UI change (pure engine module).
Notes