Skip to content

feat: refactor conformance suite into vertical-agnostic architecture (RFC #520) - #107

Open
segiodongo wants to merge 5 commits into
Universal-Commerce-Protocol:mainfrom
segiodongo:feat/vertical-agnostic-conformance
Open

feat: refactor conformance suite into vertical-agnostic architecture (RFC #520)#107
segiodongo wants to merge 5 commits into
Universal-Commerce-Protocol:mainfrom
segiodongo:feat/vertical-agnostic-conformance

Conversation

@segiodongo

Copy link
Copy Markdown
Contributor

Summary of Changes

This PR refactors the UCP conformance test harness from a retail-only monolith into a modular, capability-driven, multi-vertical test architecture per UCP RFC #520.

Key Architectural Updates

  1. 4-Tier Separation of Concerns:

    • framework/: Agnostic test harness containing BaseIntegrationTest, UcpProfile discovery parser, mock server harnesses (AgentProfileServer, MockWebhookServer), and decorators (@requires_capability, @spec_assert).
    • core/: Protocol-level tests without retail domain dependencies (protocol discovery, HTTP bindings, simulation endpoint security, idempotency guarantees).
    • common/: Cross-cutting protocol capabilities (webhooks, AP2, card credentials).
    • shopping/: Retail domain tests (checkout/, discount/, fulfillment/, order/, validation/) and domain fixtures (shopping/fixtures/flower_shop/).
  2. Platform Certification Profiles:

    • Added platforms/google.yaml validating required capabilities (dev.ucp.shopping.checkout, order, fulfillment, discount) and payment handlers (com.google.pay) against the server discovery profile.
  3. Dynamic Test Runner CLI:

    • Implemented runner.py with ucp-conformance entrypoint in pyproject.toml supporting --server_url, --suite [core|common|shopping|all], --platform <name>, -k <filter>, and --dry-run.
  4. Backward Compatibility:

    • Provided integration_test_utils.py compatibility facade that re-exports all base classes and fixtures with DeprecationWarning.
    • Maintained test_data/flower_shop symlink pointing to the new fixtures location.

Verification

  • Local Execution:
    • uv run ucp-conformance --suite=core: 12/12 passed (100%).
    • uv run ucp-conformance --suite=common: 5/5 skipped as expected via capability filtering.
    • uv run ucp-conformance --suite=shopping: 43/43 passed (100%).
    • uv run ucp-conformance --platform=google --suite=all: 60 executed (55 passed, 5 skipped).
  • Code Quality:
    • All pre-commit hooks passed cleanly (PIP_INDEX_URL=https://pypi.org/simple/ uv tool run pre-commit run --all-files).
    • Formatted and linted with ruff across all 34 files.

damaz91 and others added 5 commits July 15, 2026 08:47
…rsal-Commerce-Protocol#56)

Update hardcoded version expectations in conformance tests to match
the updated server version 2026-04-08.
- Replace FulfillmentDestinationCreateRequest instantiation with ShippingDestination to resolve TypeAliasType instantiation error.
- Decouple new test fixtures and shipping locations from conformance_input.json to a new test_fixtures.json file.
- Add --fixture_config flag to allow passing custom test fixtures.
- Update README with instructions for the new flag.
Update get_test_price() to treat both int and float major-unit inputs uniformly when converting to minor units.
…(RFC #520)

Restructure conformance test harness into a 4-tier architecture (framework, core, common, shopping) per RFC #520.

- framework/: BaseIntegrationTest, dynamic mock servers, discovery profile parsing, and decorators (@requires_capability, @spec_assert).
- core/: Protocol-level tests without retail domain dependencies (protocol discovery, binding, security, idempotency).
- common/: Cross-cutting extensions (webhooks, AP2, card credentials).
- shopping/: Retail domain tests (checkout lifecycle, business logic, discount, fulfillment, order, validation) and fixtures.
- platforms/google.yaml: Platform certification profile verifying required capabilities and payment handlers.
- runner.py: Dynamic CLI test orchestrator (ucp-conformance entrypoint) supporting suite filtering, platform evaluation, and capability checks.
- integration_test_utils.py: Backward-compatible alias facade emitting DeprecationWarning.
@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.

2 participants