Discord Feedback Notification Bug Fix + Resolution Notification
Date
ImpactMedium
Decisions
D1: Fix missing env block in GitOps manifest
- Context: In Sprint 63, the
identity-discord-secretK8s Secret and source repo manifest were written, but the env block was not reflected in the GitOps repo (aether-gitops), causing Discord notifications to be silently skipped. - Choice: Add
DISCORD_FEEDBACK_WEBHOOK_URLsecretKeyRef env block toidentity-service.yamlin aether-gitops - Alternatives: None (obvious omission fix)
- Code Paths:
aether-gitops/algosu/base/identity-service.yaml
D2: Add in-app notification when feedback is resolved
- Context: Need to notify feedback authors when their feedback is resolved. Existing NotificationService + SSE infrastructure is complete, so no new infrastructure needed.
- Choice: Add
FEEDBACK_RESOLVEDNotificationType + call NotificationService.create() on RESOLVED transition in FeedbackService - Alternatives: Discord DM (not possible via webhook), email (email service not built)
- Code Paths:
services/identity/src/notification/notification.entity.ts,services/identity/src/feedback/feedback.service.ts
Patterns
P1: Fire-and-forget notification pattern
- Where:
services/identity/src/feedback/feedback.service.ts(updateStatus method) - When to Reuse: When attaching supplemental notifications to core business logic (status change). Absorb failures with Promise.catch() to avoid affecting the main flow.
P2: DB ENUM extension migration pattern
- Where:
services/identity/src/database/migrations/1709000019000-AddFeedbackResolvedNotificationType.ts - When to Reuse: When adding a new value to a PostgreSQL ENUM. Order is mandatory:
COMMITโALTER TYPE ADD VALUE IF NOT EXISTSโBEGIN
Metrics
- Commits: 3, Files changed: 8 (+324/-5)