Skip to content

fix(alertmanager): send resolved notifications to the AI-SRE relay [JDWLABS-476] - #420

Open
jdwlabs-agent-bot[bot] wants to merge 1 commit into
mainfrom
fix/JDWLABS-476-relay-send-resolved
Open

fix(alertmanager): send resolved notifications to the AI-SRE relay [JDWLABS-476]#420
jdwlabs-agent-bot[bot] wants to merge 1 commit into
mainfrom
fix/JDWLABS-476-relay-send-resolved

Conversation

@jdwlabs-agent-bot

Copy link
Copy Markdown
Contributor

What

Flips send_resolved to true on the ai-sre Alertmanager receiver so the relay receives resolved notifications, and records why in the adjacent comment. One line of config; the discord receiver in the same file already has it on.

Why

The relay opens one Jira ticket per alert fingerprint and skips investigating repeats while that ticket is open. It never learned that a condition had cleared, so tickets stayed open until a person closed them, and every later firing of the same alert name was absorbed as a repeat. This week that left eleven stale tickets open, made the relay investigate nothing for 12h (AiSreRelayInvestigatingNothing), and produced an auto-remediation PR proposing to disable dedup entirely.

The relay-side feature that consumes this notification is jdwlabs/apps#213: note the resolve time on the ticket, close it after the alert stays resolved for a configurable grace (default 6h), cancel on re-fire, and never let a Done ticket suppress a new investigation. Merge order does not matter: the relay currently drops resolved alerts at the webhook, so enabling this first is inert until #213 deploys.

Verification

  • python3 -m unittest discover -s tools/tests -t tools/tests passes locally.
  • The routing matrix test (tests/alertmanager-routing) is unaffected: receivers and routes are unchanged, only a delivery flag on an existing webhook config.

Review gate

tenants/platform/ is a CODEOWNERS-gated path, so this PR is authored under the jdwlabs-agent-bot identity to allow a human codeowner approval without the self-review wall.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FvYBM6o7wARm2v9jmDp1yY

The relay opens one Jira ticket per alert fingerprint and skips
investigating repeats while that ticket is open. Without resolved
notifications it never learns the condition cleared, so tickets stayed
open until a person closed them and every later firing of the same alert
was absorbed as a repeat. The relay now closes its own ticket after an
alert stays resolved for a grace period, which only works if Alertmanager
delivers the resolve; the discord receiver already had this on.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FvYBM6o7wARm2v9jmDp1yY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants