fix: clear duplicate issue discovery rows#1280
Open
jakearmstrong59 wants to merge 1 commit into
Open
Conversation
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
Fixes a duplicate-GitHub penalty leak where penalized evaluations could keep cached
issue_discovery_issuesrows and still consume issue-discovery repo allocation.Problem
_zero_for_duplicate_penalty()cleared issue-discovery scalar fields, but did not clearMinerEvaluation.issue_discovery_issues.After repo-level emission allocation, issue-discovery rewards are calculated from per-repo issue rows. A duplicate-penalized miner restored from cache could therefore have:
issue_discovery_score = 0.0failed_reasonsetissue_discovery_issuesstill populatedThose stale rows could consume issue-discovery allocation before the later UID blacklist zeroing step.
Fix
issue_discovery_issuesinside_zero_for_duplicate_penalty().failed_reason.Tests
.venv/bin/pytest tests/validator/test_duplicate_penalty_propagation.py tests/validator/test_blend_emission_pools.py -q.venv/bin/pytest tests/validator/test_github_identity_fallback.py -q.venv/bin/pytest tests/validator/oss_contributions/mirror/test_classes_integration.py -q.venv/bin/ruff check ..venv/bin/ruff format --check .git diff --checkNotes
Manual reproduction now shows duplicate-penalized miners have empty issue-discovery rows and receive no issue-discovery allocation.
Closes #1279