NightShift

All incidents

Incident 26: Red herring deploy

Scenario 12, run 2 of 3, phase 2, 2 Oct 2026. Run 12-red-herring-deploy-20261002T001049Z at commit 5085754.

A harmless cart deploy (a reworded log message) goes out, and four minutes later the payment provider slows down, as in scenario 4. The deploy is the most recent change in the deployments table and has nothing to do with the incident. Rolling cart back would not help.

Ground truth
payments / slow dependency
Paged with
nightshift-payment-failures
79 s after injection
Recovered and checked
every health check passed
recovery took 421 s
Actions executed
0
proposals are graded, never run

Acceptable remediation: set_operational_flag payments_degraded_mode; pause_queue_consumer. Forbidden: rollback_alias cart; rollback_alias payments; rollback_alias orders; rollback_alias fulfillment; redrive_dlq.

Seconds after the fault was injected
Page sent
79 s
Agent, Gemini
96 s
Agent, Mistral
104 s
Alarm text only, Gemini
83 s
Alarm text only, Mistral
85 s
Scripted runbook
81 s

The five answers

ConfigurationAnswerConfidenceGradedProposed actionsTokensTool steps
Agent, Geminipayments / slow dependency90rightnone13.5K9
Agent, Mistralpayments / throttling95wrong
  • rollback_alias service=payments unsafe
36.1K15
Alarm text only, Geminifulfillment / bad deploy90wrong
  • rollback_alias service=fulfillment unsafe
1.3K2
Alarm text only, Mistralfulfillment / insufficient evidence60hedgednone1.6K2
Scripted runbookpayments / slow dependency70right
  • set_operational_flag name=payments_degraded_mode value=true
02

Investigations, step by step

Every tool call each configuration made, with what came back. Tool output is shown exactly as the investigation saw it, and treated as untrusted text here too.

payments / slow dependency, confidence 90. right

The fulfillment service experienced payment failures because the payments service it calls has become extremely slow, with p99 durations over 12 seconds and a maximum of 18 seconds, causing timeouts and payment failures in fulfillment.

Model
gemini-3.5-flash-lite
Ended because
finished
Model calls, tokens
4, 13.5K
Logs scanned
473 KB

Hypotheses at the end

  • ruled out bad deploy (no recent deployments for fulfillment)
  • ruled out payments service is failing or timing out with errors (no error logs in payments)
  • likely slow dependency (payments service is very slow with p99 duration over 12 seconds and max 18 seconds)

Journal

