Repository navigation
Conversation
The order was built by copying the completed checkout's ucp.capabilities,
so GET /orders/{id} and order webhook bodies advertised
dev.ucp.shopping.checkout. overview.md (Response Capability Selection)
requires a response to include only the capabilities relevant to its
operation type, and order responses to include dev.ucp.shopping.order.
Build the order's capabilities as the order capability at the server
version, as checkout does for its own. Add an integration test covering
GET /orders/{id} and the webhook body.
|
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. |
Contributor
Author
|
I am not sure why it is flagging CLA failure, i checked it manually and it says signed, @damaz91 I would appreciate your guidance on the same... |
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.
Problem
GET /orders/{id}and order webhook bodies advertiseddev.ucp.shopping.checkoutinucp.capabilities.Root cause
The order was built by copying the completed checkout's
ucp.capabilities(checkout_service.py). The stored order, the order endpoint and the webhook body, which is that stored order, all inherited the checkout capability.Spec
overview.md, "Response Capability Selection": businesses MUST include in
ucp.capabilitiesonly the capabilities that are relevant to the response's operation type. Order webhooks map todev.ucp.shopping.order, and the selection table says an Order response includesorderand does not includecheckout,cartordiscount. The order.md and order-rest.md examples showdev.ucp.shopping.order. Checked against tagv2026-04-08.Fix
Build the order's capabilities as the order capability at the server version, the same way checkout builds its own. The completed checkout response is unchanged.
Regression coverage
test_order_advertises_the_order_capability_not_checkoutcompletes a checkout, then asserts thatGET /orders/{id}and the webhook body advertise onlydev.ucp.shopping.orderat the matching version and still validate asOrder, and that the checkout response keepsdev.ucp.shopping.checkout. It fails onmainwith['dev.ucp.shopping.checkout'] != ['dev.ucp.shopping.order'].Validation
rest/python/server:uv run pytest, 363 passedruff checkandruff format --diffclean on the changed filesNotes
The sample has no capability negotiation (checkout hardcodes its capabilities), so this follows the same convention and does not intersect with the platform profile.