Skip to content

[WIP] Fix detection issues for pull requests#4631

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-4629-again
Draft

[WIP] Fix detection issues for pull requests#4631
Copilot wants to merge 3 commits intomainfrom
copilot/sub-pr-4629-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

Thanks for the feedback on #4629. I've created this new PR, which merges into #4629, to address your comment. I will work on the changes and keep this PR's description up to date as I make progress.

Original PR: #4629
Triggering comment (#4629 (comment)):

@copilot address comments and fix the broken tests


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

@osortega
Copy link
Contributor

@copilot Try again

- Add pre-checks in detectPullRequestWithRetry to return early when:
  - Session has no worktree branch/repository path
  - Repository has no GitHub remote (avoids 14s delay for non-GitHub repos)
- Revert processPendingPrDetections from Promise.all to sequential for-of loop
- Add unit tests for PR detection retry behavior using vi.useFakeTimers()

Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/vscode-copilot-chat/sessions/478d27dd-9149-40e0-aee9-ea7c253dfd51
Copy link
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot Try again

Done in ed67f82. Fixed the broken tests and addressed the review comments:

  1. Root cause of test timeouts: detectPullRequestWithRetry had no pre-checks, so it always incurred 2s+4s+8s=14s of delays even for sessions without a worktree branch or GitHub remote. Added two pre-checks to return early:

    • Skip if session has no worktree branch/repository path
    • Skip if the repository has no GitHub remote (checked via getGitHubRepoInfoFromContext)
  2. processPendingPrDetections: Reverted from Promise.all parallel execution to a sequential for...of loop per the "revert this change" comment.

  3. New unit tests: Added PR detection retry behavior describe block with 3 tests using vi.useFakeTimers() to verify the retry schedule.

Base automatically changed from osortega/moderate-boar to main March 24, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants