Keysproperty operations Corbelstone Residential

#312 · Water alarm, no ticket · Spindle Court

done Sat 12:05 · alarm 1952

Ledger row
policy v2
The call
POST /tickets source=alarm alarm=1952
Action, tier
open_ticket_from_alarm, tier 0
Decided by
rules: Leak alarm live 12 minutes with no ticket; open an emergency ticket now.
Controller
Allowed: open_ticket_from_alarm is tier 0 (just do it); within budget (0 of 6 actions at building 52 this hour).
authority
conditions
cooldown
budget
Definition
water_alarm_no_ticket v1
At stake
water running 12 min with nobody sent
Outcome
Emergency ticket 5656 opened from alarm 1952, vendor 37 dispatched.
Undo
Close the ticket as raised in error and cancel the dispatch.

Undo

Restores the before-snapshot below and writes a new row.

Evidence

{
  "alarm_id": 1952,
  "amount_at_risk": null,
  "asset_id": 1803,
  "building": "Spindle Court",
  "building_id": 52,
  "currency": null,
  "kind": "water_leak",
  "minutes_active": 12,
  "raised_at": "2026-10-31 11:53:20.759273",
  "sensor": "Home 0004",
  "stake_note": "water running 12 min with nobody sent",
  "started_at": "2026-10-31T12:03:20.759273",
  "unit_id": 3752
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27049,
        "ticket_id": 5656,
        "type": "created"
      },
      {
        "id": 27050,
        "ticket_id": 5656,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "alarm_id": 1952,
        "assigned_at": "2026-10-31T12:05:00",
        "attended_at": "2026-10-31T13:47:30.931298",
        "building_id": 52,
        "category": "leak",
        "closed_at": "2026-10-31T18:42:58.222774",
        "completed_at": "2026-10-31T17:42:58.222774",
        "due_at": "2026-10-31T16:05:00",
        "duplicate_of": null,
        "id": 5656,
        "opened_at": "2026-10-31T12:05:00",
        "priority": "emergency",
        "reported_by": "keys operator",
        "source": "alarm",
        "status": "assigned",
        "summary": "Water alarm: leak detected",
        "trade": "plumbing",
        "unit_id": 3752,
        "vendor_id": 37
      },
      {
        "closed_at": "2026-10-31T13:44:29.874925",
        "duplicate_of": 5656,
        "id": 5488,
        "status": "merged"
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "closed_at": null,
        "duplicate_of": null,
        "id": 5488,
        "status": "in_progress"
      }
    ]
  },
  "endpoint": "POST /tickets source=alarm alarm=1952",
  "note": "Emergency ticket 5656 opened from alarm 1952, vendor 37 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_open_ticket_from_alarm"
}

Arguments

{
  "alarm_id": 1952
}