Skip to content

feat(notifications): add Svix provider - #5352

Merged
chrisgacsal merged 6 commits into
mainfrom
feat/notification-v4-svix
Oct 26, 2026
Merged

chrisgacsal merged 6 commits into
mainfrom
feat/notification-v4-svix

Conversation

@chrisgacsal

@chrisgacsal chrisgacsal commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Implement the Svix provider for the Notification V4 contracts introduced in #5351.

  • Manage namespaces as Svix applications and webhook Channels as endpoints, including partial updates, headers, signing-secret rotation, and Event-type routing.
  • Send, observe, and resend Events with per-destination outcomes, provider data, dispatch-generation-aware resend handling, and caller-supplied idempotency keys.
  • Normalize provider errors, preserve cancellation, and instrument operations with tracex/v2.
  • Add a live Svix test harness and webhook receiver, covering lifecycle operations, delivery and recovery, fan-out, partial failures, idempotency, catch-all routing, and partial updates.
  • Configure Docker Compose for test webhook delivery to the host.

Notes for reviewer

Depends on #5351. This is PR2 in the Notification V4 stack and targets feat/notification-v4-provider-types, not main, so the diff contains only the Svix implementation commit.

Review and merge #5351 first. After it merges, this branch should be updated onto main and the PR retargeted, accounting for a possible squash merge.

The existing Notification implementation is not replaced or wired to V4 by this PR. Provider behavior and persistence responsibilities are documented in openmeter/notification/v4/providers/svix/README.md. Untracked design documents and local files are excluded.

Validation

go test -tags=dynamic -race -count=1 -timeout=5m -v ./openmeter/notification/v4/...

Passed locally across the V4 package, no-op provider, Svix provider (including the live integration suite), and test utilities, with no race reports. git diff --check also passed.

Summary by CodeRabbit

  • New Features
    • Added Svix support for managing webhook namespaces and channels, sending and resending events, and tracking delivery attempts and outcomes.
    • Added configurable webhook routing for private network destinations.
  • Bug Fixes
    • Improved handling of retries, cancellations, timeouts, and partial delivery results.
  • Documentation
    • Added guidance on Svix webhook configuration, delivery behavior, retries, and event tracking.
  • Chores
    • Updated the Svix container image.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable defects were found.

Summary

Adds a Svix provider for Notification V4 without replacing the existing notification implementation.

  • Notification namespaces now have matching Svix applications.
  • Webhook channels now use Svix endpoints for delivery.
  • Events now send through Svix and return per-channel delivery results.
  • Svix operations now share provider errors and tracing.
  • The Svix test setup can deliver webhooks to a local receiver.

No new actionable issues were found. The previous-review checks did not pass, so this assessment covers the full PR diff. Tests were not run during this review; git diff --check passed.

Diagram

sequenceDiagram
  participant N as Notification
  participant P as Svix provider
  participant S as Svix
  participant W as Webhook endpoint
  N->>P: SendEvent
  P->>S: Create message with Event ID
  S-->>P: Message accepted
  P-->>N: Message ID and destination results
  S->>W: Deliver webhook
  N->>P: GetEvent with persisted generation data
  P->>S: Read destinations and attempt pages
  P-->>N: Delivery states, attempts, and observation snapshot
  N->>P: ResendEvent with next generation and snapshot
  P->>S: Resend to each requested endpoint
  P-->>N: Per-destination results and retained baseline
Loading

Reviews (7) · Last reviewed commit: "test(notifications): cover Svix response..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 9a0dc40 and 6289d71.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a7b69d0 and 9a0dc40.

Files selected for processing: 20
  • .github/docker-compose.depot-registry.yaml
  • docker-compose.yaml
  • openmeter/notification/v4/providers/svix/README.md
  • openmeter/notification/v4/providers/svix/cancellation_test.go
  • openmeter/notification/v4/providers/svix/channel.go
  • openmeter/notification/v4/providers/svix/errors.go
  • openmeter/notification/v4/providers/svix/errors_test.go
  • openmeter/notification/v4/providers/svix/event.go
  • openmeter/notification/v4/providers/svix/event_cancellation_test.go
  • openmeter/notification/v4/providers/svix/event_test.go
  • openmeter/notification/v4/providers/svix/eventattempt.go
  • openmeter/notification/v4/providers/svix/eventmapping.go
  • openmeter/notification/v4/providers/svix/eventmapping_test.go
  • openmeter/notification/v4/providers/svix/namespace.go
  • openmeter/notification/v4/providers/svix/provider.go
  • openmeter/notification/v4/providers/svix/provider_test.go
  • openmeter/notification/v4/providers/svix/testutils/auth.go
  • openmeter/notification/v4/providers/svix/testutils/env.go
  • openmeter/notification/v4/providers/svix/testutils/webhook.go
  • openmeter/notification/v4/providers/svix/testutils/webhook_test.go

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

