{
  "tool_id": "art-525-nway-balance-closure-check",
  "note": "Vector 1 is three internal systems agreeing on one measure at one as-of moment, with every hop difference independently declared and closing: auto_pass. Vector 2 is a GENUINE CLOSURE BREAK -- the same three balances, but the independently declared CORE-DDA to REG-MART hop states a 45,000.00 difference while the two intermediate hops each state zero, so the closure residual is -4500000 minor units and the identity fails even though all three balances are equal. That break is invisible to any display of three pairwise tables and is exactly what this node exists to catch. Vector 3 supplies the balances at differing as-of moments and exercises the ran_stale execution state. Balances are synthetic, stated in integer minor units. golden_hash computed at fixture generation time.",
  "vectors": [
    {
      "name": "three-system-clean-closure-auto-pass",
      "policy_parameters": {
        "measure_label": "Total customer deposits, USD",
        "authoritative_system_id": "CORE-DDA",
        "closure_tolerance_minor": 100,
        "systems": [
          {
            "system_id": "CORE-DDA",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          },
          {
            "system_id": "GL-ORACLE",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          },
          {
            "system_id": "REG-MART",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          }
        ],
        "declared_differences": [
          {
            "from_system_id": "CORE-DDA",
            "to_system_id": "GL-ORACLE",
            "difference_minor": 0
          },
          {
            "from_system_id": "GL-ORACLE",
            "to_system_id": "REG-MART",
            "difference_minor": 0
          },
          {
            "from_system_id": "CORE-DDA",
            "to_system_id": "REG-MART",
            "difference_minor": 0
          }
        ]
      },
      "output_payload": {
        "decision": {
          "gate_policy": "auto_pass",
          "execution_state": "ran",
          "reason": null
        },
        "measure_label": "Total customer deposits, USD",
        "authoritative_system_id": "CORE-DDA",
        "closure_tolerance_minor": 100,
        "system_count": 3,
        "as_of_consistent": true,
        "as_of_values": [
          "2026-06-30T23:59:59Z"
        ],
        "systems": [
          {
            "system_id": "CORE-DDA",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": true
          },
          {
            "system_id": "GL-ORACLE",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": false
          },
          {
            "system_id": "REG-MART",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": false
          }
        ],
        "pairwise": [
          {
            "pair": "CORE-DDA -> GL-ORACLE",
            "system_a": "CORE-DDA",
            "system_b": "GL-ORACLE",
            "against_authoritative": true,
            "balance_difference_minor": 0,
            "declared_difference_minor": 0,
            "difference_minor": 0,
            "difference_basis": "declared",
            "declared_vs_balance_delta_minor": 0,
            "declared_agrees_with_balances": true,
            "within_tolerance": true
          },
          {
            "pair": "CORE-DDA -> REG-MART",
            "system_a": "CORE-DDA",
            "system_b": "REG-MART",
            "against_authoritative": true,
            "balance_difference_minor": 0,
            "declared_difference_minor": 0,
            "difference_minor": 0,
            "difference_basis": "declared",
            "declared_vs_balance_delta_minor": 0,
            "declared_agrees_with_balances": true,
            "within_tolerance": true
          },
          {
            "pair": "GL-ORACLE -> REG-MART",
            "system_a": "GL-ORACLE",
            "system_b": "REG-MART",
            "against_authoritative": false,
            "balance_difference_minor": 0,
            "declared_difference_minor": 0,
            "difference_minor": 0,
            "difference_basis": "declared",
            "declared_vs_balance_delta_minor": 0,
            "declared_agrees_with_balances": true,
            "within_tolerance": true
          }
        ],
        "triples": [
          {
            "triple": "CORE-DDA, GL-ORACLE, REG-MART",
            "systems": [
              "CORE-DDA",
              "GL-ORACLE",
              "REG-MART"
            ],
            "leg_ab_minor": 0,
            "leg_bc_minor": 0,
            "leg_ac_minor": 0,
            "residual_minor": 0,
            "residual_basis": "declared",
            "within_tolerance": true
          }
        ],
        "triple_count": 1,
        "closure_holds": true,
        "max_abs_residual_minor": 0,
        "break_pairs": [],
        "declared_disagreements": [],
        "suspect_systems": [],
        "rejected_inputs": [],
        "scope_note": "Scoped to internal system-boundary hops inside one firm, ahead of any filing. Balances are caller-declared from the firm's own systems.",
        "boundary_note": "This kernel performs only the closure arithmetic over caller-declared integer minor-unit balances and caller-declared hop differences. It does not source, derive, estimate, or audit any balance, and it does not decide which system is authoritative -- that designation is a caller input per BCBS 239 SS36(d)."
      },
      "golden_hash": "312d69ad5dd3c45926202e53c58a033e0afbc2f8081f915a93b21bf3dfb106e8"
    },
    {
      "name": "declared-hop-closure-break-review-required",
      "policy_parameters": {
        "measure_label": "Total customer deposits, USD",
        "authoritative_system_id": "CORE-DDA",
        "closure_tolerance_minor": 100,
        "systems": [
          {
            "system_id": "CORE-DDA",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          },
          {
            "system_id": "GL-ORACLE",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          },
          {
            "system_id": "REG-MART",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          }
        ],
        "declared_differences": [
          {
            "from_system_id": "CORE-DDA",
            "to_system_id": "GL-ORACLE",
            "difference_minor": 0
          },
          {
            "from_system_id": "GL-ORACLE",
            "to_system_id": "REG-MART",
            "difference_minor": 0
          },
          {
            "from_system_id": "CORE-DDA",
            "to_system_id": "REG-MART",
            "difference_minor": 4500000
          }
        ]
      },
      "output_payload": {
        "decision": {
          "gate_policy": "review_required",
          "execution_state": "ran",
          "reason": null
        },
        "measure_label": "Total customer deposits, USD",
        "authoritative_system_id": "CORE-DDA",
        "closure_tolerance_minor": 100,
        "system_count": 3,
        "as_of_consistent": true,
        "as_of_values": [
          "2026-06-30T23:59:59Z"
        ],
        "systems": [
          {
            "system_id": "CORE-DDA",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": true
          },
          {
            "system_id": "GL-ORACLE",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": false
          },
          {
            "system_id": "REG-MART",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": false
          }
        ],
        "pairwise": [
          {
            "pair": "CORE-DDA -> GL-ORACLE",
            "system_a": "CORE-DDA",
            "system_b": "GL-ORACLE",
            "against_authoritative": true,
            "balance_difference_minor": 0,
            "declared_difference_minor": 0,
            "difference_minor": 0,
            "difference_basis": "declared",
            "declared_vs_balance_delta_minor": 0,
            "declared_agrees_with_balances": true,
            "within_tolerance": true
          },
          {
            "pair": "CORE-DDA -> REG-MART",
            "system_a": "CORE-DDA",
            "system_b": "REG-MART",
            "against_authoritative": true,
            "balance_difference_minor": 0,
            "declared_difference_minor": 4500000,
            "difference_minor": 4500000,
            "difference_basis": "declared",
            "declared_vs_balance_delta_minor": 4500000,
            "declared_agrees_with_balances": false,
            "within_tolerance": false
          },
          {
            "pair": "GL-ORACLE -> REG-MART",
            "system_a": "GL-ORACLE",
            "system_b": "REG-MART",
            "against_authoritative": false,
            "balance_difference_minor": 0,
            "declared_difference_minor": 0,
            "difference_minor": 0,
            "difference_basis": "declared",
            "declared_vs_balance_delta_minor": 0,
            "declared_agrees_with_balances": true,
            "within_tolerance": true
          }
        ],
        "triples": [
          {
            "triple": "CORE-DDA, GL-ORACLE, REG-MART",
            "systems": [
              "CORE-DDA",
              "GL-ORACLE",
              "REG-MART"
            ],
            "leg_ab_minor": 0,
            "leg_bc_minor": 0,
            "leg_ac_minor": 4500000,
            "residual_minor": -4500000,
            "residual_basis": "declared",
            "within_tolerance": false
          }
        ],
        "triple_count": 1,
        "closure_holds": false,
        "max_abs_residual_minor": 4500000,
        "break_pairs": [
          "CORE-DDA -> REG-MART"
        ],
        "declared_disagreements": [
          "CORE-DDA -> REG-MART"
        ],
        "suspect_systems": [
          "CORE-DDA",
          "REG-MART"
        ],
        "rejected_inputs": [],
        "scope_note": "Scoped to internal system-boundary hops inside one firm, ahead of any filing. Balances are caller-declared from the firm's own systems.",
        "boundary_note": "This kernel performs only the closure arithmetic over caller-declared integer minor-unit balances and caller-declared hop differences. It does not source, derive, estimate, or audit any balance, and it does not decide which system is authoritative -- that designation is a caller input per BCBS 239 SS36(d)."
      },
      "golden_hash": "d5bd996f926db9fc06a6f98335e474a23d4a0cdc7db1489996c816a958d0b986"
    },
    {
      "name": "differing-as-of-ran-stale",
      "policy_parameters": {
        "measure_label": "Total customer deposits, USD",
        "authoritative_system_id": "CORE-DDA",
        "closure_tolerance_minor": 100,
        "systems": [
          {
            "system_id": "CORE-DDA",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          },
          {
            "system_id": "GL-ORACLE",
            "balance_minor": 212800400000,
            "as_of": "2026-06-29T23:59:59Z"
          },
          {
            "system_id": "REG-MART",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z"
          }
        ]
      },
      "output_payload": {
        "decision": {
          "gate_policy": "review_required",
          "execution_state": "ran_stale",
          "reason": "balances_supplied_at_differing_as_of_moments"
        },
        "measure_label": "Total customer deposits, USD",
        "authoritative_system_id": "CORE-DDA",
        "closure_tolerance_minor": 100,
        "system_count": 3,
        "as_of_consistent": false,
        "as_of_values": [
          "2026-06-30T23:59:59Z",
          "2026-06-29T23:59:59Z"
        ],
        "systems": [
          {
            "system_id": "CORE-DDA",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": true
          },
          {
            "system_id": "GL-ORACLE",
            "balance_minor": 212800400000,
            "as_of": "2026-06-29T23:59:59Z",
            "is_authoritative": false
          },
          {
            "system_id": "REG-MART",
            "balance_minor": 212800400000,
            "as_of": "2026-06-30T23:59:59Z",
            "is_authoritative": false
          }
        ],
        "pairwise": [
          {
            "pair": "CORE-DDA -> GL-ORACLE",
            "system_a": "CORE-DDA",
            "system_b": "GL-ORACLE",
            "against_authoritative": true,
            "balance_difference_minor": 0,
            "declared_difference_minor": null,
            "difference_minor": 0,
            "difference_basis": "balances",
            "declared_vs_balance_delta_minor": null,
            "declared_agrees_with_balances": null,
            "within_tolerance": true
          },
          {
            "pair": "CORE-DDA -> REG-MART",
            "system_a": "CORE-DDA",
            "system_b": "REG-MART",
            "against_authoritative": true,
            "balance_difference_minor": 0,
            "declared_difference_minor": null,
            "difference_minor": 0,
            "difference_basis": "balances",
            "declared_vs_balance_delta_minor": null,
            "declared_agrees_with_balances": null,
            "within_tolerance": true
          },
          {
            "pair": "GL-ORACLE -> REG-MART",
            "system_a": "GL-ORACLE",
            "system_b": "REG-MART",
            "against_authoritative": false,
            "balance_difference_minor": 0,
            "declared_difference_minor": null,
            "difference_minor": 0,
            "difference_basis": "balances",
            "declared_vs_balance_delta_minor": null,
            "declared_agrees_with_balances": null,
            "within_tolerance": true
          }
        ],
        "triples": [
          {
            "triple": "CORE-DDA, GL-ORACLE, REG-MART",
            "systems": [
              "CORE-DDA",
              "GL-ORACLE",
              "REG-MART"
            ],
            "leg_ab_minor": 0,
            "leg_bc_minor": 0,
            "leg_ac_minor": 0,
            "residual_minor": 0,
            "residual_basis": "balances",
            "within_tolerance": true
          }
        ],
        "triple_count": 1,
        "closure_holds": true,
        "max_abs_residual_minor": 0,
        "break_pairs": [],
        "declared_disagreements": [],
        "suspect_systems": [],
        "rejected_inputs": [],
        "scope_note": "Scoped to internal system-boundary hops inside one firm, ahead of any filing. Balances are caller-declared from the firm's own systems.",
        "boundary_note": "This kernel performs only the closure arithmetic over caller-declared integer minor-unit balances and caller-declared hop differences. It does not source, derive, estimate, or audit any balance, and it does not decide which system is authoritative -- that designation is a caller input per BCBS 239 SS36(d)."
      },
      "golden_hash": "eae823ada44777c75256b89a4094dc929b18cc315fb1155fa9d22c3af1e18303"
    }
  ]
}
