fix(validator): stale per-repo issue-discovery fields survive a succe…#1628
Open
lourincedaging0-commits wants to merge 1 commit into
Open
Conversation
…ssful scoring round _finalize_repo_issue_scores only rewrote repo_evaluations for repos seen this round (union of repo_acc and open_counts), then _roll_up_issue_totals summed over ALL repo_evaluations. A repo that was issue-scored in a prior round but is absent this round (e.g. the miner's evaluation was restored from cache after a transient DAS fetch failure, then this round's mirror fetch succeeded with issues only in other repos) kept its stale per-repo values, which got summed back into the round-level totals every round after. _clear_issue_discovery_fields already zeroed these same fields for every repo when a miner had no in-window issues at all; _finalize_repo_issue_scores needs the same treatment for repos individually absent from this round. Added RepoEvaluation.clear_issue_discovery() (symmetric to the existing copy_issue_discovery_from()) and used it both to de-duplicate _clear_issue_discovery_fields's per-repo reset and to clear repos not seen this round before the roll-up. Fixes entrius#1610
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.
…ssful scoring round
_finalize_repo_issue_scores only rewrote repo_evaluations for repos seen this round (union of repo_acc and open_counts), then _roll_up_issue_totals summed over ALL repo_evaluations. A repo that was issue-scored in a prior round but is absent this round (e.g. the miner's evaluation was restored from cache after a transient DAS fetch failure, then this round's mirror fetch succeeded with issues only in other repos) kept its stale per-repo values, which got summed back into the round-level totals every round after.
_clear_issue_discovery_fields already zeroed these same fields for every repo when a miner had no in-window issues at all; _finalize_repo_issue_scores needs the same treatment for repos individually absent from this round.
Added RepoEvaluation.clear_issue_discovery() (symmetric to the existing copy_issue_discovery_from()) and used it both to de-duplicate _clear_issue_discovery_fields's per-repo reset and to clear repos not seen this round before the roll-up.
Fixes #1610