Files
Daniel Salazar bc73cde987 feat(alarms): channel keys, and calls an uptime monitor can poll (#4672)
* feat(alarms): channel keys, warning in chat, and calls an uptime monitor can poll

- `create(..., { channel })` names the area that owns an alarm; config maps
  keys to Slack channels (`pager.slack.channels`), unmapped keys post to the
  default channel. `HttpError` takes `alarmChannel`, and the upstream_* codes
  the error gate forces go to `ai_providers`.
- Slack can post with a bot token (`chat.postMessage`), which reaches any
  channel and links a call to its message; the webhook stays as a fallback.
- Defaults: PagerDuty takes `error` and up, Slack takes up to `warning`.
- `pager.calls.rules` maps alarm ids or prefixes to call groups. A matching
  alarm is recorded in system KV until it has been quiet for `ttlMs`;
  `GET /alarms/calls?group=` (internal-auth secret) answers 503 while one is
  active, with a short plain-text body linking each call's chat message.
- Core alarms retiered: non-urgent `warning`s become `info` with a channel;
  critical and error alarms are unchanged.

* fix(alarms): keep warning on the pager; calls link to where the alarm landed

- PagerDuty takes `warning` and up again, and Slack stays at `info` when a
  pager exists: `warning` is the low-urgency pager queue, `info` is chat.
- An alarm that calls is no longer also posted to Slack. Its link comes from
  the transport that took it: the Slack message, or the PagerDuty incident,
  looked up with the new `pagerduty.apiToken` (REST, read-only is enough).
- The PagerDuty transport moves to its own module.
2026-11-17 22:40:29 -07:00
..