{
  "tool_id": "art-216-trid-tolerance-cure",
  "note": "golden_hash is empty until first golden-parity.test.mjs --update. Vector 1: no violations (all fees within tolerance). Vector 2: zero-tolerance violation requiring cure. Vector 3: changed-circumstance exemption.",
  "vectors": [
    {
      "name": "no_violation_all_buckets",
      "description": "All fees within tolerance: zero-tolerance unchanged, 10% bucket increase of $90 on $1,800 LE sum (5% < 10%), no-limit fee large increase OK.",
      "policy_parameters": {
        "fees": [
          {
            "name": "origination_fee",
            "bucket": "zero_tolerance",
            "le_amount": 1500,
            "cd_amount": 1500
          },
          {
            "name": "appraisal",
            "bucket": "ten_pct_cumulative",
            "le_amount": 600,
            "cd_amount": 640
          },
          {
            "name": "title_service",
            "bucket": "ten_pct_cumulative",
            "le_amount": 1200,
            "cd_amount": 1250
          },
          {
            "name": "hazard_insurance",
            "bucket": "no_tolerance_limit",
            "le_amount": 900,
            "cd_amount": 1100
          }
        ]
      },
      "output_payload": {
        "cure_required": false,
        "cure_amount": 0,
        "zero_tolerance_violations": 0,
        "ten_pct_bucket_le_sum": 1800,
        "ten_pct_bucket_increase": 90,
        "ten_pct_threshold": 180,
        "ten_pct_excess": 0,
        "ten_pct_violation": false,
        "total_violations": 0,
        "violations": [],
        "fee_analysis": [
          {
            "name": "origination_fee",
            "bucket": "zero_tolerance",
            "le_amount": 1500,
            "cd_amount": 1500,
            "increase": 0,
            "status": "ok",
            "violation": false
          },
          {
            "name": "appraisal",
            "bucket": "ten_pct_cumulative",
            "le_amount": 600,
            "cd_amount": 640,
            "increase": 40,
            "status": "in_ten_pct_bucket",
            "violation": false
          },
          {
            "name": "title_service",
            "bucket": "ten_pct_cumulative",
            "le_amount": 1200,
            "cd_amount": 1250,
            "increase": 50,
            "status": "in_ten_pct_bucket",
            "violation": false
          },
          {
            "name": "hazard_insurance",
            "bucket": "no_tolerance_limit",
            "le_amount": 900,
            "cd_amount": 1100,
            "increase": 200,
            "status": "no_limit",
            "violation": false
          }
        ],
        "regulatory_basis": "Reg Z §1026.19(e)(3), TRID fee tolerance rules (Loan Estimate to Closing Disclosure)",
        "note": "Changed-circumstance fees are excluded from comparison. Bucket assignment is the caller's responsibility per regulatory classification rules."
      },
      "golden_hash": "9e8da293a792b0af45fd5a2f71401fe44b8583f46e83a871c3939c1e98c7a1e8"
    },
    {
      "name": "zero_tolerance_violation",
      "description": "Zero-tolerance fee increased $500: origination fee went from $2,000 LE to $2,500 CD. Cure required = $500.",
      "policy_parameters": {
        "fees": [
          {
            "name": "origination_fee",
            "bucket": "zero_tolerance",
            "le_amount": 2000,
            "cd_amount": 2500
          }
        ]
      },
      "output_payload": {
        "cure_required": true,
        "cure_amount": 500,
        "zero_tolerance_violations": 1,
        "ten_pct_bucket_le_sum": 0,
        "ten_pct_bucket_increase": 0,
        "ten_pct_threshold": 0,
        "ten_pct_excess": 0,
        "ten_pct_violation": false,
        "total_violations": 1,
        "violations": [
          {
            "name": "origination_fee",
            "bucket": "zero_tolerance",
            "increase": 500,
            "reason": "zero_tolerance_fee_increased"
          }
        ],
        "fee_analysis": [
          {
            "name": "origination_fee",
            "bucket": "zero_tolerance",
            "le_amount": 2000,
            "cd_amount": 2500,
            "increase": 500,
            "status": "violation",
            "violation": true
          }
        ],
        "regulatory_basis": "Reg Z §1026.19(e)(3), TRID fee tolerance rules (Loan Estimate to Closing Disclosure)",
        "note": "Changed-circumstance fees are excluded from comparison. Bucket assignment is the caller's responsibility per regulatory classification rules."
      },
      "golden_hash": "f11fce26faf320af5eeb0789bc11cc74acaa9e765f374b15c0563db51ee94a4d"
    }
  ]
}
