Skip to content

feat(aggregator): /notifications weekly sent-vs-acted roll-up (#3319) - #5193

Merged
dezren39 merged 1 commit into
mainfrom
queue/8865-3319-notifications-rollup
Nov 3, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/8865-3319-notifications-rollup

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Implements #3319 (slice (e) of #1254): the weekly notification sent-vs-acted-on roll-up.

What

  • New read-only page /notifications (+ /api/notifications.json twin), registered in the page manifest at dropdown tier (curation record updated in curation-1497.test.ts, following the post-dashboard: clean up the page list (12 registered pages, overlaps to resolve) #1497 pattern).
  • New pure derivation src/notifications.ts: rollupNotificationSends(rows, now) groups the alerts.notification_sends ledger by class and rolling 7-day week over a four-week window. Only outcome = sent rows 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 its acted_on_at — the durable Ack stamp — falls within 24 hours of the send.
  • AlertsStore.listSends() reads the ledger; the server route mirrors the /alerts route's availability behaviour (unavailable page / 503 twin when the store is unreachable).
  • The page documents Ack-based attribution and its limits in plain words, and renders a sub-10% class as a default-off proposal — display only; nothing mutates a preference or a default.

Verification

  • bun test (full aggregator suite): 1444 pass, 0 fail — including new test/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.ts GhKind, overview.test.ts HealthView) — none introduced by this change.

Fixes #3319


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 22:34
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d4fa0830-eef9-43c9-a932-71b6c51c63fb
Commits

Reviewing files that changed from the base of the PR and between a90fb77 and 9de475a.

Files selected for processing: 8
  • pm-stack/aggregator/README.md
  • pm-stack/aggregator/src/alerts.ts
  • pm-stack/aggregator/src/notifications.ts
  • pm-stack/aggregator/src/pages.ts
  • pm-stack/aggregator/src/render.ts
  • pm-stack/aggregator/src/server.ts
  • pm-stack/aggregator/test/curation-1497.test.ts
  • pm-stack/aggregator/test/notifications.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T22:36:17.583818Z 9de475a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit f74234f into main Nov 3, 2026
1 check passed
@dezren39
dezren39 deleted the queue/8865-3319-notifications-rollup branch November 3, 2026 22:38
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.

feat(aggregator): notification measurement — weekly sent-vs-acted-on roll-up (#1254 slice e)

1 participant