Skip to content

feat: NotificationSink protocol for out-of-band operator alerts #849

@Aureliolo

Description

@Aureliolo

Summary

Implement a pluggable NotificationSink protocol with adapters for ntfy/Slack/email to deliver out-of-band operator alerts when the web dashboard is not being watched.

Research Source

  • ntfy.sh v2.18.0 (self-hostable HTTP push notifications, Apache-2.0, 29.2k stars)

Motivation

Currently there is no way to alert operators outside the web dashboard. A TODO exists at security/timeout/scheduler.py:190:

# TODO: Wire escalation to a notification sink so the

Design

Protocol

class NotificationSink(Protocol):
    async def send(self, notification: Notification) -> None: ...

Adapters

  • ntfy: Single async HTTP POST to self-hosted or ntfy.sh instance
  • Slack: Webhook adapter
  • Email: SMTP adapter
  • Console: Fallback logging adapter (default)

Integration Points

  1. Approval gate -- notify when contexts are parked waiting for human approval
  2. Budget enforcer -- notify on threshold breach alerts (warning/critical)
  3. Security escalation -- notify when deny-and-continue threshold is reached
  4. Stagnation detection -- notify on TERMINATE verdict

Configuration

notifications:
  enabled: true
  sink: "ntfy"
  ntfy:
    server: "https://ntfy.sh"
    topic: "synthorg-alerts"
    priority: "high"
  filters:
    min_severity: "warning"  # info, warning, critical

Key Files

  • src/synthorg/engine/approval_gate.py -- parked context notifications
  • src/synthorg/budget/enforcer.py -- budget threshold alerts
  • src/synthorg/security/timeout/scheduler.py -- existing TODO at line 190

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:mediumShould do, but not blockingscope:medium1-3 days of workspec:architectureDESIGN_SPEC Section 15 - Technical Architecturespec:task-workflowDESIGN_SPEC Section 6 - Task & Workflow Enginetype:featureNew feature implementationv0.7Minor version v0.7v0.7.4Patch release v0.7.4

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions