block / block/proto-fleet

[Notifications] Connect service for channels and rules with server-side org enforcement

Open
#177 0 comments 0 reactions 1 assignee Claimed by @illegalprime View on GitHub
Dominant language
Go
Stars
55
Forks
16
Avg merge
1d 22h
Merged PRs (30d)
87

Description

The Connect surface for rule and channel CRUD, plus a synthetic `Test` for channels that runs without saving them into Alertmanager.

Checklist:

- [ ] `proto/notifications/v1/notifications.proto` declares `ChannelService` (Create/Get/List/Update/Delete/Test) and `RuleService` (Create/Get/List/Update/Delete/Validate/ListFiringAlerts). `RuleExpression { template_values | raw_promql }` oneof; rule templates cover `Offline|Hashrate|Temperature|Pool|Command|Custom`.
- [ ] buf lint clean; Go and TS generated through the existing `buf generate`.
- [ ] Handler package `server/internal/handlers/notifications` reads `organization_id` from the auth interceptor's context, never from the request body.
- [ ] Cross-org rejection assertion in every method test. Helper added to `server/internal/testutil` so future PRs reuse it.
- [ ] `ChannelService.Test` accepts an unsaved or saved channel definition, builds a synthetic Alertmanager-shaped payload, and delivers it directly: SMTP via the SMTP infrastructure, webhook via the safe outbound client (Issue 7). Returns delivery status, response code, and error detail. Rate-limited per user (1/min).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.