Skip to content

ci: add Python server integration-test and happy-path workflow#120

Open
vishkaty wants to merge 3 commits into
Universal-Commerce-Protocol:mainfrom
vishkaty:ci/python-server-tests
Open

ci: add Python server integration-test and happy-path workflow#120
vishkaty wants to merge 3 commits into
Universal-Commerce-Protocol:mainfrom
vishkaty:ci/python-server-tests

Conversation

@vishkaty

@vishkaty vishkaty commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #118. CI today is lint-only: nothing installs the Python server's dependencies, boots it, or runs the integration tests that already exist at rest/python/server/integration_test.py — so incompatibilities like #118 (the server on main cannot import against python-sdk@main since python-sdk#48) stay invisible until a newcomer follows the README and hits the ImportError.

This adds a workflow that exercises the documented paths end-to-end on every PR/push:

  1. uv sync for rest/python/server (with the python-sdk sibling checkout the editable path dependency expects, pinned to the last compatible commit f54858e; the pin comment documents why and how to bump);
  2. runs the existing integration tests via pytest (5 tests, currently green);
  3. seeds the database from rest/python/test_data/flower_shop per the server README;
  4. boots the server and polls /.well-known/ucp for readiness;
  5. runs the documented happy-path client against it and asserts its explicit success marker ("Happy Path completed successfully.") — marker-based because the client logs failures without a non-zero exit status.

Had this workflow existed, it would have turned red the day python-sdk#48 merged — exactly the early signal #118 asks for.

Verification: full local dry-run of every step, plus the identical workflow running green in my fork: https://github.com/vishkaty/samples/actions/runs/28898090014

Scope notes

katyalai and others added 3 commits July 13, 2026 11:49
Path-filter push/pull_request triggers to rest/python/** and the
workflow file itself, matching the path-filtered shape of the Node.js
workflow proposed in Universal-Commerce-Protocol#126, so unrelated changes do not spend CI minutes
booting the Python server.
The Python server consumes ucp-sdk as an editable path dependency, so the
purpose of this job is to catch server-vs-SDK drift as it happens. Pinning
the SDK to a fixed SHA turns the check green by testing a frozen combination
and hides exactly the drift it exists to surface. Track main instead; a red
run is the signal to adapt the server (as samples#127 did for the SDK
type-alias change).

Verified: samples main + python-sdk main boot and pass the integration
tests + happy-path client.
@damaz91

damaz91 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Hello @vishkaty, we are switching to use to ucp-sdk from Pip rather than cloning the python-sdk repo in #131 - this PR would need to be changed once that merges.

I hope this makes sense to you.

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.

3 participants