fix: gate issue bounty solver lookup on completed closures - #980
Merged
anderdc merged 8 commits intoMay 8, 2026
Conversation
anderdc
approved these changes
May 8, 2026
anderdc
left a comment
Collaborator
There was a problem hiding this comment.
Default-deny on non-completed closures matches the bounty-vote policy. Tests cover not_planned / duplicate / transferred / None / missing — solver_github_id=None routes those into the existing vote_cancel_issue path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gate issue-bounty solver lookup on GitHub's completed closure reason.
check_github_issue_closed()previously treated any REST issue withstate == "closed"as eligible for solver lookup. That allowed issues closed asnot_planned,duplicate, or with missing/nullstate_reasonto still return a merged PR solver, whichissue_competitions()could turn intovote_solution()for an eligible miner.This change requires closed issues to have
state_reason == "completed"beforefind_solver_from_cross_references()runs. Non-completed or missing closure reasons now return a closed/no-solver result, preserving the existing response shape while preventing solution votes for non-completed closures.Related Issues
Closes #979
Type of Change
Testing
Tests added/updated
Manually tested
./.venv/bin/pytest tests/utils/test_github_api_tools.py::TestCheckGithubIssueClosed -q./.venv/bin/pytest tests/utils/test_github_api_tools.py -q./.venv/bin/pytest tests/validator/test_issue_competitions_forward.py -quv run pytest tests/ -quv run ruff checkuv run ruff format --checkuv run pyrightChecklist