{
  "description": "Synthetic, attributed records for a USD term loan. The bank record models a reported cash settlement. Each scenario uses an isolated local audit ledger namespace.",
  "source_records": {
    "request": {
      "application_id": "BL-2048",
      "facility_id": "LN-2048",
      "terms_revision": 2,
      "amount_cents": 25000000,
      "currency": "USD",
      "destination_ref": "BEN-2048"
    },
    "credit": {
      "application_id": "BL-2048",
      "facility_id": "LN-2048",
      "terms_revision": 2,
      "amount_cents": 25000000,
      "currency": "USD",
      "destination_ref": "BEN-2048",
      "state": "approved",
      "decision_ref": "DEC-2048"
    },
    "closing": {
      "application_id": "BL-2048",
      "facility_id": "LN-2048",
      "terms_revision": 2,
      "state": "signed_and_conditions_cleared",
      "agreement_ref": "AGR-2048"
    },
    "release": {
      "application_id": "BL-2048",
      "facility_id": "LN-2048",
      "terms_revision": 2,
      "amount_cents": 25000000,
      "currency": "USD",
      "destination_ref": "BEN-2048",
      "state": "authorized",
      "role": "funding_officer",
      "decision_ref": "DEC-2048",
      "agreement_ref": "AGR-2048",
      "release_ref": "REL-2048"
    },
    "bank": {
      "application_id": "BL-2048",
      "facility_id": "LN-2048",
      "terms_revision": 2,
      "amount_cents": 25000000,
      "currency": "USD",
      "destination_ref": "BEN-2048",
      "state": "settled",
      "release_ref": "REL-2048",
      "settlement_ref": "SET-2048"
    }
  },
  "cases": [
    {"name": "clean match", "scenario": "clean", "event_id": "bank-feed-2048"},
    {"name": "identical event retry", "scenario": "clean", "event_id": "bank-feed-2048"},
    {
      "name": "changed payload on the same event",
      "scenario": "clean",
      "event_id": "bank-feed-2048",
      "overrides": {"bank": {"amount_cents": 25000001}}
    },
    {"name": "same bank receipt on another event", "scenario": "clean", "event_id": "feed-redelivery-2048"},
    {
      "name": "approval with no settled cash",
      "scenario": "awaiting-settlement",
      "event_id": "payment-submitted",
      "overrides": {"bank": {"state": "submitted", "settlement_ref": null}}
    },
    {
      "name": "settlement does not supply credit approval",
      "scenario": "approval-missing",
      "event_id": "bank-reported",
      "overrides": {"credit": null}
    },
    {
      "name": "settlement does not supply release authority",
      "scenario": "release-missing",
      "event_id": "bank-reported",
      "overrides": {"release": null}
    },
    {
      "name": "older executed package",
      "scenario": "stale-terms",
      "event_id": "package-r1",
      "overrides": {"closing": {"terms_revision": 1}}
    },
    {
      "name": "correct amount for the wrong recipient",
      "scenario": "correction",
      "event_id": "bank-feed-r1",
      "overrides": {"bank": {"destination_ref": "BEN-2049"}}
    },
    {
      "name": "new governed revision",
      "scenario": "correction",
      "event_id": "bank-feed-r2",
      "revision": 2,
      "supersedes": "bank-feed-r1"
    },
    {
      "name": "attempt to amend an accepted match",
      "scenario": "correction",
      "event_id": "bank-feed-r3",
      "revision": 3,
      "supersedes": "bank-feed-r2",
      "overrides": {"bank": {"settlement_ref": "SET-2050"}}
    },
    {
      "name": "response lost after audit commit",
      "scenario": "uncertain-response",
      "event_id": "bank-feed-2048",
      "timeout_after_commit": true
    },
    {"name": "retry after lost response", "scenario": "uncertain-response", "event_id": "bank-feed-2048"}
  ]
}
