mirror of
https://github.com/Comfy-Org/comfy-python-sdk.git
synced 2026-11-04 23:37:47 +00:00
[PR #49] [MERGED] chore: sync the v2 spec and wire every operation it declares #57
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
effort:medium
effort:small
effort:small
effort:trivial
priority:nice-to-have
priority:nice-to-have
priority:recommended
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-python-sdk#57
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-python-sdk/pull/49
Author: @wei-hai
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @wei-hai
Base:
main← Head:wei/sync-v2-spec-complete📝 Commits (9)
3c2b9e2feat: add asset delete1317e5faddress coderabbit PR comments7de4ad0address coderabbit PR commentsee2155dfeat: add get_workflow() to fetch the graph that produced a jobbec7fb8chore: sync vendored Comfy API v2 spec from cloud@7c65b1a24e2c44chore: regenerate comfy_low models for the synced spec9c3b078Merge remote-tracking branch 'origin/wei/fetch-job-workflow' into wei/sync-v2-spec-completeba0ed19Merge remote-tracking branch 'origin/pr-41' into wei/sync-v2-spec-complete47c46d2chore: wire the synced spec's new operations into comfy_low📊 Changes
12 files changed (+478 additions, -25 deletions)
View changed files
📝
spec/openapi.yaml(+134 -16)📝
src/comfy_low/__init__.py(+4 -0)📝
src/comfy_low/models/__init__.py(+4 -0)📝
src/comfy_low/models/_generated.py(+53 -6)📝
src/comfy_low/transport.py(+29 -1)📝
src/comfy_sdk/__init__.py(+2 -1)📝
src/comfy_sdk/assets.py(+26 -0)📝
src/comfy_sdk/jobs.py(+39 -1)📝
tests/conftest.py(+42 -0)📝
tests/test_assets.py(+34 -0)📝
tests/test_async.py(+33 -0)➕
tests/test_job_workflow.py(+78 -0)📄 Description
Brings the vendored Comfy API v2 spec up to date and leaves CI green, which the automated sync PR can't do alone:
tests/test_spec_coverage.pyassertsOPERATION_IDSmatches the spec exactly, so a sync that introduces operations without wrappers always fails.The synced spec introduces two:
getJobWorkflowanddeleteAsset. Both are implemented here.What's in it
cloud@7c65b1a), plus regenerated modelsget_workflow()onJob/AsyncJob— returns the graph and aformatdiscriminator (save= the authoring workflow at the version the job ran;api= the executed graph). Callers must branch on it: which shape comes back depends on how the job was submitted, not on anything the caller controlsAsset.delete()andassets.delete(id)OPERATION_IDS/OPERATION_METHODS, withget_job_workflowmoved onto the generatedJobWorkflowResponsemodelCredit and supersession
The asset-deletion work is @jab416171's, from #41 — merged here with their commits intact rather than reimplemented, because the spec sync can't go green without it. That PR is superseded by this one; the implementation and tests are theirs.
Their branch had hand-edited
spec/openapi.yamlto adddeleteAssetbefore the sync existed. The canonical projection now declares it properly, so the synced file won that conflict — no behaviour change.One real bug fixed along the way
Six delete-asset tests still called
Comfy(server.base_url)positionally. That constructor argument was removed by the separately-mergedCOMFY_BASE_URLchange, so the two branches were mutually stale — neither PR was wrong alone. Updated toComfy()with the fixture's env var, matching every other test in those files. No test intent, assertions, or delete logic touched.Verification
ruff, ruff format, mypy, drift, hygiene, and
build+twine checkall clean; 137 passed, 4 skipped (the skips need a live deployment, as in CI).test_spec_coverage.pypasses all four assertions — all 11 spec operations have wrappers on both the sync and async transports.TypeScript counterpart: Comfy-Org/comfy-typescript-sdk#49.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.