{
  "tool_id": "art-579-stock-loan-rebate-recompute",
  "note": "Vector 1 is a clean rebate-basis loan: three days at a fixed collateral value and rate spread, computed total agrees exactly with the statement, collateral stays above the 102% same-currency threshold every day: MATCHES/auto_pass. Vector 2 is a fee-basis loan that both diverges from its statement AND breaches the 105% cross-currency collateral threshold on every declared day (the two findings are independent checks, both drive the verdict): DIVERGES/review_required. Vector 3 omits the diff tolerance entirely and exercises the did_not_run/INDETERMINATE path. Values are synthetic, stated in integer minor units and basis points. golden_hash computed at fixture generation time via the canonical executionHash path.",
  "vectors": [
    {
      "name": "rebate-basis-clean-match",
      "policy_parameters": {
        "diff_tolerance_minor": 50,
        "required_margin_pct": 102,
        "statement_period": {
          "start_date": "2026-06-01",
          "end_date": "2026-06-03"
        },
        "loans": [
          {
            "loan_id": "loan-1",
            "basis": "rebate_basis",
            "statement_amount_minor": -3825,
            "daily_marks": [
              {
                "date": "2026-06-01",
                "loaned_market_value_minor": 10000000,
                "collateral_value_minor": 10200000,
                "benchmark_rate_bps": 500,
                "rebate_spread_bps": 50
              },
              {
                "date": "2026-06-02",
                "loaned_market_value_minor": 10000000,
                "collateral_value_minor": 10200000,
                "benchmark_rate_bps": 500,
                "rebate_spread_bps": 50
              },
              {
                "date": "2026-06-03",
                "loaned_market_value_minor": 10000000,
                "collateral_value_minor": 10200000,
                "benchmark_rate_bps": 500,
                "rebate_spread_bps": 50
              }
            ]
          }
        ]
      },
      "output_payload": {
        "decision": {
          "gate_policy": "auto_pass",
          "execution_state": "ran",
          "reason": null
        },
        "verdict": "MATCHES",
        "statement_period": {
          "start_date": "2026-06-01",
          "end_date": "2026-06-03"
        },
        "diff_tolerance_minor": 50,
        "required_margin_pct": 102,
        "loan_count": 1,
        "loans": [
          {
            "loan_id": "loan-1",
            "basis": "rebate_basis",
            "day_count": 3,
            "daily_marks": [
              {
                "date": "2026-06-01",
                "loaned_market_value_minor": 10000000,
                "collateral_value_minor": 10200000,
                "required_collateral_minor": 10200000,
                "mark_ok": true,
                "daily_net_minor": -1275
              },
              {
                "date": "2026-06-02",
                "loaned_market_value_minor": 10000000,
                "collateral_value_minor": 10200000,
                "required_collateral_minor": 10200000,
                "mark_ok": true,
                "daily_net_minor": -1275
              },
              {
                "date": "2026-06-03",
                "loaned_market_value_minor": 10000000,
                "collateral_value_minor": 10200000,
                "required_collateral_minor": 10200000,
                "mark_ok": true,
                "daily_net_minor": -1275
              }
            ],
            "computed_total_minor": -3825,
            "statement_amount_minor": -3825,
            "diff_minor": 0,
            "matches": true,
            "collateral_breach_count": 0,
            "worst_breach_date": null,
            "worst_shortfall_minor": 0
          }
        ],
        "findings": [],
        "rejected_inputs": [],
        "scope_note": "Performs arithmetic only over caller-declared daily collateral values, loaned-security market values, and rate/spread inputs. Does not source or independently verify any value against a DTC feed, an agent lender's books, or a Reg SHO threshold-security list, and does not determine which collateral maintenance percentage a given master agreement requires.",
        "clause_note": "SIFMA Master Securities Loan Agreement (MSLA, 2017 version in common use) conventions: Actual/360 day-count for USD cash-collateral rebate accrual; 102% (same-currency) / 105% (cross-currency) collateral maintenance thresholds per SIFMA securities lending best practices. FINRA's Securities Lending and Transparency Engine (SLATE, Rule 6500 Series, implementing Exchange Act Rule 10c-1a) governs regulatory transparency reporting of loan terms -- a distinct duty from the rebate/fee bill recomputed here."
      },
      "golden_hash": "f27b6ddb4aa38205fa7a638f9894b0af09a0e55d70a75e86872cde742c915dc8"
    },
    {
      "name": "fee-basis-diverges-and-collateral-breach",
      "policy_parameters": {
        "diff_tolerance_minor": 50,
        "required_margin_pct": 105,
        "statement_period": {
          "start_date": "2026-06-01",
          "end_date": "2026-06-02"
        },
        "loans": [
          {
            "loan_id": "loan-2",
            "basis": "fee_basis",
            "statement_amount_minor": 1000,
            "daily_marks": [
              {
                "date": "2026-06-01",
                "loaned_market_value_minor": 5000000,
                "collateral_value_minor": 5200000,
                "fee_rate_bps": 300
              },
              {
                "date": "2026-06-02",
                "loaned_market_value_minor": 5000000,
                "collateral_value_minor": 5100000,
                "fee_rate_bps": 300
              }
            ]
          }
        ]
      },
      "output_payload": {
        "decision": {
          "gate_policy": "review_required",
          "execution_state": "ran",
          "reason": null
        },
        "verdict": "DIVERGES",
        "statement_period": {
          "start_date": "2026-06-01",
          "end_date": "2026-06-02"
        },
        "diff_tolerance_minor": 50,
        "required_margin_pct": 105,
        "loan_count": 1,
        "loans": [
          {
            "loan_id": "loan-2",
            "basis": "fee_basis",
            "day_count": 2,
            "daily_marks": [
              {
                "date": "2026-06-01",
                "loaned_market_value_minor": 5000000,
                "collateral_value_minor": 5200000,
                "required_collateral_minor": 5250000,
                "mark_ok": false,
                "daily_net_minor": 417
              },
              {
                "date": "2026-06-02",
                "loaned_market_value_minor": 5000000,
                "collateral_value_minor": 5100000,
                "required_collateral_minor": 5250000,
                "mark_ok": false,
                "daily_net_minor": 417
              }
            ],
            "computed_total_minor": 834,
            "statement_amount_minor": 1000,
            "diff_minor": -166,
            "matches": false,
            "collateral_breach_count": 2,
            "worst_breach_date": "2026-06-02",
            "worst_shortfall_minor": 150000
          }
        ],
        "findings": [
          {
            "code": "STATEMENT_AMOUNT_DIVERGES",
            "severity": "high",
            "loan_id": "loan-2",
            "message": "Loan loan-2 computed total 834 diverges from statement 1000 by -166 minor units."
          },
          {
            "code": "COLLATERAL_MARK_BREACH",
            "severity": "high",
            "loan_id": "loan-2",
            "message": "Loan loan-2 fell below the 105% collateral maintenance requirement on 2 day(s), worst shortfall 150000 minor units on 2026-06-02."
          }
        ],
        "rejected_inputs": [],
        "scope_note": "Performs arithmetic only over caller-declared daily collateral values, loaned-security market values, and rate/spread inputs. Does not source or independently verify any value against a DTC feed, an agent lender's books, or a Reg SHO threshold-security list, and does not determine which collateral maintenance percentage a given master agreement requires.",
        "clause_note": "SIFMA Master Securities Loan Agreement (MSLA, 2017 version in common use) conventions: Actual/360 day-count for USD cash-collateral rebate accrual; 102% (same-currency) / 105% (cross-currency) collateral maintenance thresholds per SIFMA securities lending best practices. FINRA's Securities Lending and Transparency Engine (SLATE, Rule 6500 Series, implementing Exchange Act Rule 10c-1a) governs regulatory transparency reporting of loan terms -- a distinct duty from the rebate/fee bill recomputed here."
      },
      "golden_hash": "b4de30a00d65be57db7d9a8baa158aa89dd2df25b092f75605bd442516201494"
    },
    {
      "name": "tolerance-not-declared-indeterminate",
      "policy_parameters": {
        "required_margin_pct": 102,
        "statement_period": {
          "start_date": "2026-06-01",
          "end_date": "2026-06-02"
        }
      },
      "output_payload": {
        "decision": {
          "gate_policy": "review_required",
          "execution_state": "did_not_run",
          "reason": "diff_tolerance_not_declared"
        },
        "verdict": "INDETERMINATE",
        "statement_period": null,
        "diff_tolerance_minor": null,
        "required_margin_pct": null,
        "loan_count": 0,
        "loans": [],
        "findings": [],
        "rejected_inputs": [
          {
            "where": "diff_tolerance_minor",
            "reason": "absent -- a tolerance must be declared, never defaulted",
            "supplied": null
          }
        ],
        "scope_note": "Performs arithmetic only over caller-declared daily collateral values, loaned-security market values, and rate/spread inputs. Does not source or independently verify any value against a DTC feed, an agent lender's books, or a Reg SHO threshold-security list, and does not determine which collateral maintenance percentage a given master agreement requires.",
        "clause_note": "SIFMA Master Securities Loan Agreement (MSLA, 2017 version in common use) conventions: Actual/360 day-count for USD cash-collateral rebate accrual; 102% (same-currency) / 105% (cross-currency) collateral maintenance thresholds per SIFMA securities lending best practices. FINRA's Securities Lending and Transparency Engine (SLATE, Rule 6500 Series, implementing Exchange Act Rule 10c-1a) governs regulatory transparency reporting of loan terms -- a distinct duty from the rebate/fee bill recomputed here."
      },
      "golden_hash": "4f2343bb7233f68c10fbce83315353e1c5d19a248f59e19eb87da1902611db34"
    }
  ]
}