Adds a Svix webhook provider for namespace and channel management, event sending, resending, and delivery observation. It adds provider error mapping, tracing, local Svix configuration, test utilities, and provider documentation.

Changes: Svix notification provider

Layer / File(s) Summary
Provider setup and namespaces
openmeter/notification/v4/providers/svix/provider.go, errors.go, namespace.go, errors_test.go, openmeter/notification/v4/providers/svix/README.md
Adds provider configuration and error classification, plus namespace retrieval, creation, update, and deletion.
Channel lifecycle
openmeter/notification/v4/providers/svix/channel.go, openmeter/notification/v4/providers/svix/cancellation_test.go, openmeter/notification/v4/providers/svix/README.md
Adds endpoint retrieval, creation, update, and deletion. Creation handles UID conflicts, while updates apply supplied fields, headers, and signing secrets.
Event delivery and observation
openmeter/notification/v4/providers/svix/event.go, eventattempt.go, eventmapping.go, event_test.go, eventmapping_test.go, event_cancellation_test.go, openmeter/notification/v4/providers/svix/README.md
Adds event sending, per-destination resending, paginated attempt retrieval, and delivery-state mapping. Tests cover resend baselines, response-size limits, and interruptions.
Local Svix test setup
.github/docker-compose.depot-registry.yaml, docker-compose.yaml, openmeter/notification/v4/providers/svix/testutils/*
Updates the Svix image and local network configuration. Adds test authentication, environment setup, and an HTTP webhook test server with request and concurrency tests.

Priority: Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant SvixProvider
  participant SvixAPI
  participant WebhookEndpoint
  Caller->>SvixProvider: SendEvent
  SvixProvider->>SvixAPI: Create or retrieve message
  SvixAPI-->>SvixProvider: Message response
  SvixAPI->>WebhookEndpoint: Deliver webhook
  Caller->>SvixProvider: GetEvent or ResendEvent
  SvixProvider->>SvixAPI: Retrieve message and attempt data
  SvixAPI-->>SvixProvider: Message and attempt responses
  SvixProvider-->>Caller: Destination results
Loading

Possibly related PRs

Suggested reviewers: gergely-kurucz-konghq, turip

Merge Risk: Minimal · up to 9a0dc

This adds a Svix provider and local test setup without wiring it into the existing notification path. No concrete merge-blocking defect was found, so the change looks safe to merge.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely summarizes the main change: adding the Svix provider for notifications.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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

Comment @coderabbitai help to get the list of available commands.

@chrisgacsal
chrisgacsal force-pushed the feat/notification-v4-svix branch from 9415bae to f980455 Compare October 26, 2026 11:30
@chrisgacsal chrisgacsal self-assigned this Oct 26, 2026
@chrisgacsal chrisgacsal added the release-note/feature Release note: Exciting New Features label Oct 26, 2026
Base automatically changed from feat/notification-v4-provider-types to main October 26, 2026 13:10
@chrisgacsal
chrisgacsal force-pushed the feat/notification-v4-svix branch from 48b50bc to 5d3b49a Compare October 26, 2026 13:10
@chrisgacsal
chrisgacsal marked this pull request as ready for review October 26, 2026 13:21
@chrisgacsal
chrisgacsal requested a review from a team as a code owner October 26, 2026 13:21
@chrisgacsal
chrisgacsal force-pushed the feat/notification-v4-svix branch from 9a0dc40 to 6289d71 Compare October 26, 2026 13:57
@chrisgacsal
chrisgacsal merged commit aab3e5b into main Oct 26, 2026
35 checks passed
@chrisgacsal
chrisgacsal deleted the feat/notification-v4-svix branch October 26, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/feature Release note: Exciting New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants