Skip to content

fix: remove admin summary from emails sent counter#1749

Merged
davidgamez merged 1 commit into
mainfrom
admin_summary_email_count
Jun 24, 2026
Merged

fix: remove admin summary from emails sent counter#1749
davidgamez merged 1 commit into
mainfrom
admin_summary_email_count

Conversation

@davidgamez

Copy link
Copy Markdown
Member

Summary:

This pull request improves the accuracy of notification delivery statistics by ensuring that admin summary emails (admin.event_summary) are excluded from delivery counts, as including them could mislead administrators. It also introduces a dedicated test to verify this behavior.

Notification delivery statistics improvements:

  • Updated the _aggregate_delivery_stats function in dispatch_monitor.py to exclude admin.event_summary notifications from delivery statistics by joining with NotificationEvent and filtering out those with the ADMIN_EVENT_SUMMARY type. [1] [2]

Testing enhancements:

  • Added the TestAggregateDeliveryStats test case in test_dispatch_notifications.py to ensure that admin summary deliveries are not counted in delivery statistics, including setup and teardown logic for test isolation.
  • Imported the updated _aggregate_delivery_stats function into the test module for direct testing.

Expected behavior:

Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).

Testing tips:

Provide tips, procedures and sample files on how to test the feature.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@davidgamez davidgamez changed the title remove admin summary from emails sent cunter fix: remove admin summary from emails sent counter Jun 24, 2026
@davidgamez davidgamez requested a review from cka-y June 24, 2026 18:12

@cka-y cka-y left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidgamez davidgamez merged commit 29e059f into main Jun 24, 2026
29 checks passed
@davidgamez davidgamez deleted the admin_summary_email_count branch June 24, 2026 18:58
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.

2 participants