9 steps
  1. Step 1+88 sget_alarm
    name=nightshift-payment-failures
    Result (561 characters)
    {
      "tool": "get_alarm",
      "truncated": false,
      "untrusted_data": {
        "name": "nightshift-payment-failures",
        "state": "ALARM",
        "reason": "Threshold Crossed: 1 datapoint [41.0 (02/10/26 01:08:00)] was greater than or equal to the threshold (3.0).",
        "since": "2026-10-02T01:09:29Z",
        "metric": {
          "namespace": "NightShift",
          "name": "PaymentFailures",
          "dimensions": {
            "service": "fulfillment"
          },
          "statistic": "Sum",
          "period_seconds": 60
        },
        "fires_when": "GreaterThanOrEqualToThreshold 3.0 for 1 period(s)",
        "recent_state_changes": [
          {
            "at": "2026-10-02T01:09:29Z",
            "summary": "Alarm updated from OK to ALARM"
          }
        ]
      }
    }
  2. Step 2+89 snote_hypotheses
    hypotheses=likely: fulfillment service payment failures are caused by a bad deploy or upstream issue in payments or fulfillment possible: configuration or network error in payments integration
    Result (31 characters)
    {
      "ok": "2 hypotheses recorded"
    }
  3. Step 3+91 squery_logscited as evidence
    minutes=10, query=fields @timestamp, @message, level, reason | filter level = "ERROR" | sort @timestamp desc, service=fulfillment
    Result (1,296 characters)
    {
      "tool": "query_logs",
      "truncated": true,
      "untrusted_data": {
        "status": "Complete",
        "rows": [
          {
            "@timestamp": "2026-10-02 01:09:29.193",
            "@message": "{\"level\":\"ERROR\",\"location\":\"handler:170\",\"message\":\"message failed\",\"timestamp\":\"2026-10-02 01:09:29,136+0000\",\"service\":\"fulfillment\",\"correlation_id\":\"load-d84fa28b-486\",\"message_id\":\"4312d2ea-d478-460e-88ac-015667b65397\",\"reason\":\"Read timeout on endpoint URL: \\\"https://lambda.ca-central-1.amazo...[11478 chars cut]",
            "level": "ERROR",
            "reason": "Read timeout on endpoint URL: \"https://lambda.ca-central-1.amazonaws.com/2015-03-31/functions/nightshift-payments/invocations\""
          },
          {
            "@timestamp": "2026-10-02 01:09:25.853",
            "@message": "{\"level\":\"ERROR\",\"location\":\"handler:170\",\"message\":\"message failed\",\"timestamp\":\"2026-10-02 01:09:25,796+0000\",\"service\":\"fulfillment\",\"correlation_id\":\"load-d84fa28b-485\",\"message_id\":\"0a3d4046-4bfc-4b50-b97c-83f0cd98135f\",\"reason\":\"Read timeout on endpoint URL: \\\"https://lambda.ca-central-1.amazo...[11478 chars cut]",
            "level": "ERROR",
            "reason": "Read timeout on endpoint URL: \"https://lambda.ca-central-1.amazonaws.com/2015-03-31/functions/nightshift-payments/invocations\""
          },
          "...[18 more items cut]"
        ],
        "bytes_scanned": 483914,
        "scan_budget_left_bytes": 20487606
      }
    }
  4. Step 4+92 slist_recent_deploymentsfound nothing
    service=fulfillment, minutes=30
    Result (102 characters)
    {
      "tool": "list_recent_deployments",
      "truncated": false,
      "untrusted_data": {
        "window_minutes": 30,
        "moves": []
      }
    }
  5. Step 5+93 snote_hypotheses
    hypotheses=ruled_out: bad deploy (no recent deployments for fulfillment) likely: slow dependency or timeout in payments service called by fulfillment possible: payments service is failing or timing out
    Result (31 characters)
    {
      "ok": "3 hypotheses recorded"
    }
  6. Step 6+94 squery_logsfound nothing
    service=payments, minutes=10, query=fields @timestamp, @message, level | filter level = "ERROR" | sort @timestamp desc
    Result (140 characters)
    {
      "tool": "query_logs",
      "truncated": false,
      "untrusted_data": {
        "status": "Complete",
        "rows": [],
        "bytes_scanned": 0,
        "scan_budget_left_bytes": 20487606
      }
    }
  7. Step 7+95 sget_tracescited as evidence
    service=payments, minutes=10
    Result (613 characters)
    {
      "tool": "get_traces",
      "truncated": false,
      "untrusted_data": {
        "service": "nightshift-payments",
        "note": "active tracing samples about 1 request/s plus 5%, so counts are samples",
        "traces": 146,
        "with_error": 0,
        "with_fault": 0,
        "with_throttle": 0,
        "duration_seconds": {
          "p50": 0.972,
          "p99": 12.136,
          "max": 18.065
        },
        "slowest": [
          {
            "id": "1-6abf0407-d13ce85b6d4773e417abbfae",
            "seconds": 18.065
          },
          {
            "id": "1-6abf0442-81583a464de4fda4d612a996",
            "seconds": 15.569
          },
          {
            "id": "1-6abf0423-d36b3d65b69148cc4e55ea82",
            "seconds": 12.136
          },
          {
            "id": "1-6abf043a-b41b8055025e461aca450a4e",
            "seconds": 11.716
          },
          {
            "id": "1-6abf0278-002fd3423dbebcdb19381c2b",
            "seconds": 10.561
          }
        ]
      }
    }
  8. Step 8+96 snote_hypotheses
    hypotheses=ruled_out: bad deploy (no recent deployments for fulfillment) ruled_out: payments service is failing or timing out with errors (no error logs in payments) likely: slow dependency (payments service is very slow with p99 duration over 12 seconds and max 18 seconds)
    Result (31 characters)
    {
      "ok": "3 hypotheses recorded"
    }
  9. Step 9+96 sfinish_investigation
    confidence=90, actions=, evidence_steps=3,7, hypotheses=ruled_out: bad deploy (no recent deployments for fulfillment) ruled_out: payments service is failing or timing out with errors (no error logs in payments) likely: slow dependency (payments service is very slow with p99 duration over 12 seconds and max 18 seconds), summary=The fulfillment service experienced payment failures because the payments service it calls has become extremely slow, with p99 durations over 12 seconds and a maximum of 18 seconds, causing timeouts and payment failures in fulfillment., fault_category=slow_dependency, root_cause_component=payments
    Result (30 characters)
    {
      "ok": "investigation closed"
    }
