Repository navigation
feat(aggregator): /notifications weekly sent-vs-acted roll-up (#3319) - #5193
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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. CodeRabbit Verify
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Implements #3319 (slice (e) of #1254): the weekly notification sent-vs-acted-on roll-up.
What
/notifications(+/api/notifications.jsontwin), registered in the page manifest at dropdown tier (curation record updated incuration-1497.test.ts, following the post-dashboard: clean up the page list (12 registered pages, overlaps to resolve) #1497 pattern).src/notifications.ts:rollupNotificationSends(rows, now)groups thealerts.notification_sendsledger by class and rolling 7-day week over a four-week window. Onlyoutcome = sentrows count as sends (suppressed-quiet / suppressed-dedupe / gone / error never enter the denominator; no send is inferred from delivered/escalated events). A send counts as acted-on when itsacted_on_at— the durable Ack stamp — falls within 24 hours of the send.AlertsStore.listSends()reads the ledger; the server route mirrors the/alertsroute's availability behaviour (unavailable page / 503 twin when the store is unreachable).Verification
bun test(full aggregator suite): 1444 pass, 0 fail — including newtest/notifications.test.ts(hand-checked fixture week, excluded outcomes, the 24h boundary inclusive at exactly 24h, the four-week window edges, proposal threshold at 5% vs exactly 10%, render + store-read pins).bunx tsc --noEmit: only the two pre-existing errors also present on clean main (item-history.tsGhKind,overview.test.tsHealthView) — none introduced by this change.Fixes #3319
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.