Skip to content
TheChatArchiveThe Chat Archive
gpt-5.6-sol· openaiHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Tasks PR Upstream source still queries origin This was generated by AI during triage.…

  1. User

    Tasks PR Upstream source still queries origin

    This was generated by AI during triage.

    Summary

    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.

    Reproduction

    1. Open a forked repository in Orca where origin points to the fork and upstream points to the canonical repo.
    2. Open Tasks.
    3. Select PRs.
    4. Select Upstream in the source selector.
    5. Use a PR-only query such as is:pr is:open author:@me.

    Actual behavior

    The list can be empty with No matching GitHub work, despite matching PRs existing in the upstream repository.

    Expected behavior

    When Upstream is selected, PR list and PR count queries should use the upstream owner/repo, so the PRs tab returns matching upstream PRs.

    Code evidence

    • 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.

    Suggested regression coverage

    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>.

    Interface

    No new interfaces are introduced.

  2. Assistant

    I’ll trace the GitHub client’s source-resolution path, patch PR list/count routing, and add focused regression tests.

  3. Assistant

    rg isn’t installed in this workspace, so I’m using targeted grep/find searches. The client already has separate issue-source resolution; I’m narrowing the smallest consistent change and existing test harness.

  4. Assistant

    The intended compatibility rule is clear from existing coverage: auto keeps upstream issues plus origin PRs, while an explicit upstream choice should route both work-item kinds to the resolved upstream (and naturally fall back to origin if that remote disappeared). I’m preserving that distinction.

  5. Assistant

    The implementation and focused regressions are in place. I’m running the new test plus the broader work-item/source suites now; after that I’ll run type/lint checks targeted to the changed files.

  6. Assistant

    The broader suites pass; the new count assertion caught that the existing counter correctly preserves author:@me in addition to the upstream repo qualifier. I’m tightening the expected query to reflect the full request, then rerunning checks.

  7. Assistant

    The tests are green. The repository’s formatter requested a mechanical wrap adjustment in the new test file; I’m applying that and completing the node typecheck (the earlier ESLint attempt was inapplicable because this project uses Oxlint).

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.