Observer
Observer

Incident and maintenance lifecycle

States, transitions, and the events fired on each.

Observer treats incidents and maintenances as instances of the same underlying row (the updates table). The lifecycle state is derived from a grid of timestamp columns rather than an explicit state column; this keeps the model coherent regardless of whether the transition happened via API, server action, or cron.

States

StateTrigger
draftRow exists but published_at IS NULL. Invisible to the public.
publishedpublished_at set. Renders on the public page.
resolvedresolved_at set. Final lifecycle for an incident.
scheduledMaintenance with scheduled_start_at set, actual_start_at NULL.
in_progressMaintenance with actual_start_at set, actual_end_at NULL.
completedMaintenance with actual_end_at set.
canceledEither type with canceled_at set.
deletedSoft-delete via deleted_at. Permanent; not displayed anywhere.

Transitions

       draft
         │ POST /publish

     published ──── POST /resolve ──▶ resolved

         │ DELETE

       deleted

  (maintenance only)
   scheduled ── cron @ scheduled_start_at ──▶ in_progress
                                                    │ cron @ scheduled_end_at

                                                 completed

   any state ── POST /cancel ──▶ canceled

Webhook events

Each transition fires a webhook event. See Webhook payload reference for exact body shapes.

EventFires when
incident.createdRow inserted (regardless of draft / publish).
incident.publishedpublished_at set.
incident.updatedTitle, severity, or affected services patched.
incident.message_addedMessage appended to timeline.
incident.resolvedresolved_at set.
incident.deleteddeleted_at set.
maintenance.scheduledRow inserted with scheduled_start_at.
maintenance.starting_soonCron fires within 1h of scheduled_start_at. Once per row.
maintenance.startedactual_start_at set (manual or cron).
maintenance.completedactual_end_at set.
maintenance.canceledcanceled_at set.

Auto-message side effects

Some lifecycle transitions append a system message to the timeline:

  • maintenance.started (cron or API) appends an Information message: "Maintenance started."
  • maintenance.completed (cron or API) appends a Resolved message: "Maintenance completed."
  • maintenance.canceled (API) appends an Information message: "Maintenance canceled."

These are visible on the public page exactly like operator-authored messages. They exist so the timeline reflects every state change without requiring the operator to remember.

Was this page helpful?