Skip to content

fix: update server to match SDK type alias changes#127

Merged
damaz91 merged 2 commits into
mainfrom
fix/avoid-root-model-compat
Jul 13, 2026
Merged

fix: update server to match SDK type alias changes#127
damaz91 merged 2 commits into
mainfrom
fix/avoid-root-model-compat

Conversation

@damaz91

@damaz91 damaz91 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates the sample Flower Shop merchant server to be compatible with the breaking changes in the Python SDK (which avoids RootModel in favor of type aliases).

Specifically, it:

  • Removes .root accesses on Fulfillment and FulfillmentDestination instances.
  • Removes direct instantiation of Fulfillment (aliased as FulfillmentWrapper), FulfillmentDestination, and Version constructors.
  • Updates address field mappings (city -> address_locality, region -> address_region) to match the new SDK models.

These changes are required to fix conformance test failures when running against the new SDK.

Category (Required)

  • Core Protocol: Changes to the base communication layer, global context, or breaking refactors. (Requires Technical Council approval)
  • Governance/Contributing: Updates to GOVERNANCE.md, CONTRIBUTING.md, or CODEOWNERS. (Requires Governance Council approval)
  • Capability: New schemas (Discovery, Cart, etc.) or extensions. (Requires Maintainer approval)
  • Documentation: Updates to README, or documentations regarding schema or capabilities. (Requires Maintainer approval)
  • Infrastructure: CI/CD, Linters, or build scripts. (Requires DevOps Maintainer approval)
  • Maintenance: Version bumps, lockfile updates, or minor bug fixes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool (resolver, linter, validator). (Requires Maintainer approval)
  • Community Health (.github): Updates to templates, workflows, or org-level configs. (Requires DevOps Maintainer approval)

Related Issues

Related to conformance PR Universal-Commerce-Protocol/conformance#50

Checklist

  • I have followed the Contributing Guide (including Conventional Commits title requirements and ! for breaking changes).
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk.

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Jul 10, 2026
@vishkaty

Copy link
Copy Markdown
Contributor

Verified this branch locally against python-sdk main (b1631ad): a minimal checkout-session create returns 201 (main currently 500s on the same request — TypeAliasType.__call__() takes 1 positional argument but 2 were given, checkout_service.py:307), and the full happy-path client completes end to end. LGTM from a consumer's perspective.

@damaz91 damaz91 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 13, 2026
Comment thread rest/python/server/services/checkout_service.py Outdated
@damaz91
damaz91 merged commit 44e0b9d into main Jul 13, 2026
11 checks passed
@damaz91
damaz91 deleted the fix/avoid-root-model-compat branch July 13, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants