Skip to main content
Use alertPolicy when you want a workflow to carry operational alert metadata such as ownership, severity, runbooks, labels, and deterministic reactions. The API is declarative:
  • createSmithers(..., { alertPolicy }) defines module-level defaults.
  • smithers(..., { alertPolicy }) overrides those defaults for one workflow.
  • Smithers stores the merged policy on the workflow and exposes durable alert rows through the DB adapter and CLI.
  • deliver uses logical destination names such as oncall or author; transport clients live in your runtime integration.

Module Defaults

Workflow Overrides

The merged policy is stored on workflow.opts.alertPolicy. Rule names are policy keys for your integration: the core engine doesn’t attach built-in behavior to them in this release.

Merge Semantics

  • defaults merge shallowly.
  • defaults.labels merge by key.
  • rules merge by rule name; workflow-level fields win when a rule appears in both places.
  • reactions merge by reaction name; workflow-level definitions replace module-level ones with the same name.

Reaction Kinds

Reference a named reaction from rules, or inline a reaction object directly.

Runtime Surface

alertPolicy is currently workflow metadata plus a durable alert storage model. The core engine starts an AlertRuntime wrapper for configured policies, but it does not run built-in alert evaluators, poll approval age, execute delivery clients, or create pause/cancel/approval reactions automatically. Runtime integrations can:
  • Read the merged policy from workflow.opts.alertPolicy.
  • Persist alert instances with SmithersDb.insertAlert().
  • Query active alerts with SmithersDb.listAlerts().
  • Acknowledge, resolve, or silence alert rows with the DB adapter or CLI.

Durable Alert Instances

Alert rows live in _smithers_alerts. The row shape includes:

CLI

list returns active firing, acknowledged, and silenced alerts. Use --format json when another process needs to consume the rows.

Reactions and Delivery

Reaction objects (the five kinds above) are stored as data: your runtime boundary decides how to interpret them. deliver, for example, can route to Slack, PagerDuty, email, or an internal incident feed, but Smithers doesn’t bundle those transports.
  • Use alert policy for operational conditions such as failed runs, approval timeouts, or budget breaches.
  • Keep destinations logical and stable, for example oncall, author, or incident-feed.
  • Put transport details in your notifier boundary, not in workflow code.
  • Avoid using alert policy for every ordinary business notification.