{
  "name": "Service Recovery: Unexpected Replication Delay",
  "description": "Check replication health and pending writes. Confirm the affected service, incident owner and current processing load before selecting the recovery procedure.",
  "steps": [
    {
      "text": "Confirm the affected service and incident owner in the incident channel. Ask the incident coordinator to record the scope before any recovery change.",
      "timing": "At the start of the incident",
      "tools": [
        "Incident channel",
        "Service inventory"
      ],
      "implicit_rules": [
        "Keep one incident owner responsible for coordinating changes."
      ]
    },
    {
      "text": "Check replication health, pending writes and the current processing load. Compare the standby state with the approved recovery range in the service runbook.",
      "timing": "Before choosing the recovery procedure",
      "tools": [
        "PostgreSQL monitoring",
        "Service runbook"
      ],
      "implicit_rules": [
        "A healthy connection alone does not confirm that the standby is ready."
      ]
    },
    {
      "text": "When the standby falls outside the approved recovery range, the team does not apply the usual promotion sequence. The on-call engineer escalates to the database owner, checks downstream queue status and follows the incident-specific recovery path.",
      "timing": "When the standby is outside the approved recovery range",
      "tools": [
        "Incident channel",
        "Queue monitoring"
      ],
      "implicit_rules": [
        "Do not apply the usual promotion sequence until the database owner confirms the recovery path."
      ]
    },
    {
      "text": "Ask the database owner to confirm the recovery action and its rollback conditions. Record the decision and the observations used to make it in the incident notes.",
      "timing": "Before applying the approved change",
      "tools": [
        "Service runbook",
        "Incident notes"
      ],
      "implicit_rules": [
        "Preserve the reasoning so the next on-call engineer can understand the exception."
      ]
    },
    {
      "text": "After the approved action, check replication state and downstream processing with the incident coordinator. Keep the incident open until the service owner confirms recovery.",
      "timing": "After the recovery action",
      "tools": [
        "PostgreSQL monitoring",
        "Queue monitoring"
      ],
      "implicit_rules": [
        "Check the downstream queue as well as the database."
      ]
    },
    {
      "text": "Update the handover notes with the exceptional condition, the responsible roles and the approved runbook reference. Ask the database owner to resolve the remaining threshold question.",
      "timing": "During handover",
      "tools": [
        "Knowledge Hub",
        "Service runbook"
      ],
      "implicit_rules": [
        "Record access requests through the normal approval channel; never copy secrets into the handover."
      ]
    }
  ],
  "decisions": [
    {
      "decision": "Escalate before promoting an out-of-range standby.",
      "alternatives_considered": [
        "Apply the usual promotion sequence",
        "Wait for the database owner to confirm an incident-specific path"
      ],
      "rationale": "Pending writes and downstream queue state may change the safe recovery path.",
      "evidence_or_outcome": "The fictional interview identifies the escalation condition. No production recovery was performed."
    }
  ],
  "needs_followup": true,
  "missing_info": [
    "Which approved runbook defines the recovery range for this service?"
  ],
  "linear_text": "Check replication health and pending writes. Confirm the affected service, incident owner and current processing load before selecting the recovery procedure. When the standby falls outside the approved recovery range, the team does not apply the usual promotion sequence. The on-call engineer escalates to the database owner, checks downstream queue status and follows the incident-specific recovery path."
}
