Skip to content

fix: gate issue bounty solver lookup on completed closures - #980

Merged
anderdc merged 8 commits into
entrius:testfrom
mkdev5:fix/issue-979-completed-closure-gate
May 8, 2026
Merged

fix: gate issue bounty solver lookup on completed closures#980
anderdc merged 8 commits into
entrius:testfrom
mkdev5:fix/issue-979-completed-closure-gate

Conversation

@mkdev5

@mkdev5 mkdev5 commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Gate issue-bounty solver lookup on GitHub's completed closure reason.

check_github_issue_closed() previously treated any REST issue with state == "closed" as eligible for solver lookup. That allowed issues closed as not_planned, duplicate, or with missing/null state_reason to still return a merged PR solver, which issue_competitions() could turn into vote_solution() for an eligible miner.

This change requires closed issues to have state_reason == "completed" before find_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

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

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 -q

  • uv run pytest tests/ -q

  • uv run ruff check

  • uv run ruff format --check

  • uv run pyright

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 4, 2026

@anderdc anderdc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@anderdc
anderdc merged commit 933e0dd into entrius:test May 8, 2026
3 checks passed
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] Issue bounties can vote solutions for non-completed GitHub closures

3 participants