{
  "schema_version": "d30-posting-fixtures-v1",
  "evidence_class": "synthetic; expected canonical arithmetic independently specified in Stage 0 before implementation",
  "accounts": [
    {
      "account_id": "cash_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "asset",
      "normal_side": "debit",
      "status": "active"
    },
    {
      "account_id": "deposits_ada_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "liability",
      "normal_side": "credit",
      "status": "active"
    },
    {
      "account_id": "deposits_ben_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "liability",
      "normal_side": "credit",
      "status": "active"
    },
    {
      "account_id": "deposits_cora_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "liability",
      "normal_side": "credit",
      "status": "active"
    },
    {
      "account_id": "fee_income_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "income",
      "normal_side": "credit",
      "status": "active"
    },
    {
      "account_id": "interest_expense_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "expense",
      "normal_side": "debit",
      "status": "active"
    },
    {
      "account_id": "opening_equity_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "equity",
      "normal_side": "credit",
      "status": "active"
    },
    {
      "account_id": "unallocated_receipts_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "liability",
      "normal_side": "credit",
      "status": "active"
    },
    {
      "account_id": "cash_eur",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "EUR",
      "account_type": "asset",
      "normal_side": "debit",
      "status": "active"
    },
    {
      "account_id": "deposits_ada_eur",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "EUR",
      "account_type": "liability",
      "normal_side": "credit",
      "status": "active"
    },
    {
      "account_id": "closed_deposits_usd",
      "ledger_id": "CB-GENERAL",
      "entity_id": "CB-A",
      "currency": "USD",
      "account_type": "liability",
      "normal_side": "credit",
      "status": "closed"
    },
    {
      "account_id": "other_entity_cash_usd",
      "ledger_id": "CB-OTHER",
      "entity_id": "CB-B",
      "currency": "USD",
      "account_type": "asset",
      "normal_side": "debit",
      "status": "active"
    }
  ],
  "command_template": {
    "schema_version": "d30-journal-v1",
    "entity_id": "CB-A",
    "ledger_id": "CB-GENERAL",
    "journal_id": "J-CASE",
    "business_operation_id": "OP-CASE",
    "currency": "USD",
    "effective_at": "2026-10-20T09:00:00.000Z",
    "source_available_at": "2026-10-20T09:01:00.000Z",
    "booking_period": "2026-10",
    "legs": [
      {
        "account_id": "cash_usd",
        "side": "debit",
        "amount_minor": "100000"
      },
      {
        "account_id": "deposits_ada_usd",
        "side": "credit",
        "amount_minor": "100000"
      }
    ]
  },
  "context_template": {
    "recorded_at": "2026-10-20T10:00:00.000Z",
    "open_periods": [
      "2026-10"
    ],
    "allow_current_period_adjustment": false
  },
  "cases": [
    {
      "id": "P01-funding",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "100000",
          "credit_minor": "100000",
          "residual_minor": "0"
        },
        "movements": [
          {
            "account_id": "cash_usd",
            "raw_delta_minor": "100000",
            "normal_delta_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "raw_delta_minor": "-100000",
            "normal_delta_minor": "100000"
          }
        ]
      }
    },
    {
      "id": "P02-internal-transfer",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "deposits_ada_usd",
            "side": "debit",
            "amount_minor": "25000"
          },
          {
            "account_id": "deposits_ben_usd",
            "side": "credit",
            "amount_minor": "25000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "25000",
          "credit_minor": "25000",
          "residual_minor": "0"
        },
        "movements": [
          {
            "account_id": "deposits_ada_usd",
            "raw_delta_minor": "25000",
            "normal_delta_minor": "-25000"
          },
          {
            "account_id": "deposits_ben_usd",
            "raw_delta_minor": "-25000",
            "normal_delta_minor": "25000"
          }
        ]
      }
    },
    {
      "id": "P03-fee",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "deposits_ada_usd",
            "side": "debit",
            "amount_minor": "250"
          },
          {
            "account_id": "fee_income_usd",
            "side": "credit",
            "amount_minor": "250"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "250",
          "credit_minor": "250",
          "residual_minor": "0"
        },
        "movements": [
          {
            "account_id": "deposits_ada_usd",
            "raw_delta_minor": "250",
            "normal_delta_minor": "-250"
          },
          {
            "account_id": "fee_income_usd",
            "raw_delta_minor": "-250",
            "normal_delta_minor": "250"
          }
        ]
      }
    },
    {
      "id": "P04-three-leg-funding-with-fee",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "10000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "9700"
          },
          {
            "account_id": "fee_income_usd",
            "side": "credit",
            "amount_minor": "300"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "10000",
          "credit_minor": "10000",
          "residual_minor": "0"
        },
        "movements": [
          {
            "account_id": "cash_usd",
            "raw_delta_minor": "10000",
            "normal_delta_minor": "10000"
          },
          {
            "account_id": "deposits_ada_usd",
            "raw_delta_minor": "-9700",
            "normal_delta_minor": "9700"
          },
          {
            "account_id": "fee_income_usd",
            "raw_delta_minor": "-300",
            "normal_delta_minor": "300"
          }
        ]
      }
    },
    {
      "id": "P05-huge-string-exactness",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "9007199254740993"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "9007199254740000"
          },
          {
            "account_id": "fee_income_usd",
            "side": "credit",
            "amount_minor": "993"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "9007199254740993",
          "credit_minor": "9007199254740993",
          "residual_minor": "0"
        },
        "movements": [
          {
            "account_id": "cash_usd",
            "raw_delta_minor": "9007199254740993",
            "normal_delta_minor": "9007199254740993"
          },
          {
            "account_id": "deposits_ada_usd",
            "raw_delta_minor": "-9007199254740000",
            "normal_delta_minor": "9007199254740000"
          },
          {
            "account_id": "fee_income_usd",
            "raw_delta_minor": "-993",
            "normal_delta_minor": "993"
          }
        ]
      }
    },
    {
      "id": "P06-abnormal-normal-side-is-not-generic-rejection",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "fee_income_usd",
            "side": "debit",
            "amount_minor": "100"
          },
          {
            "account_id": "cash_usd",
            "side": "credit",
            "amount_minor": "100"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "100",
          "credit_minor": "100",
          "residual_minor": "0"
        },
        "movements": [
          {
            "account_id": "fee_income_usd",
            "raw_delta_minor": "100",
            "normal_delta_minor": "-100"
          },
          {
            "account_id": "cash_usd",
            "raw_delta_minor": "-100",
            "normal_delta_minor": "-100"
          }
        ]
      }
    },
    {
      "id": "P07-independent-eur-journal",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "EUR",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_eur",
            "side": "debit",
            "amount_minor": "10000"
          },
          {
            "account_id": "deposits_ada_eur",
            "side": "credit",
            "amount_minor": "10000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "10000",
          "credit_minor": "10000",
          "residual_minor": "0"
        },
        "movements": [
          {
            "account_id": "cash_eur",
            "raw_delta_minor": "10000",
            "normal_delta_minor": "10000"
          },
          {
            "account_id": "deposits_ada_eur",
            "raw_delta_minor": "-10000",
            "normal_delta_minor": "10000"
          }
        ]
      }
    },
    {
      "id": "R01-unbalanced-by-one",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "99999"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNBALANCED_JOURNAL",
        "totals": {
          "debit_minor": "100000",
          "credit_minor": "99999",
          "residual_minor": "1"
        }
      }
    },
    {
      "id": "R02-unknown-account-last-leg",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "unknown_account",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNKNOWN_ACCOUNT"
      }
    },
    {
      "id": "R03-closed-account",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "closed_deposits_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "ACCOUNT_CLOSED"
      }
    },
    {
      "id": "R04-currency-mismatch-balanced-numbers",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_eur",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "CURRENCY_MISMATCH"
      }
    },
    {
      "id": "R05-cross-entity-ledger",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "other_entity_cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "ACCOUNT_SCOPE_MISMATCH"
      }
    },
    {
      "id": "R06-empty-journal",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": []
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_LEGS"
      }
    },
    {
      "id": "R07-one-leg",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_LEGS"
      }
    },
    {
      "id": "R08-same-account-only",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "cash_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "DISTINCT_ACCOUNTS_REQUIRED"
      }
    },
    {
      "id": "R09-invalid-side",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "DR",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SIDE"
      }
    },
    {
      "id": "R10-future-effective",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T10:00:00.001Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "FUTURE_EFFECTIVE_TIME"
      }
    },
    {
      "id": "R11-future-source-evidence",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T10:00:00.001Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "FUTURE_SOURCE_AVAILABILITY"
      }
    },
    {
      "id": "R12-invalid-gregorian-date",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-02-30T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_TIMESTAMP"
      }
    },
    {
      "id": "R13-no-timezone",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_TIMESTAMP"
      }
    },
    {
      "id": "R14-unfrozen-precision",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_TIMESTAMP"
      }
    },
    {
      "id": "R15-closed-period",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-09",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "PERIOD_CLOSED"
      }
    },
    {
      "id": "R16-silent-period-move",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNAUTHORIZED_PERIOD_ADJUSTMENT"
      }
    },
    {
      "id": "R17-unsupported-schema",
      "command": {
        "schema_version": "d30-journal-v999",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNSUPPORTED_SCHEMA"
      }
    },
    {
      "id": "R18-unknown-currency",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "ZZZ",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNSUPPORTED_CURRENCY"
      }
    },
    {
      "id": "AMOUNT-01",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "0"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-02",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "-1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-03",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "+1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-04",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "01"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-05",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1.00"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-06",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1e3"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-07",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": " 1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-08",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1 "
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-09",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": ""
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-10",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1000000000000000000000000000000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-11",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": 100000
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-12",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": true
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-13",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": false
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-14",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": null
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-15",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1\n"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-16",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1\r"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-17",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "\u0661"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-18",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "NaN"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "AMOUNT-19",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "Infinity"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "MISSING-AMOUNT",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SCHEMA"
      }
    },
    {
      "id": "EXTRA-COMMAND-FIELD",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ],
        "ignored": true
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SCHEMA"
      }
    },
    {
      "id": "BAD-JOURNAL-ID",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "bad id",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_IDENTIFIER"
      }
    },
    {
      "id": "NEWLINE-JOURNAL-ID",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J\n",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_IDENTIFIER"
      }
    },
    {
      "id": "UNKNOWN-LEG-FIELD",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000",
            "currency": "USD"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SCHEMA"
      }
    },
    {
      "id": "AUTH-PERIOD-ADJUSTMENT",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "Approved teaching current-period adjustment"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "100000",
          "credit_minor": "100000",
          "residual_minor": "0"
        }
      }
    },
    {
      "id": "AUTH-WITHOUT-REASON",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "   "
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNAUTHORIZED_PERIOD_ADJUSTMENT"
      }
    },
    {
      "id": "REASON-WITHOUT-AUTH",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false,
        "adjustment_reason": "Explanation alone is insufficient"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNAUTHORIZED_PERIOD_ADJUSTMENT"
      }
    },
    {
      "id": "AT-RECORDED-BOUNDARY",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T10:00:00.000Z",
        "source_available_at": "2026-10-20T10:00:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL"
      }
    },
    {
      "id": "LATE-SOURCE",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-19T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:59:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL"
      }
    },
    {
      "id": "INVALID-LEAP-DAY",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-02-29T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_TIMESTAMP"
      }
    },
    {
      "id": "YEAR-ZERO",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "0000-01-01T00:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_TIMESTAMP"
      }
    },
    {
      "id": "LEAP-SECOND",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:60.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_TIMESTAMP"
      }
    },
    {
      "id": "YEAR-ONE",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "0001-01-01T00:00:00.000Z",
        "source_available_at": "0001-01-01T00:00:00.000Z",
        "booking_period": "0001-01",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "0001-01-01T00:00:00.000Z",
        "open_periods": [
          "0001-01"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL"
      }
    },
    {
      "id": "MAX-AMOUNT",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "999999999999999999999999999999"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "999999999999999999999999999999"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "999999999999999999999999999999",
          "credit_minor": "999999999999999999999999999999",
          "residual_minor": "0"
        }
      }
    },
    {
      "id": "32-LEGS",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "16",
          "credit_minor": "16",
          "residual_minor": "0"
        }
      }
    },
    {
      "id": "33-LEGS",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "1"
          },
          {
            "account_id": "fee_income_usd",
            "side": "credit",
            "amount_minor": "1"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_LEGS"
      }
    },
    {
      "id": "SUM-EXCEEDS-LEG-LIMIT",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "999999999999999999999999999999"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "999999999999999999999999999999"
          },
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "999999999999999999999999999999"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "999999999999999999999999999999"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL",
        "totals": {
          "debit_minor": "1999999999999999999999999999998",
          "credit_minor": "1999999999999999999999999999998",
          "residual_minor": "0"
        }
      }
    },
    {
      "id": "NEGATIVE-RESIDUAL",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "99999"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNBALANCED_JOURNAL",
        "totals": {
          "debit_minor": "99999",
          "credit_minor": "100000",
          "residual_minor": "-1"
        }
      }
    },
    {
      "id": "INVALID-ACCOUNTS-DUPLICATE",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_ACCOUNTS"
      }
    },
    {
      "id": "INVALID-CONTEXT-BOOL",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": 1
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_CONTEXT"
      }
    },
    {
      "id": "INVALID-CONTEXT-TIME",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_CONTEXT"
      }
    },
    {
      "id": "INVALID-CONTEXT-PERIOD-DUPLICATE",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10",
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_CONTEXT"
      }
    },
    {
      "id": "REASON-NEL",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "\u0085"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNAUTHORIZED_PERIOD_ADJUSTMENT"
      }
    },
    {
      "id": "REASON-FILE-SEPARATOR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "\u001c"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNAUTHORIZED_PERIOD_ADJUSTMENT"
      }
    },
    {
      "id": "REASON-NBSP",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "\u00a0"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNAUTHORIZED_PERIOD_ADJUSTMENT"
      }
    },
    {
      "id": "REASON-MEDIUM-SPACE",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "\u205f"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "UNAUTHORIZED_PERIOD_ADJUSTMENT"
      }
    },
    {
      "id": "REASON-BOM",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "\ufeff"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL"
      }
    },
    {
      "id": "REASON-PADDED-CONTENT",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-09-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": true,
        "adjustment_reason": "\u0085Approved\u001c"
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "VALID_JOURNAL"
      }
    },
    {
      "id": "STRICT-END-IDENTIFIER-CR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J\r",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_IDENTIFIER"
      }
    },
    {
      "id": "STRICT-END-AMOUNT-CR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000\r"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "STRICT-END-PERIOD-CR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10\r",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SCHEMA"
      }
    },
    {
      "id": "STRICT-END-IDENTIFIER-LF",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J\n",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_IDENTIFIER"
      }
    },
    {
      "id": "STRICT-END-AMOUNT-LF",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000\n"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "STRICT-END-PERIOD-LF",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10\n",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SCHEMA"
      }
    },
    {
      "id": "STRICT-END-IDENTIFIER-LINE-SEPARATOR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J\u2028",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_IDENTIFIER"
      }
    },
    {
      "id": "STRICT-END-AMOUNT-LINE-SEPARATOR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000\u2028"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "STRICT-END-PERIOD-LINE-SEPARATOR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10\u2028",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SCHEMA"
      }
    },
    {
      "id": "STRICT-END-IDENTIFIER-PARAGRAPH-SEPARATOR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J\u2029",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_IDENTIFIER"
      }
    },
    {
      "id": "STRICT-END-AMOUNT-PARAGRAPH-SEPARATOR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000\u2029"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_AMOUNT"
      }
    },
    {
      "id": "STRICT-END-PERIOD-PARAGRAPH-SEPARATOR",
      "command": {
        "schema_version": "d30-journal-v1",
        "entity_id": "CB-A",
        "ledger_id": "CB-GENERAL",
        "journal_id": "J-CASE",
        "business_operation_id": "OP-CASE",
        "currency": "USD",
        "effective_at": "2026-10-20T09:00:00.000Z",
        "source_available_at": "2026-10-20T09:01:00.000Z",
        "booking_period": "2026-10\u2029",
        "legs": [
          {
            "account_id": "cash_usd",
            "side": "debit",
            "amount_minor": "100000"
          },
          {
            "account_id": "deposits_ada_usd",
            "side": "credit",
            "amount_minor": "100000"
          }
        ]
      },
      "context": {
        "recorded_at": "2026-10-20T10:00:00.000Z",
        "open_periods": [
          "2026-10"
        ],
        "allow_current_period_adjustment": false
      },
      "accounts": [
        {
          "account_id": "cash_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_ben_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "deposits_cora_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "fee_income_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "income",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "interest_expense_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "expense",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "opening_equity_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "equity",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "unallocated_receipts_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "cash_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        },
        {
          "account_id": "deposits_ada_eur",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "EUR",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "active"
        },
        {
          "account_id": "closed_deposits_usd",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "currency": "USD",
          "account_type": "liability",
          "normal_side": "credit",
          "status": "closed"
        },
        {
          "account_id": "other_entity_cash_usd",
          "ledger_id": "CB-OTHER",
          "entity_id": "CB-B",
          "currency": "USD",
          "account_type": "asset",
          "normal_side": "debit",
          "status": "active"
        }
      ],
      "expected": {
        "code": "INVALID_SCHEMA"
      }
    }
  ]
}
