fix(bounties): reject ambiguous solver identities#1306
Conversation
anderdc
left a comment
There was a problem hiding this comment.
Keep: the failed_reason skip on the bounty solver lookup — that closes a real gap where _zero_for_duplicate_penalty's failed_reason isn't read by registered_miners today.
Drop: the ambiguous-github-id detection (the _build_registered_miner_lookup helper's tuple return, the ambiguous_github_ids set, the per-issue ambiguous-cancel branch in forward.py, and test_ambiguous_github_id_votes_cancel_instead_of_picking_hotkey). gittensor/validator/oss_contributions/inspections.py:14 detect_and_penalize_miners_sharing_github already runs in oss_contributions() before issue_competitions() and stamps failed_reason on every miner sharing a github_id, so by the time _build_registered_miner_lookup filters on failed_reason, no two remaining candidates can share an id. The branch is unreachable.
Simplest shape: a single conditional in the existing dict comprehension or one extra if eval.failed_reason is not None: continue line.
Summary
What changed
Why
Bounty solver lookup should only vote for a solver when the validator has exactly one non-failed registered miner identity for the solver's GitHub account. Failed or ambiguous current-round identities are not reliable payout targets.
Validation
uv run pytest tests/validator/test_issue_competitions_forward.py tests/validator/test_duplicate_penalty_propagation.py -quv run ruff check gittensor/validator/issue_competitions/forward.py tests/validator/test_issue_competitions_forward.pyuv run ruff format --check gittensor/validator/issue_competitions/forward.py tests/validator/test_issue_competitions_forward.pyuv run pyright gittensor/validator/issue_competitions/forward.py tests/validator/test_issue_competitions_forward.pygit diff --check