feat(github): share installations with web Cloud Agents (2/4) - #5978
feat(github): share installations with web Cloud Agents (2/4)#5978pandemicsyn wants to merge 28 commits into
Conversation
fa6817f to
d70becc
Compare
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Executive Summary
Overview
Issue Details (click to expand)WARNING
Files Reviewed (5 files)
Inline publication was blocked: this PR has an existing bot pending review (id 5158007287) that this session is not permitted to clear, so the finding is recorded here. Previous Review Summaries (10 snapshots, latest commit fda919a)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit fda919a)Status: 1 Issue Found | Recommendation: Address before merge Executive Summary
Overview
Issue Details (click to expand)WARNING
Files Reviewed (9 files)
Inline publication was blocked: this PR has an existing bot pending review (id 5158007287) that this session is not permitted to clear, so the finding is recorded here. Previous review (commit 4c3d38b)Status: No Issues Found | Recommendation: Merge Executive SummaryRebase onto current main left GitHub-installation review scope unchanged; overlapping files differ only by already-landed main content, with high confidence. Files Reviewed (3 files)
Previous review (commit 98af34e)Status: No Issues Found | Recommendation: Merge Executive SummaryLock-observation tests now match the exact advisory-lock SQL already used by sibling suites; the single-file incremental change looks correct with high confidence. Files Reviewed (1 file)
Previous review (commit fbc73e0)Status: No Issues Found | Recommendation: Merge Executive SummaryLifecycle lock-overlap tests now wait for a blocked owner advisory lock before releasing the holder; the single-file incremental change looks correct with high confidence. Files Reviewed (1 file)
Previous review (commit f0df914)Status: No Issues Found | Recommendation: Merge Executive SummaryRepository refresh now follows the lifecycle lock order and skips deleted or inactive projections; the two-file incremental change looks correct with high confidence. Files Reviewed (2 files)
Previous review (commit 622241e)Status: No Issues Found | Recommendation: Merge Executive SummarySynchronous GitHub lifecycle cleanup now records completed receipts only after required DB work; the incremental simplification looks correct with high confidence. Files Reviewed (8 files)
Previous review (commit cd4e7d7)Status: No Issues Found | Recommendation: Merge Executive SummaryIn-lease GitHub lifecycle receipts now return retryable 503 with Retry-After; the five-file incremental change looks correct with high confidence. Files Reviewed (5 files)
Previous review (commit f1bbbb4)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryFailed GitHub Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (5 files)
Previous review (commit 458e94b)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryFailed GitHub Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (19 files)
Previous review (commit d70becc)Status: 3 Issues Found | Recommendation: Address before merge Executive SummaryExclusive GitHub uninstall retries can skip cleanup after unlink failures, unpinned runtime auth stays broken after sharing demotion, and the migration rebuilds live Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (50 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
98af34e to
4c3d38b
Compare
fda919a to
af1734d
Compare
Outcome
Default-off shared canonical GitHub installations for WEB Cloud Agents with exact tenant-association pinning. Slack shared use remains PR3; Code Reviewer shared routing remains PR4.
Reviewed base: current
mainatcf59d8662499749228164232615da5af0abe5134. Reviewed head:af1734d3ce0b8d11acad16622754be8618603cdb.Exact Association Boundaries
Generic token and Chat SDK webhook paths require canonical
sharing_mode = exclusive. Managed shared lookup requires an exact active association ID. GitHub bot-link signed state carries exactplatformIntegrationId; callback validates association, installation, Standard/Lite identity, canonical lifecycle, local health, and current Kilo owner or organization membership.Predeploy bot-link state without an association ID is accepted only while management and sharing admission remain disabled and only for one healthy canonical-exclusive or true-legacy literal-null app association. Explicit Standard rows require exact signed association identity. Keep features disabled for at least one signed-state TTL after deployment.
Simple Synchronous Lifecycle
Required canonical/local database cleanup runs first and fails non-2xx without recording completion. Standard bot unlink runs second as best-effort alerting. Completed-success receipts dedupe later deliveries; concurrent and crash-window repeats are idempotent. GitHub does not automatically retry failed webhooks, so manual redelivery after database failure is the accepted recovery. No lifecycle queue, cron, outbox, lease, fencing, Retry-After, or automatic retry worker exists.
Repository refresh follows lifecycle lock order and cannot revive terminal state.
Provider Reservation Boundary
Slack, Linear, and Discord OAuth attempts are durable, expiring, owner-row locked, purpose-bound, and single-use. PR3 owns provider-installation generation and lazy recovery.
Migration And Rollout
Generated migration:
0243_exotic_triton.sql. Replacement indexes build concurrently with required transaction boundaries. Before enabling sharing, stale eligible-unlinked must be zero. PR2 adds no canonical reconciliation DML.Verification
The final-rebase PostgreSQL-backed Jest/bootstrap rerun was blocked before test execution because the local OrbStack Docker daemon was unresponsive;
docker info, Compose health, andpnpm test:dbtimed out. This was not an assertion failure. The accepted pre-rebase head had the schema/bootstrap and focused web suites passing.No production queries, repairs, associations, settings, flags, backfills, deployments, or external provider operations were performed.