feat(miner): add calibration backtest-eligibility for ContributionProfile replay - #8571
Closed
andriypolanski wants to merge 2 commits into
Closed
feat(miner): add calibration backtest-eligibility for ContributionProfile replay#8571andriypolanski wants to merge 2 commits into
andriypolanski wants to merge 2 commits into
Conversation
Contributor
|
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 #8571 +/- ##
==========================================
- Coverage 89.58% 89.47% -0.11%
==========================================
Files 97 100 +3
Lines 22706 23113 +407
Branches 3872 4017 +145
==========================================
+ Hits 20341 20681 +340
- Misses 2187 2224 +37
- Partials 178 208 +30
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Contributor
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 LoopOver is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
andriypolanski
force-pushed
the
fix/8545-eligibility-backtest
branch
from
July 24, 2026 21:40
dc1f69f to
381c59e
Compare
Contributor
|
This repository reviews pull requests one-shot: the PR must be correct as originally opened. Pushing an additional commit closes it automatically instead of restarting review — open a fresh pull request with every fix included. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/loopover-miner/lib/ams-eligibility-backtest.tsexportingbacktestEligibilityCandidate(events, currentProfiles, candidateProfiles): reads the four eligibility ruleIds fromsignal_rule_fired/signal_human_overrideevents, reconstructsFilterCandidatefrom bounded metadata (miner: capture bounded candidate context (labels/assignees/owner) in eligibility-exclusion fired-event metadata #8544), classifies viafilterCandidatesByProfiles(no filter reimplementation), and scores with the same engine backtest helpers + min-rank sample floors as ams-calibration: backtest a proposed min-rank skip threshold against the node's own selection history #8184.calibration backtest-eligibility --profile <path> [--json]incalibration-cli.ts, mirroringrunBacktestThreshold: under-floored corpus prints an explicit line and exits 0 without persisting; success printsskippedNoContextandrenderBacktestComparisonfor visible + held-out splits; invalid/missing--profile→ exit 1; operational errors → exit 2.ams_eligibility_backtest_runviarecordAmsEligibilityBacktestRun;computeAmsBacktestTrackRecordnow aggregates threshold + eligibility runs (parity with ams-calibration: aggregate backtest track record into the miner calibration report + snapshot event #8185). Maincalibrationreport andcalibration snapshotinclude eligibility runs in track-record attachment.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 typecheck(vianpm run build:miner)npm run build:minernpx vitest run test/unit/miner-ams-eligibility-backtest.test.ts test/unit/miner-calibration-cli.test.ts— 47 passednpx vitest run test/unit/miner-ams-eligibility-backtest.test.ts test/unit/miner-calibration-cli.test.ts --coverage.all=false --coverage && npx diff-cover coverage/lcov.info --compare-branch=origin/main— 100% patch lines (147/147) and 100% patch branches (188/188) on changed miner filesnpm 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/**). Tests import.tsvia variable specifiers (miner-ams-eligibility-backtest.test.ts,miner-calibration-cli.test.ts) socodecov/patchgrades changed lines under--coverage.all=false. Fulltest:cileft to CI.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.UI Evidence
Not applicable — miner calibration CLI advisory backtest only.