chore: sync vendored Comfy API v2 spec (cloud@61ef440) - #46
Conversation
📝 WalkthroughWalkthroughThe OpenAPI v2 specification updates deployment metadata, adds asset retention and deletion operations, documents deployment readiness errors, and replaces identifier examples with UUIDs. ChangesOpenAPI v2 contract updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@spec/openapi.yaml`:
- Around line 94-99: Regenerate the low SDK from the updated OpenAPI contract by
running scripts/gen_models.sh, ensuring the generated Asset model exposes
expires_at and the relevant transport methods accept and send expires_in. Commit
the regenerated changes, including the additional affected schema sections.
- Around line 957-967: Update the POST /api/v2/jobs operation’s 422 response
description to include the deployment_stopped error code alongside the existing
documented 422 codes, preserving the deployment-scoped terminal-state semantics.
- Line 901: Replace the truncated example value for Output.id with a complete,
valid UUID string, preserving the existing asset UUID documentation.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b8a99ca1-1d29-4d61-997d-12e09c3e4aa2
📒 Files selected for processing (1)
spec/openapi.yaml
| expires_in: | ||
| type: integer | ||
| minimum: 60 | ||
| maximum: 604800 | ||
| description: 'Optional retention override in seconds (60s–7d): the asset''s `expires_at` becomes now + `expires_in`, replacing the platform''s default retention. Implementations without configurable retention ignore it. The bounds apply to this override only — the platform default is operator-configured and may lie outside them.' | ||
| example: 86400 |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Regenerate and commit the low SDK before merge.
The generated SDK does not expose these contract changes. src/comfy_low/models/_generated.py:11-37 lacks Asset.expires_at. src/comfy_low/transport.py:269-310 and src/comfy_low/transport.py:312-328 cannot accept or send expires_in.
SDK users cannot set the retention override or access the retention deadline. Run scripts/gen_models.sh and commit the generated result before merge.
Also applies to: 175-180, 726-730
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@spec/openapi.yaml` around lines 94 - 99, Regenerate the low SDK from the
updated OpenAPI contract by running scripts/gen_models.sh, ensuring the
generated Asset model exposes expires_at and the relevant transport methods
accept and send expires_in. Commit the regenerated changes, including the
additional affected schema sections.
| type: string | ||
| description: Asset UUID. | ||
| example: asset_01JZV9R4N8... | ||
| example: 9f8a1c0d-2b3e-4f56-... |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use a complete UUID example.
Output.id is documented as an asset UUID, but this example ends with .... Replace it with a complete UUID value.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@spec/openapi.yaml` at line 901, Replace the truncated example value for
Output.id with a complete, valid UUID string, preserving the existing asset UUID
documentation.
| Deployment-scoped surfaces add: `deployment_not_ready` (429 + | ||
|
|
||
| Retry-After — the deployment can still reach ready; retry) and | ||
|
|
||
| `deployment_stopped` (422 — terminal deployment state; a retry | ||
|
|
||
| cannot succeed without operator action). A 429 is disambiguated | ||
|
|
||
| by `error.code` alone; clients should treat any 429 + Retry-After | ||
|
|
||
| as "back off and retry". |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Document deployment_stopped on job submission.
POST /api/v2/jobs lists its 422 codes at lines 440-445, but it omits the new deployment_stopped code declared here. Add it to that operation response description so generated operation documentation includes the terminal submission failure.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@spec/openapi.yaml` around lines 957 - 967, Update the POST /api/v2/jobs
operation’s 422 response description to include the deployment_stopped error
code alongside the existing documented 422 codes, preserving the
deployment-scoped terminal-state semantics.
Automated sync of the public Comfy API v2 spec, projected from the
canonical contract (internal notes stripped, all component schemas
kept). Source:
cloud@61ef440.This PR is on its own per-source-commit branch
(
chore/sync-v2-spec-61ef440); a laterspec change opens a separate PR and will not touch this branch, so a
regen commit pushed here is safe.
Action required before merge: regenerate the low layer and commit
the result so the spec-drift check passes —
Summary by CodeRabbit
New Features
Documentation