A community based topic aggregation platform built on atproto

feat(notifications): in-app notifications for replies, mentions, upvotes master

Adds the In-App Notifications backend from docs/PRD_NOTIFICATIONS.md: the AppView records replies, mentions and grouped upvotes as firehose events are indexed, and serves them through four new XRPC endpoints. Decisions made during the build are in docs/NOTIFICATIONS_IMPLEMENTATION.md. Changes: - Migrations 053 (notifications, notification_state, preferences), 054 (votes upvote-history index, CONCURRENTLY) and 055 (public post withdrawal markers). - Fan-out on comment create/edit/resurrection/delete, post insert/edit/ tombstone and vote create/replace/delete. Write-time gates skip self-notifications, blocked, erased and aggregator accounts, deleted or removed content, unindexed threads, and stale edits. Mentions capped at 10 per record. - Upvotes grouped into one notification per item. A voter bumps the group only on their first upvote. Trusted bridged upvote totals are counted and bump the group only above the high-water mark. - Read API: social.coves.notification.listNotifications (keyset cursor, placeholders for deleted, moderator-removed and admin-removed references, preview labels and thumbnails), getUnreadCount (capped at 101), updateSeen, getPreferences and putPreferences. - One shared read-visibility predicate for list and count: blocks, preferences, empty upvote groups and reference states. - sort_at is stamped with clock_timestamp() at write time. - Account erasure deletes a user's notifications under the erasure advisory-lock protocol. - Hourly retention job: read rows, unread overflow, empty upvote groups, and rows whose content has stayed hidden for more than 7 days. - Notification lexicons, plus their own release step in docs/LEXICON_PUBLISHING.md. - Unit, integration and E2E pipeline contract tests for each source. Deploy notes: migrations 053-055 run on deploy, and 054 builds its index CONCURRENTLY. Publish the notification lexicons with the step 4 release in docs/LEXICON_PUBLISHING.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>


+32445 -136
189 changed files