mirror of
https://github.com/Comfy-Org/comfy-swift-sdk.git
synced 2026-11-04 23:47:26 +00:00
[PR #11] [MERGED] CI: build/test workflow + OpenAPI contract drift check #16
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-swift-sdk#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-swift-sdk/pull/11
Author: @mattmillerai
Created: 6/21/2026
Status: ✅ Merged
Merged: 6/21/2026
Merged by: @mattmillerai
Base:
main← Head:ci/openapi-contract-check📝 Commits (6)
08e7561ci: add Swift build and test workflow37569d2ci: add OpenAPI contract drift check against ComfyUI spec50fb1d4docs(contract): note POST /api/queue deprecation and /api/jobs migratione923aa4fix(contract): point manifest at /api/jobs/{job_id} after #8 migrationae6e31efix(ci): build/test on macos-15 for the Swift Testing toolchain6105b3afix(ci): run tests serially to avoid URLProtocol-stub deadlock📊 Changes
4 files changed (+260 additions, -0 deletions)
View changed files
➕
.github/workflows/ci.yml(+36 -0)➕
.github/workflows/openapi-contract.yml(+52 -0)➕
Scripts/contract/check_contract.py(+117 -0)➕
Scripts/contract/sdk-endpoints.yml(+55 -0)📄 Description
Adds CI to the repo (there was none) and ties the SDK to the ComfyUI front-facing OpenAPI contract.
What's here
ci: Swift build and test workflow—swift build+swift teston every PR and push tomain(macos-14).ci: OpenAPI contract drift check— validates the endpoints the SDK calls againstComfy-Org/ComfyUI:openapi.yaml.How the contract check behaves
Scripts/contract/sdk-endpoints.ymldeclares the endpoints the SDK depends on;Scripts/contract/check_contract.pyvalidates them against the spec the workflow fetches.deprecated: truerequired: false) missingIt runs on PR, push to
main, a weekly schedule (to catch drift introduced upstream rather than by an SDK change), and manual dispatch with a pinnableopenapi_ref.Real finding it already surfaces
The SDK reads job status via
GET /api/prompt/{prompt_id}, which is not in the front-facing contract — the documented path isGET /api/jobs/{job_id}. Encoded as a non-blocking warning (so CI is green) with a migration note, rather than swept under the rug.What's intentionally out of scope
The WebSocket
/wsstream and the/oauth/*endpoints aren't in the OpenAPI contract (OpenAPI can't model WS; OAuth is a separate authorization-server surface). They're listed in the manifest'sexcluded:block for transparency and skipped by the checker.Verified locally against the current spec
Negative test (a required endpoint absent from the spec) correctly exits 1.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.