{
  "tool_id": "art-262-validate-ebam-acmt-flow",
  "note": "eBAM acmt message flow validator: acmt.007/010/011/017/019 state machine per CGI-MP eBAM guide 2023.",
  "vectors": [
    {
      "name": "valid_account_opening_sequence",
      "description": "acmt.007 (open request) → acmt.010 (ack referencing MSG-001) → OPENING_CONFIRMED, valid=true, 0 errors.",
      "policy_parameters": {
        "strict_order": true,
        "acmt_messages": [
          {
            "message_type": "acmt.007",
            "message_id": "MSG-001",
            "account_id": "ACC-ALPHA-001"
          },
          {
            "message_type": "acmt.010",
            "message_id": "MSG-002",
            "account_id": "ACC-ALPHA-001",
            "ref_message_id": "MSG-001"
          }
        ]
      },
      "output_payload": {
        "is_valid": true,
        "acmt_state": "OPENING_CONFIRMED",
        "total_messages": 2,
        "request_count": 1,
        "ack_count": 1,
        "report_count": 0,
        "orphan_count": 0,
        "error_count": 0,
        "warning_count": 0,
        "validation_errors": [],
        "validation_warnings": [],
        "orphan_requests": [],
        "message_sequence": [
          {
            "seq": 1,
            "msg_id": "MSG-001",
            "msg_type": "acmt.007",
            "role": "REQUEST",
            "label": "AccountOpeningRequest",
            "account_id": "ACC-ALPHA-001",
            "valid": true,
            "expects_ack": true
          },
          {
            "seq": 2,
            "msg_id": "MSG-002",
            "msg_type": "acmt.010",
            "role": "ACK",
            "label": "AccountRequestAcknowledgement",
            "account_id": "ACC-ALPHA-001",
            "valid": true,
            "ref_message_id": "MSG-001",
            "resolves": "MSG-001"
          }
        ],
        "table_version": "CGI-MP-EBAM-2023",
        "table_source": "CGI-MP eBAM Usage Guide 2023 v1.0; ISO 20022 acmt message catalogue (acmt.007.001.06 / acmt.010.001.04 / acmt.011.001.07 / acmt.017.001.05 / acmt.019.001.07); SWIFT eBAM SLA guidelines 2023",
        "regulatory_basis": "CGI-MP eBAM Usage Guide 2023: acmt.007 AccountOpeningRequest / acmt.010 AccountRequestAcknowledgement / acmt.011 AccountModificationRequest / acmt.017 AccountClosureRequest / acmt.019 AccountReport state-machine. Each REQUEST must be followed by an ACK (acmt.010); REPORT (acmt.019) is permitted at any point. Gated chain routes on /acmt_state.",
        "pii_note": "ZERO PII: message type codes, sequence numbers, account identifiers (synthetic/structural), and state machine fields only. No account holder, signatory, or personal data enters this kernel.",
        "not_legal_advice": "Not legal or compliance advice. eBAM flow validation requires review by qualified treasury operations staff and the account servicer."
      },
      "golden_hash": "0a388bce015f053093645e29cfc217d66de24557c8601ce5a3d1a489edcfa57f"
    },
    {
      "name": "valid_account_closure_sequence",
      "description": "acmt.017 (closure request) → acmt.010 (ack) → acmt.019 (report) → CLOSURE_CONFIRMED, valid=true.",
      "policy_parameters": {
        "strict_order": true,
        "acmt_messages": [
          {
            "message_type": "acmt.017",
            "message_id": "MSG-010",
            "account_id": "ACC-BETA-007"
          },
          {
            "message_type": "acmt.010",
            "message_id": "MSG-011",
            "account_id": "ACC-BETA-007",
            "ref_message_id": "MSG-010"
          },
          {
            "message_type": "acmt.019",
            "message_id": "MSG-012",
            "account_id": "ACC-BETA-007"
          }
        ]
      },
      "output_payload": {
        "is_valid": true,
        "acmt_state": "CLOSURE_CONFIRMED",
        "total_messages": 3,
        "request_count": 1,
        "ack_count": 1,
        "report_count": 1,
        "orphan_count": 0,
        "error_count": 0,
        "warning_count": 0,
        "validation_errors": [],
        "validation_warnings": [],
        "orphan_requests": [],
        "message_sequence": [
          {
            "seq": 1,
            "msg_id": "MSG-010",
            "msg_type": "acmt.017",
            "role": "REQUEST",
            "label": "AccountClosureRequest",
            "account_id": "ACC-BETA-007",
            "valid": true,
            "expects_ack": true
          },
          {
            "seq": 2,
            "msg_id": "MSG-011",
            "msg_type": "acmt.010",
            "role": "ACK",
            "label": "AccountRequestAcknowledgement",
            "account_id": "ACC-BETA-007",
            "valid": true,
            "ref_message_id": "MSG-010",
            "resolves": "MSG-010"
          },
          {
            "seq": 3,
            "msg_id": "MSG-012",
            "msg_type": "acmt.019",
            "role": "REPORT",
            "label": "AccountReport",
            "account_id": "ACC-BETA-007",
            "valid": true
          }
        ],
        "table_version": "CGI-MP-EBAM-2023",
        "table_source": "CGI-MP eBAM Usage Guide 2023 v1.0; ISO 20022 acmt message catalogue (acmt.007.001.06 / acmt.010.001.04 / acmt.011.001.07 / acmt.017.001.05 / acmt.019.001.07); SWIFT eBAM SLA guidelines 2023",
        "regulatory_basis": "CGI-MP eBAM Usage Guide 2023: acmt.007 AccountOpeningRequest / acmt.010 AccountRequestAcknowledgement / acmt.011 AccountModificationRequest / acmt.017 AccountClosureRequest / acmt.019 AccountReport state-machine. Each REQUEST must be followed by an ACK (acmt.010); REPORT (acmt.019) is permitted at any point. Gated chain routes on /acmt_state.",
        "pii_note": "ZERO PII: message type codes, sequence numbers, account identifiers (synthetic/structural), and state machine fields only. No account holder, signatory, or personal data enters this kernel.",
        "not_legal_advice": "Not legal or compliance advice. eBAM flow validation requires review by qualified treasury operations staff and the account servicer."
      },
      "golden_hash": "719c6c311c19eff5f8c2e4ae12403e99eca8dfc832d9634bc02d6988d0e8948c"
    },
    {
      "name": "invalid_orphan_request",
      "description": "acmt.007 with no following acmt.010 acknowledgement → ORPHAN_REQUEST error, is_valid=false, acmt_state=INVALID.",
      "policy_parameters": {
        "strict_order": true,
        "acmt_messages": [
          {
            "message_type": "acmt.007",
            "message_id": "MSG-020",
            "account_id": "ACC-GAMMA-003"
          }
        ]
      },
      "output_payload": {
        "is_valid": false,
        "acmt_state": "INVALID",
        "total_messages": 1,
        "request_count": 1,
        "ack_count": 0,
        "report_count": 0,
        "orphan_count": 1,
        "error_count": 1,
        "warning_count": 0,
        "validation_errors": [
          {
            "seq": 1,
            "msg_id": "MSG-020",
            "issue": "ORPHAN_REQUEST",
            "detail": "acmt.007 has no acmt.010 acknowledgement in the provided message set."
          }
        ],
        "validation_warnings": [],
        "orphan_requests": [
          {
            "msg_id": "MSG-020",
            "msg_type": "acmt.007",
            "account_id": "ACC-GAMMA-003",
            "seq": 1
          }
        ],
        "message_sequence": [
          {
            "seq": 1,
            "msg_id": "MSG-020",
            "msg_type": "acmt.007",
            "role": "REQUEST",
            "label": "AccountOpeningRequest",
            "account_id": "ACC-GAMMA-003",
            "valid": true,
            "expects_ack": true
          }
        ],
        "table_version": "CGI-MP-EBAM-2023",
        "table_source": "CGI-MP eBAM Usage Guide 2023 v1.0; ISO 20022 acmt message catalogue (acmt.007.001.06 / acmt.010.001.04 / acmt.011.001.07 / acmt.017.001.05 / acmt.019.001.07); SWIFT eBAM SLA guidelines 2023",
        "regulatory_basis": "CGI-MP eBAM Usage Guide 2023: acmt.007 AccountOpeningRequest / acmt.010 AccountRequestAcknowledgement / acmt.011 AccountModificationRequest / acmt.017 AccountClosureRequest / acmt.019 AccountReport state-machine. Each REQUEST must be followed by an ACK (acmt.010); REPORT (acmt.019) is permitted at any point. Gated chain routes on /acmt_state.",
        "pii_note": "ZERO PII: message type codes, sequence numbers, account identifiers (synthetic/structural), and state machine fields only. No account holder, signatory, or personal data enters this kernel.",
        "not_legal_advice": "Not legal or compliance advice. eBAM flow validation requires review by qualified treasury operations staff and the account servicer."
      },
      "golden_hash": "f1e5713392c3b12d3d73da398de847e5c1a462d4105f584c69c767a89d08478b"
    }
  ]
}
