auth: expand Resend email event handling - #206
Conversation
Resend complaint, suppression, and scheduling events provide useful operational context but were rejected by the original delivery-focused allowlist. Known click and inbound events also caused pointless retries when subscribed accidentally.\n\nNormalize and log complained, suppressed, and scheduled events; acknowledge clicked and received events without logging their payloads. Document the expanded subscriptions and ratchet line coverage.\n\nCo-authored-by: OpenAI <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe Resend webhook route now distinguishes logged, warning, and ignored events, normalizes additional email event types, and acknowledges unsupported events without payload logging. Tests, coverage configuration, environment guidance, and operator documentation were updated accordingly. ChangesResend webhook event handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Resend
participant WebhookHandler
participant Logger
Resend->>WebhookHandler: Send signed email webhook
WebhookHandler->>WebhookHandler: Validate and classify event
WebhookHandler->>Logger: Log supported event at info or warn
WebhookHandler-->>Resend: Return received or ignored response
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
|
Coverage Report for CI Build 29750494073Coverage increased (+0.09%) to 57.272%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |



Summary
Expand the optional Resend integration with additional operational events and avoid unnecessary retries for known email events that ePDS intentionally does not log.
Changes
email.complained,email.suppressed, andemail.scheduled.warnlevel.email.clickedand inboundemail.receivedevents without logging their payloads.Testing
pnpm format:checkpnpm linttsc --build tsconfig.json)pnpm test— 1,067 tests passedpnpm test:coverage— 58.29% statements, 57.53% branches, 71.52% functions, 57.10% linesNotes
This is a follow-up to PR #198. Webhook data remains logging-only and the integration remains optional and email-provider agnostic.
Summary by CodeRabbit
New Features
Documentation
Tests