Keysproperty operations Corbelstone Residential

#405 · Water alarm, no ticket · Mistral Lofts

done Mon 14:06 · alarm 1999

Ledger row
policy v2
The call
POST /tickets source=alarm alarm=1999
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 102 this hour).
authority
conditions
cooldown
budget
Definition
water_alarm_no_ticket v1
At stake
water running 11 min with nobody sent
Outcome
Emergency ticket 5663 opened from alarm 1999, vendor 34 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": 1999,
  "amount_at_risk": null,
  "asset_id": 2744,
  "building": "Mistral Lofts",
  "building_id": 102,
  "currency": null,
  "kind": "water_leak",
  "minutes_active": 11,
  "raised_at": "2026-11-02 13:55:43.097516",
  "sensor": "Home 1C",
  "stake_note": "water running 11 min with nobody sent",
  "started_at": "2026-11-02T14:05:43.097516",
  "unit_id": 6662
}

Before and after

{
  "after": {
    "ticket_events": [
      {
        "id": 27076,
        "ticket_id": 5663,
        "type": "created"
      },
      {
        "id": 27077,
        "ticket_id": 5663,
        "type": "vendor_dispatched"
      }
    ],
    "tickets": [
      {
        "alarm_id": 1999,
        "assigned_at": "2026-11-02T14:06:00",
        "attended_at": "2026-11-02T15:07:01.709778",
        "building_id": 102,
        "category": "leak",
        "closed_at": "2026-11-02T17:46:37.276545",
        "completed_at": "2026-11-02T16:46:37.276545",
        "due_at": "2026-11-02T18:06:00",
        "duplicate_of": null,
        "id": 5663,
        "opened_at": "2026-11-02T14:06:00",
        "priority": "emergency",
        "reported_by": "keys operator",
        "source": "alarm",
        "status": "assigned",
        "summary": "Water alarm: leak detected",
        "trade": "plumbing",
        "unit_id": 6662,
        "vendor_id": 34
      },
      {
        "closed_at": "2026-11-02T16:50:31.929194",
        "duplicate_of": 5663,
        "id": 5620,
        "status": "merged"
      }
    ]
  },
  "before": {
    "tickets": [
      {
        "closed_at": null,
        "duplicate_of": null,
        "id": 5620,
        "status": "in_progress"
      }
    ]
  },
  "endpoint": "POST /tickets source=alarm alarm=1999",
  "note": "Emergency ticket 5663 opened from alarm 1999, vendor 34 dispatched.",
  "ok": true,
  "rollback_fn_name": "undo_open_ticket_from_alarm"
}

Arguments

{
  "alarm_id": 1999
}