chore(openapi): sync shared API contract from cloud@24201f6#14947
chore(openapi): sync shared API contract from cloud@24201f6#14947comfy-pr-bot wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughUpdated the OpenAPI specification with optional job execution start and end timestamps, a conditional 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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: 1
🤖 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 `@openapi.yaml`:
- Around line 2470-2478: Add minimum: 0 to the allowance, remaining, and used
integer properties in the affected OpenAPI schema, preserving their existing
descriptions, types, and response shape.
🪄 Autofix (Beta)
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: f1cd0aae-1eae-4d56-b5da-93542c557af0
📒 Files selected for processing (1)
openapi.yaml
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
- GitHub Check: test (ubuntu-latest)
- GitHub Check: test (windows-2022)
- GitHub Check: test (windows-latest)
- GitHub Check: test (macos-latest)
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
**: IMPORTANT: Only comment on issues directly introduced by this PR's code changes.
Treat AGENTS.md as mandatory repository policy, not optional style guidance.
Flag PR changes that violate AGENTS.md even when the code is otherwise functional.
In particular, enforce architecture boundaries, dtype/device/memory rules,
interface contracts, import style, no unnecessary try/except blocks, no inline
imports, no outbound internet paths in core ComfyUI, and narrow scoped fixes.
Prefer direct findings over suggestions when a rule is violated. Only ignore
AGENTS.md when it clearly conflicts with a newer explicit maintainer instruction
in the PR.
Do NOT flag pre-existing issues in code that was merely moved, re-indented,
de-indented, or reformatted without logic changes. If code appears in the diff
only due to whitespace or structural reformatting (e.g., removing awith:block),
treat it as unchanged. Contributors should not feel obligated to address
pre-existing issues outside the scope of their contribution.
Files:
openapi.yaml
| allowance: | ||
| description: Total free jobs granted for the current period | ||
| type: integer | ||
| remaining: | ||
| description: Free jobs remaining (allowance - used, floored at 0) | ||
| type: integer | ||
| used: | ||
| description: Free jobs consumed so far | ||
| type: integer |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Constrain free-tier counts to non-negative values.
The schema currently permits negative allowance, used, and remaining values, even though these represent job counts and remaining is documented as floored at zero. Add minimum: 0 to all three fields so the generated contract matches the response semantics.
As per path instructions, preserve public interface contracts and existing call/return shapes—if modifying schemas, do so in a way that matches the existing OpenAPI contract expectations.
🤖 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 `@openapi.yaml` around lines 2470 - 2478, Add minimum: 0 to the allowance,
remaining, and used integer properties in the affected OpenAPI schema,
preserving their existing descriptions, types, and response shape.
Source: Path instructions
There was a problem hiding this comment.
@eyokompis It looks like you may have accidentally pasted an API key in this comment. For your security, please:
- Revoke this key immediately in your OpenAI dashboard (https://platform.openai.com/api-keys), since it's now publicly visible in this PR thread.
- Generate a new key if you still need one.
- Consider editing/deleting this comment to remove the exposed key from the public record (note: it may still be cached or visible in notifications/webhooks even after editing).
This isn't related to the free_tier_balance schema review comment — if you intended to reply to that suggestion (adding minimum: 0 to allowance, used, and remaining), let me know and I'm happy to help with that separately.
ⓘ concerned about your exposed credentials (´・ω・`)
b9557a0 to
07b66f4
Compare
07b66f4 to
c3ada9c
Compare
eyokompis
left a comment
There was a problem hiding this comment.
Approved in CodeRabbit Change Stack
c3ada9c to
ad5de16
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@openapi.yaml`:
- Around line 2484-2492: Add minimum: 0 to the allowance, remaining, and used
integer properties in the affected OpenAPI schema, preserving their existing
descriptions, types, and response shape.
🪄 Autofix (Beta)
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: 81e1f82f-6e00-4594-b253-4678f371f2c4
📒 Files selected for processing (1)
openapi.yaml
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
- GitHub Check: test (windows-2022)
- GitHub Check: test (macos-latest)
- GitHub Check: test (ubuntu-latest)
- GitHub Check: test (windows-latest)
🧰 Additional context used
📓 Path-based instructions (2)
**/*
📄 CodeRabbit inference engine (AGENTS.md)
**/*: Keep changes small, direct, and limited to the narrowest code path and fewest files necessary; prefer practical fixes over broad architectural work.
Prefer fewer dependencies and do not add a ComfyUI dependency unless absolutely necessary.
Remove obsolete code, dead branches, unused options, debug prints, and unnecessary compatibility paths.
Preserve existing APIs, node names, model-loading behavior, file layout, and workflow compatibility unless replacement is explicit.
Keep architectural layers focused; do not leak UI, API, workflow, queue, persistence, telemetry, model-loading, node, or execution concerns into unrelated layers.
Shared core modules should depend only on lower-level primitives and their own domain concepts; higher-level concepts belong at callers, adapters, services, or boundaries.
Pass only the narrowest data needed across boundaries and keep identity mapping, persistence, history, telemetry, response shaping, and UI state in their owning layers.
Before touching many files, identify the smallest owner layer; use caller-side mappings, adapters, events, or narrow interfaces instead of exposing private concepts across layers.
Core ComfyUI code must not make unsolicited internet requests or add uploads, telemetry, analytics, tracking, reporting, update checks, remote configuration, licensing checks, or similar outbound paths.
Model downloading is allowed only when explicitly authorized by the user, limited to the requested artifact, and free of telemetry, tracking, unrelated metadata, or background activity.
Warning and info messages should be short and actionable; documentation and README changes should be concise, factual, and tied to changed behavior.
Use short direct commit subjects such asFix ...,Add ...,Support ...,Remove ..., orUpdate ...; keep PR descriptions short and state the problem, behavior change, and tests.
Prefer one coherent behavioral change per commit and prioritize crashes, incorrect dtype/device behavior, m...
Files:
openapi.yaml
**
⚙️ CodeRabbit configuration file
**: IMPORTANT: Only comment on issues directly introduced by this PR's code changes.
Treat AGENTS.md as mandatory repository policy, not optional style guidance.
Flag PR changes that violate AGENTS.md even when the code is otherwise functional.
In particular, enforce architecture boundaries, dtype/device/memory rules,
interface contracts, import style, no unnecessary try/except blocks, no inline
imports, no outbound internet paths in core ComfyUI, and narrow scoped fixes.
Prefer direct findings over suggestions when a rule is violated. Only ignore
AGENTS.md when it clearly conflicts with a newer explicit maintainer instruction
in the PR.
Do NOT flag pre-existing issues in code that was merely moved, re-indented,
de-indented, or reformatted without logic changes. If code appears in the diff
only due to whitespace or structural reformatting (e.g., removing awith:block),
treat it as unchanged. Contributors should not feel obligated to address
pre-existing issues outside the scope of their contribution.
Files:
openapi.yaml
🔇 Additional comments (3)
openapi.yaml (3)
533-536: LGTM!
545-548: LGTM!
1576-1582: LGTM!
| allowance: | ||
| description: Total free jobs granted for the current period | ||
| type: integer | ||
| remaining: | ||
| description: Free jobs remaining (allowance - used, floored at 0) | ||
| type: integer | ||
| used: | ||
| description: Free jobs consumed so far | ||
| type: integer |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Constrain free-tier counts to non-negative values.
The schema currently permits negative allowance, used, and remaining values, even though these represent job counts and remaining is documented as floored at zero. Add minimum: 0 to all three fields so the generated contract matches the response semantics.
As per path instructions, preserve public interface contracts and existing call/return shapes—if modifying schemas, do so in a way that matches the existing OpenAPI contract expectations.
🤖 Proposed fix
- allowance:
- description: Total free jobs granted for the current period
- type: integer
- remaining:
- description: Free jobs remaining (allowance - used, floored at 0)
- type: integer
- used:
- description: Free jobs consumed so far
- type: integer
+ allowance:
+ description: Total free jobs granted for the current period
+ type: integer
+ minimum: 0
+ remaining:
+ description: Free jobs remaining (allowance - used, floored at 0)
+ type: integer
+ minimum: 0
+ used:
+ description: Free jobs consumed so far
+ type: integer
+ minimum: 0🤖 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 `@openapi.yaml` around lines 2484 - 2492, Add minimum: 0 to the allowance,
remaining, and used integer properties in the affected OpenAPI schema,
preserving their existing descriptions, types, and response shape.
Source: Path instructions
Automated cloud→core OpenAPI projection
This PR projects the shared / FE-facing subset of ComfyUI Cloud's
OpenAPI contract into core's
openapi.yaml.Comfy-Org/cloud@24201f6services/ingest/openapi.yamlservices/ingest/scripts/openapi-projectIncluded: shared operations, cloud-only FE-facing operations
(
x-runtime: [cloud]), and local-only operations core serves(
x-runtime: [local]), plus only the components those operationsreference.
Excluded (security boundary, BE-752):
x-internaloperations,runtime-onlyraw routes, and the/admin/·/api/internal/·/api/webhooks/M2M surface — and any component reachable only fromthem. The generator asserts this is leak-free before emitting.
review this contract change before merging.