fix: enforce one-issue-per-PR across miners in mirror issue discovery - #832
Closed
ClaudeCenter wants to merge 1 commit into
Closed
fix: enforce one-issue-per-PR across miners in mirror issue discovery#832ClaudeCenter wants to merge 1 commit into
ClaudeCenter wants to merge 1 commit into
Conversation
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.
Collaborator
|
Duplicate of #822 which is better scoped/implemented. Closing. |
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
to per-miner scope, closing the two-account collusion vector on
multi-issue solving PRs
internal mechanics
What was broken
PR #796 moved the
pr_scored_keysdedup 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
_classify_issueinto a_MinerBatch(evaluation, solved_issues, closed_count, open_issue_count)NamedTuple._classify_issuerunsonce per issue across the cycle.
_build_canonical_pr_ownerswalks every miner'ssolved_issuesand produces
(repo, pr_number) → (created_at, issue_number, uid)forthe earliest-created qualifying issue across all miners. Same-account
issues (discoverer == solver) are excluded — they never claim the slot.
_score_miner_mirror_issuesconsumes the batch directly, comparingeach issue's marker against
canonical_pr_owners[pr_key]. Mismatchesdrop to credibility-only, matching legacy pre-feat: route OSS contributions + issue discovery through das-github-mirror for mirror-enabled repos #796 semantics.