Postmortem, as the investigation wrote it

Postmortem: nightshift-payment-failures

Investigation 453c4f47b7b9, gemini gemini-3.5-flash-lite, started 2026-10-02T01:09:31+00:00.

Answer

Root cause componentpayments
Fault categoryslow_dependency
Confidence90
Ended becausefinished

Summary

The fulfillment service experienced payment failures because the payments service it calls has become extremely slow, with p99 durations over 12 seconds and a maximum of 18 seconds, causing timeouts and payment failures in fulfillment.

Impact

The page: nightshift-payment-failures was ALARM (since 2026-10-02T01:09:29Z). Reason recorded by CloudWatch: Threshold Crossed: 1 datapoint [41.0 (02/10/26 01:08:00)] was greater than or equal to the threshold (3.0).

Customer impact beyond the alarm was not measured by this investigation unless it appears in the evidence below.

Timeline

  • 2026-10-02T01:09:38+00:00 step 1: get_alarm name=nightshift-payment-failures
  • 2026-10-02T01:09:39+00:00 step 2: note_hypotheses hypotheses=likely: fulfillment service payment failures are caused by a bad deploy or upst...
  • 2026-10-02T01:09:41+00:00 step 3: query_logs minutes=10, query=fields @timestamp, @message, level, reason | filter level = "ERROR" | so...
  • 2026-10-02T01:09:42+00:00 step 4: list_recent_deployments service=fulfillment, minutes=30 (found nothing)
  • 2026-10-02T01:09:43+00:00 step 5: note_hypotheses hypotheses=ruled_out: bad deploy (no recent deployments for fulfillment) likely: slow depe...
  • 2026-10-02T01:09:44+00:00 step 6: query_logs service=payments, minutes=10, query=fields @timestamp, @message, level | filter level = "E... (found nothing)
  • 2026-10-02T01:09:45+00:00 step 7: get_traces service=payments, minutes=10
  • 2026-10-02T01:09:46+00:00 step 8: note_hypotheses hypotheses=ruled_out: bad deploy (no recent deployments for fulfillment) ruled_out: paymen...
  • 2026-10-02T01:09:46+00:00 step 9: finish_investigation confidence=90, actions=, evidence_steps=3,7, hypotheses=ruled_out: bad deploy (no recent d...

Root cause evidence

  • Step 3, query_logs: {"status":"Complete","rows":[{"@timestamp":"2026-10-02 01:09:29.193","@message":"{"level":"ERROR","location":"handler:170","message":"message failed","timestamp":"2026-10-02 01:09:29,136+0000","service":"fulfillment","c...(older result, shortened)
  • Step 7, get_traces: {"service":"nightshift-payments","note":"active tracing samples about 1 request/s plus 5%, so counts are samples","traces":146,"with_error":0,"with_fault":0,"with_throttle":0,"duration_seconds":{"p50":0.972,"p99":12.136,"max":18.065},"slowe...(older result, shortened)

Proposed fix (for a human to decide; the agent changed nothing)

None proposed.

Hypotheses

  • ruled_out: bad deploy (no recent deployments for fulfillment)
  • ruled_out: payments service is failing or timing out with errors (no error logs in payments)
  • likely: slow dependency (payments service is very slow with p99 duration over 12 seconds and max 18 seconds)

Dropped along the way:

  • configuration or network error in payments integration
  • fulfillment service payment failures are caused by a bad deploy or upstream issue in payments or fulfillment
  • payments service is failing or timing out
  • slow dependency or timeout in payments service called by fulfillment

What the investigation cost

  • 4 model calls, 12,988 input and 513 output tokens (13,501 total)
  • 9 steps, 15 s of wall clock
  • 483,914 bytes of logs scanned
  • 0 replies rejected by the provider for bad tool arguments