{
  "tool_id": "art-578-etf-pcf-basket-verification",
  "note": "Vector 1 is a clean basket: every PCF line is delivered in kind at exactly its expected quantity, no cash-in-lieu, and the cash deposited equals the balancing amount: MATCHES/auto_pass. Vector 2 has a genuine 40-share shortfall on US5949181045 covered by a declared cash-in-lieu substitution (line still matches: 250 delivered + 40 substituted = 300 expected) but the cash deposited (116000) does not equal the recomputed expected cash (balancing 15000 + cash-in-lieu 40*2500=100000 = 115000, delta 1000 vs tolerance 100): DIVERGES/review_required on BALANCING_CASH_MISMATCH alone. Vector 3 omits the cash tolerance entirely and exercises the did_not_run/INDETERMINATE path. All quantities are integer shares, all cash figures integer minor units. golden_hash computed at fixture generation time.",
  "vectors": [
    {
      "name": "clean-basket-matches",
      "policy_parameters": {
        "cash_tolerance_minor": 100,
        "transaction_type": "create",
        "units_requested": 1,
        "creation_unit_size": 50000,
        "pcf": {
          "as_of": "2026-08-07",
          "balancing_amount_per_unit_minor": 15000,
          "lines": [
            {
              "security_id": "US0378331005",
              "name": "Issuer A common stock",
              "quantity_per_unit": 500
            },
            {
              "security_id": "US5949181045",
              "name": "Issuer B common stock",
              "quantity_per_unit": 300
            },
            {
              "security_id": "US4592001014",
              "name": "Issuer C common stock",
              "quantity_per_unit": 200
            }
          ]
        },
        "basket": {
          "lines": [
            {
              "security_id": "US0378331005",
              "quantity": 500
            },
            {
              "security_id": "US5949181045",
              "quantity": 300
            },
            {
              "security_id": "US4592001014",
              "quantity": 200
            }
          ],
          "cash_in_lieu": [],
          "cash_deposited_minor": 15000
        }
      },
      "output_payload": {
        "decision": {
          "gate_policy": "auto_pass",
          "execution_state": "ran",
          "reason": null
        },
        "verdict": "MATCHES",
        "transaction_type": "create",
        "units_requested": 1,
        "creation_unit_size": 50000,
        "pcf_as_of": "2026-08-07",
        "cash_tolerance_minor": 100,
        "line_count": 3,
        "line_results": [
          {
            "security_id": "US0378331005",
            "name": "Issuer A common stock",
            "expected_quantity": 500,
            "delivered_quantity": 500,
            "substituted_quantity": 0,
            "covered_quantity": 500,
            "matches": true,
            "cash_in_lieu_value_minor": 0
          },
          {
            "security_id": "US5949181045",
            "name": "Issuer B common stock",
            "expected_quantity": 300,
            "delivered_quantity": 300,
            "substituted_quantity": 0,
            "covered_quantity": 300,
            "matches": true,
            "cash_in_lieu_value_minor": 0
          },
          {
            "security_id": "US4592001014",
            "name": "Issuer C common stock",
            "expected_quantity": 200,
            "delivered_quantity": 200,
            "substituted_quantity": 0,
            "covered_quantity": 200,
            "matches": true,
            "cash_in_lieu_value_minor": 0
          }
        ],
        "cash_in_lieu_total_minor": 0,
        "expected_cash_minor": 15000,
        "cash_deposited_minor": 15000,
        "cash_delta_minor": 0,
        "cash_matches": true,
        "findings": [],
        "rejected_inputs": [],
        "scope_note": "Performs arithmetic only over a caller-declared Portfolio Composition File and a caller-declared assembled basket. Does not source, derive, or independently verify the PCF, does not price securities, and does not determine which lines are cash-in-lieu-eligible.",
        "clause_note": "DTCC's ETF Processing service (Fund/SERV, over NSCC) settles authorized-participant creation/redemption baskets against the fund's daily Portfolio Composition File. This kernel performs the per-line and balancing-amount reconciliation an AP or its custodian already runs against that PCF. No DTCC endorsement of this tool is implied or claimed."
      },
      "golden_hash": "51cd845dc95b70083c4195616fe4d6c30991dc577c545b18c5a0c4f32fbe47a4"
    },
    {
      "name": "cash-in-lieu-shortfall-and-cash-mismatch-diverges",
      "policy_parameters": {
        "cash_tolerance_minor": 100,
        "transaction_type": "create",
        "units_requested": 1,
        "creation_unit_size": 50000,
        "pcf": {
          "as_of": "2026-08-06",
          "balancing_amount_per_unit_minor": 15000,
          "lines": [
            {
              "security_id": "US0378331005",
              "name": "Issuer A common stock",
              "quantity_per_unit": 500
            },
            {
              "security_id": "US5949181045",
              "name": "Issuer B common stock",
              "quantity_per_unit": 300
            },
            {
              "security_id": "US4592001014",
              "name": "Issuer C common stock",
              "quantity_per_unit": 200
            }
          ]
        },
        "basket": {
          "lines": [
            {
              "security_id": "US0378331005",
              "quantity": 500
            },
            {
              "security_id": "US5949181045",
              "quantity": 250
            },
            {
              "security_id": "US4592001014",
              "quantity": 200
            }
          ],
          "cash_in_lieu": [
            {
              "security_id": "US5949181045",
              "shortfall_quantity": 40,
              "substitution_price_minor": 2500
            }
          ],
          "cash_deposited_minor": 116000
        }
      },
      "output_payload": {
        "decision": {
          "gate_policy": "review_required",
          "execution_state": "ran",
          "reason": null
        },
        "verdict": "DIVERGES",
        "transaction_type": "create",
        "units_requested": 1,
        "creation_unit_size": 50000,
        "pcf_as_of": "2026-08-06",
        "cash_tolerance_minor": 100,
        "line_count": 3,
        "line_results": [
          {
            "security_id": "US0378331005",
            "name": "Issuer A common stock",
            "expected_quantity": 500,
            "delivered_quantity": 500,
            "substituted_quantity": 0,
            "covered_quantity": 500,
            "matches": true,
            "cash_in_lieu_value_minor": 0
          },
          {
            "security_id": "US5949181045",
            "name": "Issuer B common stock",
            "expected_quantity": 300,
            "delivered_quantity": 250,
            "substituted_quantity": 40,
            "covered_quantity": 290,
            "matches": false,
            "cash_in_lieu_value_minor": 100000
          },
          {
            "security_id": "US4592001014",
            "name": "Issuer C common stock",
            "expected_quantity": 200,
            "delivered_quantity": 200,
            "substituted_quantity": 0,
            "covered_quantity": 200,
            "matches": true,
            "cash_in_lieu_value_minor": 0
          }
        ],
        "cash_in_lieu_total_minor": 100000,
        "expected_cash_minor": 115000,
        "cash_deposited_minor": 116000,
        "cash_delta_minor": 1000,
        "cash_matches": false,
        "findings": [
          {
            "code": "LINE_QUANTITY_MISMATCH",
            "severity": "high",
            "security_id": "US5949181045",
            "message": "Security US5949181045 expected 300 (delivered 250 + cash-in-lieu 40 = 290)."
          },
          {
            "code": "BALANCING_CASH_MISMATCH",
            "severity": "high",
            "message": "Expected cash 115000 minor units (balancing 15000 + cash-in-lieu 100000); deposited 116000; delta 1000."
          }
        ],
        "rejected_inputs": [],
        "scope_note": "Performs arithmetic only over a caller-declared Portfolio Composition File and a caller-declared assembled basket. Does not source, derive, or independently verify the PCF, does not price securities, and does not determine which lines are cash-in-lieu-eligible.",
        "clause_note": "DTCC's ETF Processing service (Fund/SERV, over NSCC) settles authorized-participant creation/redemption baskets against the fund's daily Portfolio Composition File. This kernel performs the per-line and balancing-amount reconciliation an AP or its custodian already runs against that PCF. No DTCC endorsement of this tool is implied or claimed."
      },
      "golden_hash": "3cde680208c2bf4e3b2b8731a534010eb01a9d8803a99248c0c2730d2273fbc1"
    },
    {
      "name": "tolerance-not-declared-indeterminate",
      "policy_parameters": {
        "transaction_type": "create",
        "units_requested": 1,
        "creation_unit_size": 50000,
        "pcf": {
          "as_of": "2026-08-07",
          "balancing_amount_per_unit_minor": 15000,
          "lines": []
        }
      },
      "output_payload": {
        "decision": {
          "gate_policy": "review_required",
          "execution_state": "did_not_run",
          "reason": "cash_tolerance_not_declared"
        },
        "verdict": "INDETERMINATE",
        "transaction_type": null,
        "units_requested": null,
        "creation_unit_size": null,
        "pcf_as_of": null,
        "cash_tolerance_minor": null,
        "line_count": 0,
        "line_results": [],
        "cash_in_lieu_total_minor": null,
        "expected_cash_minor": null,
        "cash_deposited_minor": null,
        "cash_delta_minor": null,
        "cash_matches": null,
        "findings": [],
        "rejected_inputs": [
          {
            "where": "cash_tolerance_minor",
            "reason": "absent -- a cash tolerance must be declared, never defaulted",
            "supplied": null
          }
        ],
        "scope_note": "Performs arithmetic only over a caller-declared Portfolio Composition File and a caller-declared assembled basket. Does not source, derive, or independently verify the PCF, does not price securities, and does not determine which lines are cash-in-lieu-eligible.",
        "clause_note": "DTCC's ETF Processing service (Fund/SERV, over NSCC) settles authorized-participant creation/redemption baskets against the fund's daily Portfolio Composition File. This kernel performs the per-line and balancing-amount reconciliation an AP or its custodian already runs against that PCF. No DTCC endorsement of this tool is implied or claimed."
      },
      "golden_hash": "994d04c1e25634c28768efb0cbaaa0b57d036ea173f8edec2415e447d055d8d5"
    }
  ]
}
