Repository navigation
refactor(notification): move v4 provider contracts into provider package - #5401
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Provider contracts and registry openmeter/notification/v4/provider/*, openmeter/notification/v4/event.go, openmeter/notification/v4/deliverystatus.go, openmeter/notification/v4/webhook.go, openmeter/notification/v4/provider/svix/README.md |
The provider contracts and registry use the provider package. The API uses Namespace and v4 notification types, and provider metadata fields use map[string]string. Provider error types are defined in the provider package. |
No-op and Svix provider adapters openmeter/notification/v4/provider/noop/*, openmeter/notification/v4/provider/svix/namespace.go, openmeter/notification/v4/provider/svix/channel.go, openmeter/notification/v4/provider/svix/errors.go, openmeter/notification/v4/provider/svix/provider.go, openmeter/notification/v4/providers/svix/errors.go |
The no-op and Svix providers use the provider-package interfaces and operation types. Svix error normalization classifies HTTP and transport errors; the previous implementation file is removed. |
Svix event delivery and observation openmeter/notification/v4/provider/svix/event.go, openmeter/notification/v4/provider/svix/eventattempt.go, openmeter/notification/v4/provider/svix/eventmapping.go, openmeter/notification/v4/provider/svix/*_test.go |
Svix event send, resend, and retrieval paths use provider-package types. Event and delivery provider metadata use string maps. Existing delivery, cancellation, retry, and routing test scenarios use the updated types. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Refactor
Possibly related PRs
- openmeterio/openmeter#5351: Introduced the provider contracts that this PR relocates to
notification/v4/provider. - openmeterio/openmeter#5352: Implemented the Svix provider against the contracts that this PR relocates and updates.
Suggested reviewers: gergely-kurucz-konghq
Merge Risk: 
Minimal · up to e1c94
-
The provider relocation appears mergeable after normal checks. No remaining repository references to the removed API were found; live Svix integration behavior remains unverified.
Pre-merge checks: 
4
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.
Comment @coderabbitai help to get the list of available commands.
The provider packages moved from providers/ to provider/ in #5401.
Overview
Move Notification V4 provider contracts into
v4/providerso provider operation types are separate from the core notification model. Renamev4/providers/{svix,noop}tov4/provider/{svix,noop}and update imports, tests, and documentation.The package exposes
Namespace,Registry,RegistryConfig, andNewRegistry. Move provider errors andWebhookProvideralongside the contracts. Replace the namedProviderDatamap withmap[string]stringto keep the dependency directionprovider -> v4without an import cycle.Notes for reviewer
This is a package refactor with unchanged validation and runtime behavior. It contains no service/adapter implementation, schema changes, or migrations.
Validation passed:
go test -race -short ./openmeter/notification/v4/...make lint-go GO_LINT_PATH=./openmeter/notification/v4/...git diff --checkLive Svix integration tests were excluded by
-short.

Confidence Score: 5/5
This refactor appears safe to merge.Summary
Moves notification V4 provider contracts into
v4/provider, separate from the core notification model.No actionable issues found. This review used source comparisons; tests were not run.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Svix["provider/svix"] --> Contracts["provider: contracts, errors, registry"] Noop["provider/noop"] --> Contracts Contracts --> Core["v4: events, delivery states, channel configuration"] Svix --> Core Noop --> CoreReviews (1) · Last reviewed commit: "refactor(notification): move v4 provider..." · Reviewed by Greptile
Summary by CodeRabbit