Skip to content

feat(miner): add calibration backtest-eligibility for ContributionProfile replay - #8571

Closed
andriypolanski wants to merge 2 commits into
JSONbored:mainfrom
andriypolanski:fix/8545-eligibility-backtest
Closed

feat(miner): add calibration backtest-eligibility for ContributionProfile replay#8571
andriypolanski wants to merge 2 commits into
JSONbored:mainfrom
andriypolanski:fix/8545-eligibility-backtest

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck (via npm run build:miner)
  • npm run build:miner
  • npx vitest run test/unit/miner-ams-eligibility-backtest.test.ts test/unit/miner-calibration-cli.test.ts — 47 passed
  • CI-scoped Codecov simulation: npx 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/main100% patch lines (147/147) and 100% patch branches (188/188) on changed miner files
  • npm run test:coverage (full unsharded gate)
  • npm run test:ci
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Miner-only change (packages/loopover-miner/lib/**). Tests import .ts via variable specifiers (miner-ams-eligibility-backtest.test.ts, miner-calibration-cli.test.ts) so codecov/patch grades changed lines under --coverage.all=false. Full test:ci left to CI.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section 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.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Not applicable — miner calibration CLI advisory backtest only.

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.47%. Comparing base (0c19927) to head (381c59e).
⚠️ Report is 6 commits behind head on main.

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     
Flag Coverage Δ
backend 83.53% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-miner/lib/ams-calibration.ts 51.93% <100.00%> (ø)
...ges/loopover-miner/lib/ams-eligibility-backtest.ts 100.00% <100.00%> (ø)
packages/loopover-miner/lib/calibration-cli.ts 97.51% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
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
andriypolanski force-pushed the fix/8545-eligibility-backtest branch from dc1f69f to 381c59e Compare July 24, 2026 21:40
@loopover-orb loopover-orb Bot closed this Jul 24, 2026
@loopover-orb

loopover-orb Bot commented Jul 24, 2026

Copy link
Copy Markdown
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.

@loopover-orb loopover-orb Bot added the review-evasion Gittensor contributor context label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. review-evasion Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

miner: calibration backtest-eligibility — replay a candidate ContributionProfile against the captured exclusion corpus

2 participants