{
  "tool_id": "art-470-lookback-completeness-reconciler",
  "note": "golden_hash filled by golden-parity.test.mjs --update; output_payload filled by fill-fixture-payloads.mjs. Vector 1: clean multi-period lookback, all periods snapshot-covered and fully reconciled. Vector 2: source/extract gap in one period (ABSENCE-INSTRUMENT case) plus duplicate records. Vector 3: a period with no preserved list snapshot -- flagged unverifiable, excluded from the coverage denominator, never silently screened.",
  "vectors": [
    {
      "name": "clean_multi_period_reconciliation",
      "description": "Three periods, source counts match extract counts exactly, all snapshots present -- fully reconciled lookback, zero gaps.",
      "policy_parameters": {
        "periods": [
          {
            "period_label": "2023-Q4",
            "source_record_count": 500,
            "extract_record_count": 500,
            "dedup_record_count": 500,
            "snapshot_available": true
          },
          {
            "period_label": "2024-Q1",
            "source_record_count": 620,
            "extract_record_count": 620,
            "dedup_record_count": 620,
            "snapshot_available": true
          }
        ]
      },
      "output_payload": {
        "period_count": 2,
        "periods": [
          {
            "period_label": "2023-Q4",
            "source_record_count": 500,
            "extract_record_count": 500,
            "dedup_record_count": 500,
            "duplicate_count": 0,
            "gap_count": 0,
            "coverage_pct": 100,
            "snapshot_available": true,
            "period_status": "complete"
          },
          {
            "period_label": "2024-Q1",
            "source_record_count": 620,
            "extract_record_count": 620,
            "dedup_record_count": 620,
            "duplicate_count": 0,
            "gap_count": 0,
            "coverage_pct": 100,
            "snapshot_available": true,
            "period_status": "complete"
          }
        ],
        "total_source_record_count": 1120,
        "total_extract_record_count": 1120,
        "total_duplicate_count": 0,
        "verifiable_source_count": 1120,
        "verifiable_extract_count": 1120,
        "overall_coverage_pct": 100,
        "gap_periods": [],
        "unverifiable_periods": [],
        "lookback_status": "complete"
      },
      "golden_hash": "88adb199ec206a1f1ab7b5ee2005377c1cf76a9344c75a5b91d7c74ce4e50dfa"
    },
    {
      "name": "source_extract_gap_with_duplicates",
      "description": "Source system reports more records than the extract produced (coverage gap the ABSENCE-INSTRUMENT rule exists to catch), and one period carries duplicate records after dedup.",
      "policy_parameters": {
        "periods": [
          {
            "period_label": "2024-Q1",
            "source_record_count": 1000,
            "extract_record_count": 1000,
            "dedup_record_count": 990,
            "snapshot_available": true
          },
          {
            "period_label": "2024-Q2",
            "source_record_count": 1200,
            "extract_record_count": 1100,
            "dedup_record_count": 1100,
            "snapshot_available": true
          }
        ]
      },
      "output_payload": {
        "period_count": 2,
        "periods": [
          {
            "period_label": "2024-Q1",
            "source_record_count": 1000,
            "extract_record_count": 1000,
            "dedup_record_count": 990,
            "duplicate_count": 10,
            "gap_count": 0,
            "coverage_pct": 100,
            "snapshot_available": true,
            "period_status": "complete_with_duplicates"
          },
          {
            "period_label": "2024-Q2",
            "source_record_count": 1200,
            "extract_record_count": 1100,
            "dedup_record_count": 1100,
            "duplicate_count": 0,
            "gap_count": 100,
            "coverage_pct": 91.67,
            "snapshot_available": true,
            "period_status": "incomplete"
          }
        ],
        "total_source_record_count": 2200,
        "total_extract_record_count": 2100,
        "total_duplicate_count": 10,
        "verifiable_source_count": 2200,
        "verifiable_extract_count": 2100,
        "overall_coverage_pct": 95.45,
        "gap_periods": [
          "2024-Q2"
        ],
        "unverifiable_periods": [],
        "lookback_status": "incomplete_gaps_present"
      },
      "golden_hash": "c9607a0b096f70f28b36be9312f670da4f1198f3e15a12a49d8e539e25989854"
    },
    {
      "name": "snapshot_absent_period_unverifiable",
      "description": "One period has no preserved versioned-list snapshot -- flagged unverifiable and excluded from the coverage denominator rather than screened against the current list.",
      "policy_parameters": {
        "periods": [
          {
            "period_label": "2024-Q1",
            "source_record_count": 1000,
            "extract_record_count": 1000,
            "dedup_record_count": 1000,
            "snapshot_available": true
          },
          {
            "period_label": "2024-Q2",
            "source_record_count": 900,
            "extract_record_count": 900,
            "dedup_record_count": 900,
            "snapshot_available": false
          }
        ]
      },
      "output_payload": {
        "period_count": 2,
        "periods": [
          {
            "period_label": "2024-Q1",
            "source_record_count": 1000,
            "extract_record_count": 1000,
            "dedup_record_count": 1000,
            "duplicate_count": 0,
            "gap_count": 0,
            "coverage_pct": 100,
            "snapshot_available": true,
            "period_status": "complete"
          },
          {
            "period_label": "2024-Q2",
            "source_record_count": 900,
            "extract_record_count": 900,
            "dedup_record_count": 900,
            "duplicate_count": 0,
            "gap_count": 0,
            "coverage_pct": 100,
            "snapshot_available": false,
            "period_status": "unverifiable_no_snapshot"
          }
        ],
        "total_source_record_count": 1900,
        "total_extract_record_count": 1900,
        "total_duplicate_count": 0,
        "verifiable_source_count": 1000,
        "verifiable_extract_count": 1000,
        "overall_coverage_pct": 100,
        "gap_periods": [],
        "unverifiable_periods": [
          "2024-Q2"
        ],
        "lookback_status": "incomplete_unverifiable_periods_present"
      },
      "golden_hash": "69386bf9f814fb4afe1c1227f712190d5d7067c6ba5227bbe186f39ac4a7debb"
    }
  ]
}
