{
  "tool_id": "art-437-fr2052a-inflow-outflow-classifier",
  "note": "golden_hash filled by golden-parity.test.mjs --update. Vector 1: seeded default multi-row, multi-bucket, one intercompany row eliminated, no overrides, compliant. Vector 2: one bucket override WITH a reason_code (clean) and one override MISSING a reason_code, deficient flag fires. Vector 3: zero-input edge (finite gate, empty rows/boundaries, all totals zero, vacuously compliant).",
  "vectors": [
    {
      "name": "seeded_default_compliant",
      "description": "Five rows across three maturity buckets (overnight/2-30/31-90 days) via the boundary table, one intercompany outflow eliminated from the external aggregation ($300M), no overrides. Total inflow $1850M, total outflow $1300M, net $550M.",
      "policy_parameters": {
        "boundary_table_version": "2026-07-01",
        "bucket_boundaries": [
          {
            "bucket_label": "Overnight",
            "max_days": 1
          },
          {
            "bucket_label": "2-30 days",
            "max_days": 30
          },
          {
            "bucket_label": "31-90 days",
            "max_days": 90
          },
          {
            "bucket_label": ">90 days",
            "max_days": 9999
          }
        ],
        "rows": [
          {
            "row_id": "r0",
            "flow_type": "inflow",
            "amount_musd": 1200,
            "maturity_days": 1,
            "is_intercompany": false
          },
          {
            "row_id": "r1",
            "flow_type": "outflow",
            "amount_musd": 900,
            "maturity_days": 45,
            "is_intercompany": false
          },
          {
            "row_id": "r2",
            "flow_type": "outflow",
            "amount_musd": 400,
            "maturity_days": 7,
            "is_intercompany": false
          },
          {
            "row_id": "r3",
            "flow_type": "inflow",
            "amount_musd": 650,
            "maturity_days": 90,
            "is_intercompany": false
          },
          {
            "row_id": "r4",
            "flow_type": "outflow",
            "amount_musd": 300,
            "maturity_days": 30,
            "is_intercompany": true
          }
        ]
      },
      "output_payload": {
        "boundary_table_version": "2026-07-01",
        "row_count": 5,
        "override_count": 0,
        "override_missing_reason_count": 0,
        "rows": [
          {
            "row_id": "r0",
            "flow_type": "inflow",
            "amount_musd": 1200,
            "maturity_days": 1,
            "table_bucket": "Overnight",
            "bucket": "Overnight",
            "is_intercompany": false,
            "override_applied": false,
            "override_reason_code": null
          },
          {
            "row_id": "r1",
            "flow_type": "outflow",
            "amount_musd": 900,
            "maturity_days": 45,
            "table_bucket": "31-90 days",
            "bucket": "31-90 days",
            "is_intercompany": false,
            "override_applied": false,
            "override_reason_code": null
          },
          {
            "row_id": "r2",
            "flow_type": "outflow",
            "amount_musd": 400,
            "maturity_days": 7,
            "table_bucket": "2-30 days",
            "bucket": "2-30 days",
            "is_intercompany": false,
            "override_applied": false,
            "override_reason_code": null
          },
          {
            "row_id": "r3",
            "flow_type": "inflow",
            "amount_musd": 650,
            "maturity_days": 90,
            "table_bucket": "31-90 days",
            "bucket": "31-90 days",
            "is_intercompany": false,
            "override_applied": false,
            "override_reason_code": null
          },
          {
            "row_id": "r4",
            "flow_type": "outflow",
            "amount_musd": 300,
            "maturity_days": 30,
            "table_bucket": "2-30 days",
            "bucket": "2-30 days",
            "is_intercompany": true,
            "override_applied": false,
            "override_reason_code": null
          }
        ],
        "form_2052a": [
          {
            "bucket": "Overnight",
            "inflow_musd": 1200,
            "outflow_musd": 0,
            "net_musd": 1200
          },
          {
            "bucket": "31-90 days",
            "inflow_musd": 650,
            "outflow_musd": 900,
            "net_musd": -250
          },
          {
            "bucket": "2-30 days",
            "inflow_musd": 0,
            "outflow_musd": 400,
            "net_musd": -400
          }
        ],
        "total_inflow_musd": 1850,
        "total_outflow_musd": 1300,
        "total_net_musd": 550,
        "elimination_total_musd": 300,
        "note": "Product/maturity-bucket classification against a versioned Appendix IV-style boundary table (policy input); an overridden bucket without a reason_code is flagged and is the row-level basis for a separate signed §27 human_accountability_record (this kernel does not mint that record). Intercompany rows are eliminated from the external aggregation and reported only in elimination_total_musd. Evidence artifact and form-shaped export only -- not a filing, not regulator-submittable."
      },
      "compliance_flags": [
        "FR2052A_CLASSIFICATION_OK",
        "FR2052A_INTERCOMPANY_ELIMINATED"
      ],
      "golden_hash": "59040a25880a95ab53ce5b872c35441e917c878b58f91476b0902dbc9dc05dbf"
    },
    {
      "name": "override_missing_reason_deficient",
      "description": "Two rows both bucket-overridden away from their table-derived bucket: r0 carries a reason_code (clean override), r1 does not -- FR2052A_OVERRIDE_MISSING_REASON_CODE fires. No intercompany rows.",
      "policy_parameters": {
        "boundary_table_version": "2026-07-01",
        "bucket_boundaries": [
          {
            "bucket_label": "Overnight",
            "max_days": 1
          },
          {
            "bucket_label": "2-30 days",
            "max_days": 30
          },
          {
            "bucket_label": "31-90 days",
            "max_days": 90
          },
          {
            "bucket_label": ">90 days",
            "max_days": 9999
          }
        ],
        "rows": [
          {
            "row_id": "r0",
            "flow_type": "inflow",
            "amount_musd": 500,
            "maturity_days": 5,
            "is_intercompany": false,
            "bucket_override": "Overnight",
            "override_reason_code": "REPRICING_TERM_MISMATCH"
          },
          {
            "row_id": "r1",
            "flow_type": "outflow",
            "amount_musd": 200,
            "maturity_days": 5,
            "is_intercompany": false,
            "bucket_override": ">90 days"
          }
        ]
      },
      "output_payload": {
        "boundary_table_version": "2026-07-01",
        "row_count": 2,
        "override_count": 2,
        "override_missing_reason_count": 1,
        "rows": [
          {
            "row_id": "r0",
            "flow_type": "inflow",
            "amount_musd": 500,
            "maturity_days": 5,
            "table_bucket": "2-30 days",
            "bucket": "Overnight",
            "is_intercompany": false,
            "override_applied": true,
            "override_reason_code": "REPRICING_TERM_MISMATCH"
          },
          {
            "row_id": "r1",
            "flow_type": "outflow",
            "amount_musd": 200,
            "maturity_days": 5,
            "table_bucket": "2-30 days",
            "bucket": ">90 days",
            "is_intercompany": false,
            "override_applied": true,
            "override_reason_code": null
          }
        ],
        "form_2052a": [
          {
            "bucket": "Overnight",
            "inflow_musd": 500,
            "outflow_musd": 0,
            "net_musd": 500
          },
          {
            "bucket": ">90 days",
            "inflow_musd": 0,
            "outflow_musd": 200,
            "net_musd": -200
          }
        ],
        "total_inflow_musd": 500,
        "total_outflow_musd": 200,
        "total_net_musd": 300,
        "elimination_total_musd": 0,
        "note": "Product/maturity-bucket classification against a versioned Appendix IV-style boundary table (policy input); an overridden bucket without a reason_code is flagged and is the row-level basis for a separate signed §27 human_accountability_record (this kernel does not mint that record). Intercompany rows are eliminated from the external aggregation and reported only in elimination_total_musd. Evidence artifact and form-shaped export only -- not a filing, not regulator-submittable."
      },
      "compliance_flags": [
        "FR2052A_OVERRIDE_MISSING_REASON_CODE"
      ],
      "golden_hash": "2cf08331d4cc94f9ec4d4aae74df51b91732067c74c56a15156593e86b66fa67"
    },
    {
      "name": "zero_input_edge",
      "description": "No boundary table and no rows supplied. Finite gate: all totals resolve to 0, row_count 0, no flags beyond the default clean flag.",
      "policy_parameters": {
        "boundary_table_version": "2026-07-01",
        "bucket_boundaries": [],
        "rows": []
      },
      "output_payload": {
        "boundary_table_version": "2026-07-01",
        "row_count": 0,
        "override_count": 0,
        "override_missing_reason_count": 0,
        "rows": [],
        "form_2052a": [],
        "total_inflow_musd": 0,
        "total_outflow_musd": 0,
        "total_net_musd": 0,
        "elimination_total_musd": 0,
        "note": "Product/maturity-bucket classification against a versioned Appendix IV-style boundary table (policy input); an overridden bucket without a reason_code is flagged and is the row-level basis for a separate signed §27 human_accountability_record (this kernel does not mint that record). Intercompany rows are eliminated from the external aggregation and reported only in elimination_total_musd. Evidence artifact and form-shaped export only -- not a filing, not regulator-submittable."
      },
      "compliance_flags": [
        "FR2052A_CLASSIFICATION_OK"
      ],
      "golden_hash": "6f90c5f47ffeea7220cf9e414b631bf0bf123a7dfec8a80b7d203725dcc343d3"
    }
  ]
}
