fix: gate MERGED solving PRs missing merged_at in mirror issue discovery - #920
Closed
Daedalus-Icarus wants to merge 1 commit into
Closed
Conversation
Daedalus-Icarus
force-pushed
the
fix/timeline-cross-reference-pagination
branch
from
May 2, 2026 18:14
049f3e8 to
7a3fbfb
Compare
Daedalus-Icarus
force-pushed
the
fix/timeline-cross-reference-pagination
branch
from
May 2, 2026 18:22
d4d2de0 to
86a4617
Compare
Daedalus-Icarus
force-pushed
the
fix/timeline-cross-reference-pagination
branch
from
May 2, 2026 18:39
a2e0c57 to
523a2e2
Compare
|
DRIFT detected — original PR premise tackled paginating issue cross-reference timeline events in _PR_TIMELINE_QUERY, the current state may not align. Flagging for maintainer review.
|
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
A solving PR with
state == 'MERGED'butmerged_at is Noneis structurally unscoreable (time decay needsmerged_at)._mirror_issue_for_scoringalready drops it, but only aftertotal_solved_issuesandtotal_valid_solved_issueshave been incremented. One corrupted record could push a miner pastMIN_VALID_SOLVED_ISSUES, flipping eligibility and producing a non-zero discovery score from the other valid issues.This PR adds the missing gate in
_classify_issueso the corrupted record buckets asnot-solved-closedbefore the counters bump — matching the defensive gate already present on the OSS mirror scoring path.Changes
gittensor/validator/issue_discovery/mirror_scan.py: rejectMERGEDsolving PRs withmerged_at is Nonein_classify_issue; document the gate in the module docstring.tests/validator/issue_discovery/test_mirror_scan.py: unit test on_classify_issueand a regression test verifying the counters stay at zero.Close #919
Test plan
pytest tests/validator/issue_discovery/test_mirror_scan.py