fix: Update UCP conformance repo to UCP 2026-01-23 version#28
Conversation
jingyli
left a comment
There was a problem hiding this comment.
Thanks @cusell-google! Seems like there are 2 minor miss in the updates when it comes to complete_checkout's request payload & item representation in requests.
| # from the completion payload in this release to flatten the schema. | ||
|
|
||
| payment_payload = { | ||
| "payment_data": payment_data, |
There was a problem hiding this comment.
In 2026-01-23's complete_checkout request payload, we no longer have payment_data as a json key, but rather it is replaced by payment with an instruments array (https://ucp.dev/2026-01-23/specification/checkout/#complete-checkout). We should probably correct the test here?
Also similar comments below where we are testing against complete_checkout.
| item_update = item_update_req.ItemUpdateRequest( | ||
| item_update = item_update_request.ItemUpdateRequest( | ||
| id=checkout_obj.line_items[0].item.id, | ||
| title=checkout_obj.line_items[0].item.title, |
There was a problem hiding this comment.
item no longer accepts any other metadata fields instead of id in the request front (https://github.com/Universal-Commerce-Protocol/ucp/blob/release/2026-01-23/source/schemas/shopping/types/item.json) - so might be good to clean it here.
Similar comments to item_update objects defined below.
There was a problem hiding this comment.
Thanks, kept just the id.
1e4bf59 to
5eb8b29
Compare
…nd fix test payloads
As per PR review feedback, item objects no longer accept other metadata fields instead of id in the request front. This commit removes title from ItemCreateRequest and ItemUpdateRequest instantiations.
| "name": "dev.ucp.shopping.order", | ||
| "version": "2026-01-23", | ||
| "spec": "https://ucp.dev/specs/shopping/order", | ||
| "schema": "https://ucp.dev/schemas/shopping/order.json", |
There was a problem hiding this comment.
nit: These schema and spec fields should also be dated.
i.e. spec -> https://ucp.dev/2026-01-23/specification/order/ and schema -> https://ucp.dev/2026-01-23/schemas/shopping/order.json
There was a problem hiding this comment.
Done. Thanks for the catch
7ca5aee
into
Universal-Commerce-Protocol:main
Overview
This PR updates the local simulation server and test harness payload definitions in the
conformancerepository to align seamlessly with the Universal Commerce Protocol 2026-01-23 SDK release.A substantial set of data modeling upgrades forced test payloads to drift out-of-sync with the Python SDK, resulting in 422 validations and 500 runtime tracebacks during testing. This pull request resolves all errors while migrating tests directly to the updated data patterns structure.
Detailed Changes
checkout_service.pyupdates to expect and handle a nativeFulfillmentUpdateRequest. The usage of staticFulfillmentobjects during fulfillment adjustments has been entirely replaced, which resolves widespread 422Unprocessable Entityvalidation failures."line_item_123"). Because the server now uses robust dynamic UUID generation for created lines, these strict lookups crashed. Tests acrossfulfillment_test.pywere adjusted to extract and pass generated line items appropriately.models.pyrepresentations and update workflows to safely parse and reconstruct models namedFulfillmentGroupandFulfillmentOptionmatching directly with UCP 01-23. Replaced deprecated paths that referencedFulfillmentGroupResponse, repairingNameErrorexceptions gracefully.t['type'],total['amount']). Due to how data parsing is currently evaluated via Pydantic model parsing into properties vs.model_extra, assertions scattered entirely acrossorder_test.py,validation_test.py, andfulfillment_test.pywere corrected to target the accurate instance accesses.ap2authentication extension object to correctly inherit from base objects instead of nesting via legacy wrapping wrappers (the oldmandatecontext payloads). Comments have been fully adjusted to explain why flattened objects replaceap2_datarequirements.from ucp_sdk... import Payment as Payment).Test Results
Locally executed using
uv runon Python 3.13 against the background Merchant Server simulation environment.Includes commits ae7b4b8... and prior.