Skip to content

fix(bounties): reject ambiguous solver identities#1306

Merged
anderdc merged 4 commits into
entrius:testfrom
JSONbored:codex/bounty-identity-ambiguity
May 23, 2026
Merged

fix(bounties): reject ambiguous solver identities#1306
anderdc merged 4 commits into
entrius:testfrom
JSONbored:codex/bounty-identity-ambiguity

Conversation

@JSONbored
Copy link
Copy Markdown
Contributor

Summary

  • Exclude failed miner evaluations from issue-bounty solver lookup.
  • Detect GitHub IDs that map to multiple active miner hotkeys and cancel matching bounty votes instead of selecting one by dictionary overwrite.
  • Preserve bounty payout behavior for non-eligible but otherwise valid registered miners.

What changed

  • Added a safe GitHub ID to hotkey lookup builder for issue bounty voting.
  • Added an explicit ambiguous solver cancel path before coldkey lookup and solution voting.
  • Added regression tests for failed miners, ambiguous GitHub IDs, and the existing non-eligibility-gated bounty behavior.

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 -q
  • uv run ruff check gittensor/validator/issue_competitions/forward.py tests/validator/test_issue_competitions_forward.py
  • uv run ruff format --check gittensor/validator/issue_competitions/forward.py tests/validator/test_issue_competitions_forward.py
  • uv run pyright gittensor/validator/issue_competitions/forward.py tests/validator/test_issue_competitions_forward.py
  • git diff --check
  • Codex Security source-to-sink review: failed and ambiguous identities cannot reach coldkey lookup or solution voting; non-eligible but otherwise valid registered miners still can.
  • CodeRabbit CLI review: 0 issues.

@JSONbored JSONbored marked this pull request as ready for review May 19, 2026 00:59
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 19, 2026
@JSONbored JSONbored marked this pull request as draft May 19, 2026 01:26
@JSONbored JSONbored marked this pull request as ready for review May 19, 2026 01:51
Copy link
Copy Markdown
Collaborator

@anderdc anderdc left a comment

Choose a reason for hiding this comment

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

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.

@JSONbored JSONbored requested a review from anderdc May 23, 2026 00:45
@anderdc anderdc merged commit 2ce88df into entrius:test May 23, 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.

2 participants