fix: increase closingIssuesReferences limit to 100 and warn on truncation in _PR_TIMELINE_QUERY - #934
Closed
Tet-9 wants to merge 1 commit into
Closed
Conversation
…tion in _PR_TIMELINE_QUERY
Collaborator
|
In practice we only want PRs that solve one issue — if a PR closes multiple issues, either the original issue wasn't scoped right or the PR is expanding scope. 20 is already very high given that. 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.
Fixes #885
Problem
_PR_TIMELINE_QUERYrequestedclosingIssuesReferences(first: 20).A PR closing more than 20 issues has its 21st-and-later closing
references silently truncated.
find_solver_from_cross_referencesfilters merged PRs by
issue_number in p.get('closing_numbers', []),so any issue at position 21+ returns no matches and the validator
records
solver_lookup_failed=True— the miner loses credit for aPR they legitimately merged.
Fix
Two changes to
github_api_tools.py:Increased the limit from
first: 20tofirst: 100(GitHub'sper-field maximum for
closingIssuesReferences). This eliminatesthe truncation for the overwhelming majority of real-world PRs.
Added
pageInfo { hasNextPage }to the query and abt.logging.warningwhenhasNextPageisTrue. PRs closingmore than 100 issues are vanishingly rare, but operators can now
correlate the warning with a missed solver attribution instead of
debugging silently wrong results.
Changes
gittensor/utils/github_api_tools.py—first: 20→first: 100,added
pageInfo { hasNextPage }, added truncation warning