feat: dual-schema support (2026-01-23) + UCP readiness validator CLI#31
Closed
sbeashwar wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
Closed
feat: dual-schema support (2026-01-23) + UCP readiness validator CLI#31sbeashwar wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
sbeashwar wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
Conversation
The UCP spec moved from 2026-01-11 to 2026-01-23, changing services from single UcpService objects to arrays of transport objects, and capabilities from flat lists to dicts keyed by name. The conformance tests only supported the old format. integration_test_utils.py: - shopping_service_endpoint now handles both formats - 2026-01-23: iterates transport list to find REST binding - 2026-01-11: reads single UcpService.rest.endpoint directly protocol_test.py: - test_discovery: accepts either version, parses both capability formats - test_discovery_urls: extracts URLs from both service structures - test_version_negotiation: discovers endpoint from both formats - Payment handler assertions made optional (not all profiles declare them) - Removed buyer_consent from required capabilities set Addresses Universal-Commerce-Protocol/ucp#142
Standalone CLI tool that validates merchant UCP endpoint readiness by fetching /.well-known/ucp and running structural checks: - Discovery profile reachability and JSON/schema validation - Schema version detection (2026-01-11 / 2026-01-23) with consistency - Required capability completeness (checkout, order, discount, fulfillment) - Payment handler declaration and config validation - Spec/schema URL reachability - Signing key JWK format validation - Optional checkout smoke test (--smoke) Output modes: colored terminal (default) and JSON (--json). Exit code 0 for READY, 1 for NOT_READY. Zero new dependencies - reuses httpx and ucp-sdk. Addresses Universal-Commerce-Protocol/ucp#142
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
…oded list The test_discovery test had a hardcoded set of expected payment handler IDs (google_pay, mock_payment_handler, shop_pay) that was specific to the Flower Shop sample server. This caused failures when running against any other UCP endpoint. Replace with structural validation that discovers handlers from the business profile and validates each handler has: - Required fields (id, name, version, config) - Reverse-DNS naming convention for handler name This makes the conformance test server-agnostic, which is the correct behavior for a protocol conformance suite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by stacked PRs: #32 (SDK migration), #33 (handler validation), #34 (validator tool).