Skip to content

chore: sync vendored Comfy API v2 spec (cloud@61ef440) - #46

Closed
comfy-pr-bot wants to merge 1 commit into
mainfrom
chore/sync-v2-spec-61ef440
Closed

chore: sync vendored Comfy API v2 spec (cloud@61ef440)#46
comfy-pr-bot wants to merge 1 commit into
mainfrom
chore/sync-v2-spec-61ef440

Conversation

@comfy-pr-bot

@comfy-pr-bot comfy-pr-bot commented Aug 12, 2026

Copy link
Copy Markdown
Member

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 later
spec 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 —

scripts/gen_models.sh (datamodel-code-generator)

Summary by CodeRabbit

  • New Features

    • Added support for setting asset retention periods during upload and hash-based asset creation.
    • Added an API operation to delete assets, including conflict handling.
    • Asset responses now include expiration timestamps.
    • Expanded deployment error reporting for unavailable or stopped deployments.
  • Documentation

    • Updated API server information, examples, identifiers, asset expiration behavior, and link resolution guidance.

@comfy-pr-bot
comfy-pr-bot requested review from a team as code owners August 12, 2026 20:46
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The OpenAPI v2 specification updates deployment metadata, adds asset retention and deletion operations, documents deployment readiness errors, and replaces identifier examples with UUIDs.

Changes

OpenAPI v2 contract updates

Layer / File(s) Summary
Asset retention and deletion contracts
spec/openapi.yaml
Asset upload and hash-mint requests accept bounded expires_in values. Assets expose nullable expires_at. Asset deletion returns documented success, not-found, conflict, and server-error responses.
Deployment and job response contracts
spec/openapi.yaml
The server URL uses the .run.comfy.app deployment format. Job URLs document host-relative resolution. Job submission errors include deployment readiness and stopped states.
Specification metadata and examples
spec/openapi.yaml
The specification header identifies the public API v2 copy. Job and asset examples use UUID identifiers.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: wei-hai

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: synchronizing the vendored Comfy API v2 specification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sync-v2-spec-61ef440

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8bfbd3c and 8890f59.

📒 Files selected for processing (1)
  • spec/openapi.yaml

Comment thread spec/openapi.yaml
Comment on lines +94 to +99
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ 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.

Comment thread spec/openapi.yaml
type: string
description: Asset UUID.
example: asset_01JZV9R4N8...
example: 9f8a1c0d-2b3e-4f56-...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Comment thread spec/openapi.yaml
Comment on lines +957 to +967
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".

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

@wei-hai wei-hai closed this Aug 13, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants