Skip to content

fix(github): complete install when app JWT getInstallation 404s - #5825

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
fix/github-callback-installation-404
Open

fix(github): complete install when app JWT getInstallation 404s#5825
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
fix/github-callback-installation-404

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • GitHub App install callbacks reported GET /app/installations/{id} 404s as Sentry errors even after the user-token admin check had already found the installation.
  • Install and update flows now persist the installation returned by GET /user/installations, which avoids the app-JWT lookup that can 404 due to GitHub replication lag right after install. Selected repositories are listed with the same user token.
  • Remaining app-JWT 404s (non-install setup actions) are logged as warnings instead of exceptions.

Fixes KILOCODE-WEB-27TD

Test plan

  • Unit coverage for findAdministeredInstallation returning the matching installation or null
  • Callback coverage that install succeeds from the user-token installation even when app-JWT getInstallation would 404
  • Callback coverage that a non-install 404 redirects with installation_not_found and does not call captureException

@kilo-code-bot

kilo-code-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • apps/web/src/app/api/integrations/github/callback/route.ts
  • apps/web/src/app/api/integrations/github/callback/route.test.ts
  • apps/web/src/lib/integrations/platforms/github/app-selector.ts
  • apps/web/src/lib/integrations/platforms/github/app-selector.test.ts

Reviewed by grok-4.6 · Input: 137K · Output: 12.2K · Cached: 312.6K

Review guidance: REVIEW.md from base branch main

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.

0 participants