Skip to content
This repository was archived by the owner on Oct 1, 2026. It is now read-only.
This repository was archived by the owner on Oct 1, 2026. It is now read-only.

Stage 4: Notification core — Recipients, templates, email sending #180

Description

@bakhterets

Implement the core notification logic including recipient resolution, template rendering, and SMTP sending.

Files: internal/notification/notification.go, internal/notification/resolver.go, internal/notification/renderer.go, internal/notification/smtp.go, internal/notification/templates/

Tasks:

  • Define event kinds as typed constants: pending_review, reviewed, status_changed.
  • Recipient resolver: review audience (SMOD fixed address + operator + admin lists) + contact_email, normalize + dedup.
  • Build dedup_key as change_id : kind : recipient and store in JSONB.
  • Build and serialize payload snapshot (title, dates, old/new status, actor, incident link).
  • Change summary builder (title, dates, old/new status).
  • Email templates in internal/notification/templates/ (subject.txt, body.html) using text/template.
  • Email renderer (subject, body, deep link from payload).
  • SMTP sender using github.com/wneessen/go-mail with timeout + TLS.
  • Promote google/uuid to a direct dependency.
  • Verify: unit tests for kind mapping, recipient rules, dedup key, summary, payload serialization, and rendering.

Deliverable: Core notification system with templating, recipient resolution, and SMTP integration.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions