{
  "tool_id": "art-599-gleif-snapshot-digest",
  "note": "golden_hash filled by `node golden-parity.test.mjs --update`. Vectors cover both LastUpdateDate provenance paths (CDF XML element vs caller-supplied for a CSV row), the ISO 17442 courtesy flag failing without blocking, the no-normalization rule (leading/trailing whitespace and CRLF are hashed as given), a surrogate-pair unicode byte stream, and empty input capturing nothing.",
  "vectors": [
    {
      "name": "xml-record-with-lastupdatedate",
      "policy_parameters": {
        "lei": "5493001KJTIIGC8Y1R12",
        "source_text": "<LEIRecord><LEI>5493001KJTIIGC8Y1R12</LEI><Entity><LegalName>SPECIMEN ENTITY</LegalName></Entity><Registration><LastUpdateDate>2026-06-30T12:00:00.000Z</LastUpdateDate><RegistrationStatus>ISSUED</RegistrationStatus></Registration></LEIRecord>",
        "captured_at": "2026-08-11T00:00:00Z",
        "source_format": "xml",
        "golden_copy_as_of": "2026-06-30"
      },
      "output_payload": {
        "lei": "5493001KJTIIGC8Y1R12",
        "lei_checksum_valid": true,
        "lei_checksum_note": null,
        "last_update_date": "2026-06-30T12:00:00.000Z",
        "last_update_date_source": "record_xml",
        "last_update_date_found": true,
        "source_sha256": "b7bf7a7c7b834d96f1f8f0ba2bb0185e65290e78cfc7e4406000477543591270",
        "source_bytes": 242,
        "source_format": "xml",
        "golden_copy_as_of": "2026-06-30",
        "captured_at": "2026-08-11T00:00:00Z",
        "snapshot_captured": true,
        "source_url": "https://www.gleif.org/en/lei-data/gleif-golden-copy/download-the-golden-copy",
        "licence": "CC0 1.0 Universal -- GLEIF Open Data (confirmed: gleif.org/en/meta/lei-data-terms-of-use)",
        "verification_path": "Compare source_sha256 against a fresh GLEIF Golden Copy download for the same as-of date. GLEIF publishes three golden-copy sets plus four delta files daily, so re-derive the digest from the file itself rather than trusting this record.",
        "scope_note": "This records that these exact bytes were pinned at the stated capture time. It is not a statement that the record is still current, not a validation of the entity data, and carries no ongoing monitoring duty.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). This tool hashes the pasted bytes and reads no field other than LastUpdateDate. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "GLEIF_SNAPSHOT_CAPTURED"
      ],
      "golden_hash": "67e45a9e1a7137b507ab7130e9fdccad40634ef9b45cbe8b1c2da74e5347e8d0"
    },
    {
      "name": "csv-row-caller-supplied-date",
      "policy_parameters": {
        "lei": "5493001KJTIIGC8Y1R12",
        "source_text": "5493001KJTIIGC8Y1R12,SPECIMEN ENTITY,,,GB,ISSUED,2026-06-30T12:00:00.000Z",
        "captured_at": "2026-08-11T00:00:00Z",
        "source_format": "csv",
        "golden_copy_as_of": "2026-06-30",
        "last_update_date": "2026-06-30T12:00:00.000Z"
      },
      "output_payload": {
        "lei": "5493001KJTIIGC8Y1R12",
        "lei_checksum_valid": true,
        "lei_checksum_note": null,
        "last_update_date": "2026-06-30T12:00:00.000Z",
        "last_update_date_source": "caller_supplied",
        "last_update_date_found": true,
        "source_sha256": "b5b1596710f790a4db9455aa347a7feb9fbebc8ab3503e724f6155876d97a526",
        "source_bytes": 73,
        "source_format": "csv",
        "golden_copy_as_of": "2026-06-30",
        "captured_at": "2026-08-11T00:00:00Z",
        "snapshot_captured": true,
        "source_url": "https://www.gleif.org/en/lei-data/gleif-golden-copy/download-the-golden-copy",
        "licence": "CC0 1.0 Universal -- GLEIF Open Data (confirmed: gleif.org/en/meta/lei-data-terms-of-use)",
        "verification_path": "Compare source_sha256 against a fresh GLEIF Golden Copy download for the same as-of date. GLEIF publishes three golden-copy sets plus four delta files daily, so re-derive the digest from the file itself rather than trusting this record.",
        "scope_note": "This records that these exact bytes were pinned at the stated capture time. It is not a statement that the record is still current, not a validation of the entity data, and carries no ongoing monitoring duty.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). This tool hashes the pasted bytes and reads no field other than LastUpdateDate. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "GLEIF_SNAPSHOT_CAPTURED"
      ],
      "golden_hash": "e1804cfe078cf967146cc3ac9e944019f54e4644b102e35b383b6ce2fccf7868"
    },
    {
      "name": "csv-row-no-date-available",
      "policy_parameters": {
        "lei": "7LTWFZYICNSX8D621K86",
        "source_text": "5493001KJTIIGC8Y1R12,SPECIMEN ENTITY,,,GB,ISSUED,2026-06-30T12:00:00.000Z",
        "captured_at": "2026-08-11T00:00:00Z",
        "source_format": "csv"
      },
      "output_payload": {
        "lei": "7LTWFZYICNSX8D621K86",
        "lei_checksum_valid": true,
        "lei_checksum_note": null,
        "last_update_date": null,
        "last_update_date_source": null,
        "last_update_date_found": false,
        "source_sha256": "b5b1596710f790a4db9455aa347a7feb9fbebc8ab3503e724f6155876d97a526",
        "source_bytes": 73,
        "source_format": "csv",
        "golden_copy_as_of": null,
        "captured_at": "2026-08-11T00:00:00Z",
        "snapshot_captured": true,
        "source_url": "https://www.gleif.org/en/lei-data/gleif-golden-copy/download-the-golden-copy",
        "licence": "CC0 1.0 Universal -- GLEIF Open Data (confirmed: gleif.org/en/meta/lei-data-terms-of-use)",
        "verification_path": "Compare source_sha256 against a fresh GLEIF Golden Copy download for the same as-of date. GLEIF publishes three golden-copy sets plus four delta files daily, so re-derive the digest from the file itself rather than trusting this record.",
        "scope_note": "This records that these exact bytes were pinned at the stated capture time. It is not a statement that the record is still current, not a validation of the entity data, and carries no ongoing monitoring duty.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). This tool hashes the pasted bytes and reads no field other than LastUpdateDate. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "GLEIF_SNAPSHOT_CAPTURED"
      ],
      "golden_hash": "e1e02b6c1f2f952d77d2d077caf9b14b21bf1dc32012b076d019fd41fc90cf06"
    },
    {
      "name": "lei-checksum-invalid-courtesy-flag",
      "policy_parameters": {
        "lei": "NOTALEI0000000000000",
        "source_text": "5493001KJTIIGC8Y1R12,SPECIMEN ENTITY,,,GB,ISSUED,2026-06-30T12:00:00.000Z",
        "captured_at": "2026-08-11T00:00:00Z",
        "source_format": "csv"
      },
      "output_payload": {
        "lei": "NOTALEI0000000000000",
        "lei_checksum_valid": false,
        "lei_checksum_note": "ISO 17442 mod-97 check failed (remainder 19, expected 1). LEI has invalid check digits.",
        "last_update_date": null,
        "last_update_date_source": null,
        "last_update_date_found": false,
        "source_sha256": "b5b1596710f790a4db9455aa347a7feb9fbebc8ab3503e724f6155876d97a526",
        "source_bytes": 73,
        "source_format": "csv",
        "golden_copy_as_of": null,
        "captured_at": "2026-08-11T00:00:00Z",
        "snapshot_captured": true,
        "source_url": "https://www.gleif.org/en/lei-data/gleif-golden-copy/download-the-golden-copy",
        "licence": "CC0 1.0 Universal -- GLEIF Open Data (confirmed: gleif.org/en/meta/lei-data-terms-of-use)",
        "verification_path": "Compare source_sha256 against a fresh GLEIF Golden Copy download for the same as-of date. GLEIF publishes three golden-copy sets plus four delta files daily, so re-derive the digest from the file itself rather than trusting this record.",
        "scope_note": "This records that these exact bytes were pinned at the stated capture time. It is not a statement that the record is still current, not a validation of the entity data, and carries no ongoing monitoring duty.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). This tool hashes the pasted bytes and reads no field other than LastUpdateDate. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "GLEIF_SNAPSHOT_CAPTURED",
        "GLEIF_LEI_CHECKSUM_INVALID"
      ],
      "golden_hash": "5e91e00f926c9d22fedc68359a1538edc8a2f81de05ed509a37e337edf290117"
    },
    {
      "name": "whitespace-is-not-normalized",
      "policy_parameters": {
        "lei": "5493001KJTIIGC8Y1R12",
        "source_text": "   5493001KJTIIGC8Y1R12,SPECIMEN ENTITY,,,GB,ISSUED,2026-06-30T12:00:00.000Z   \r\n",
        "captured_at": "2026-08-11T00:00:00Z",
        "source_format": "csv"
      },
      "output_payload": {
        "lei": "5493001KJTIIGC8Y1R12",
        "lei_checksum_valid": true,
        "lei_checksum_note": null,
        "last_update_date": null,
        "last_update_date_source": null,
        "last_update_date_found": false,
        "source_sha256": "6faacfc8f5fd558bce0deb6c100d52200becb23006219a52736f1cca8757919c",
        "source_bytes": 81,
        "source_format": "csv",
        "golden_copy_as_of": null,
        "captured_at": "2026-08-11T00:00:00Z",
        "snapshot_captured": true,
        "source_url": "https://www.gleif.org/en/lei-data/gleif-golden-copy/download-the-golden-copy",
        "licence": "CC0 1.0 Universal -- GLEIF Open Data (confirmed: gleif.org/en/meta/lei-data-terms-of-use)",
        "verification_path": "Compare source_sha256 against a fresh GLEIF Golden Copy download for the same as-of date. GLEIF publishes three golden-copy sets plus four delta files daily, so re-derive the digest from the file itself rather than trusting this record.",
        "scope_note": "This records that these exact bytes were pinned at the stated capture time. It is not a statement that the record is still current, not a validation of the entity data, and carries no ongoing monitoring duty.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). This tool hashes the pasted bytes and reads no field other than LastUpdateDate. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "GLEIF_SNAPSHOT_CAPTURED"
      ],
      "golden_hash": "24dd3e3e2e73f12d8293bde9e346ceffa1c94f240f9e7e3f72f2570afa9998c3"
    },
    {
      "name": "unicode-and-surrogate-pair-bytes",
      "policy_parameters": {
        "lei": "5493001KJTIIGC8Y1R12",
        "source_text": "café 😀 ünïcødé",
        "captured_at": "2026-08-11T00:00:00Z",
        "source_format": "other"
      },
      "output_payload": {
        "lei": "5493001KJTIIGC8Y1R12",
        "lei_checksum_valid": true,
        "lei_checksum_note": null,
        "last_update_date": null,
        "last_update_date_source": null,
        "last_update_date_found": false,
        "source_sha256": "7be24a09fc940e1236fcbe2f9878d56cab380530da1090072adfa59b5ba64113",
        "source_bytes": 22,
        "source_format": "other",
        "golden_copy_as_of": null,
        "captured_at": "2026-08-11T00:00:00Z",
        "snapshot_captured": true,
        "source_url": "https://www.gleif.org/en/lei-data/gleif-golden-copy/download-the-golden-copy",
        "licence": "CC0 1.0 Universal -- GLEIF Open Data (confirmed: gleif.org/en/meta/lei-data-terms-of-use)",
        "verification_path": "Compare source_sha256 against a fresh GLEIF Golden Copy download for the same as-of date. GLEIF publishes three golden-copy sets plus four delta files daily, so re-derive the digest from the file itself rather than trusting this record.",
        "scope_note": "This records that these exact bytes were pinned at the stated capture time. It is not a statement that the record is still current, not a validation of the entity data, and carries no ongoing monitoring duty.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). This tool hashes the pasted bytes and reads no field other than LastUpdateDate. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [
        "GLEIF_SNAPSHOT_CAPTURED"
      ],
      "golden_hash": "2f6773cca936d65409e4563ce1fceb2d6806ba3c0ead240955d3dbf8cdb8821a"
    },
    {
      "name": "empty-input-nothing-captured",
      "policy_parameters": {},
      "output_payload": {
        "lei": null,
        "lei_checksum_valid": null,
        "lei_checksum_note": "Not provided",
        "last_update_date": null,
        "last_update_date_source": null,
        "last_update_date_found": false,
        "source_sha256": null,
        "source_bytes": 0,
        "source_format": "other",
        "golden_copy_as_of": null,
        "captured_at": null,
        "snapshot_captured": false,
        "source_url": "https://www.gleif.org/en/lei-data/gleif-golden-copy/download-the-golden-copy",
        "licence": "CC0 1.0 Universal -- GLEIF Open Data (confirmed: gleif.org/en/meta/lei-data-terms-of-use)",
        "verification_path": "Compare source_sha256 against a fresh GLEIF Golden Copy download for the same as-of date. GLEIF publishes three golden-copy sets plus four delta files daily, so re-derive the digest from the file itself rather than trusting this record.",
        "scope_note": "This records that these exact bytes were pinned at the stated capture time. It is not a statement that the record is still current, not a validation of the entity data, and carries no ongoing monitoring duty.",
        "pii_note": "LEI reference data is PUBLIC registry data (GLEIF, gleif.org). This tool hashes the pasted bytes and reads no field other than LastUpdateDate. No PII processed -- use synthetic or public registry data only."
      },
      "compliance_flags": [],
      "golden_hash": "4828315cf273e6a8c09185d6d9026a29a410577d28522184417b56828e708ffb"
    }
  ]
}
