Repository navigation
Emit integration.auth.succeeded so notifiers can edge-detect grant health - #1525
Conversation
|
Warning Review limit reached
Next review available in: 8 minutes Limit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR adds ChangesIntegration authentication event delivery
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This change adds success notifications for completed OAuth refresh and connection flows without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review. Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant OAuthHandler
participant TokenRefresh
participant PackageSubscriptions
participant SubscribedPackage
OAuthHandler->>PackageSubscriptions: dispatch OAuth connection success
TokenRefresh->>PackageSubscriptions: dispatch refresh success
PackageSubscriptions->>SubscribedPackage: deliver metadata-only event
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
🔎 Preview deployed: https://kody-pr-1525.kody-a99.workers.dev Worker: Mocks:
|
Packages can store working/failed health themselves instead of time-window dedup. The platform still emits every classified attempt and does not coalesce repeats. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
f6d0369 to
8322ebb
Compare
Intent
Give packages a success signal for OAuth grants so they can store working ↔ failed health in package storage instead of a 24-hour cooldown. Today only
integration.auth.failedexists, so a notifier cannot tell “still broken” from “broke again after a reconnect.”Summary
integration.auth.succeededafter a successful host-side token refresh and after/connect/oauthpersists tokens.source(refresh|oauth_connect), trustedaccount_url. No tokens or secrets.integration.auth.failedand add it to subscription list/dispatch keywords.event-notifierwill subscribe and replace its 24h per-connection dedup with stored health in a follow-up publish (not in this repo).Testing
Preview manual test on https://kody-pr-1525.kody-a99.workers.dev as
user-me:Signed in;
/account/integrations.jsonis empty (0 apps / 0 connections)./guides/package-subscriptionsdocumentsintegration.auth.succeededwithsource: refresh | oauth_connect./guides/oauthmentions succeeded alongside failed./connect/oauth?provider=googlerenders the connect persist page.CodeRabbit: no actionable comments. Ready-for-review CI all green.
npx vitest run --project node-uniton token-refresh, package-subscriptions, and account-secrets suites (19 passed).GitHub CI on
f6d0369e: all 11 checks passed.Focused node-unit suites passed again after oxfmt.
Published
@kentcdodds/event-notifier0a0b46aand dry-ran the health matrix (working→failed notifies, failed→failed skips). No live Discord posts.System changes
System recap — extends existing primitives (medium risk)
Mode: recap · Base:
main@5f4f8ce5· Head:f6d0369eClassification: extends —
integrationsgains a sibling success topic;/connect/oauthpersist and subscription discovery wire it through.Primitives touched
integrationsintegration.auth.succeededon refresh and connect persistapp-ui/connect/oauthpersist fans out the new topicsaved-packagesSystem map
Successful OAuth refresh and connect persist fan out
integration.auth.succeededto the owning user's subscribed packages.Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).
Change flow
Before / after
Summary by CodeRabbit
New Features
integration.auth.succeedednotifications for successful OAuth connections and token refreshes.Documentation