Skip to content

fix(mirror): skip fixed-base scoring when PR file evidence is unavailable#1204

Closed
Desel72 wants to merge 1 commit into
entrius:testfrom
Desel72:fix/mirror-fixed-base-fetch-failure
Closed

fix(mirror): skip fixed-base scoring when PR file evidence is unavailable#1204
Desel72 wants to merge 1 commit into
entrius:testfrom
Desel72:fix/mirror-fixed-base-fetch-failure

Conversation

@Desel72
Copy link
Copy Markdown
Contributor

@Desel72 Desel72 commented May 12, 2026

Summary

Prevent awarding fresh mirror OSS score from fixed_base_score when PR file evidence is unavailable in the current round.

Before this change, score_mirror_pr could still apply fixed_base_score after:

  • mirror file fetch raised MirrorRequestError, or
  • mirror returned an empty file list for scoring_data_stored=True.

That allowed nonzero earned score with zero token evidence for the round.

This PR changes that behavior to skip scoring that PR for the round when file evidence is unavailable, even in fixed-base repositories.

Related Issues

Closes #1203

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested

Added regression tests in mirror scoring suite:

  • fixed-base repo + MirrorRequestError on get_pr_files => no fresh score
  • fixed-base repo + empty files for scoring_data_stored=True => no fresh score

Validation notes:

  • python3 -m py_compile passed for modified files.
  • Full pytest execution is blocked in this environment due missing runtime dependency bittensor.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 12, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 13, 2026

fixed_base_score is intentionally fixed — the same-author PR #1115 added the not pr.scoring_data_stored and not has_fixed_base: return bypass and the "Only the base score is overridden. Token fields stay token-derived so eligibility, pioneer, and reporting gates keep their evidence signal" comment specifically so base_score is independent of file evidence and token_score carries the evidence signal. A transient MirrorRequestError on get_pr_files isn't gameable by miners, and the cache fallback in reward.py is gated on the bulk fetch failing, not per-PR file fetches. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] fixed_base_score mirror PRs can earn score when file evidence is unavailable

2 participants