feat(github-app): strict installation lookup, drop transitional fallbacks (#283 PR 7/7)#294
feat(github-app): strict installation lookup, drop transitional fallbacks (#283 PR 7/7)#294coji wants to merge 1 commit intofeat/issue-283-backfillfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
8d629f8 to
95f0e0c
Compare
6271744 to
7e96004
Compare
95f0e0c to
44a5cda
Compare
7e96004 to
6f00bea
Compare
44a5cda to
aa36656
Compare
d6b266b to
3365fac
Compare
aa36656 to
3c83597
Compare
3365fac to
2e37380
Compare
3c83597 to
ea800f0
Compare
2e37380 to
39aaa36
Compare
18a9df2 to
9ae43b8
Compare
85781db to
8d782a7
Compare
1e0c6e8 to
d0da8d7
Compare
8d782a7 to
81a57e7
Compare
…acks (#283 PR 7/7) Final PR in the multi-installation stack. After this lands the transitional "active link 1 件" / "github_installation_id IS NULL OK" paths are gone and every github_app repository must have a canonical installation assigned. shared schema: - db/shared.sql: drop integrations.app_suspended_at column (suspend state moved to github_app_links.suspended_at in PR 1) - db/migrations/shared/20260408001949.sql: Atlas migration via table-rebuild - regenerate app/services/type.ts octokit resolution (app/services/github-octokit.server.ts): - resolveOctokitForRepository: github_app + github_installation_id IS NULL now throws "Repository has no canonical installation assigned. Run reassign-broken-repositories or reinstall." - delete deprecated resolveOctokitFromOrg / assertOrgGithubAuthResolvable / OrgGithubAuthInput PR webhook lookup (github-webhook-pull.server.ts): - drop the OR clause; require strict (owner, repo, installation_id) match - broken state repos are silently skipped until operator runs reassign-broken-repositories UI route migration: - repositories/$repository/$pull/index.tsx: switch from resolveOctokitFromOrg to resolveOctokitForRepository (uses repository.githubInstallationId) - queries.server.ts: select githubInstallationId cleanup: - remove appSuspendedAt references from setup callback, webhook handlers, mutations, batch queries - update test fixtures (drop app_suspended_at column from in-memory SQLite schemas) - update github-octokit.server.test.ts to drop legacy assertOrgGithubAuthResolvable / resolveOctokitFromOrg tests and the transitional fallback cases of resolveOctokitForRepository Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d0da8d7 to
e6a4166
Compare
81a57e7 to
4e72683
Compare

Summary
Issue #283 stack の 最終 PR (7/7) — 移行期間 fallback を全削除し、strict installation lookup に切替。これでシリーズ完結。
設計根拠: `docs/rdd/issue-283-multiple-github-accounts.md`
作業計画: `docs/rdd/issue-283-work-plan.md`
依存: #288, #296, #290, #291, #292, #293
このマージは PR 6 (#293) の `backfill-installation-membership` を本番実行 + 検証完了後 にのみ実行してください。順序を守らないと既存リポジトリが strict lookup で弾かれてエラーになります。
詳細手順は #293 の Runbook 参照。
変更内容
schema (`db/shared.sql` + migration)
Octokit 解決 (`app/services/github-octokit.server.ts`)
query 層 (`app/services/github-integration-queries.server.ts`)
PR webhook (`app/services/github-webhook-pull.server.ts`)
```sql
WHERE owner = ? AND repo = ? AND github_installation_id = ?
```
route (`app/routes/$orgSlug/settings/repositories/$repository/$pull/`)
cleanup
満たす受入条件
デプロイ Rollback 戦略
Stack 位置 (完成形)
```text
PR 1 (#288): schema
└ PR 2 (#296): query/octokit
└ PR 3 (#290): webhook/membership
└ PR 4 (#291): UI
└ PR 5 (#292): repo UI
└ PR 6 (#293): backfill
└ [PR 7: strict] ← this PR
```
テスト
🤖 Generated with Claude Code