Conversation
There was a problem hiding this comment.
The PR introduces a useful batch notification API with good test coverage, but has several correctness issues that need to be addressed: input mutation in the batch emit path, CSRF token reuse across parallel requests, inconsistent recipient key resolution bypassing the authenticationIdentifier config, a potential recipients field leaking into Properties, silent swallowing of all batch failures without error propagation, and a typo in the README example.
PR Bot Information
Version: 1.22.5
- File Content Strategy: Full file content
- Event Trigger:
pull_request.opened - Correlation ID:
f3e56ffc-4e48-449b-b3a5-97c8f223bc37 - LLM:
anthropic--claude-4.6-sonnet
SummaryThe following content is AI-generated and provides a summary of the pull request: Add Batch Notification API SupportNew Feature✨ Introduces a Batch Notification API that allows sending multiple notifications in a single Usage examples: // Typed batch notification
alert.notify('BookOrdered', [
{ recipients: [ buyer1.id ], data: { title: book.title, buyer: buyer1.name } },
{ recipients: [ buyer2.id ], data: { title: book.title, buyer: buyer2.name } },
])
// Default batch notification
alert.notify([
{ recipients: ['alice@example.com'], title: 'Order confirmed', description: 'Your order is on its way.' },
{ recipients: ['bob@example.com'], title: 'We have your order', description: 'Your order is being processed.' },
])Changes
PR Bot InformationVersion:
|
There was a problem hiding this comment.
The PR introduces a solid batch notification API with good test coverage, but there are several correctness issues that need to be addressed: caller object mutation in the batch emit path, a shared CSRF token across parallel requests that will cause failures in production, an empty-array crash in postNotification, inconsistent NotificationTypeKey prefixing between the auto-emit and manual notify() paths, and a double-notification in the bookshop test service.
PR Bot Information
Version: 1.22.5
- Correlation ID:
22937577-ccea-4eb3-a6af-936b4f6fea65 - File Content Strategy: Full file content
- Event Trigger:
pull_request.ready_for_review - LLM:
anthropic--claude-4.6-sonnet
Batch APIs should be supported such as
alert.notify('<Notification Type>', [{recipients: <recipient>, ...<properties>}, ...])