Keysproperty operations Corbelstone Residential

#237 · Water alarm, no ticket · Loom Lofts

done Tue 18:20 · alarm 1868

Ledger row
policy v2
The call
POST /tickets source=alarm alarm=1868
Action, tier
open_ticket_from_alarm, tier 0
Decided by
rules: Leak alarm live 11 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 26 this hour).
authority
conditions
cooldown
budget
Definition
water_alarm_no_ticket v1
At stake
water running 11 min with nobody sent
Outcome
Emergency ticket 5651 opened from alarm 1868, 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": 1868,
  "amount_at_risk": null,
  "asset_id": 787,
  "building": "Loom Lofts",
  "building_id": 26,
  "currency": null,
  "kind": "water_leak",
  "minutes_active": 11,
  "raised_at": "2026-10-27 18:09:51.502564",
  "sensor": "Home 1G",
  "stake_note": "water running 11 min with nobody sent",
  "started_at": "2026-10-27T18:19:51.502564",
  "unit_id": 1636
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27016,
        "ticket_id": 5651,
        "type": "created"
      },
      {
        "id": 27017,
        "ticket_id": 5651,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "alarm_id": 1868,
        "assigned_at": "2026-10-27T18:20:00",
        "attended_at": "2026-10-27T20:38:50.222571",
        "building_id": 26,
        "category": "leak",
        "closed_at": "2026-10-27T23:09:30.103429",
        "completed_at": "2026-10-27T22:09:30.103429",
        "due_at": "2026-10-27T22:20:00",
        "duplicate_of": null,
        "id": 5651,
        "opened_at": "2026-10-27T18:20:00",
        "priority": "emergency",
        "reported_by": "keys operator",
        "source": "alarm",
        "status": "assigned",
        "summary": "Water alarm: leak detected",
        "trade": "plumbing",
        "unit_id": 1636,
        "vendor_id": 37
      },
      {
        "closed_at": "2026-10-27T19:54:37.817987",
        "duplicate_of": 5651,
        "id": 5279,
        "status": "merged"
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "closed_at": "2026-10-29T00:50:31.499713",
        "duplicate_of": null,
        "id": 5279,
        "status": "closed"
      }
    ]
  },
  "endpoint": "POST /tickets source=alarm alarm=1868",
  "note": "Emergency ticket 5651 opened from alarm 1868, vendor 37 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_open_ticket_from_alarm"
}

Arguments

{
  "alarm_id": 1868
}