fix: sync all repository-owning app installations - #1094
Merged
decyjphr merged 3 commits intoSep 29, 2026
Merged
Conversation
Adapt PR #1044 source commits 9b63a02 and f720b1a onto the enterprise target without upstream merges. Preserve enterprise enrichment and user installations, isolate errors sequentially, count returned errors in summaries, await NOP error reporting, and keep CLI failures explicit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add phase 22 using real Settings NOP with verified test-org installation metadata, controlled enumeration/auth, and read-only request boundaries. Refuse CRON before smoke setup can start an unscoped scheduled sync. Keep live multi-installation claims separate from mocked fanout tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve README and smoke phase catalog conflicts by retaining variable pagination phase 21 and installation full-sync phase 22. Clarify that the spawned Probot CLI can reload .env after the harness CRON check. 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.
Manual and scheduled full sync currently process only the first App installation, silently leaving other accounts without reconciliation. This adapts #1044 onto
yadhav/fix-recent-issues, preserving the target branch's enterprise support and making partial failures visible.Approach
{ results, errors }, retaining returned Settings objects, including partial results, and aggregating their errors. Count installations with reported errors as failed in the summary.info()App lookup. Reject missing account logins explicitly.nullfor zero eligible installations and the CLI's nonzero exit, replacing its incidental TypeError with an explicit diagnostic.Validation
Using Node 22.12.0 / npm 10.9.0:
npm run test:unit -- --runInBand: 841 passed, 12 skipped, including 46 new tests for sequential fanout, owner/token separation, enterprise enrichment, error aggregation, CLI exit behavior, and smoke boundaries.188c604929201774699fd1d8dabd445358cee9e8: 31 failed, 3 passed.full-sync.js; syntax and diff checks pass. The 10 existing lint errors inindex.jsandsmoke-test.jsare unchanged.Important limitations and integration notes
Smoke startup correction: the live run used a session-only containment preload, not committed here, to filter real App enumeration and restrict installation auth. However, the spawned Probot CLI reloaded
.envafter preload checks: saved logs confirm webhook forwarding started and enterprise verification ran despite supplied empty variables. The smoke-entry CRON check does not guarantee the spawned server retains an empty CRON value. No webhook delivery or cron tick is recorded, but the logs do not prove that neither was enabled. Recorded intercepted API traffic contains only the authorized installation's token request; the instrumentation was not exhaustive. The 9 assertions establish controlled single-org Settings behavior, not unmodified startup isolation or live multi-org fanout.CLI runtime limitation: entrypoint tests run the real CLI code with mocked Probot boundaries. A separate network-disabled check with installed Probot 14 reproduced the pre-existing null logger failure before
probot.ready(). This branch does not fix that readiness issue; reconcile the independent #1053 follow-up when landing together.GH_ORGdoes not filter full sync on this baseline and is not introduced here. Combined landing with #1053 must preserve all-installations behavior by default and explicit organization filtering, reconciling overlapping code, tests, CLI changes, and documentation.Source audit
Source commits
9b63a02and dependentf720b1awere missing and adapted intobe88186;6c4f0eaadds guarded smoke coverage. Upstream merge commitsad45b4dand207de06were excluded. No wholesale upstream or sibling merge was used.