Skip to content

fix: Update UCP conformance repo to UCP 2026-01-23 version#28

Open
cusell-google wants to merge 5 commits intoUniversal-Commerce-Protocol:mainfrom
cusell-google:main
Open

fix: Update UCP conformance repo to UCP 2026-01-23 version#28
cusell-google wants to merge 5 commits intoUniversal-Commerce-Protocol:mainfrom
cusell-google:main

Conversation

@cusell-google
Copy link
Copy Markdown

Overview

This PR updates the local simulation server and test harness payload definitions in the conformance repository 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

  • Schema Object Mapping: Upgraded checkout_service.py updates to expect and handle a native FulfillmentUpdateRequest. The usage of static Fulfillment objects during fulfillment adjustments has been entirely replaced, which resolves widespread 422 Unprocessable Entity validation failures.
  • Line Item Payloads: Multiple conformance methods were found injecting invalid hardcoded identifiers (e.g. "line_item_123"). Because the server now uses robust dynamic UUID generation for created lines, these strict lookups crashed. Tests across fulfillment_test.py were adjusted to extract and pass generated line items appropriately.
  • Internal Server Resolution: Refactored the models.py representations and update workflows to safely parse and reconstruct models named FulfillmentGroup and FulfillmentOption matching directly with UCP 01-23. Replaced deprecated paths that referenced FulfillmentGroupResponse, repairing NameError exceptions gracefully.
  • SDK Object Dictionary Evaluation Fixes: Test validations were accessing values as dictionaries mapping standard parameters (t['type'], total['amount']). Due to how data parsing is currently evaluated via Pydantic model parsing into properties vs .model_extra, assertions scattered entirely across order_test.py, validation_test.py, and fulfillment_test.py were corrected to target the accurate instance accesses.
  • SDK Extensions Flattening: Redesigned payload creation for the ap2 authentication extension object to correctly inherit from base objects instead of nesting via legacy wrapping wrappers (the old mandate context payloads). Comments have been fully adjusted to explain why flattened objects replace ap2_data requirements.
  • Code Maintenance & Styling: Removed unneeded module aliases causing redundancy in test imports (e.g., stripped out from ucp_sdk... import Payment as Payment).

Test Results

Locally executed using uv run on Python 3.13 against the background Merchant Server simulation environment.

All 59 conformance tests across 13 suites pass successfully without any 422 or 500 errors.
Total tests passed: 59
Exit code: 0


Includes commits ae7b4b8... and prior.

Refactors SDK imports that unnecessarily aliased Payment.
Restores proper checkout ap2 update payload formatting that natively merges the mandate object context.

Test Report:
- ALL 59 Integration Tests Passing
- Exit Code: 0
@cusell-google cusell-google changed the title Update UCP conformance repo to UCP 2026-01-23 version test: Update UCP conformance repo to UCP 2026-01-23 version Mar 24, 2026
@cusell-google cusell-google marked this pull request as ready for review March 25, 2026 13:01
@cusell-google cusell-google requested review from a team as code owners March 25, 2026 13:01
@cusell-google cusell-google changed the title test: Update UCP conformance repo to UCP 2026-01-23 version fix: Update UCP conformance repo to UCP 2026-01-23 version Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants