{
  "tool_id": "art-564-ucp-checkout-payload-lint",
  "note": "Vectors computed directly from the shipped kernel. Covers a fully conformant pinned-version checkout, a nonconformant payload missing several resource-level required fields, an unpinned-version payload that stays UNKNOWN_VERSION regardless of otherwise clean structure, an absent-payload structural failure, and a nonconformant totals-cardinality/amount-type violation.",
  "vectors": [
    {
      "name": "conformant-clean-checkout",
      "description": "A fully conformant UCP checkout resource pinned to version 2026-04-08 -- required top-level fields present, exactly one subtotal and one total entry, valid status enum, integer minor-unit amounts. CONFORMANT, no findings.",
      "policy_parameters": {
        "payload": {
          "ucp": {
            "version": "2026-04-08"
          },
          "id": "checkout_abc123",
          "status": "ready_for_complete",
          "currency": "USD",
          "line_items": [
            {
              "id": "li_1",
              "item": {
                "id": "sku_1",
                "name": "Widget"
              },
              "quantity": 2,
              "totals": [
                {
                  "type": "subtotal",
                  "amount": 4000
                },
                {
                  "type": "total",
                  "amount": 4000
                }
              ]
            }
          ],
          "totals": [
            {
              "type": "subtotal",
              "amount": 4000
            },
            {
              "type": "tax",
              "amount": 320,
              "display_text": "Sales tax"
            },
            {
              "type": "total",
              "amount": 4320
            }
          ],
          "links": [
            {
              "url": "https://merchant.example/tos",
              "type": "terms_of_service"
            }
          ]
        }
      },
      "output_payload": {
        "verdict": "CONFORMANT",
        "ucp_version_declared": "2026-04-08",
        "ucp_spec_pinned_tag": "v2026-04-08",
        "ucp_spec_source": "https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json",
        "finding_count": 0,
        "error_count": 0,
        "warning_count": 0,
        "findings": [],
        "rationale": [
          "Pinned schema: UCP v2026-04-08 source/schemas/shopping/checkout.json (https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json).",
          "payload declares UCP version 2026-04-08, within the pinned allowlist.",
          "0 error-severity finding(s), 0 warning-severity finding(s) against the pinned checkout resource shape.",
          "This lints a full checkout RESOURCE against the schema's resource-level required[] set, not a partial create/update/complete request body (the schema's narrower ucp_request per-verb profile is out of scope).",
          "Verify-only: never contacts a UCP or ACP endpoint; the caller supplies the payload."
        ],
        "note": "Deterministic, verify-only structural lint of a caller-supplied UCP checkout resource against the schema pinned at tag v2026-04-08 of github.com/Universal-Commerce-Protocol/ucp. Never fetches a live spec version and never contacts a UCP/ACP endpoint. UCP composes with AP2 (Google developer blog) and is not presented here as a competitor to ACP or AP2."
      },
      "compliance_flags": [
        "UCP_LINT_RUN",
        "UCP_CONFORMANT"
      ],
      "golden_hash": "d852e1b3cdc55d213f199d7232a11f449177bded7bf3dfac2f5d646e73c9bdbb"
    },
    {
      "name": "nonconformant-missing-required-fields",
      "description": "Missing several resource-level required[] fields (status, totals, links) and a line_item missing its own required totals. Known pinned version. NONCONFORMANT.",
      "policy_parameters": {
        "payload": {
          "ucp": {
            "version": "2026-01-23"
          },
          "id": "checkout_missing1",
          "currency": "USD",
          "line_items": [
            {
              "id": "li_1",
              "item": {
                "id": "sku_1"
              },
              "quantity": 1
            }
          ]
        }
      },
      "output_payload": {
        "verdict": "NONCONFORMANT",
        "ucp_version_declared": "2026-01-23",
        "ucp_spec_pinned_tag": "v2026-04-08",
        "ucp_spec_source": "https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json",
        "finding_count": 4,
        "error_count": 4,
        "warning_count": 0,
        "findings": [
          {
            "code": "CHECKOUT_MISSING_REQUIRED_FIELD",
            "severity": "error",
            "path": "status",
            "message": "required Checkout field \"status\" is absent (pinned schema required[]: ucp, id, line_items, status, currency, totals, links)."
          },
          {
            "code": "CHECKOUT_MISSING_REQUIRED_FIELD",
            "severity": "error",
            "path": "totals",
            "message": "required Checkout field \"totals\" is absent (pinned schema required[]: ucp, id, line_items, status, currency, totals, links)."
          },
          {
            "code": "CHECKOUT_MISSING_REQUIRED_FIELD",
            "severity": "error",
            "path": "links",
            "message": "required Checkout field \"links\" is absent (pinned schema required[]: ucp, id, line_items, status, currency, totals, links)."
          },
          {
            "code": "LINE_ITEM_MISSING_FIELD",
            "severity": "error",
            "path": "line_items[0].totals",
            "message": "required LineItem field \"totals\" is absent."
          }
        ],
        "rationale": [
          "Pinned schema: UCP v2026-04-08 source/schemas/shopping/checkout.json (https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json).",
          "payload declares UCP version 2026-01-23, within the pinned allowlist.",
          "4 error-severity finding(s), 0 warning-severity finding(s) against the pinned checkout resource shape.",
          "This lints a full checkout RESOURCE against the schema's resource-level required[] set, not a partial create/update/complete request body (the schema's narrower ucp_request per-verb profile is out of scope).",
          "Verify-only: never contacts a UCP or ACP endpoint; the caller supplies the payload."
        ],
        "note": "Deterministic, verify-only structural lint of a caller-supplied UCP checkout resource against the schema pinned at tag v2026-04-08 of github.com/Universal-Commerce-Protocol/ucp. Never fetches a live spec version and never contacts a UCP/ACP endpoint. UCP composes with AP2 (Google developer blog) and is not presented here as a competitor to ACP or AP2."
      },
      "compliance_flags": [
        "UCP_LINT_RUN",
        "UCP_NONCONFORMANT",
        "UCP_STRUCTURAL_ERRORS"
      ],
      "golden_hash": "cdbc5c3cd4530047c7569592fc20b9d3e1295cb205ac644605f00bd7c0f09f27"
    },
    {
      "name": "unknown-version-not-pinned",
      "description": "payload declares a UCP version outside the pinned allowlist. Structural shape is otherwise clean, but the verdict is capped at UNKNOWN_VERSION -- never upgraded to CONFORMANT for a version this kernel has no pinned rules for.",
      "policy_parameters": {
        "payload": {
          "ucp": {
            "version": "2025-11-01"
          },
          "id": "checkout_future",
          "status": "incomplete",
          "currency": "EUR",
          "line_items": [
            {
              "id": "li_1",
              "item": {
                "id": "sku_9"
              },
              "quantity": 1,
              "totals": [
                {
                  "type": "subtotal",
                  "amount": 1000
                },
                {
                  "type": "total",
                  "amount": 1000
                }
              ]
            }
          ],
          "totals": [
            {
              "type": "subtotal",
              "amount": 1000
            },
            {
              "type": "total",
              "amount": 1000
            }
          ],
          "links": []
        }
      },
      "output_payload": {
        "verdict": "UNKNOWN_VERSION",
        "ucp_version_declared": "2025-11-01",
        "ucp_spec_pinned_tag": "v2026-04-08",
        "ucp_spec_source": "https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json",
        "finding_count": 1,
        "error_count": 0,
        "warning_count": 1,
        "findings": [
          {
            "code": "UCP_VERSION_NOT_PINNED",
            "severity": "warning",
            "path": "ucp.version",
            "message": "payload declares UCP version \"2025-11-01\", which is outside the pinned allowlist (2026-01-11, 2026-01-23, 2026-04-08). This lint cannot assert conformance to an unpinned version's requirements."
          }
        ],
        "rationale": [
          "Pinned schema: UCP v2026-04-08 source/schemas/shopping/checkout.json (https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json).",
          "payload declares UCP version 2025-11-01, outside the pinned allowlist -- verdict capped at UNKNOWN_VERSION regardless of structural findings.",
          "0 error-severity finding(s), 1 warning-severity finding(s) against the pinned checkout resource shape.",
          "This lints a full checkout RESOURCE against the schema's resource-level required[] set, not a partial create/update/complete request body (the schema's narrower ucp_request per-verb profile is out of scope).",
          "Verify-only: never contacts a UCP or ACP endpoint; the caller supplies the payload."
        ],
        "note": "Deterministic, verify-only structural lint of a caller-supplied UCP checkout resource against the schema pinned at tag v2026-04-08 of github.com/Universal-Commerce-Protocol/ucp. Never fetches a live spec version and never contacts a UCP/ACP endpoint. UCP composes with AP2 (Google developer blog) and is not presented here as a competitor to ACP or AP2."
      },
      "compliance_flags": [
        "UCP_LINT_RUN",
        "UCP_UNKNOWN_VERSION",
        "UCP_STRUCTURAL_WARNINGS"
      ],
      "golden_hash": "353a490943d3c7969144991f7f01f7fc00072c8c926814a6ba3d818463fecf29"
    },
    {
      "name": "missing-payload-entirely",
      "description": "No pp.payload object supplied at all -- a structural failure, not a version question, so NONCONFORMANT rather than UNKNOWN_VERSION.",
      "policy_parameters": {},
      "output_payload": {
        "verdict": "NONCONFORMANT",
        "ucp_version_declared": null,
        "ucp_spec_pinned_tag": "v2026-04-08",
        "ucp_spec_source": "https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json",
        "finding_count": 1,
        "error_count": 1,
        "warning_count": 0,
        "findings": [
          {
            "code": "MISSING_PAYLOAD",
            "severity": "error",
            "path": "",
            "message": "pp.payload is absent or is not a JSON object -- nothing to lint."
          }
        ],
        "rationale": [
          "No usable checkout payload object was supplied; this is a structural failure, not a version question, so the verdict is NONCONFORMANT rather than UNKNOWN_VERSION."
        ],
        "note": "Verify-only UCP checkout-resource lint against the pinned v2026-04-08 schema. Never contacts a UCP/ACP endpoint."
      },
      "compliance_flags": [
        "UCP_LINT_RUN",
        "UCP_NONCONFORMANT",
        "UCP_MISSING_PAYLOAD"
      ],
      "golden_hash": "fbab6a86f255631afe8a72d7b52b45399ef13e072a831aa43c28e7c76a89327f"
    },
    {
      "name": "nonconformant-bad-totals-cardinality-and-amount-type",
      "description": "Known pinned version, but totals carries two subtotal entries and zero total entries, and one entry has a non-integer amount. NONCONFORMANT.",
      "policy_parameters": {
        "payload": {
          "ucp": {
            "version": "2026-04-08"
          },
          "id": "checkout_badtotals",
          "status": "completed",
          "currency": "usd",
          "line_items": [
            {
              "id": "li_1",
              "item": {
                "id": "sku_1"
              },
              "quantity": 0,
              "totals": [
                {
                  "type": "subtotal",
                  "amount": 100
                }
              ]
            }
          ],
          "totals": [
            {
              "type": "subtotal",
              "amount": 100
            },
            {
              "type": "subtotal",
              "amount": 50
            },
            {
              "type": "fee",
              "amount": 4.5
            }
          ],
          "links": []
        }
      },
      "output_payload": {
        "verdict": "NONCONFORMANT",
        "ucp_version_declared": "2026-04-08",
        "ucp_spec_pinned_tag": "v2026-04-08",
        "ucp_spec_source": "https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json",
        "finding_count": 5,
        "error_count": 5,
        "warning_count": 0,
        "findings": [
          {
            "code": "CHECKOUT_CURRENCY_INVALID",
            "severity": "error",
            "path": "currency",
            "message": "currency must be a 3-letter uppercase ISO 4217 code."
          },
          {
            "code": "LINE_ITEM_QUANTITY_INVALID",
            "severity": "error",
            "path": "line_items[0].quantity",
            "message": "LineItem.quantity must be an integer >= 1."
          },
          {
            "code": "TOTAL_ENTRY_AMOUNT_NOT_INTEGER",
            "severity": "error",
            "path": "totals[2].amount",
            "message": "Total.amount must be an integer number of the currency minor unit (signed_amount)."
          },
          {
            "code": "TOTALS_SUBTOTAL_CARDINALITY",
            "severity": "error",
            "path": "totals",
            "message": "totals must contain exactly one entry with type \"subtotal\" (found 2)."
          },
          {
            "code": "TOTALS_TOTAL_CARDINALITY",
            "severity": "error",
            "path": "totals",
            "message": "totals must contain exactly one entry with type \"total\" (found 0)."
          }
        ],
        "rationale": [
          "Pinned schema: UCP v2026-04-08 source/schemas/shopping/checkout.json (https://github.com/Universal-Commerce-Protocol/ucp/tree/v2026-04-08/source/schemas/shopping/checkout.json).",
          "payload declares UCP version 2026-04-08, within the pinned allowlist.",
          "5 error-severity finding(s), 0 warning-severity finding(s) against the pinned checkout resource shape.",
          "This lints a full checkout RESOURCE against the schema's resource-level required[] set, not a partial create/update/complete request body (the schema's narrower ucp_request per-verb profile is out of scope).",
          "Verify-only: never contacts a UCP or ACP endpoint; the caller supplies the payload."
        ],
        "note": "Deterministic, verify-only structural lint of a caller-supplied UCP checkout resource against the schema pinned at tag v2026-04-08 of github.com/Universal-Commerce-Protocol/ucp. Never fetches a live spec version and never contacts a UCP/ACP endpoint. UCP composes with AP2 (Google developer blog) and is not presented here as a competitor to ACP or AP2."
      },
      "compliance_flags": [
        "UCP_LINT_RUN",
        "UCP_NONCONFORMANT",
        "UCP_STRUCTURAL_ERRORS"
      ],
      "golden_hash": "f8fd9b2575b3aa2058f588ba0d992ae7b71dda257d0b5bc5fd54d12c4078f4e0"
    }
  ]
}
