Skip to content

feat(incidents): Nudge captains of stale, quiet incidents - #525

Merged
spalmurray merged 11 commits into
mainfrom
feat/stale-incident-nudges
Nov 18, 2026
Merged

spalmurray merged 11 commits into
mainfrom
feat/stale-incident-nudges

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds a daily task that posts a nudge in the incident channel when an incident looks forgotten. The captain is @mentioned. This lets incident owners close out incidents without someone checking on each one by hand.

An incident gets a nudge when all of these are true:

  • It is Active or Mitigated, and not private.
  • Its status has not changed for at least 1 business day (latest status_changed event, else creation time).
  • Nobody has posted in the channel or its threads for at least 2 business days. Bot messages and joins don't count, so channels with ongoing work are left alone.
  • It hasn't had a nudge in the last 3 business days (new Incident.last_nudge_at field).

The nudge suggests /inc mitigated or /inc resolved, asks for a short update if work is ongoing, and says it's experimental. It points feedback to #team-sre, the same channel as the frontend's Get Help link.

The feature is off by default, so nothing changes on deploy. To turn it on, set [slack] stale_incident_nudges_enabled = true in the deployed config. Migration 0026 adds the field and a django-q schedule that runs daily at 14:00 UTC and skips weekends.

Open questions:

  • Run time: 14:00 UTC is 9:00 AM ET / 3:00 PM CET in winter. Business days are counted as UTC weekdays.
  • Private incidents are skipped, the same as the Statuspage reminders. Should they get nudges too?
  • If the channel history can't be read, the incident is skipped, so a Slack error never causes a nudge.

via Spencer.

--

View Session [Sentry]

@spalmurray
spalmurray marked this pull request as ready for review November 17, 2026 20:56
@spalmurray
spalmurray requested a review from a team as a code owner November 17, 2026 20:56

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7530833. Configure here.

sentry-junior Bot and others added 2 commits November 18, 2026 15:00
Store each user's Slack timezone on UserProfile when we sync or create
them from Slack, and fetch it on first use for captains who don't have
one yet. Nudges only go out on the captain's weekdays. Incidents with no
captain, or whose captain's timezone can't be found, use UTC.

Co-Authored-By: Spencer Murray <[email protected]>
@spalmurray
spalmurray merged commit a69c7b8 into main Nov 18, 2026
34 checks passed
@spalmurray
spalmurray deleted the feat/stale-incident-nudges branch November 18, 2026 18:30
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.

2 participants