{
  "tool_id": "art-404-check-retail-installment-disclosures",
  "note": "TILA amount-financed/finance-charge/total-of-payments tie-out fixtures vs a REAL art-332 (CC-A) amortization schedule output -- parity proof, not a reimplementation. Includes a tie-out-fail case, a dealer-markup-not-disclosed flag case, and a missing-provenance case.",
  "vectors": [
    {
      "name": "clean_tie_out_exact",
      "policy_parameters": {
        "inputs": {
          "cash_price": 21500,
          "downpayment": 1500,
          "other_amounts_financed": 0,
          "prepaid_finance_charge": 0,
          "amortization_schedule": {
            "totals": {
              "total_interest": 3479.43,
              "total_principal": 20000,
              "num_payments": 60,
              "ending_balance": 0
            },
            "schedule_digest": "sha256:cd726c8717cdc5b1dde830101a5a7fb29f10840048b8cb85d5d834837c493f3d",
            "source_tool_id": "art-332-build-amortization-schedule"
          },
          "disclosed_amount_financed": 20000,
          "disclosed_finance_charge": 3479.43,
          "disclosed_total_of_payments": 23479.43,
          "tolerance_cents": 500,
          "dealer_participation": {
            "markup_pct": 1.5,
            "dealer_reserve_disclosed": true,
            "declaration_note": "Dealer participation disclosed per contract Sec 4."
          }
        }
      },
      "output_payload": {
        "compliant": true,
        "amount_financed": 20000,
        "total_of_payments": 23479.43,
        "finance_charge": 3479.43,
        "tie_outs": [
          {
            "label": "amount_financed",
            "disclosed": 20000,
            "computed": 20000,
            "diff_cents": 0,
            "within_tolerance": true
          },
          {
            "label": "finance_charge",
            "disclosed": 3479.43,
            "computed": 3479.43,
            "diff_cents": 0,
            "within_tolerance": true
          },
          {
            "label": "total_of_payments",
            "disclosed": 23479.43,
            "computed": 23479.43,
            "diff_cents": 0,
            "within_tolerance": true
          }
        ],
        "tolerance_cents": 500,
        "amortization_provenance": {
          "source_tool_id": "art-332-build-amortization-schedule",
          "schedule_digest": "sha256:cd726c8717cdc5b1dde830101a5a7fb29f10840048b8cb85d5d834837c493f3d",
          "provenance_ok": true,
          "total_interest": 3479.43,
          "total_principal": 20000,
          "num_payments": 60
        },
        "dealer_participation": {
          "markup_pct": 1.5,
          "dealer_reserve_disclosed": true,
          "declaration_note": "Dealer participation disclosed per contract Sec 4.",
          "disambiguation": "This dealer-participation record is ASSERTED and receipt-bound only -- a fair-lending ADJACENCY note (dealer markup/reserve practices are a known ECOA/Reg B disparate-impact risk area), NOT a discrimination determination. No disparate-impact or disparate-treatment analysis is computed here."
        },
        "disambiguation": "check_retail_installment_disclosures ties the declared cash-price/downpayment/prepaid-finance-charge inputs against a REUSED amortization schedule (art-332, and where TVM-derived, art-324..331) -- it does not compute or verify the amortization itself, and a wrong schedule_digest/totals yields a faithfully wrong tie-out.",
        "regulatory_basis": "12 CFR 1026.18(b)/(d)/(h) (Reg Z retail-installment TILA disclosures: amount financed, finance charge, total of payments) and 1026.18(d)(1)(i) (finance-charge tolerance)."
      },
      "compliance_flags": [],
      "golden_hash": "137aa92d36fcd39ec6a4a6490a4f8a777896c6456fb7ec0b4fb861e67e22e7c2"
    },
    {
      "name": "finance_charge_tie_out_fail",
      "policy_parameters": {
        "inputs": {
          "cash_price": 21500,
          "downpayment": 1500,
          "other_amounts_financed": 0,
          "prepaid_finance_charge": 0,
          "amortization_schedule": {
            "totals": {
              "total_interest": 3479.43,
              "total_principal": 20000,
              "num_payments": 60,
              "ending_balance": 0
            },
            "schedule_digest": "sha256:cd726c8717cdc5b1dde830101a5a7fb29f10840048b8cb85d5d834837c493f3d",
            "source_tool_id": "art-332-build-amortization-schedule"
          },
          "disclosed_amount_financed": 20000,
          "disclosed_finance_charge": 3529.43,
          "disclosed_total_of_payments": 23479.43,
          "tolerance_cents": 500,
          "dealer_participation": {
            "markup_pct": 1.5,
            "dealer_reserve_disclosed": true,
            "declaration_note": "Dealer participation disclosed per contract Sec 4."
          }
        }
      },
      "output_payload": {
        "compliant": false,
        "amount_financed": 20000,
        "total_of_payments": 23479.43,
        "finance_charge": 3479.43,
        "tie_outs": [
          {
            "label": "amount_financed",
            "disclosed": 20000,
            "computed": 20000,
            "diff_cents": 0,
            "within_tolerance": true
          },
          {
            "label": "finance_charge",
            "disclosed": 3529.43,
            "computed": 3479.43,
            "diff_cents": 5000,
            "within_tolerance": false
          },
          {
            "label": "total_of_payments",
            "disclosed": 23479.43,
            "computed": 23479.43,
            "diff_cents": 0,
            "within_tolerance": true
          }
        ],
        "tolerance_cents": 500,
        "amortization_provenance": {
          "source_tool_id": "art-332-build-amortization-schedule",
          "schedule_digest": "sha256:cd726c8717cdc5b1dde830101a5a7fb29f10840048b8cb85d5d834837c493f3d",
          "provenance_ok": true,
          "total_interest": 3479.43,
          "total_principal": 20000,
          "num_payments": 60
        },
        "dealer_participation": {
          "markup_pct": 1.5,
          "dealer_reserve_disclosed": true,
          "declaration_note": "Dealer participation disclosed per contract Sec 4.",
          "disambiguation": "This dealer-participation record is ASSERTED and receipt-bound only -- a fair-lending ADJACENCY note (dealer markup/reserve practices are a known ECOA/Reg B disparate-impact risk area), NOT a discrimination determination. No disparate-impact or disparate-treatment analysis is computed here."
        },
        "disambiguation": "check_retail_installment_disclosures ties the declared cash-price/downpayment/prepaid-finance-charge inputs against a REUSED amortization schedule (art-332, and where TVM-derived, art-324..331) -- it does not compute or verify the amortization itself, and a wrong schedule_digest/totals yields a faithfully wrong tie-out.",
        "regulatory_basis": "12 CFR 1026.18(b)/(d)/(h) (Reg Z retail-installment TILA disclosures: amount financed, finance charge, total of payments) and 1026.18(d)(1)(i) (finance-charge tolerance)."
      },
      "compliance_flags": [
        "TILA_DISCLOSURE_TIE_OUT_FAIL"
      ],
      "golden_hash": "8973067f3c8cf05b60fde121d93a9733bbd14c1a8949aea186f571fad7c47850"
    },
    {
      "name": "dealer_markup_not_disclosed_flag",
      "policy_parameters": {
        "inputs": {
          "cash_price": 21500,
          "downpayment": 1500,
          "other_amounts_financed": 0,
          "prepaid_finance_charge": 0,
          "amortization_schedule": {
            "totals": {
              "total_interest": 3479.43,
              "total_principal": 20000,
              "num_payments": 60,
              "ending_balance": 0
            },
            "schedule_digest": "sha256:cd726c8717cdc5b1dde830101a5a7fb29f10840048b8cb85d5d834837c493f3d",
            "source_tool_id": "art-332-build-amortization-schedule"
          },
          "disclosed_amount_financed": 20000,
          "disclosed_finance_charge": 3479.43,
          "disclosed_total_of_payments": 23479.43,
          "tolerance_cents": 500,
          "dealer_participation": {
            "markup_pct": 2,
            "dealer_reserve_disclosed": false,
            "declaration_note": null
          }
        }
      },
      "output_payload": {
        "compliant": true,
        "amount_financed": 20000,
        "total_of_payments": 23479.43,
        "finance_charge": 3479.43,
        "tie_outs": [
          {
            "label": "amount_financed",
            "disclosed": 20000,
            "computed": 20000,
            "diff_cents": 0,
            "within_tolerance": true
          },
          {
            "label": "finance_charge",
            "disclosed": 3479.43,
            "computed": 3479.43,
            "diff_cents": 0,
            "within_tolerance": true
          },
          {
            "label": "total_of_payments",
            "disclosed": 23479.43,
            "computed": 23479.43,
            "diff_cents": 0,
            "within_tolerance": true
          }
        ],
        "tolerance_cents": 500,
        "amortization_provenance": {
          "source_tool_id": "art-332-build-amortization-schedule",
          "schedule_digest": "sha256:cd726c8717cdc5b1dde830101a5a7fb29f10840048b8cb85d5d834837c493f3d",
          "provenance_ok": true,
          "total_interest": 3479.43,
          "total_principal": 20000,
          "num_payments": 60
        },
        "dealer_participation": {
          "markup_pct": 2,
          "dealer_reserve_disclosed": false,
          "declaration_note": null,
          "disambiguation": "This dealer-participation record is ASSERTED and receipt-bound only -- a fair-lending ADJACENCY note (dealer markup/reserve practices are a known ECOA/Reg B disparate-impact risk area), NOT a discrimination determination. No disparate-impact or disparate-treatment analysis is computed here."
        },
        "disambiguation": "check_retail_installment_disclosures ties the declared cash-price/downpayment/prepaid-finance-charge inputs against a REUSED amortization schedule (art-332, and where TVM-derived, art-324..331) -- it does not compute or verify the amortization itself, and a wrong schedule_digest/totals yields a faithfully wrong tie-out.",
        "regulatory_basis": "12 CFR 1026.18(b)/(d)/(h) (Reg Z retail-installment TILA disclosures: amount financed, finance charge, total of payments) and 1026.18(d)(1)(i) (finance-charge tolerance)."
      },
      "compliance_flags": [
        "DEALER_MARKUP_NOT_DISCLOSED"
      ],
      "golden_hash": "2a5fe8f0599cd9190f7c53effc3091b3481df6cb311a4bd919efd27d015011ba"
    },
    {
      "name": "missing_provenance_digest",
      "policy_parameters": {
        "inputs": {
          "cash_price": 21500,
          "downpayment": 1500,
          "other_amounts_financed": 0,
          "prepaid_finance_charge": 0,
          "amortization_schedule": {
            "totals": {
              "total_interest": 3479.43,
              "total_principal": 20000,
              "num_payments": 60,
              "ending_balance": 0
            },
            "source_tool_id": "art-332-build-amortization-schedule"
          },
          "disclosed_amount_financed": 20000,
          "disclosed_finance_charge": 3479.43,
          "disclosed_total_of_payments": 23479.43,
          "tolerance_cents": 500,
          "dealer_participation": {
            "markup_pct": 1.5,
            "dealer_reserve_disclosed": true,
            "declaration_note": "Dealer participation disclosed per contract Sec 4."
          }
        }
      },
      "output_payload": {
        "compliant": false,
        "amount_financed": 20000,
        "total_of_payments": 23479.43,
        "finance_charge": 3479.43,
        "tie_outs": [
          {
            "label": "amount_financed",
            "disclosed": 20000,
            "computed": 20000,
            "diff_cents": 0,
            "within_tolerance": true
          },
          {
            "label": "finance_charge",
            "disclosed": 3479.43,
            "computed": 3479.43,
            "diff_cents": 0,
            "within_tolerance": true
          },
          {
            "label": "total_of_payments",
            "disclosed": 23479.43,
            "computed": 23479.43,
            "diff_cents": 0,
            "within_tolerance": true
          }
        ],
        "tolerance_cents": 500,
        "amortization_provenance": {
          "source_tool_id": "art-332-build-amortization-schedule",
          "schedule_digest": null,
          "provenance_ok": false,
          "total_interest": 3479.43,
          "total_principal": 20000,
          "num_payments": 60
        },
        "dealer_participation": {
          "markup_pct": 1.5,
          "dealer_reserve_disclosed": true,
          "declaration_note": "Dealer participation disclosed per contract Sec 4.",
          "disambiguation": "This dealer-participation record is ASSERTED and receipt-bound only -- a fair-lending ADJACENCY note (dealer markup/reserve practices are a known ECOA/Reg B disparate-impact risk area), NOT a discrimination determination. No disparate-impact or disparate-treatment analysis is computed here."
        },
        "disambiguation": "check_retail_installment_disclosures ties the declared cash-price/downpayment/prepaid-finance-charge inputs against a REUSED amortization schedule (art-332, and where TVM-derived, art-324..331) -- it does not compute or verify the amortization itself, and a wrong schedule_digest/totals yields a faithfully wrong tie-out.",
        "regulatory_basis": "12 CFR 1026.18(b)/(d)/(h) (Reg Z retail-installment TILA disclosures: amount financed, finance charge, total of payments) and 1026.18(d)(1)(i) (finance-charge tolerance)."
      },
      "compliance_flags": [
        "AMORTIZATION_SCHEDULE_PROVENANCE_MISSING"
      ],
      "golden_hash": "57d539daa8c4742fcb2c961057e9799b62ac209a032c154bcb79ad34a5b525f2"
    }
  ]
}