{
  "tool_id": "art-600-lei-relationship-consistency",
  "note": "golden_hash filled by `node golden-parity.test.mjs --update`. Vectors cover each of the four invariants failing in isolation and all four failing at once, plus the three cases most likely to be got wrong: adjacent (non-overlapping) validity periods are NOT duplicates, an INACTIVE edge is not walked for cycles, and a deprecated-but-published exception code is recognized rather than flagged. An empty record set returns consistent:null and no clean-pass flag.",
  "vectors": [
    {
      "name": "clean-two-level-hierarchy",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2020-01-01"
          },
          {
            "start_node_lei": "7LTWFZYICNSX8D621K86",
            "end_node_lei": "529900T8BM49AURSDO55",
            "relationship_type": "IS_ULTIMATELY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2019-01-01",
            "exception_code": "NON_PUBLIC"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 2,
        "records_assessed": true,
        "consistent": true,
        "violation_count": 0,
        "violations": [],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": null,
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "LEI_RELATIONSHIP_CONSISTENT"
      ],
      "golden_hash": "2994082c47eec595e86a0dd94913a014268edb6e9d72152912854de126d1cebb"
    },
    {
      "name": "invalid-node-lei",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "NOTALEI0000000000000",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2020-01-01"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 1,
        "records_assessed": true,
        "consistent": false,
        "violation_count": 1,
        "violations": [
          {
            "code": "INVALID_NODE_LEI",
            "detail": "Record 1 endNode.nodeId NOTALEI0000000000000 fails the ISO 17442 mod-97 check.",
            "record_index": 1
          }
        ],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": false,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [
          "NOTALEI0000000000000"
        ],
        "cycle_path": null,
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "INVALID_NODE_LEI"
      ],
      "golden_hash": "4a0675d85333c1025d21197c5cf226097890d0543ef1205c3593cfb0b2f0e515"
    },
    {
      "name": "parent-cycle-detected",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          },
          {
            "start_node_lei": "7LTWFZYICNSX8D621K86",
            "end_node_lei": "5493001KJTIIGC8Y1R12",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 2,
        "records_assessed": true,
        "consistent": false,
        "violation_count": 1,
        "violations": [
          {
            "code": "PARENT_CYCLE_DETECTED",
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges revisits 5493001KJTIIGC8Y1R12: 5493001KJTIIGC8Y1R12 -> 7LTWFZYICNSX8D621K86 -> 5493001KJTIIGC8Y1R12",
            "record_index": 2
          }
        ],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": false,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": [
          "5493001KJTIIGC8Y1R12",
          "7LTWFZYICNSX8D621K86",
          "5493001KJTIIGC8Y1R12"
        ],
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "PARENT_CYCLE_DETECTED"
      ],
      "golden_hash": "68f966fd81ce24c974195a16f0fceff9a215e9fc92d8853a7617fccf0d161b5c"
    },
    {
      "name": "parent-cycle-three-hop",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          },
          {
            "start_node_lei": "7LTWFZYICNSX8D621K86",
            "end_node_lei": "529900T8BM49AURSDO55",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          },
          {
            "start_node_lei": "529900T8BM49AURSDO55",
            "end_node_lei": "5493001KJTIIGC8Y1R12",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 3,
        "records_assessed": true,
        "consistent": false,
        "violation_count": 1,
        "violations": [
          {
            "code": "PARENT_CYCLE_DETECTED",
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges revisits 5493001KJTIIGC8Y1R12: 5493001KJTIIGC8Y1R12 -> 7LTWFZYICNSX8D621K86 -> 529900T8BM49AURSDO55 -> 5493001KJTIIGC8Y1R12",
            "record_index": 3
          }
        ],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": false,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": [
          "5493001KJTIIGC8Y1R12",
          "7LTWFZYICNSX8D621K86",
          "529900T8BM49AURSDO55",
          "5493001KJTIIGC8Y1R12"
        ],
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "PARENT_CYCLE_DETECTED"
      ],
      "golden_hash": "77b2d6f927daa05470e4aba13fee47d7b9880b94729975dc8bac2c76f2db9be7"
    },
    {
      "name": "unrecognized-exception-code",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "exception_code": "DISCLOSURE_NOT_REQUIRED"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 1,
        "records_assessed": true,
        "consistent": false,
        "violation_count": 1,
        "violations": [
          {
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "detail": "Record 1 carries exception code \"DISCLOSURE_NOT_REQUIRED\", which is not a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1.",
            "record_index": 1
          }
        ],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": false,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": null,
        "unrecognized_exception_codes": [
          "DISCLOSURE_NOT_REQUIRED"
        ],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "UNRECOGNIZED_EXCEPTION_CODE"
      ],
      "golden_hash": "eb58155f53d523cd05f0893351ce7843662979f67b01a0d7c3aa05b2fb6bfdc0"
    },
    {
      "name": "deprecated-exception-code-is-recognized",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "exception_code": "LEGAL_OBSTACLES"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 1,
        "records_assessed": true,
        "consistent": true,
        "violation_count": 0,
        "violations": [],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": null,
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [
          "LEGAL_OBSTACLES"
        ],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "LEI_RELATIONSHIP_CONSISTENT"
      ],
      "golden_hash": "f62771a6aa09f4a7663992684a3de1216ad60120212b6cb37ee214a3ff643b11"
    },
    {
      "name": "duplicate-active-overlapping-periods",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2020-01-01",
            "end_date": "2024-01-01"
          },
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2023-01-01"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 2,
        "records_assessed": true,
        "consistent": false,
        "violation_count": 1,
        "violations": [
          {
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "detail": "Records 1 and 2 are both ACTIVE for 5493001KJTIIGC8Y1R12 -> 7LTWFZYICNSX8D621K86 (IS_DIRECTLY_CONSOLIDATED_BY) with overlapping validity periods.",
            "record_index": 2
          }
        ],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": false,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": null,
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [
          "5493001KJTIIGC8Y1R12 -> 7LTWFZYICNSX8D621K86 (IS_DIRECTLY_CONSOLIDATED_BY)"
        ],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "DUPLICATE_ACTIVE_RELATIONSHIP"
      ],
      "golden_hash": "b7571a289fb738d9fb46104d5a2dcba73b7e6a44f6a70362b934ea93fa7547e3"
    },
    {
      "name": "adjacent-periods-are-not-duplicates",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2020-01-01",
            "end_date": "2022-01-01"
          },
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2022-01-01"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 2,
        "records_assessed": true,
        "consistent": true,
        "violation_count": 0,
        "violations": [],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": null,
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "LEI_RELATIONSHIP_CONSISTENT"
      ],
      "golden_hash": "fe56e9e1a938f64d00954377f67ed6728562c4acfb50fc54339daa870ed876c0"
    },
    {
      "name": "inactive-edges-are-not-walked-for-cycles",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          },
          {
            "start_node_lei": "7LTWFZYICNSX8D621K86",
            "end_node_lei": "5493001KJTIIGC8Y1R12",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "INACTIVE"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 2,
        "records_assessed": true,
        "consistent": true,
        "violation_count": 0,
        "violations": [],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": null,
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "LEI_RELATIONSHIP_CONSISTENT"
      ],
      "golden_hash": "7784adc646c4f26de39b7e5b825ebdf3200b7aef2d4af64df66c617af9d7b9b9"
    },
    {
      "name": "all-four-violations-at-once",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": [
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "NOTALEI0000000000000",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          },
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2020-01-01"
          },
          {
            "start_node_lei": "7LTWFZYICNSX8D621K86",
            "end_node_lei": "5493001KJTIIGC8Y1R12",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE"
          },
          {
            "start_node_lei": "5493001KJTIIGC8Y1R12",
            "end_node_lei": "7LTWFZYICNSX8D621K86",
            "relationship_type": "IS_DIRECTLY_CONSOLIDATED_BY",
            "relationship_status": "ACTIVE",
            "start_date": "2021-01-01",
            "exception_code": "DISCLOSURE_NOT_REQUIRED"
          }
        ]
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 4,
        "records_assessed": true,
        "consistent": false,
        "violation_count": 4,
        "violations": [
          {
            "code": "INVALID_NODE_LEI",
            "detail": "Record 1 endNode.nodeId NOTALEI0000000000000 fails the ISO 17442 mod-97 check.",
            "record_index": 1
          },
          {
            "code": "PARENT_CYCLE_DETECTED",
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges revisits 5493001KJTIIGC8Y1R12: 5493001KJTIIGC8Y1R12 -> 7LTWFZYICNSX8D621K86 -> 5493001KJTIIGC8Y1R12",
            "record_index": 3
          },
          {
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "detail": "Record 4 carries exception code \"DISCLOSURE_NOT_REQUIRED\", which is not a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1.",
            "record_index": 4
          },
          {
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "detail": "Records 2 and 4 are both ACTIVE for 5493001KJTIIGC8Y1R12 -> 7LTWFZYICNSX8D621K86 (IS_DIRECTLY_CONSOLIDATED_BY) with overlapping validity periods.",
            "record_index": 4
          }
        ],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": false,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": false,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": false,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": false,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [
          "NOTALEI0000000000000"
        ],
        "cycle_path": [
          "5493001KJTIIGC8Y1R12",
          "7LTWFZYICNSX8D621K86",
          "5493001KJTIIGC8Y1R12"
        ],
        "unrecognized_exception_codes": [
          "DISCLOSURE_NOT_REQUIRED"
        ],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [
          "5493001KJTIIGC8Y1R12 -> 7LTWFZYICNSX8D621K86 (IS_DIRECTLY_CONSOLIDATED_BY)"
        ],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "INVALID_NODE_LEI",
        "PARENT_CYCLE_DETECTED",
        "UNRECOGNIZED_EXCEPTION_CODE",
        "DUPLICATE_ACTIVE_RELATIONSHIP"
      ],
      "golden_hash": "a3c887be9c8f01ebeb03bf0b0a032b9c77ccdb70111798a354d8caf2319413bc"
    },
    {
      "name": "empty-record-set-is-not-a-clean-pass",
      "policy_parameters": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "relationships": []
      },
      "output_payload": {
        "subject_lei": "5493001KJTIIGC8Y1R12",
        "subject_lei_valid": true,
        "record_count": 0,
        "records_assessed": false,
        "consistent": null,
        "violation_count": 0,
        "violations": [],
        "invariant_results": [
          {
            "invariant": "node_lei_validity",
            "code": "INVALID_NODE_LEI",
            "pass": true,
            "detail": "Every startNode/endNode LEI passes the ISO 17442 mod-97 check."
          },
          {
            "invariant": "no_direct_parent_cycle",
            "code": "PARENT_CYCLE_DETECTED",
            "pass": true,
            "detail": "Walking IS_DIRECTLY_CONSOLIDATED_BY edges never revisits a node on the current path."
          },
          {
            "invariant": "exception_code_well_formed",
            "code": "UNRECOGNIZED_EXCEPTION_CODE",
            "pass": true,
            "detail": "Every exception code is a published GLEIF category in GLEIF-REPORTING-EXCEPTIONS-CDF-2.1."
          },
          {
            "invariant": "no_overlapping_active_duplicates",
            "code": "DUPLICATE_ACTIVE_RELATIONSHIP",
            "pass": true,
            "detail": "No (startNode, endNode, relationshipType) triple has two ACTIVE records with overlapping validity periods."
          }
        ],
        "invalid_node_leis": [],
        "cycle_path": null,
        "unrecognized_exception_codes": [],
        "deprecated_exception_codes": [],
        "duplicate_active_triples": [],
        "exception_table_version": "GLEIF-REPORTING-EXCEPTIONS-CDF-2.1",
        "exception_table_source": "GLEIF Level 2 Data: Reporting Exceptions CDF format 2.1 (gleif.org/en/lei-data/access-and-use-lei-data/level-2-data-reporting-exceptions-2-1-format)",
        "recognized_exception_codes_current": [
          "NO_LEI",
          "NATURAL_PERSONS",
          "NON_CONSOLIDATING",
          "NO_KNOWN_PERSON",
          "NON_PUBLIC"
        ],
        "recognized_exception_codes_deprecated": [
          "BINDING_LEGAL_COMMITMENTS",
          "LEGAL_OBSTACLES",
          "DISCLOSURE_DETRIMENTAL",
          "DETRIMENT_NOT_EXCLUDED",
          "CONSENT_NOT_OBTAINED"
        ],
        "scope_note": "This flags a possible inconsistency in GLEIF's published Level-2 relationship data for this LEI. It is not an assertion about the entity's actual corporate structure, and not a finding about the entity itself. GLEIF golden-copy data is periodically corrected; recheck against a fresh golden-copy pull before treating this as durable.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). Relationship records are processed structurally only. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [],
      "golden_hash": "ef228427553d09f2f5cce72977eae82f97e5347d3f4ecad2fe75192771e04a9e"
    }
  ]
}
