Skip to content

test: make merchant assertions configuration-agnostic - #106

Open
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:test/merchant-agnostic-assertions
Open

test: make merchant assertions configuration-agnostic#106
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:test/merchant-agnostic-assertions

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Description

test_idempotency_create uses "EUR" as its conflict currency:

conflict_payload.currency = "EUR"

For a merchant whose fixture currency is already EUR, that produces the same
request body under the same idempotency key. A conforming server replays the
original response, while the test expects 409 for a conflict.

test_fulfillment_flow also derives its expected checkout total from only the
item price and selected shipping option. This disagrees with the suite's own
checkout verification invariant, which sums every non-total entry; a merchant
that adds tax or fees therefore fails an otherwise valid checkout.

Fix: choose a conflict currency distinct from the fixture currency, and
calculate the fulfillment expectation from the complete non-total breakdown.
This keeps the USD reference fixture unchanged while allowing other supported
merchant configurations.

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

Fixes #103

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.

Screenshots / Logs (if applicable)

N/A — test-only assertion correction.

🤖 Generated with Claude Code

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:needs-triage Signal that the PR is ready for human triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two assertions encode the reference merchant's currency and tax treatment

2 participants