Skip to content

Add notification system infrastructure (issue #89, Phase 1)#91

Merged
barreiro merged 1 commit into
Hyperfoil:mainfrom
stalep:issue_89_p1
May 15, 2026
Merged

Add notification system infrastructure (issue #89, Phase 1)#91
barreiro merged 1 commit into
Hyperfoil:mainfrom
stalep:issue_89_p1

Conversation

@stalep
Copy link
Copy Markdown
Member

@stalep stalep commented May 15, 2026

Introduce the notification SPI, entities, service, REST endpoints, and CLI commands for configuring and dispatching change detection notifications.

Core components:

  • NotificationPlugin SPI with CDI auto-discovery for plugin implementations
  • NotificationMethod enum (WEBHOOK, EMAIL, SLACK, GITHUB_ISSUE)
  • NotificationConfig entity with per-folder config, secrets (@JsonIgnore), and user-defined message template with placeholders
  • NotificationLog entity for notification history and debugging
  • NotificationService observes ChangeDetectedEvent and dispatches to configured plugins, logging each attempt

Event changes:

  • ChangeDetectedEvent now carries folderId (for config lookup) and dispatch flag (false suppresses notifications for recalculate/bulk import)
  • WorkService.execute() resolves folderId from source values

REST API:

  • POST/GET/PUT/DELETE /api/notification/config for CRUD
  • GET /api/notification/log for notification history
  • GET /api/notification/methods for available plugin methods

CLI commands:

  • add notification to [--secrets] [--template]
  • list notifications [folder]
  • remove notification

No plugin implementations are included — those come in subsequent phases. Design doc added at docs/design/notification-system.md.

@stalep stalep requested a review from barreiro May 15, 2026 12:57
@Path("methods")
@PermitAll
@Operation(description = "List available notification methods")
public List<NotificationMethod> getAvailableMethods() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed. NotificationMethod is an enum, all values are present in the open api spec aready

Introduce the notification SPI, entities, service, REST endpoints, and
CLI commands for configuring and dispatching change detection notifications.

Core components:
- NotificationPlugin SPI with CDI auto-discovery for plugin implementations
- NotificationMethod enum (WEBHOOK, EMAIL, SLACK, GITHUB_ISSUE)
- NotificationConfig entity with per-folder config, secrets (@JsonIgnore),
  and user-defined message template with placeholders
- NotificationLog entity for notification history and debugging
- NotificationService observes ChangeDetectedEvent and dispatches to
  configured plugins, logging each attempt

Event changes:
- ChangeDetectedEvent now carries folderId (for config lookup) and
  dispatch flag (false suppresses notifications for recalculate/bulk import)
- WorkService.execute() resolves folderId from source values

REST API:
- POST/GET/PUT/DELETE /api/notification/config for CRUD
- GET /api/notification/log for notification history
- GET /api/notification/methods for available plugin methods

CLI commands:
- add notification <method> to <folder> <data> [--secrets] [--template]
- list notifications [folder]
- remove notification <id>

No plugin implementations are included — those come in subsequent phases.
Design doc added at docs/design/notification-system.md.
@barreiro barreiro merged commit cd787fc into Hyperfoil:main May 15, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants