Skip to content

Stop retrying inaccessible repositories after 404 - #8884

Merged
Alex Ross (alexr00) merged 4 commits into
mainfrom
copilot/fix-dead-repo-handling
Aug 11, 2026
Merged

Stop retrying inaccessible repositories after 404#8884
Alex Ross (alexr00) merged 4 commits into
mainfrom
copilot/fix-dead-repo-handling

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Repository metadata 404s left dead remotes active, allowing repeated requests to consume the shared API-call budget and block healthy repositories. Existing warnings did not identify the failing repository or workspace folder.

  • Terminal failure handling

    • Cache non-SAML metadata 404s as inaccessible for the session.
    • Preserve the existing SAML reauthorization flow.
  • Repository isolation

    • Remove and dispose inaccessible repositories before downstream fetches.
    • Prevent subsequent creation paths from re-adding known-dead repositories.
    • Keep healthy workspace repositories active.
  • Actionable diagnostics

    • Log the repository, remote, and workspace path once:
Repository owner/repo from remote origin in workspace folder /workspace/repo returned HTTP 404 and will be skipped for this session.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix handling of dead or inaccessible repos in multi-folder workspace Stop retrying inaccessible repositories after 404 Aug 11, 2026
Comment thread src/github/folderRepositoryManager.ts
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review August 11, 2026 10:25
Copilot AI lite review requested due to automatic review settings August 11, 2026 10:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses repeated, unproductive retries against repositories that return a non-SAML HTTP 404 when fetching repository metadata, which can exhaust the extension’s shared API-call budget and degrade multi-folder workspaces. It adds session-scoped “inaccessible repo” tracking, removes inaccessible repos from active processing, and improves log diagnostics to identify the failing repository and workspace folder.

Changes:

  • Cache non-SAML repository-metadata 404s as “inaccessible” for the current session and suppress further retry/log noise for those repos.
  • Isolate failures by removing/disposing inaccessible repositories and preventing their recreation during subsequent update/creation flows.
  • Add targeted tests covering 404 caching/logging behavior and ensuring healthy repositories are unaffected.
Show a summary per file
File Description
src/github/githubRepository.ts Marks repos inaccessible on non-SAML 404 during metadata fetch; suppresses repeated work/logging and returns false early from resolveRemote.
src/github/folderRepositoryManager.ts Filters known-inaccessible repos during updates, removes/disposing inaccessible repos, and blocks recreation via createGitHubRepository.
src/test/github/githubRepository.test.ts Adds unit tests validating one-time logging + caching of inaccessible repos and preserving SAML behavior.
src/test/github/folderRepositoryManager.test.ts Adds coverage ensuring inaccessible repos are skipped/removed without impacting healthy repos, and that recreation is blocked.

Review details

Tip

Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread src/github/folderRepositoryManager.ts
@alexr00
Alex Ross (alexr00) merged commit a6a6339 into main Aug 11, 2026
8 checks passed
@alexr00
Alex Ross (alexr00) deleted the copilot/fix-dead-repo-handling branch August 11, 2026 10:37
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.

Dead/inaccessible repo in multi-folder workspace: endless 404 retries exhaust the internal 140-call limit, and the log never names the failing repo

4 participants