Skip to content

fix(validator): fall through OSS scoring when mirror omits base_ref#1637

Open
RealDiligent wants to merge 1 commit into
entrius:testfrom
RealDiligent:fix/critical-issue-null-base-ref-fallthrough
Open

fix(validator): fall through OSS scoring when mirror omits base_ref#1637
RealDiligent wants to merge 1 commit into
entrius:testfrom
RealDiligent:fix/critical-issue-null-base-ref-fallthrough

Conversation

@RealDiligent

Copy link
Copy Markdown

Fixes #1636

Summary

Pre-backfill mirror rows can omit base_ref. OSS scoring treated null as '' and rejected those merged PRs at load time, while issue discovery already fall-throughs missing branch metadata.

Skip the base-ref gate when base_ref is None, matching the existing null head_ref / head_repo_full_name behavior and issue-discovery parity.

Root cause

check_merged_branch_eligibility used base_ref or '', so a missing base_ref became an empty string that never matched the acceptable branch set. Valid merged PRs were dropped before scoring.

Fix approach

Gate on base_ref only when it is present (base_ref is not None), consistent with issue discovery (scan.py) and existing null head_ref fall-through.

Impact

Pre-backfill mirror rows and any merged PR missing branch metadata can score OSS contributions instead of being silently dropped.

Risk / tradeoffs

  • Intentionally permissive for absent metadata only; explicit non-matching base_ref values are still rejected.
  • No producer-side mirror change required.

Test plan

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jul 15, 2026
Skip the base-ref eligibility gate when mirror rows omit base_ref, matching
issue-discovery fall-through for pre-backfill data.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

fix(validator): OSS mirror scoring still rejects merged PRs with null base_ref on test

1 participant