Description
OSS mirror PR scoring rejects merged PRs when base_ref is null, even though issue discovery already treats missing branch metadata as pre-backfill data and falls through.
In check_merged_branch_eligibility (gittensor/validator/oss_contributions/mirror/scoring.py), the base-ref gate uses base_ref or ''. When the mirror omits base_ref on older rows, that becomes '', which never matches the acceptable branch set, so valid merged PRs are dropped at load time and never enter merged_prs.
Issue discovery skips the branch gate when solving_pr.base_ref is None (see tests/validator/issue_discovery/test_scan.py::test_missing_base_ref_falls_through_to_solved). OSS scoring should behave the same way.
Steps to Reproduce
- Load a merged mirror PR with
base_ref: null and default_branch: main.
- Call
_should_skip_merged_mirror_pr.
- Observe the PR is skipped with reason
merged to None not in acceptable branches=....
Expected Behavior
When base_ref is missing, skip the base-ref check (same fall-through as null head_ref / head_repo_full_name) so pre-backfill mirror rows can still score.
Actual Behavior
The PR is rejected and earns no OSS contribution score.
Environment
- Repo:
entrius/gittensor
- Branch:
test
- Affected file:
gittensor/validator/oss_contributions/mirror/scoring.py
Additional Context
Parity bug between OSS scoring and issue discovery. Prior reports: #1599.
Description
OSS mirror PR scoring rejects merged PRs when
base_refisnull, even though issue discovery already treats missing branch metadata as pre-backfill data and falls through.In
check_merged_branch_eligibility(gittensor/validator/oss_contributions/mirror/scoring.py), the base-ref gate usesbase_ref or ''. When the mirror omitsbase_refon older rows, that becomes'', which never matches the acceptable branch set, so valid merged PRs are dropped at load time and never entermerged_prs.Issue discovery skips the branch gate when
solving_pr.base_ref is None(seetests/validator/issue_discovery/test_scan.py::test_missing_base_ref_falls_through_to_solved). OSS scoring should behave the same way.Steps to Reproduce
base_ref: nullanddefault_branch: main._should_skip_merged_mirror_pr.merged to None not in acceptable branches=....Expected Behavior
When
base_refis missing, skip the base-ref check (same fall-through as nullhead_ref/head_repo_full_name) so pre-backfill mirror rows can still score.Actual Behavior
The PR is rejected and earns no OSS contribution score.
Environment
entrius/gittensortestgittensor/validator/oss_contributions/mirror/scoring.pyAdditional Context
Parity bug between OSS scoring and issue discovery. Prior reports: #1599.