{
  "process_id": "CM-04",
  "policy_version": "synthetic-v1",
  "event_id": "cm-04-example-v1",
  "input": {
    "as_of": "2026-11-09T14:00:00Z",
    "loan_id": "S1",
    "lock_id": "LK1",
    "events": [
      {
        "event_id": "E1",
        "loan_id": "S1",
        "lock_id": "LK1",
        "kind": "confirmed",
        "request_id": "R1",
        "revision": 1,
        "authority_reference": "AUTH-1",
        "confirmation_id": "CONF-1",
        "observed_at": "2026-11-09T13:00:00Z",
        "expires_at": "2026-11-20T17:00:00Z"
      },
      {
        "event_id": "E2",
        "loan_id": "S1",
        "lock_id": "LK1",
        "kind": "requested",
        "request_id": "R2",
        "observed_at": "2026-11-09T13:30:00Z",
        "requested_expires_at": "2026-11-30T17:00:00Z"
      }
    ]
  },
  "expected": {
    "status": "ready_for_review",
    "confirmed_revision": 1,
    "confirmed_expires_at": "2026-11-20T17:00:00Z",
    "pending_request_ids": [
      "R2"
    ],
    "unique_events": 2,
    "errors": []
  },
  "changes": [
    {
      "name": "Confirmed extension",
      "append_path": [
        "events"
      ],
      "append_value": {
        "event_id": "E3",
        "loan_id": "S1",
        "lock_id": "LK1",
        "kind": "confirmed",
        "request_id": "R2",
        "revision": 2,
        "authority_reference": "AUTH-2",
        "confirmation_id": "CONF-2",
        "observed_at": "2026-11-09T13:45:00Z",
        "expires_at": "2026-11-30T17:00:00Z"
      },
      "expected": {
        "status": "ready_for_review",
        "confirmed_revision": 2,
        "confirmed_expires_at": "2026-11-30T17:00:00Z",
        "pending_request_ids": [],
        "unique_events": 3,
        "errors": []
      }
    },
    {
      "name": "Duplicate confirmation event",
      "append_path": [
        "events"
      ],
      "append_value": {
        "event_id": "E1",
        "loan_id": "S1",
        "lock_id": "LK1",
        "kind": "confirmed",
        "request_id": "R1",
        "revision": 1,
        "authority_reference": "AUTH-1",
        "confirmation_id": "CONF-1",
        "observed_at": "2026-11-09T13:00:00Z",
        "expires_at": "2026-11-20T17:00:00Z"
      },
      "expected": {
        "status": "ready_for_review",
        "confirmed_revision": 1,
        "confirmed_expires_at": "2026-11-20T17:00:00Z",
        "pending_request_ids": [
          "R2"
        ],
        "unique_events": 2,
        "errors": []
      }
    },
    {
      "name": "Conflicting replay",
      "append_path": [
        "events"
      ],
      "append_value": {
        "event_id": "E1",
        "loan_id": "S1",
        "lock_id": "LK1",
        "kind": "confirmed",
        "request_id": "R1",
        "revision": 1,
        "authority_reference": "AUTH-1",
        "confirmation_id": "CONF-1",
        "observed_at": "2026-11-09T13:00:00Z",
        "expires_at": "2026-11-30T17:00:00Z"
      },
      "expected": {
        "status": "hold",
        "confirmed_revision": 1,
        "confirmed_expires_at": "2026-11-20T17:00:00Z",
        "pending_request_ids": [
          "R2"
        ],
        "unique_events": 2,
        "errors": [
          "conflicting_event:E1"
        ]
      }
    },
    {
      "name": "Impossible expiration date",
      "path": [
        "events",
        0,
        "expires_at"
      ],
      "value": "2026-02-30T17:00:00Z",
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:event.expires_at:invalid_utc_timestamp"
        ]
      }
    },
    {
      "name": "Missing lock identity",
      "remove_path": [
        "lock_id"
      ],
      "expected": {
        "status": "hold",
        "errors": [
          "missing_field:lock_id"
        ]
      }
    }
  ]
}
