{
  "process_id": "FA-06",
  "policy_version": "synthetic-v1",
  "event_id": "fa-06-example-v1",
  "input": {
    "entity": "LENDER-1",
    "currency": "USD",
    "cutoff": "2026-10-31T23:59:59Z",
    "window_start": "2026-10-01T00:00:00Z",
    "controls": [
      {
        "entity": "LENDER-1",
        "currency": "USD",
        "known_at": "2026-10-31T23:59:59Z",
        "account_id": "cash",
        "subledger_cents": 100000000,
        "gl_cents": 100000000,
        "owner": "Cash Accountant",
        "evidence_id": "REC-CASH-1"
      },
      {
        "entity": "LENDER-1",
        "currency": "USD",
        "known_at": "2026-10-31T23:59:59Z",
        "account_id": "loans",
        "subledger_cents": 200000000,
        "gl_cents": 200000000,
        "owner": "Loan Accountant",
        "evidence_id": "REC-LOANS-1"
      }
    ],
    "open_items": [
      {
        "entity": "LENDER-1",
        "currency": "USD",
        "known_at": "2026-10-31T23:59:59Z",
        "item_id": "OI1",
        "account_id": "loans",
        "amount_cents": 5000,
        "owner": "Controller",
        "approval_id": "DEFER-1",
        "approved_at": "2026-10-31T23:59:59Z",
        "disposition": "approved_defer"
      }
    ],
    "required_controls": [
      "cash",
      "loans"
    ],
    "period": "2026-10",
    "trial_balance_version": "TB1",
    "trial_balance_debit_cents": 300000000,
    "trial_balance_credit_cents": 300000000,
    "approved_defer_limit_cents": 10000,
    "manifest": {
      "controls": {
        "as_of": "2026-10-31T23:59:59Z",
        "known_at": "2026-10-31T23:59:59Z",
        "expected_records": 2,
        "received_records": 2,
        "complete": true
      },
      "open_items": {
        "as_of": "2026-10-31T23:59:59Z",
        "known_at": "2026-10-31T23:59:59Z",
        "expected_records": 1,
        "received_records": 1,
        "complete": true
      }
    }
  },
  "expected": {
    "status": "ready_for_controller_review",
    "control_differences_cents": {
      "cash": 0,
      "loans": 0
    },
    "trial_balance_difference_cents": 0,
    "accepted_deferred_items": [
      "OI1"
    ],
    "signed_close": false,
    "errors": []
  },
  "changes": [
    {
      "name": "Equal and opposite control breaks do not net away",
      "replace_input": {
        "entity": "LENDER-1",
        "currency": "USD",
        "cutoff": "2026-10-31T23:59:59Z",
        "window_start": "2026-10-01T00:00:00Z",
        "controls": [
          {
            "entity": "LENDER-1",
            "currency": "USD",
            "known_at": "2026-10-31T23:59:59Z",
            "account_id": "cash",
            "subledger_cents": 100000500,
            "gl_cents": 100000000,
            "owner": "Cash Accountant",
            "evidence_id": "REC-CASH-1"
          },
          {
            "entity": "LENDER-1",
            "currency": "USD",
            "known_at": "2026-10-31T23:59:59Z",
            "account_id": "loans",
            "subledger_cents": 199999500,
            "gl_cents": 200000000,
            "owner": "Loan Accountant",
            "evidence_id": "REC-LOANS-1"
          }
        ],
        "open_items": [
          {
            "entity": "LENDER-1",
            "currency": "USD",
            "known_at": "2026-10-31T23:59:59Z",
            "item_id": "OI1",
            "account_id": "loans",
            "amount_cents": 5000,
            "owner": "Controller",
            "approval_id": "DEFER-1",
            "approved_at": "2026-10-31T23:59:59Z",
            "disposition": "approved_defer"
          }
        ],
        "required_controls": [
          "cash",
          "loans"
        ],
        "period": "2026-10",
        "trial_balance_version": "TB1",
        "trial_balance_debit_cents": 300000000,
        "trial_balance_credit_cents": 300000000,
        "approved_defer_limit_cents": 10000,
        "manifest": {
          "controls": {
            "as_of": "2026-10-31T23:59:59Z",
            "known_at": "2026-10-31T23:59:59Z",
            "expected_records": 2,
            "received_records": 2,
            "complete": true
          },
          "open_items": {
            "as_of": "2026-10-31T23:59:59Z",
            "known_at": "2026-10-31T23:59:59Z",
            "expected_records": 1,
            "received_records": 1,
            "complete": true
          }
        }
      },
      "expected": {
        "status": "hold",
        "control_differences_cents": {
          "cash": 500,
          "loans": -500
        },
        "trial_balance_difference_cents": 0,
        "accepted_deferred_items": [
          "OI1"
        ],
        "signed_close": false,
        "errors": [
          "cash:unreconciled_control",
          "loans:unreconciled_control"
        ]
      }
    },
    {
      "name": "Unbalanced trial balance",
      "path": [
        "trial_balance_credit_cents"
      ],
      "value": 299999999,
      "expected": {
        "status": "hold",
        "control_differences_cents": {
          "cash": 0,
          "loans": 0
        },
        "trial_balance_difference_cents": 1,
        "accepted_deferred_items": [
          "OI1"
        ],
        "signed_close": false,
        "errors": [
          "trial_balance_unbalanced"
        ]
      }
    },
    {
      "name": "Unowned open item holds",
      "path": [
        "open_items",
        0,
        "owner"
      ],
      "value": "",
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:item.owner:expected_nonblank_trimmed_text"
        ]
      }
    },
    {
      "name": "An unapproved proposed disposition does not close",
      "path": [
        "open_items",
        0,
        "disposition"
      ],
      "value": "proposed",
      "expected": {
        "status": "hold",
        "control_differences_cents": {
          "cash": 0,
          "loans": 0
        },
        "trial_balance_difference_cents": 0,
        "accepted_deferred_items": [],
        "signed_close": false,
        "errors": [
          "OI1:unaccepted_disposition"
        ]
      }
    },
    {
      "name": "Defer limit exceeded",
      "path": [
        "open_items",
        0,
        "amount_cents"
      ],
      "value": 10001,
      "expected": {
        "status": "hold",
        "control_differences_cents": {
          "cash": 0,
          "loans": 0
        },
        "trial_balance_difference_cents": 0,
        "accepted_deferred_items": [],
        "signed_close": false,
        "errors": [
          "OI1:unaccepted_disposition"
        ]
      }
    },
    {
      "name": "Future-dated approval cannot support this historical close",
      "path": [
        "open_items",
        0,
        "approved_at"
      ],
      "value": "2026-11-01T00:00:00Z",
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:item:future_approval"
        ]
      }
    },
    {
      "name": "An empty configured control population cannot support a nonzero trial balance",
      "replace_input": {
        "entity": "LENDER-1",
        "currency": "USD",
        "cutoff": "2026-10-31T23:59:59Z",
        "window_start": "2026-10-01T00:00:00Z",
        "controls": [],
        "open_items": [],
        "required_controls": [],
        "period": "2026-10",
        "trial_balance_version": "TB1",
        "trial_balance_debit_cents": 300000000,
        "trial_balance_credit_cents": 300000000,
        "approved_defer_limit_cents": 10000,
        "manifest": {
          "controls": {
            "as_of": "2026-10-31T23:59:59Z",
            "known_at": "2026-10-31T23:59:59Z",
            "expected_records": 0,
            "received_records": 0,
            "complete": true
          },
          "open_items": {
            "as_of": "2026-10-31T23:59:59Z",
            "known_at": "2026-10-31T23:59:59Z",
            "expected_records": 0,
            "received_records": 0,
            "complete": true
          }
        }
      },
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:controls:missing_or_unexpected_control_account"
        ]
      }
    },
    {
      "name": "Missing source page is an incomplete population",
      "path": [
        "manifest",
        "controls",
        "received_records"
      ],
      "value": 0,
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:controls:incomplete_population"
        ]
      }
    },
    {
      "name": "Malformed source timestamp holds",
      "path": [
        "manifest",
        "controls",
        "known_at"
      ],
      "value": "2026-13-32T00:00:00Z",
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:controls.known_at:invalid_utc_timestamp"
        ]
      }
    },
    {
      "name": "Old source as-of cannot satisfy the declared exact cutoff",
      "path": [
        "manifest",
        "controls",
        "as_of"
      ],
      "value": "2026-10-01T00:00:00Z",
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:controls:invalid_source_cutoff"
        ]
      }
    }
  ]
}
