FrankenTerm

Notification Pipeline

246 words1 min read4 subsectionsFrom the README at ft 0.15.21

On this page4
BackendsAlert manager (alerts.rs)Redaction before emissionReliability

When detections fire, ft watch can notify operators through desktop notifications and webhooks.

Backends

Channel File When to use
Desktop notification desktop_notify.rs Interactive operator on a workstation
Email email_notify.rs (config only) Not wired: no SMTP sender exists yet; --notify-via email on its own is rejected and an enabled email config logs a warning (ft-9b41l)
Webhook webhook.rs Integrate with PagerDuty / Slack / custom routers
Prometheus alert via the metrics surface Existing alerting infra
In-app events event bus Other ft surfaces (web/SSE, MCP, robot events)

Alert manager (alerts.rs)

Planned: an alert manager that routes detections to channels by rule (severity, rule_id pattern, pane, time-of-day). alerts.rs currently evaluates usage/cost thresholds only and is not connected to the notification pipeline. The intended rule shape:

  • Severity threshold
  • Channel list (one or more backends)
  • Throttling window (suppress duplicates)
  • Mute list (operator can ft mute add <identity_key> --for 1h; find the identity_key via ft events --format json)

Redaction before emission

All outbound notifications go through the Redactor first; the same one used for get-text and search responses. A detection whose snippet contains a secret never leaves the host via email or webhook.

Reliability

Under ft watch, webhook delivery retries transport errors, 408, 429 and 5xx up to 5 attempts (1 s initial delay, doubling, capped at 4 s); other 4xx responses and cancellation are not retried. Each endpoint has a circuit breaker: after 5 consecutive failed deliveries it is skipped for 5 minutes (recorded as webhook_circuit_open) so a dead endpoint cannot stall the pipeline.