Add cloud-runtime FE-facing operations to spec#13734
Merged
MillerMedia merged 11 commits intomasterfrom May 8, 2026
Merged
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
4 tasks
Add ~67 cloud-runtime FE-facing path operations to the core OpenAPI spec,
each tagged with x-runtime: [cloud] at the operation level. These operations
are served by the cloud runtime; the local runtime returns 404 for all of
these paths.
Domain groups added:
- Jobs / prompts: /api/job/*, /api/jobs/*/cancel, /api/prompt/*, etc.
- History v2: /api/history_v2, /api/history_v2/{prompt_id}
- Cloud logs: /api/logs
- Asset extensions: /api/assets/download, export, import, etc.
- Custom nodes: /api/experiment/nodes (cloud install/uninstall)
- Hub: /api/hub/profiles, /api/hub/workflows, /api/hub/labels, etc.
- Workflows: /api/workflows CRUD, versioning, fork, publish
- Auth/session: /api/auth/session, /api/auth/token, /.well-known/jwks.json
- Billing: /api/billing/balance, plans, subscribe, topup, etc.
- Workspace: /api/workspace/*, /api/workspaces/*
- User/settings/misc: /api/user, /api/secrets, /api/feedback, etc.
Also adds corresponding cloud-only component schemas (CloudJob, CloudWorkflow,
BillingPlan, Workspace, HubProfile, AuthSession, etc.), all tagged with
x-runtime: [cloud].
Spectral lint passes under the existing ruleset with zero new warnings.
- Add job_id as a nullable UUID field to the Asset schema - Mark prompt_id as deprecated with note pointing to job_id - No x-runtime tag needed as both runtimes populate the field
- Add 'hash' as a nullable string field to Asset and AssetUpdated schemas - Mark 'asset_hash' as deprecated with a note pointing to 'hash' - AssetCreated inherits 'hash' via allOf from Asset - Spectral lint clean (no new warnings)
Three PUT operations were added that should be PATCH (cloud serves
PATCH for partial updates):
- /api/workflows/{workflow_id}
- /api/workspaces/{id}
- /api/workspace/members/{userId}
Two POST operations were added that should be GET (cloud serves GET
with query params):
- /api/assets/remote-metadata (url moves to query param)
- /api/files/mask-layers (response shape replaced — operation queries
related mask layer filenames, not file uploads)
PR review surfaced operations the cloud runtime serves that weren't
covered by the initial spec push, plus one path family missed entirely.
New methods on existing paths:
- /api/auth/session: add POST (create session cookie) and DELETE (logout)
- /api/secrets/{id}: add GET (read metadata) and PATCH (update)
- /api/hub/profiles: add POST (create profile)
- /api/hub/workflows: add POST (publish to hub)
- /api/hub/workflows/{share_id}: add DELETE (unpublish)
- /api/workspaces/{id}: add DELETE (soft-delete workspace)
- /api/workspace/members/{user_id}/api-keys: add DELETE (bulk revoke)
- /api/workflows/{workflow_id}/versions: add POST (create new version)
- /api/userdata/{file}/publish: add GET (read publish info)
New path family:
- /api/tasks (GET list) and /api/tasks/{task_id} (GET detail) for the
background task framework
New component schemas (all tagged x-runtime: [cloud]):
CreateSessionResponse, DeleteSessionResponse, UpdateSecretRequest,
BulkRevokeAPIKeysResponse, CreateHubProfileRequest, PublishHubWorkflowRequest,
HubWorkflowDetail, AssetInfo, CreateWorkflowVersionRequest,
WorkflowVersionResponse, WorkflowPublishInfo, TaskEntry, TaskResponse,
TasksListResponse. Existing SecretMeta extended with provider and
last_used_at fields the cloud runtime actually returns.
New tag: task. Spectral lint passes with zero errors.
5629e57 to
d25d49d
Compare
Mirrors the Asset schema's deprecation pattern: prompt_id is marked
deprecated with a description pointing to job_id; job_id is the new
preferred field. PUT /api/assets/{id} responses can now carry both fields
consistent with the other Asset-returning endpoints.
MillerMedia
added a commit
that referenced
this pull request
May 6, 2026
Adds assert_job_id_prompt_id_match() helper and uses it across test_crud.py, test_list_filter.py, and test_uploads.py to verify both fields are present and carry the same value on every Asset response. The spec change introducing job_id lives in the parent PR (#13734).
Add nullable integer fields 'width' and 'height' to the Asset schema in openapi.yaml. These expose original image dimensions in pixels for clients that need pre-thumbnail size info. Both fields are null for non-image assets or assets ingested before dimension extraction. Co-authored-by: Matt Miller <MillerMedia@users.noreply.github.com>
a9ef24c to
3c9c376
Compare
alexisrolland
previously approved these changes
May 7, 2026
These two paths are not actually served by the cloud runtime — they
return 404 with a redirect message pointing callers to the canonical
`/api/jobs/{job_id}` (plural). Declaring them with `x-runtime: [cloud]`
and a 200 response schema is incorrect.
`/api/job/{job_id}/status` stays — it is a real cloud-served endpoint.
Also drops the now-orphaned `CloudJob` and `CloudJobOutputs` component
schemas. `CloudJobStatus` is retained.
57c015e to
d1c5ef4
Compare
alexisrolland
approved these changes
May 7, 2026
luke-mino-altherr
approved these changes
May 8, 2026
MillerMedia
added a commit
that referenced
this pull request
May 8, 2026
Adds assert_job_id_prompt_id_match() helper and uses it across test_crud.py, test_list_filter.py, and test_uploads.py to verify both fields are present and carry the same value on every Asset response. The spec change introducing job_id lives in the parent PR (#13734).
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These operations are served by the cloud runtime today. Adding them to core's
openapi.yamlwithx-runtime: [cloud]tagging makes the spec an accurate description of the FE-observable API surface across runtimes. The local runtime continues to return 404 for these paths; FE codegen filters by tag.What changed
Added ~67 cloud-runtime FE-facing path operations to
openapi.yaml, each tagged withx-runtime: [cloud]at the operation level. Also added corresponding cloud-only component schemas, all tagged withx-runtime: [cloud].No handler implementation in core — only the spec changes.
Domain groups
/api/job/{job_id},/api/job/{job_id}/outputs,/api/job/{job_id}/status,/api/jobs/{job_id}/cancel,/api/prompt/{prompt_id},/api/history_v2,/api/history_v2/{prompt_id},/api/logs/api/assets/download,/api/assets/export,/api/assets/exports/{exportName},/api/assets/from-workflow,/api/assets/import,/api/assets/remote-metadata/api/experiment/nodes,/api/experiment/nodes/{id},/api/hub/assets/upload-url,/api/hub/labels,/api/hub/profiles,/api/hub/profiles/{username},/api/hub/profiles/check,/api/hub/profiles/me,/api/hub/workflows,/api/hub/workflows/{share_id},/api/hub/workflows/index/api/workflows,/api/workflows/{workflow_id},/api/workflows/{workflow_id}/content,/api/workflows/{workflow_id}/fork,/api/workflows/{workflow_id}/versions,/api/workflows/published/{share_id}/api/auth/session,/api/auth/token,/.well-known/jwks.json/api/billing/balance,/api/billing/events,/api/billing/ops/{id},/api/billing/payment-portal,/api/billing/plans,/api/billing/preview-subscribe,/api/billing/status,/api/billing/subscribe,/api/billing/subscription/cancel,/api/billing/subscription/resubscribe,/api/billing/topup/api/workspace/api-keys,/api/workspace/api-keys/{id},/api/workspace/invites,/api/workspace/invites/{inviteId},/api/workspace/leave,/api/workspace/members,/api/workspace/members/{user_id}/api-keys,/api/workspace/members/{userId},/api/workspaces,/api/workspaces/{id}/api/feedback,/api/files/mask-layers,/api/internal/cloud_analytics,/api/invites/{token}/accept,/api/secrets,/api/secrets/{id},/api/user,/api/userdata/{file}/publish,/api/vhs/queryvideo,/api/vhs/viewaudio,/api/vhs/viewvideo,/api/viewvideoNew component schemas (all
x-runtime: [cloud])CloudError,CloudJob,CloudJobStatus,CloudJobOutputs,CloudPrompt,HistoryV2Response,HistoryV2Entry,CloudLogsResponse,AssetDownloadRequest,AssetImportRequest,RemoteAssetMetadata,CloudNode,CloudNodeList,HubLabel,HubProfile,HubWorkflow,HubWorkflowList,HubWorkflowIndexEntry,CloudWorkflow,CloudWorkflowList,CloudWorkflowVersion,AuthSession,AuthTokenResponse,JwksResponse,BillingBalance,BillingEvent,BillingEventList,BillingOp,BillingPlan,BillingStatus,BillingSubscription,SubscriptionPreview,Workspace,WorkspaceMember,WorkspaceInvite,WorkspaceApiKey,WorkspaceApiKeyCreated,CloudUser,SecretMetaNew tags
auth— Authentication and session managementbilling— Billing, subscriptions, and payment managementworkspace— Workspace and team managementhub— ComfyUI Hub: profiles, shared workflows, and labelsworkflows— Cloud workflow management and versioningValidation
.spectral.yamlruleset with zero new errors or warnings$refreferences resolve correctly