SWE-Rebench v2 hard task
harbor run -t ibragim-badertdinov/stablyai__orca-5176harbor download ibragim-badertdinov/stablyai__orca-5176Tasks PR Upstream source still queries origin
This was generated by AI during triage.
In the Tasks page, selecting the PRs tab and choosing Upstream in the source selector can show No matching GitHub work even when matching upstream PRs exist.
The upstream/origin selector is visible in the PRs view, but the GitHub client still resolves PR list/count queries from origin, so is:pr is:open author:@me searches the fork/origin repo instead of the selected upstream repo.
origin points to the fork and upstream points to the canonical repo.PRs.Upstream in the source selector.is:pr is:open author:@me.The list can be empty with No matching GitHub work, despite matching PRs existing in the upstream repository.
When Upstream is selected, PR list and PR count queries should use the upstream owner/repo, so the PRs tab returns matching upstream PRs.
src/main/github/client.ts resolves issueResolved with the selected preference, but resolves prOwnerRepo separately via getOwnerRepo(repoPath, connectionId), which is the origin repo.listWorkItems passes that prOwnerRepo into both recent and queried PR fetches.countWorkItems uses the same prOwnerRepo for PR count queries, so pagination/count can also be wrong.src/renderer/src/components/TaskPage.tsx renders the selector using origin={s.sources.prs} and upstream={s.sources.upstreamCandidate}, which makes the control appear relevant in the PRs surface while the backend still routes PR queries to origin.Add tests for:
listWorkItems('/repo-root', 10, 'is:pr is:open author:@me', undefined, 'upstream') using the upstream slug in --repo.countWorkItems('/repo-root', 'is:pr is:open author:@me', 'upstream') building a search query with repo:<upstream-owner>/<repo>.No new interfaces are introduced.