Skip to content

feat(shared,api): identityProvider and automationId scope on the shared dispatcher - #6599

Merged
saddlepaddle merged 1 commit into
mainfrom
fix/dispatcher-identity-and-scope
Aug 18, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
fix/dispatcher-identity-and-scope

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Two small additions the provider agents needed once #6594 landed. identityProvider lets Google's two trigger kinds resolve me through one google identity. automationId lets the raw-webhook route restrict candidates to the automation its URL names instead of fanning out org-wide. Optional, default-off, no behaviour change for existing callers. Typecheck + lint clean.


Summary by cubic

Adds optional identityProvider on BaseMatchableEvent and optional automationId scoping in dispatchMatchingTriggers. Old behavior resolved "me" against event.provider and raw webhooks fanned out org‑wide; new behavior resolves "me" against identityProvider when set and allows raw webhooks to restrict dispatch to one automation. Defaults keep existing behavior.

  • packages/shared: identityProvider defaults to provider; Google Calendar and Gmail should set identityProvider: "google" to unify "me" resolution.
  • apps/api: dispatcher uses identityProvider ?? provider for identity lookups and optionally filters by automationId; omit it to keep org‑wide fan‑out. No migrations required.

Written for commit 9dec333. Summary will update on new commits.

Review in cubic

…ed dispatcher

Two additions the provider agents needed the moment the shared dispatcher
landed, both small enough to be one commit rather than two forks.

identityProvider on BaseMatchableEvent: the dispatcher resolves `me` from
user_identities where provider = event.provider. Google Calendar and Gmail
are two trigger kinds behind one Google identity, so both set
identityProvider: "google". Defaults to provider; every other provider
leaves it unset.

automationId on dispatchMatchingTriggers: provider webhooks fan out across
the org because the provider does not know which automation cares. A raw
webhook is addressed to one automation by its URL, so fanning out to every
webhook trigger in the org would be wrong. Optional filter; unset means
org-wide, which is what every other route wants.
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@saddlepaddle, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Limit details: You’ve used all 10 included reviews currently available under your plan.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d3f7ddb4-690f-49bf-9102-810b90821399

📥 Commits

Reviewing files that changed from the base of the PR and between 338c64c and 9dec333.

📒 Files selected for processing (2)
  • apps/api/src/lib/automations/dispatchMatchingTriggers.ts
  • packages/shared/src/automation-matching/core.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@saddlepaddle
saddlepaddle merged commit 0113ea2 into main Aug 18, 2026
17 checks passed
@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) ✅ View Branch
Vercel API (Vercel) ✅ Open Preview
Vercel Web (Vercel) ✅ Open Preview
Vercel Marketing (Vercel) ✅ Open Preview
Vercel Admin (Vercel) ✅ Open Preview
Vercel Docs (Vercel) ✅ Open Preview

Preview updates automatically with new commits

This branch was previously deployed

1 inactive deployment
preview — 9dec333e Deployed Aug 18, 2026 by saddlepaddle via Deploy Docs #7966
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.

1 participant