Conversation
added 2 commits
April 27, 2026 13:44
Mirrors the c275848 fix on getPullRequests. CLOSED issues filter on closed_at instead of created_at so an issue authored before the lookback window but closed within it (e.g. a long-standing bug solved yesterday) still appears in the discovery response. OPEN issues stay on created_at to match OPEN PR semantics — stale never-closed issues drop off.
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
Brings
getIssuesto parity with the recentgetPullRequestsfix in c275848. Issues now use the same state-aware lookback pattern as PRs.Before:
```sql
WHERE i.author_github_id = $1
AND i.created_at >= $2
```
After:
```sql
WHERE i.author_github_id = $1
AND (
(i.state = 'OPEN' AND i.created_at >= $2)
OR (i.state = 'CLOSED' AND i.closed_at >= $2)
)
```
Why
The asymmetry was caught during validator-side review: an issue authored 40 days ago and closed yesterday is missed by the current query, even though the symmetric PR (opened 40 days ago, merged yesterday) is now correctly returned by /pulls after c275848.
Concrete impact for the validator: a miner who solves a long-standing issue with a recent PR has the solving PR fetched and scored via OSS, but the issue itself is invisible to issue discovery, so the miner doesn't get discovery credit for solving it.
Behavior
created_at— stale never-closed issues drop off (matches OPEN PR semantics)closed_at— late-closed long-stale issues still surface (matches MERGED PR semantics)Test plan
/api/v1/miners/:gh/issues?since=<date>against a miner with an issue created >35 days ago and closed within the window — confirm it appears