Skip to content

fix(validator): move valid_solved increment after exclusion guards#1299

Closed
enjoyandlove wants to merge 2 commits into
entrius:testfrom
enjoyandlove:fix/valid-solved-increment-after-exclusion-guards
Closed

fix(validator): move valid_solved increment after exclusion guards#1299
enjoyandlove wants to merge 2 commits into
entrius:testfrom
enjoyandlove:fix/valid-solved-increment-after-exclusion-guards

Conversation

@enjoyandlove
Copy link
Copy Markdown

Summary

Closes #1298

Move the valid_solved increment after the same-account and non-canonical exclusion guards in _score_miner_issues. Previously, acc.valid_solved was incremented before these guards ran, which allowed excluded issues (same-account solvers, non-canonical PRs) to inflate the counter and inadvertently satisfy the per-repository eligibility threshold. The counter now only increments for issues that pass all exclusion checks.

Related Issues

Type of Change

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

Testing

  • Tests added/updated
  • Manually tested

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 18, 2026
@enjoyandlove
Copy link
Copy Markdown
Author

Hi, @anderdc
When you have a moment, could you please review this PR?
Thank you for your time.

@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 22, 2026

This isn't a real bypass — acc.scored_issues already excludes same-account and non-canonical-owner cases, so the per-repo issue_discovery_score loop at scan.py:551 produces 0 for self-farmers regardless of valid_solved. valid_solved is by design the quality counter ("solving PR meets the token threshold", per check_issue_eligibility's docstring) — same-account and canonical-owner are score-eligibility signals downstream, not validity signals. Moving the increment past those guards would also drop honest discoverers whose own PR happens to solve a discovery, or who lose a canonical-owner tie. Closing.

@anderdc anderdc closed this May 22, 2026
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] increment valid_solved only after exclusion guards in issue discovery

2 participants