Skip to content

fix: increase closingIssuesReferences limit to 100 and warn on truncation in _PR_TIMELINE_QUERY - #934

Closed
Tet-9 wants to merge 1 commit into
entrius:testfrom
Tet-9:fix/885-closing-issues-references-truncation
Closed

fix: increase closingIssuesReferences limit to 100 and warn on truncation in _PR_TIMELINE_QUERY#934
Tet-9 wants to merge 1 commit into
entrius:testfrom
Tet-9:fix/885-closing-issues-references-truncation

Conversation

@Tet-9

@Tet-9 Tet-9 commented May 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #885

Problem

_PR_TIMELINE_QUERY requested closingIssuesReferences(first: 20).
A PR closing more than 20 issues has its 21st-and-later closing
references silently truncated. find_solver_from_cross_references
filters 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 a
PR they legitimately merged.

Fix

Two changes to github_api_tools.py:

  1. Increased the limit from first: 20 to first: 100 (GitHub's
    per-field maximum for closingIssuesReferences). This eliminates
    the truncation for the overwhelming majority of real-world PRs.

  2. Added pageInfo { hasNextPage } to the query and a
    bt.logging.warning when hasNextPage is True. PRs closing
    more 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.pyfirst: 20first: 100,
    added pageInfo { hasNextPage }, added truncation warning

@anderdc

anderdc commented May 6, 2026

Copy link
Copy Markdown
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.

@anderdc anderdc closed this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] _PR_TIMELINE_QUERY truncates closingIssuesReferences to 20 nodes for solver lookup

2 participants