Files
sxchnge/backend/notifications/PROVENANCE.md
T

33 lines
1.9 KiB
Markdown

# Source provenance
SendGrid driver source adapted from the local Sendico checkout at commit
`8bb20dcd622dd8eb92d289b6b34411e7eccab083`:
`api/notification/internal/server/notificationimp/mail/internal/sendgrid.go`.
The adaptation retains SendGrid SDK message construction, sender configuration
and personalization. It implements our provider-neutral `email.Sender` contract,
accepts already-rendered subject/text/HTML, uses bounded context-aware HTTP,
classifies delivery outcomes and never logs provider response bodies. Sendico's
builders, dynamic-template dependency, notification events and unused producer
were removed. Resend is a new driver using the same contract.
SMTP is an owned adapter using Go's standard `net/smtp`, verified `crypto/tls`
connections and standard MIME encoders. Its implicit-TLS connection configuration
matches Sendico's existing mail client, without importing its modules or copying
its keepalive/reconnect behavior. Local mailbox credentials are provisioned into
SXCHNGE Vault explicitly; the application does not read Sendico files or secrets.
Shared messaging was selected from that same Sendico revision's
`api/pkg/messaging`: `config.go`, `capability/errors.go`, `reliable/transport.go`,
`reliable/durable_settings.go`, `reliable/durable_settings_behavior.go`,
`internal/natsb/broker.go`, `internal/natsb/config/config.go`, and
`internal/natscap/durable.go`. The selected code lives in
`backend/shared/messaging`, with imports adapted to SXCHNGE. The runtime composes
those adapters and owns connection closure. Unused discovery, best-effort envelope
subscriptions, platform stream registries and parking provisioning were omitted.
The durable adapter was separated into transport, subscription and admin files;
publishing now honors its context and fetch polling respects its bounded wait.
No Sendico module or live Sendico infrastructure is required. Use SXCHNGE-owned
MongoDB and NATS deployments.