Repository navigation
fix: bound repository sync concurrency and handle pre-creation suborg lookups - #1087
Merged
decyjphr merged 3 commits intoSep 27, 2026
Merged
Conversation
Process installation repositories in batches of ten, wait for each batch to settle, and report repository failures through existing apply and dry-run error paths. Include the full-sync Docker entrypoint and cover batching, selection, continuation, and reporting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Treat team and custom-property lookup 404s as unmatched only when the repository itself is also missing. This prevents existing suborg configuration from breaking phase 7 creation previews and applies, while preserving real API errors and post-creation inheritance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the two moderate error-recording and failure-reporting issues in lib/settings.js.
Review effort: Lite
Findings: 1
What changed in this PR
This pull request bounds repository sync concurrency and handles suborg membership lookups before repository creation. Two unresolved moderate issues remain in lib/settings.js around NOP error attribution and full-sync failure reporting.
Changes:
- Processes repositories in batches of ten with
Promise.allSettled. - Adds deferred membership handling for missing repositories.
- Adds full-sync Docker support and documentation.
| File | Summary |
|---|---|
test/unit/lib/settings-new-repo.test.js |
Tests pre-creation membership resolution. |
test/unit/lib/settings-batching.test.js |
Tests batching and failure behavior. |
README.md |
Documents pre-creation suborg behavior. |
lib/settings.js |
Implements batching, membership handling, and error aggregation. |
docs/github-action.md |
Documents batching and failure reporting. |
docs/docker-debugging.md |
Documents Docker full-sync usage. |
Dockerfile |
Includes the full-sync entrypoint. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Route updateRepos NOP failures through repository-attributed logError so full-sync exits unsuccessfully while later repositories continue. Cover archive, repository, and child-plugin failures through the real processing path, CLI exit status, and PR reporting. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

Why
Installation-wide sync starts every repository concurrently, creating unnecessary API pressure, and a rejected repository can prevent later reporting and follow-up processing. Separately, smoke phase 7 fails after earlier phases create a team-targeted suborg: membership resolution queries the new repository before
force_createhas created it.Approach
yadhav/fix-recent-issues: process installation repositories in batches of ten usingPromise.allSettled, preserving successful result values and input order.Promise.alldoes not cancel already-started work. The batching change bounds repository concurrency and waits for each batch to settle before proceeding; it does not impose a global limit on individual plugin API calls.Validation
Using Node 22.12.0:
npm run test:unit -- --runInBand --silent --reporters=default: 511 passed, 12 skipped; 24 suites passed, 2 skipped. Includes 35 new regression cases for measured concurrency, final partial batches, result ordering, failure reporting, restrictions, and new-repository suborg resolution in apply/NOP modes.lib/settings.jsretains exactly seven pre-existing trailing-whitespace diagnostics;git diff --checkpasses.Validation limits
test/integration/common.jsrequires ESM Probot (Unexpected token 'export').Targets
yadhav/fix-recent-issues; no wholesale merge frommain-enterprise.