Files
Pulse/docs
rcourtman bfbc5a73ed Honor HTTP 429/503 Retry-After headers in NotificationQueue (#4840)
## Why
2026-11-20 production telemetry showed **28,900 `rate_limited`
notification failures in 7 days** across 648 installs.
`readWebhookResponse` already cloned `resp.Header` on every HTTP
`429`/`503` (the shared transport for Discord, Slack, Telegram, ntfy,
Pushover, Gotify, PagerDuty, Teams, generic webhooks, and Apprise HTTP),
but every queued sender discarded those headers and
`NotificationFailureError` carried no `RetryAfter` duration — causing
`NotificationQueue` to hammer rate-limited endpoints on fixed backoff
instead of waiting out the receiver's cooldown window.

## What changed
- **`internal/notifications/failure_class.go`:** Added `RetryAfter
time.Duration` on `NotificationFailureError`,
`FailWithClassAndRetryAfter` / `FailfWithClassAndRetryAfter`, and
`RetryAfterFromError` (walks nested `NotificationFailureError` unwrap
chains so `safeAppriseError` and `webhookResponseReadError` preserve the
hint automatically).
- **`internal/notifications/webhook_response.go`:** Added
`parseNotificationRetryAfter` (supports integer/fractional seconds and
HTTP-date `Retry-After` on HTTP `429`/`503`, plus Discord
`X-RateLimit-Reset-After` fallback on HTTP `429`, clamped to `[1s,
15m]`) and attached the hint in `readWebhookResponse` without ever
reading or logging response bodies or raw header values.
- **`internal/notifications/queue.go`:** Wired
`RetryAfterFromError(err)` through `processNotification` →
`scheduleRetryWithHint` → `calculateBackoffForRetry`, honoring
`max(classBackoff, retryAfter)` capped at 15 minutes.
- **Tests & contract:** Added tests in
`webhook_response_retry_hint_test.go` and `queue_test.go`; updated
`docs/release-control/v6/internal/subsystems/notifications.md`.

## Verification
- `pulse-dev-validate`: targeted Retry-After, confidentiality, and queue
tests passed.
- `pulse-dev-validate`: full `go test -count=1
./internal/notifications/...` passed.
- `pulse-dev-validate`: canonical `.husky/pre-commit`, `commit-msg`, and
`.husky/pre-push` gates passed.
2026-11-21 10:30:41 +00:00
..
…
2026-11-13 03:09:31 +00:00
2026-11-21 02:04:40 +00:00
2026-11-17 20:11:48 +00:00
…
…
2026-11-21 02:04:40 +00:00
2026-11-21 02:04:40 +00:00

Pulse documentation

Start here for installation, platform setup, security, operations, and Pulse Intelligence. Commands, configuration keys, image names, API fields, and product identifiers remain untranslated in localized guides.

The local guides below are shipped with this installation. Links labelled GitHub or online open online resources in a new tab and need network access; their current content can differ from your installed version.

Need help with a failure? Read the safe reporting guidance before sharing evidence. A second reproduction or diagnostics export is not required; keep the original evidence if another attempt could interrupt workloads or send duplicate notifications. GitHub reports and attachments are public: review them locally and keep credentials and private details out.

Start here

Localized getting started guides: Deutsch · Español · Français

Platforms and agents

VMware vSphere support is early access. Current builds expose dedicated vSphere inventory and recovery context, but operators should validate the integration against their own vCenter before production use.

Monitoring and operations

Pulse Intelligence

Patrol watch-only analysis is available on Community with a local model or the operator's own provider. Investigation and governed fixes require the relevant Pulse Pro capabilities.

Security, privacy, and access

Plans and managed access

Pulse Cloud is not generally available. Ordinary self-hosted Pulse remains the primary installation path; MSP and Enterprise access are explicit commercial paths rather than defaults in self-hosted setup.

Development and reference

Detailed design notes and dated migration specifications may remain in this directory for maintainers, but they are not operator setup guides unless they are linked from the sections above.

Previous versions and migrations

Found a bug? Use the issue forms. For setup questions, use GitHub Discussions.