{
  "tool_id": "art-234-test-hoepa-high-cost",
  "note": "HOEPA §1026.32(a)(1) three-trigger test. Known constants: APR trigger = APOR+6.5pp (first lien standard), APOR+8.5pp (subordinate or dwelling <$50k); points-and-fees = 5% of loan / $1,380 floor (2026, FR 2025-22773); PP trigger: >36 months or >2% of prepaid amount. golden_hash empty until golden-parity --update.",
  "vectors": [
    {
      "name": "hoepa_apr_trigger_first_lien",
      "description": "First-lien loan: APR 12.5%, APOR 5.5% => spread 7pp > 6.5pp first-lien threshold. APR trigger fires. Known constant: APOR+6.5pp for first-lien per §1026.32(a)(1)(i)(A).",
      "policy_parameters": {
        "apr_pct": 12.5,
        "apor_pct": 5.5,
        "lien_type": "first",
        "is_small_dwelling": false,
        "loan_amount": 400000,
        "points_and_fees": 5000,
        "has_prepayment_penalty": false,
        "prepayment_penalty_period_months": 0,
        "prepayment_penalty_pct": 0,
        "year": 2026
      },
      "output_payload": {
        "is_high_cost": true,
        "triggers_fired": [
          "apr_trigger"
        ],
        "apr_trigger_met": true,
        "points_fees_trigger_met": false,
        "prepayment_penalty_trigger_met": false,
        "apr_spread_pct": 7,
        "apr_pct": 12.5,
        "apor_pct": 5.5,
        "apr_threshold_pct": 6.5,
        "apr_threshold_basis": "first_lien_standard_6.5pp",
        "lien_type": "first",
        "is_small_dwelling": false,
        "loan_amount": 400000,
        "points_and_fees": 5000,
        "points_fees_limit": 20000,
        "points_fees_limit_pct": 5,
        "points_fees_floor": 1380,
        "has_prepayment_penalty": false,
        "prepayment_penalty_period_months": 0,
        "prepayment_penalty_pct": 0,
        "pp_period_limit_months": 36,
        "pp_pct_limit": 2,
        "year": 2026,
        "table_version": "HOEPA-REGZ-2026-01-01",
        "fr_citation": "FR 2025-22773, effective 2026-01-01; 12 CFR §1026.32(a)(1)(ii)",
        "regulatory_basis": "12 CFR §1026.32(a)(1) HOEPA high-cost mortgage trigger test. APR trigger: §1026.32(a)(1)(i). Points-and-fees trigger: §1026.32(a)(1)(ii). Prepayment penalty trigger: §1026.32(a)(1)(iii).",
        "consumes": "art-220 (lookup_reg_z_thresholds) supplies the HOEPA threshold table (table: hoepa). This node pins the same values for local deterministic compute.",
        "note": "HOEPA restrictions apply if ANY trigger is met. APOR must be supplied by caller from FFIEC weekly APOR table (ffiec.gov/ratespread). For HPML escrow requirement: use art-235 (test_hpml_escrow)."
      },
      "compliance_flags": [
        "HOEPA_HIGH_COST_MORTGAGE",
        "HOEPA_APR_TRIGGER"
      ],
      "golden_hash": "eba8aaa043e01cb3df6f64a680189cedbda3422a5291e38d7fe01e960476af5b"
    },
    {
      "name": "hoepa_points_fees_trigger",
      "description": "First-lien loan $400k, points-and-fees $25k: 5% limit = $20k. Points-and-fees exceed limit by $5k. Points-fees trigger fires; APR spread 2pp < 6.5pp (no APR trigger).",
      "policy_parameters": {
        "apr_pct": 7.5,
        "apor_pct": 5.5,
        "lien_type": "first",
        "is_small_dwelling": false,
        "loan_amount": 400000,
        "points_and_fees": 25000,
        "has_prepayment_penalty": false,
        "prepayment_penalty_period_months": 0,
        "prepayment_penalty_pct": 0,
        "year": 2026
      },
      "output_payload": {
        "is_high_cost": true,
        "triggers_fired": [
          "points_fees_trigger"
        ],
        "apr_trigger_met": false,
        "points_fees_trigger_met": true,
        "prepayment_penalty_trigger_met": false,
        "apr_spread_pct": 2,
        "apr_pct": 7.5,
        "apor_pct": 5.5,
        "apr_threshold_pct": 6.5,
        "apr_threshold_basis": "first_lien_standard_6.5pp",
        "lien_type": "first",
        "is_small_dwelling": false,
        "loan_amount": 400000,
        "points_and_fees": 25000,
        "points_fees_limit": 20000,
        "points_fees_limit_pct": 5,
        "points_fees_floor": 1380,
        "has_prepayment_penalty": false,
        "prepayment_penalty_period_months": 0,
        "prepayment_penalty_pct": 0,
        "pp_period_limit_months": 36,
        "pp_pct_limit": 2,
        "year": 2026,
        "table_version": "HOEPA-REGZ-2026-01-01",
        "fr_citation": "FR 2025-22773, effective 2026-01-01; 12 CFR §1026.32(a)(1)(ii)",
        "regulatory_basis": "12 CFR §1026.32(a)(1) HOEPA high-cost mortgage trigger test. APR trigger: §1026.32(a)(1)(i). Points-and-fees trigger: §1026.32(a)(1)(ii). Prepayment penalty trigger: §1026.32(a)(1)(iii).",
        "consumes": "art-220 (lookup_reg_z_thresholds) supplies the HOEPA threshold table (table: hoepa). This node pins the same values for local deterministic compute.",
        "note": "HOEPA restrictions apply if ANY trigger is met. APOR must be supplied by caller from FFIEC weekly APOR table (ffiec.gov/ratespread). For HPML escrow requirement: use art-235 (test_hpml_escrow)."
      },
      "compliance_flags": [
        "HOEPA_HIGH_COST_MORTGAGE",
        "HOEPA_POINTS_FEES_TRIGGER"
      ],
      "golden_hash": "9ded648d9ae414a11f0d668be463e2bb52be3d7fc1aa95b13d59ee9e470d5171"
    },
    {
      "name": "empty_input_finite",
      "description": "Empty inputs: all thresholds zero, no triggers fire, is_high_cost=false. Verifies empty-input finite invariant.",
      "policy_parameters": {},
      "output_payload": {
        "is_high_cost": false,
        "triggers_fired": [],
        "apr_trigger_met": false,
        "points_fees_trigger_met": false,
        "prepayment_penalty_trigger_met": false,
        "apr_spread_pct": 0,
        "apr_pct": 0,
        "apor_pct": 0,
        "apr_threshold_pct": 6.5,
        "apr_threshold_basis": "first_lien_standard_6.5pp",
        "lien_type": "first",
        "is_small_dwelling": false,
        "loan_amount": 0,
        "points_and_fees": 0,
        "points_fees_limit": 1380,
        "points_fees_limit_pct": 5,
        "points_fees_floor": 1380,
        "has_prepayment_penalty": false,
        "prepayment_penalty_period_months": 0,
        "prepayment_penalty_pct": 0,
        "pp_period_limit_months": 36,
        "pp_pct_limit": 2,
        "year": 2026,
        "table_version": "HOEPA-REGZ-2026-01-01",
        "fr_citation": "FR 2025-22773, effective 2026-01-01; 12 CFR §1026.32(a)(1)(ii)",
        "regulatory_basis": "12 CFR §1026.32(a)(1) HOEPA high-cost mortgage trigger test. APR trigger: §1026.32(a)(1)(i). Points-and-fees trigger: §1026.32(a)(1)(ii). Prepayment penalty trigger: §1026.32(a)(1)(iii).",
        "consumes": "art-220 (lookup_reg_z_thresholds) supplies the HOEPA threshold table (table: hoepa). This node pins the same values for local deterministic compute.",
        "note": "HOEPA restrictions apply if ANY trigger is met. APOR must be supplied by caller from FFIEC weekly APOR table (ffiec.gov/ratespread). For HPML escrow requirement: use art-235 (test_hpml_escrow)."
      },
      "compliance_flags": [],
      "golden_hash": "f2563ce93a638bb3c21fffe0f084cdeda878a6446759e0f87e61395362f2a0e1"
    }
  ]
}
