{
  "tool_id": "art-01-ap2-mandate-chain-validator",
  "note": "golden_hash fields are empty until first `node golden-parity.test.mjs --update`. policy_parameters/output_payload below mirror the v0.4 kernel contract (inputs folded into policy_parameters; output_payload is the stored decision).",
  "vectors": [
    {
      "name": "valid_trio_pass",
      "policy_parameters": {
        "validate_at": "2026-06-18T12:00:00.000Z",
        "hnp_mode": "strict",
        "intent": {
          "mandate_type": "intent",
          "mandate_id": "int-001",
          "version": "2.0",
          "issued_at": "2026-06-18T10:00:00.000Z",
          "expires_at": "2026-06-19T10:00:00.000Z",
          "issuer_id": "agent-alpha",
          "scope": {
            "merchant_ids": [
              "merchant-acme"
            ],
            "category_codes": [
              "5411",
              "5912"
            ],
            "currency": "USD",
            "max_amount": 500
          },
          "human_not_present": false
        },
        "cart": {
          "mandate_type": "cart",
          "mandate_id": "crt-001",
          "version": "2.0",
          "issued_at": "2026-06-18T11:00:00.000Z",
          "expires_at": "2026-06-19T11:00:00.000Z",
          "parent_mandate_id": "int-001",
          "parent_hash": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
          "cart_total": 38.97,
          "currency": "USD",
          "merchant_id": "merchant-acme"
        },
        "payment": {
          "mandate_type": "payment",
          "mandate_id": "pay-001",
          "version": "2.0",
          "issued_at": "2026-06-18T11:54:00.000Z",
          "expires_at": "2026-06-18T12:30:00.000Z",
          "parent_mandate_id": "crt-001",
          "parent_hash": "b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3",
          "amount": 38.97,
          "currency": "USD",
          "merchant_id": "merchant-acme",
          "payment_method": "card_on_file",
          "human_not_present": false
        }
      },
      "output_payload": {
        "validation_verdict": "PASS",
        "checks_run": 8,
        "failing_checks": [],
        "warning_checks": [],
        "mandate_ids": {
          "intent": "int-001",
          "cart": "crt-001",
          "payment": "pay-001"
        },
        "has_cart": true,
        "human_not_present": false
      },
      "golden_hash": "effeb3f1b34144404a0a97690595dfcbac32611eef034e0c7c091cb08eaf54b7"
    },
    {
      "name": "overspend_fail",
      "policy_parameters": {
        "validate_at": "2026-06-18T12:00:00.000Z",
        "hnp_mode": "strict",
        "intent": {
          "mandate_type": "intent",
          "mandate_id": "int-os-001",
          "version": "2.0",
          "issued_at": "2026-06-18T11:00:00.000Z",
          "expires_at": "2026-06-19T11:00:00.000Z",
          "issuer_id": "agent-zeta",
          "scope": {
            "merchant_ids": [
              "merchant-acme"
            ],
            "category_codes": [
              "5411"
            ],
            "currency": "USD",
            "max_amount": 50
          },
          "human_not_present": false
        },
        "cart": {
          "mandate_type": "cart",
          "mandate_id": "crt-os-001",
          "version": "2.0",
          "issued_at": "2026-06-18T11:30:00.000Z",
          "expires_at": "2026-06-19T11:30:00.000Z",
          "parent_mandate_id": "int-os-001",
          "parent_hash": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
          "cart_total": 120,
          "currency": "USD",
          "merchant_id": "merchant-acme"
        },
        "payment": {
          "mandate_type": "payment",
          "mandate_id": "pay-os-001",
          "version": "2.0",
          "issued_at": "2026-06-18T11:54:00.000Z",
          "expires_at": "2026-06-18T12:30:00.000Z",
          "parent_mandate_id": "crt-os-001",
          "parent_hash": "b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3",
          "amount": 120,
          "currency": "USD",
          "merchant_id": "merchant-acme",
          "payment_method": "card_on_file",
          "human_not_present": false
        }
      },
      "output_payload": {
        "validation_verdict": "FAIL",
        "checks_run": 8,
        "failing_checks": [
          {
            "id": "spend",
            "detail": "Payment amount 120 USD exceeds intent max_amount 50 — over-spend of 70.00. Cart total 120 exceeds intent max_amount 50."
          }
        ],
        "warning_checks": [],
        "mandate_ids": {
          "intent": "int-os-001",
          "cart": "crt-os-001",
          "payment": "pay-os-001"
        },
        "has_cart": true,
        "human_not_present": false
      },
      "golden_hash": "8b46e96c46ea3f88db1ec05c85ae9dd62965a3944f392d6c20343f5f5938dab2"
    },
    {
      "name": "expired_intent_fail",
      "policy_parameters": {
        "validate_at": "2026-06-18T12:00:00.000Z",
        "hnp_mode": "strict",
        "intent": {
          "mandate_type": "intent",
          "mandate_id": "int-exp-001",
          "version": "2.0",
          "issued_at": "2026-06-17T11:00:00.000Z",
          "expires_at": "2026-06-18T11:00:00.000Z",
          "issuer_id": "agent-epsilon",
          "scope": {
            "merchant_ids": [
              "merchant-acme"
            ],
            "category_codes": [
              "5411"
            ],
            "currency": "USD",
            "max_amount": 100
          },
          "human_not_present": false
        },
        "cart": null,
        "payment": {
          "mandate_type": "payment",
          "mandate_id": "pay-exp-001",
          "version": "2.0",
          "issued_at": "2026-06-18T11:54:00.000Z",
          "expires_at": "2026-06-18T12:30:00.000Z",
          "parent_mandate_id": "int-exp-001",
          "parent_hash": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
          "amount": 50,
          "currency": "USD",
          "merchant_id": "merchant-acme",
          "payment_method": "card_on_file",
          "human_not_present": false
        }
      },
      "output_payload": {
        "validation_verdict": "FAIL",
        "checks_run": 8,
        "failing_checks": [
          {
            "id": "ttl",
            "detail": "intent: EXPIRED — expires_at 2026-06-18T11:00:00.000Z ≤ validate-at 2026-06-18T12:00:00.000Z. payment: valid until 2026-06-18T12:30:00.000Z (30 min remaining)."
          }
        ],
        "warning_checks": [],
        "mandate_ids": {
          "intent": "int-exp-001",
          "cart": null,
          "payment": "pay-exp-001"
        },
        "has_cart": false,
        "human_not_present": false
      },
      "golden_hash": "b2bede9d8a0367b350886d16e27daf76ffdeb3a74f449f305cb9048a4867308c"
    }
  ]
}
