Skip to content

fix: enforce one-issue-per-PR across miners in mirror issue discovery - #832

Closed
ClaudeCenter wants to merge 1 commit into
entrius:testfrom
ClaudeCenter:fix/issue-821-one-issue-per-pr
Closed

fix: enforce one-issue-per-PR across miners in mirror issue discovery#832
ClaudeCenter wants to merge 1 commit into
entrius:testfrom
ClaudeCenter:fix/issue-821-one-issue-per-pr

Conversation

@ClaudeCenter

Copy link
Copy Markdown

Summary

What was broken

PR #796 moved the pr_scored_keys dedup set into _score_miner_mirror_issues,
where it only ever sees a single miner's issues. A solving PR closing issues
authored by miners A and B (e.g., a third party merges a fix that closes
both A's #50 and B's #51) awarded full discovery score to each miner.
Documented behavior: one score per solving PR per round, earliest-created
qualifying issue wins.

How this fixes it

  • Phase 1 fetches each miner's issues and partitions them by
    _classify_issue into a _MinerBatch(evaluation, solved_issues, closed_count, open_issue_count) NamedTuple. _classify_issue runs
    once per issue across the cycle.
  • _build_canonical_pr_owners walks every miner's solved_issues
    and produces (repo, pr_number) → (created_at, issue_number, uid) for
    the earliest-created qualifying issue across all miners. Same-account
    issues (discoverer == solver) are excluded — they never claim the slot.
  • _score_miner_mirror_issues consumes the batch directly, comparing
    each issue's marker against canonical_pr_owners[pr_key]. Mismatches
    drop to credibility-only, matching legacy pre-feat: route OSS contributions + issue discovery through das-github-mirror for mirror-enabled repos #796 semantics.

Closes entrius#821. PR entrius#796 narrowed the one-issue-per-PR dedup to per-miner
scope, allowing two miners to each score discovery for the same solving
PR. Restores round-global scope via a cross-miner canonical PR-owner map
built from each miner's phase-1-partitioned solved issues; _classify_issue
runs once per issue across the cycle.
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Apr 28, 2026
@anderdc

anderdc commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Duplicate of #822 which is better scoped/implemented. Closing.

@anderdc anderdc closed this Apr 28, 2026
@ClaudeCenter
ClaudeCenter deleted the fix/issue-821-one-issue-per-pr branch May 7, 2026 08:53
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] Mirror issue discovery one-issue-per-PR rule is enforced per-miner rather than per-round

2 participants