Repository navigation
feat(cloud): verify Run on Cloud workflow handoffs - #1008
wealthwiselabs wants to merge 65 commits into
Conversation
Add a default-installed comfy-run-on-cloud skill that takes one local workflow onto Comfy Cloud: stock Cloud first, an existing workspace Build next, and a workflow-scoped custom build only for what is left. It gates every upload from disk on a per-file yes, and asks before freeing a release, Build or deployment slot. A reference skill, comfy-run-on-cloud-local-install, covers finding the install behind a workflow, Comfy Desktop's split macOS layout included. Add a hidden `comfy build inventory <workflow>` that reports what one workflow loads (classes, recorded versions, models with subfolders, embeddings, input files, muted nodes, implicit loaders), finds each model across local model roots, joins a running ComfyUI's classes, and with --cloud says whether stock Comfy Cloud runs it as-is, with dropdown remaps, or needs a build. `comfy skills` ships only SKILL.md, so the skill's inventory step has to be a command rather than a bundled script.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Merge Risk:
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Architecture Decision Compliance | The prior architecture finding remains unresolved. Both new ADRs are still Proposed: CLOUD-HANDOFF-0004 and [DESKTOP-DI… | Add and accept ADR coverage for the watch-auth recovery protocol, Builder reads during dry runs, and the inventory compatibility/readiness contract. Accept or explicitly supersede the Desktop discovery decision if it governs the new path-id… |

Passed checks: 4 passed
Full details: Architecture Decision Compliance
-
Explanation
The prior architecture finding remains unresolved. Both new ADRs are still Proposed: CLOUD-HANDOFF-0004 and DESKTOP-DISCOVERY-0005. The diff introduces durable contracts without accepted coverage:
deploy_runtime.py:134-183,212-229andcloud/oauth.py:761-875definewatch_auth_lost, shared-token adoption, one-retry recovery, and preserved sign-in behavior;command/build.py:1882-1910,2047-2054makespush --dry-runperform an authenticated Builder snapshot read; andworkflow_inventory.py:565-680plusschemas/build_inventory.json:240-335define compatibility, readiness, model-identity, and lossless-removal contracts. In addition,cloud_model_validation.py:94-150removes selectedunknown_enum_valueerrors and emitscloud_model_asset_verified, while Proposed CLOUD-HANDOFF-0004 rejects weakening unrelated CQL validation at lines 111-117 without defining an accepted scoped exception.Resolution
Add and accept ADR coverage for the watch-auth recovery protocol, Builder reads during dry runs, and the inventory compatibility/readiness contract. Accept or explicitly supersede the Desktop discovery decision if it governs the new path-identity boundary. Amend CLOUD-HANDOFF-0004 to define and accept the scoped Cloud model-validation exception, or preserve the original
unknown_enum_valuediagnostic. Proposed ADRs do not replace accepted decisions.
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
The skill now converts a workflow for stock Cloud on its own only when the conversion cannot change the output: the same file in another folder, removing memory- or speed-only nodes, an exact core equivalent, or a setting that reproduces the saved behavior. Any other change (a different model, LoRA, upscaler or implementation, or Cloud's file under the user's filename but with different weights) needs the user's yes, offered next to a custom build as the exact alternative with its costs and the workspace limits. A custom build asks whether to cover just the workflow or the whole instance. Every converted copy is pre-flighted on the server, a deployment counts as working only with a clean import log and a smoke run, and inputs already on Cloud are not re-uploaded. `comfy build inventory` reports the pieces this needs: memory-only nodes Cloud lacks as `lossless_removable`, a size check of each local model against Cloud's same-named file (`weights`), and with `--input-root` the blake3-based name each input would have on Cloud and whether it is there. Verdicts are now `covered`, `covered_after_lossless_fixes`, `covered_needs_check` and `needs_build_or_lossy_conversion`.
…d-skill # Conflicts: # CHANGELOG.md # comfy_cli/skills/__init__.py
…wn node definitions
…d-skill # Conflicts: # CHANGELOG.md
…o esun/feat/run-on-cloud-skill
… esun/feat/run-on-cloud-skill # Conflicts: # CHANGELOG.md
…into esun/feat/run-on-cloud-skill # Conflicts: # CHANGELOG.md
…into esun/feat/run-on-cloud-skill # Conflicts: # CHANGELOG.md # comfy_cli/desktop_install.py # comfy_cli/schemas/env.json # comfy_cli/schemas/which.json # tests/comfy_cli/command/test_manager_gui.py # tests/comfy_cli/test_desktop_install.py
…loud-skill # Conflicts: # CHANGELOG.md
|
🎉 Thank you for your contribution, we really appreciate it! 🎉 Like many open source projects, we require contributors to sign our Contributor License Agreement (CLA). A CLA makes the ownership of contributions explicit, so contributors and the project share a clear understanding of how the code can be used. By signing, you:
CLAs are standard practice across major open source projects including those under the Apache Software Foundation and the Linux Foundation. Ours is based on the Apache Software Foundation's CLA. Most importantly, it would enable us to relicense the project under a more permissive license in the future, giving the project and its community greater flexibility. ✍ To sign, please post a new comment on this PR with exactly the following text: ✍ I have read and agree to the Contributor License Agreement You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
skishore23
left a comment
There was a problem hiding this comment.
KishoreBot (AI), reviewing at Kishore's request.
Reviewed commit 958ac1f49c0f00dacd785146e506b9f7ab1d8478 against base bb1b6a6f43be24e673d2211be1aa89820e450de3.
[P1] Integrated workflow deletion can remove a concurrent replacement.
comfy_cli/command/workflow.py:1642-1667 verifies a sidebar file/mirrored record and owner, then deletes the path without a server-enforced content/version condition. A concurrent same-name save after verification is deleted even though its bytes were never verified. The exact-head in-memory transport reproduction replaces the graph during the intervening user lookup; deletion exits 0 and removes the replacement. This is also reported on component PR #1046.
Please use conditional deletion bound to the verified identity/version, refuse without destructive cleanup on mismatch, and add the interleaving regression. If the API cannot provide this condition, do not automatically remove the sidebar file. A second GET only narrows the race.
The previous malformed-modelsDirs and bool/number identity findings are fixed. The integrated auth/watch and authenticated dry-run contracts also need ADR coverage under AGENTS.md/.agents/checks/adr-compliance.md: token-family ownership/adoption/retry/watch-state semantics and the public-only authenticated Builder read/no-upload/no-save boundary. Please record the decisions, or explain why they are local implementation details; the proposed handoff/Desktop ADRs do not document those contracts.
Validation: the review covered all 113 changed files, affected callers/tests and prior discussions. The review runner reports 2,238 focused tests passed (including installed-skill and schema-consumer coverage) plus ADR/Ruff checks, and reproduced the delete race at this head. I independently inspected the current delete sequence. No live Cloud/Desktop/upload acceptance is claimed. Current CI: 17 success, CodeRabbit skipped, cla-assistant failed. The contributor CLA remains a separate landing blocker.
…y Cloud and hands back its link Builds on #1008. The agent reads the workflow from the running local server, checks it with `comfy workflow check --where cloud --models-dir`, then runs it on Comfy Cloud, an existing build, a swapped copy or a custom build. A model the check cannot prove the same runs on Cloud's copy and is named in the report. It asks by name before every upload and lossy swap: a model goes through `comfy model upload` after a dry run, and a deployment run goes first with `--no-upload`, asks about the files in details.missing[], then reruns with one `--allow-upload <hash>` per approved file. It runs one real job and saves with `comfy workflow save --where cloud`, ending with the folder link, or says there is none for a record-only save. comfy-build points a single-workflow request at the new skill, comfy-build-failures says a missing import needs a way to install it before another cut, and comfy-deploy and comfy-deploy-failures read a deployment with `deploy show` outside a Build folder, since `deploy status` needs one.
…y Cloud and hands back its link Builds on #1008. The agent reads the workflow from the running local server, checks it with `comfy workflow check --where cloud --models-dir`, then runs it on Comfy Cloud, an existing build, a swapped copy or a custom build. A model the check cannot prove the same runs on Cloud's copy and is named in the report. It asks by name before every upload and lossy swap: a model goes through `comfy model upload` after a dry run, and a deployment run goes first with `--no-upload`, asks about the files in details.missing[], then reruns with one `--allow-upload <hash>` per approved file. It runs one real job and saves with `comfy workflow save --where cloud`, ending with the folder link, or says there is none for a record-only save. comfy-build points a single-workflow request at the new skill, comfy-build-failures says a missing import needs a way to install it before another cut, and comfy-deploy and comfy-deploy-failures read a deployment with `deploy show` outside a Build folder, since `deploy status` needs one.
…y Cloud and hands back its link Builds on #1008. The agent reads the workflow from the running local server, checks it with `comfy workflow check --where cloud --models-dir`, then runs it on Comfy Cloud, an existing build, a swapped copy or a custom build. A model the check cannot prove the same runs on Cloud's copy and is named in the report. It asks by name before every upload and lossy swap: a model goes through `comfy model upload` after a dry run, and a deployment run goes first with `--no-upload`, asks about the files in details.missing[], then reruns with one `--allow-upload <hash>` per approved file. It runs one real job and saves with `comfy workflow save --where cloud`, ending with the folder link, or says there is none for a record-only save. comfy-build points a single-workflow request at the new skill, comfy-build-failures says a missing import needs a way to install it before another cut, and comfy-deploy and comfy-deploy-failures read a deployment with `deploy show` outside a Build folder, since `deploy status` needs one.
…y Cloud and hands back its link Builds on #1008. The agent reads the workflow from the running local server, checks it with `comfy workflow check --where cloud --models-dir`, then runs it on Comfy Cloud, an existing build, a swapped copy or a custom build. A model the check cannot prove the same runs on Cloud's copy and is named in the report. It asks by name before every upload and lossy swap: a model goes through `comfy model upload` after a dry run, and a deployment run goes first with `--no-upload`, asks about the files in details.missing[], then reruns with one `--allow-upload <hash>` per approved file. It runs one real job and saves with `comfy workflow save --where cloud`, ending with the folder link, or says there is none for a record-only save. comfy-build points a single-workflow request at the new skill, comfy-build-failures says a missing import needs a way to install it before another cut, and comfy-deploy and comfy-deploy-failures read a deployment with `deploy show` outside a Build folder, since `deploy status` needs one.
…y Cloud and hands back its link Builds on #1008. The agent reads the workflow from the running local server, checks it with `comfy workflow check --where cloud --models-dir`, then runs it on Comfy Cloud, an existing build, a swapped copy or a custom build. A model the check cannot prove the same runs on Cloud's copy and is named in the report. It asks by name before every upload and lossy swap: a model goes through `comfy model upload` after a dry run, and a deployment run goes first with `--no-upload`, asks about the files in details.missing[], then reruns with one `--allow-upload <hash>` per approved file. It runs one real job and saves with `comfy workflow save --where cloud`, ending with the folder link, or says there is none for a record-only save. comfy-build points a single-workflow request at the new skill, comfy-build-failures says a missing import needs a way to install it before another cut, and comfy-deploy and comfy-deploy-failures read a deployment with `deploy show` outside a Build folder, since `deploy status` needs one.
…y Cloud and hands back its link Builds on #1008. The agent reads the workflow from the running local server, checks it with `comfy workflow check --where cloud --models-dir`, then runs it on Comfy Cloud, an existing build, a swapped copy or a custom build. A model the check cannot prove the same runs on Cloud's copy and is named in the report. It asks by name before every upload and lossy swap: a model goes through `comfy model upload` after a dry run, and a deployment run goes first with `--no-upload`, asks about the files in details.missing[], then reruns with one `--allow-upload <hash>` per approved file. It runs one real job and saves with `comfy workflow save --where cloud`, ending with the folder link, or says there is none for a record-only save. comfy-build points a single-workflow request at the new skill, comfy-build-failures says a missing import needs a way to install it before another cut, and comfy-deploy and comfy-deploy-failures read a deployment with `deploy show` outside a Build folder, since `deploy status` needs one.
Run on Cloud now checks whether the original workflow can run in the standard environment or an existing compatible Build before converting it or creating a custom environment. The handoff verifies required inputs, approved model bytes, an actual job, and the exact saved document and editor target before reporting success.
What changes
model uploadpreviews the exact file/workspace/type, binds upload to the approved SHA256 and an immutable snapshot, checks destination collisions, and verifies returned identity/loader paths. Deduplication requires identical bytes already owned by the workspace; public visibility alone is insufficient. Existing Build/deployment uploads retain per-file approval, ledger and immediate byte/target rechecks. No universal upload manifest is introduced.deploy uiverifies the current OAuth workspace, editor eligibility, ready deployment and served release.workflow ui --saved-file <saved_file_id>additionally verifies the exact authenticated userdata UUID/path/raw-content snapshot and publishes?savedFile=<UUID>only whenprivate_saved_file_links_enabledis literaltrue. Standard and custom environment selection remain explicit; discovery does not mutate compute.saved_file_idseparately from the mirrored record'sworkflow_id. Record UUIDs, matching names and equal content cannot certify file identity. Legacy positional/record links require regeneration. Older-server saves remain successful without a usable file ID; the skill reports verified sidebar/environment/API recovery without repeating saves or uploads.which/envreport the selected workspace separately from registry candidates. Auth/watch recovery preserves accepted job IDs, bounded retries andwatch_auth_lostexit 75; recovery commands work outside Build-spec folders. Preview rendering, asset query encoding, prompt-template packaging and output sanitization are included.Validation
f2d3800f9dincorporates mainbb1b6a6f43through an ordinary merge. The changelog is the exact duplicate-free union of19old/9main/21merged entries, with the released suffix byte-identical to main. All772automatic paths remain exact. Five saved-file identity/skill/test files remain byte-identical to5317.c4d921cfd0is preserved and the worktree is clean.Historical5317 and earlier validation
5317dc5bacincorporates mainacfd665a99through an ordinary merge. The only manual resolution is the changelog: its 19 pending entries are the exact duplicate-free union of the branch's 18 and main's seven, and the 1.24.0-and-older released suffix is byte-identical to main. All 776 other paths match Git's automatic merge result.fa4df716c7passed 13,527 / 40 skips, and2024c3ba94passed 13,736 / 40 skips. The prior7de6247main composition passed 5,005 / three skips, with 2,487 feature checks at its recorded validation head. Those are historical records, not a whole-project rerun on5317dc5bac. Existing coverage includes the 826 frontend canvas-consumer fixtures and 269 pinned frontend UUID cases; the fresh affected composition above validates this new merge.saved_file_idversus nullable workflow-record identity warning remains preserved. Current-head hosted code checks have now completed successfully, including verified actual pytest and Windows/Linux/macOS E2E steps. The existing unsigned CLA check remains failed. No manual CI/CLA retry or identity-bound action was performed.Prerequisites and rollout
Independently reviewable CLI prerequisites: #1043 Desktop discovery, #1044 auth/watch recovery, #1045 dry-run node pins, and #1046 normal sidebar saves. Their commits are integrated with regular merges; merging them first removes their corresponding diff here while preserving contributors.
Existing Cloud OAuth/editor-listing groundwork is Cloud #16318. Stable userdata identity/snapshot support is Cloud #17240, consumed with the matching frontend #21946. Advertise
private_saved_file_links_enabledonly after the matching backend and browser consumer are deployed. It gates CLI publication, not browser loading. This PR performs no production deployment, capability enablement or public workflow publishing.Ordinary main merges through
7de6247preserve the released changelog history and all branch-specific pending entries. Source-validation head:1d6d3f5932. Fresh affected workflow/build/models/CQL/download validation passed 5,005 tests with three existing skips; feature-specific checks passed 2,487. Whole-tree Ruff lint/format, ADR checks, normal commit hooks and independent merge-preservation review passed.The earlier full suite at
2024c3ba94passed 13,736 tests with 40 existing skips. That result remains attributed to its recorded head; it was not rerun on the final main merge. The intervening test-only corrections use valid workflow fixtures and isolate mocked UI conversion/preflight from live catalog reads while retaining validation and assertions. The current affected composition and feature checks cover the final merge.The changelog-only follow-up at
c782f9f92cdocumentssaved_file_idas the actual userdata identity, separate fromworkflow_id, and its nullablesaved_file_identity_unavailablewarning. All runtime and test bytes are identical to the source-validation head above; normal hooks and whitespace checks pass.November 2 review follow-up verification
Fixed reactive OAuth peer adoption so recovery accepts only a different access token with known, unexpired expiry; otherwise it refreshes the current stored refresh token. Watch classification rereads credentials nonblocking after refresh-lock contention, retaining
watch_auth_lost/75. Workflow association refusal guidance now asks users to verify name, content, and ownership before manual cleanup.Validation: 3,616 affected tests passed (6 existing warnings), plus whole-tree Ruff lint/format and ADR checks. The shared auth/test bytes match the independently reviewed #1044 fix; its old-source controls fail six cases while five preservation controls pass. Account binding, default refresh/coalescing, the 90-second refresh budget, deletion policy, saved-file/skill contracts and CI policy are preserved. Normal commit hooks ran; this is scoped local validation, not a new whole-project or hosted result.