Add adapter-level alerting, alert dispatch, and customizable alert payloads#48
Merged
Prateek32177 merged 1 commit intocodex/add-scalable-alerting-integration-for-slack-and-discordfrom Mar 3, 2026
Conversation
f42f528
into
codex/add-scalable-alerting-integration-for-slack-and-discord
3 checks passed
Prateek32177
added a commit
that referenced
this pull request
Mar 3, 2026
…replay (#46) * refactor: make controls.alert primary API for dlq and non-dlq alerts * payload updated * Fix missing alert context fields in Slack/Discord notifications (#47) * Fix alert context propagation for Slack/Discord payloads * Fix lint errors in notification internals exports * payload updated * Centralize alerts and restore backward-compatible payload defaults (#48) * payload updated * version upgraded * updated readme * updated readme * docs: README updates for queue support, Upstash QStash, examples, and API reference (#49) * docs: restore full README sections and keep queue updates * docs: strengthen README positioning and core SDK usage * updated readme * updated readme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
titleandmessagewhile keeping sensible DLQ/non-DLQ fallbacks.Description
dispatchWebhookAlerthelper (src/notifications/dispatch.ts) and wires adapter-levelalerts+alertoptions intonextjs,express, andcloudflarehandlers to send alerts on verification/enqueue.WebhookVerificationService.handleWithQueueand queue handling to dispatch alerts after successful enqueue, and updates queue responses to includeplatformandeventIdwhen queued.src/notifications/utils.ts, defaultingsourcetounknownwhen unresolved, and preventing undefined metadata in control alert payloads viawithoutUndefinedinsrc/upstash/controls.ts.titleandmessagewhile falling back to updated default constants insrc/notifications/constants.tsand payload builders.src/test.tsto validate custom title/message passthrough and fallback behavior for alerts.Testing
npm test, which included the two new alert tests for custom title/message passthrough and fallback behavior, and confirmed they passed.src/test.tsto verify dispatch runs only when alert config is present and successful enqueue/verification occurs.Codex Task