Skip to content

Incident Lifecycle & States

Incidents follow a strict state machine that coordinates team response from creation through closure.

State Machine

detected → triaging → active → mitigated → resolved → closed
detected → active (acknowledge)
detected/active → mitigated
detected/active/mitigated → resolved
mitigated/resolved/closed → active (reopen)
detected/active → cancelled

resolved, closed, and cancelled are terminal states. Deletion is a soft delete via a deleted_at tombstone — rows are never hard-deleted.

States

StatusDescriptionTypical Trigger
detectedInitial creation, awaiting triage or acknowledgementManual creation or promotion from an alert investigation
triagingUndergoing triage assessmentPOST /api/v1/incidents/{id}/begin-triage
activeAcknowledged, active response underwayacknowledge, or promote from triaging
mitigatedContained/fix in place, monitoringPOST /api/v1/incidents/{id}/mitigate
resolvedFully resolved (terminal)POST /api/v1/incidents/{id}/resolve
closedFinalized after resolution (terminal)POST /api/v1/incidents/{id}/close
cancelledFalse alarm (terminal)POST /api/v1/incidents/{id}/cancel

Optimistic Concurrency

Every transition goes through TransitionIncidentStatus, which guards the update with WHERE status IN (fromStatuses). If the incident is no longer in an allowed source state, the update affects zero rows and the API returns a conflict (incident status changed concurrently) instead of corrupting state. This makes concurrent commands safe.

Transitions

Each row lists the source states accepted by the action and the resulting state.

ActionFromToNotes
Begin TriagedetectedtriagingInitializes the incident document sections
PromotetriagingactivePropagates service status
AcknowledgedetectedactiveSets sla_acknowledged_at, stops escalation
Mitigatedetected, activemitigatedSets mitigated_at, propagates service status
Resolvedetected, active, mitigatedresolvedRequires resolution docs (see below); cascades resolved to linked firing alerts
CloseresolvedclosedSets closed_at
Reopenmitigated, resolved, closedactiveReturns incident to active response
Canceldetected, activecancelledTerminal false-alarm state

Resolution Requirements

resolve is rejected unless the incident has a non-empty summary and the following incident-document sections are filled in:

  • impact_assessment
  • root_cause
  • resolution

If any are missing, the API returns a validation error listing the missing fields.

Automatic Timestamps

applyStatusTimestamps stamps lifecycle fields as each transition lands:

Transition ToTimestamp(s) Set
triagingtriaged_at
activesla_acknowledged_at
mitigatedmitigated_at
resolvedresolved_at and sla_resolved_at
closedclosed_at

These timestamps drive the SLA metrics (MTTA, MTTR, MTTM) reported by the metrics API.

Side Effects

Beyond timestamps, transitions trigger:

  • Timeline entries — each action records a structured timeline entry (with an ICS event type for triage/promote/document changes)
  • Service status propagation — promote, mitigate, resolve, and reopen update the affected service status
  • Alert cascade — resolving an incident cascades resolved to linked firing alerts
  • Audit events — every transition writes a fire-and-forget audit event
  • Incident channel updates — when Slack incident channels are enabled, status changes are posted to the incident channel
  • SLA escalation — the SLA worker triggers escalation on a response breach; acknowledgement stops it

API Endpoints

ActionMethodPathPermission
Begin TriagePOST/api/v1/incidents/{id}/begin-triageincidents:command
PromotePOST/api/v1/incidents/{id}/promoteincidents:command
AcknowledgePOST/api/v1/incidents/{id}/acknowledgeincidents:command
MitigatePOST/api/v1/incidents/{id}/mitigateincidents:command
ResolvePOST/api/v1/incidents/{id}/resolveincidents:command
ClosePOST/api/v1/incidents/{id}/closeincidents:command
ReopenPOST/api/v1/incidents/{id}/reopenincidents:command
CancelPOST/api/v1/incidents/{id}/cancelincidents:command
EscalatePOST/api/v1/incidents/{id}/escalateincidents:command

See Also

Released under the MIT License.