incidents: fire a fresh Slack 'open' on the first Critical escalation#199
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖
Building on the new "critical opens immediately" semantics: when an incident has already been opened at a lower severity and a Critical contributor joins after the original Slack
incident_openhas shipped, we now enqueue a freshincident_openrow as the escalation signal. The drainer ships it at Critical timing (no holding window).Gated on a new
incidents.escalated_atcolumn so this only fires the first time per incident — subsequent Critical joins are silent, otherwise a flapping check could re-page operators repeatedly.The two cases when a Critical joins an existing incident now read as:
escalated_at IS NULL→ stampescalated_atand enqueue a fresh open. The message text uses the existing "incident opened" template (for now, as if the incident had opened for the first time).The previous test asserting "no Slack noise after delivered open" is replaced with the inverse-and-then-some: original + escalation rows, escalation deliver_after ~now,
escalated_atrecorded; plus a new test that a second Critical join leaves the row count at two.