feat(miner): add calibration backtest-eligibility for ContributionProfile replay - #8572
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 21:49:58 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.
|
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.