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 23 commits into
Conversation
43bceb3 to
be5c58a
Compare
fa6817f to
d70becc
Compare
Code Review SummaryStatus: 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 Summaries (3 snapshots, latest commit f1bbbb4)Current summary above is authoritative. Previous snapshots are kept for context only. 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 grok-4.6 · Input: 77.4K · Output: 7.7K · Cached: 276.6K Review guidance: REVIEW.md from base branch |
|
Addressed the review against the current head.
Verification: 69 focused runtime/lifecycle tests, 254 cleanliness behavior tests, 101 schema tests plus fresh bootstrap, 632 token tests, and 419 focused managed Cloud Agent tests passed. |
|
Follow-up on the lifecycle retry disposition: The pending-index compatibility concern is an explicitly accepted rollout risk: no global bridge index is retained. The migration-to-app promotion window is brief and monitored, and old pending callbacks receive retry guidance after promotion. |
|
Product simplification supersedes the prior receipt-lease disposition. Current head
Verification: 75 focused lifecycle and DB-backed token behavior tests, 101 schema tests plus fresh bootstrap, and all 633 token tests passed. |
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.
Authorization Boundaries
Generic repository, cached, integration-ID, and Chat SDK token paths require canonical
sharing_mode = exclusive. Unbound legacy rows are usable only when no matching canonical identity exists. Managed shared lookup requires an exact activeexpectedIntegrationId; unpinned managed lookup requires exclusive mode.Simple Synchronous Lifecycle
Installation lifecycle handling is intentionally synchronous and idempotent. For
installation.deleted, required canonical/local database revocation runs first and propagates failure. Standard-app bot identity unlink runs second as best-effort alerting and cannot leave local GitHub authorization active or fail a completed database cleanup. Lite has no bot unlink flow.Delivery dedupe records only completed success after required local lifecycle work succeeds. Completed duplicates return
200. A failed DB cleanup records no completed receipt and returns non-2xx with an alert; GitHub does not automatically retry, so manual redelivery is the accepted recovery. A crash before completion recording or concurrent duplicate may repeat idempotent cleanup. PR2 has no lifecycle queue, cron, outbox, pending lease, attempt fencing, poison state, hidden retry, orRetry-After.Provider Reservation Boundary
Slack, Linear, and Discord OAuth attempts remain durable, expiring, owner-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. The accepted migration-to-app pending-install window is brief and monitored; retry the connection after promotion if an old callback fails. Before enabling sharing, stale eligible-unlinked must be zero. PR2 adds no canonical reconciliation DML.Verification
No production queries, repairs, associations, settings, flags, backfills, deployments, or external provider operations were performed.