Repository navigation
Conversation
comfy deploy up takes --editor/--no-editor and sends comfy-deploy's editor field: on a create, with a move, or alone on an existing deployment (comfy-deploy refuses it beside a compute edit). With neither flag nothing is sent. comfy deploy ls shows each deployment's editor value where comfy-deploy answers it, blank where it does not. Ref BE-23492
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Editor request contract and API operations comfy_cli/command/deploy_types.py, comfy_cli/deploy_api.py, comfy_cli/deploy_api_errors.py, tests/comfy_cli/deploy_api_cases.py |
Create and move requests accept optional editor values. A new API method sets the editor value. API status mappings and wire tests cover these operations. |
Editor requests and confirmation in deploy up comfy_cli/command/deploy.py, comfy_cli/command/deploy_up.py, comfy_cli/error_codes.py, tests/comfy_cli/command/test_deploy_up.py, tests/comfy_cli/command/test_deploy_up_move.py, tests/comfy_cli/command/deploy_up_support.py, comfy_cli/skills/comfy-deploy/SKILL.md, CHANGELOG.md, tests/comfy_cli/output/test_error_code_registry.py |
The CLI passes explicit editor flags through create, update, and move operations. It confirms the requested value from responses or follow-up reads. If confirmation fails, it reports deploy_editor_unchanged while retaining the operation result. |
Editor status in deployment listings comfy_cli/command/deploy_ls.py, comfy_cli/schemas/deploy_ls.json, tests/comfy_cli/command/test_deploy_ls.py |
Listing output includes boolean editor values. Pretty output shows on or off when the value is available; the schema permits null. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant up_cmd
participant deploy_up
participant DeployClient
participant comfy_deploy
up_cmd->>deploy_up: Pass UpRequest with optional editor value
deploy_up->>DeployClient: Create, move, or set editor value
DeployClient->>comfy_deploy: Send deployment request
comfy_deploy-->>DeployClient: Return deployment response
DeployClient-->>deploy_up: Return response data
opt Response does not confirm requested value
deploy_up->>DeployClient: Read deployment for confirmation
DeployClient->>comfy_deploy: Request deployment state
comfy_deploy-->>DeployClient: Return deployment state
DeployClient-->>deploy_up: Return observed editor value or read error
end
Suggested reviewers: james00012, guill
Merge Risk: 
Minimal · up to e6b7a
-
No concrete merge-blocking issue is established by the supplied evidence. The reported test failures and lack of a live deployment check do not, by themselves, change merge readiness.
Pre-merge checks: 
4 · 
2
-
Failed checks: 2 warnings Passed checks: 4 passedFull details: Architecture Decision Compliance
-
Explanation
The PR creates a durable deployment compatibility contract without an ADR.
comfy_cli/deploy_api.py:263-279adds theeditorAPI operation and move payload, whilecomfy_cli/command/deploy_up.py:275-299and:721-758define confirmation, ownership, and partial-success invariants.comfy_cli/schemas/deploy_ls.json:27-30andcomfy_cli/error_codes.py:1663-1671publish the contract to machine consumers. Nodocs/adrfile changes in the PR, and the description does not explain why this boundary is local and reversible. ADR-AUTOMATION-0003 is followed for the renderer, append-only error code, and tolerant fields, but it does not record the deployment editor boundary.Resolution
Add and accept an ADR, or amend an applicable accepted ADR, that records comfy-deploy ownership of editor state, the separate editor endpoint versus move payload, confirmation-read rules, and partial-success behavior. Relate it to ADR-AUTOMATION-0003 and document testable invariants and revisit triggers. Alternatively, explain in the PR or architecture documentation why this contract is local and reversible.
-
Finishing Touches: 💡 1
-
📝 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
Comment @coderabbitai help to get the list of available commands.
…ged against a read A create, move or editor edit whose answer, and a read after it, do not show the --editor/--no-editor value asked for now exits 1 with deploy_editor_unchanged, the rest of the result kept in data. An editor edit reads the deployment first, since the list answers no editor, so a repeated --no-editor on a deployment already off reports changed: false.
…firmation The editor value is judged on its own, from the latest answer that shows one. A failed read to confirm it no longer drops the create or move it rode on: data and changed stay filled, and deploy_editor_unchanged carries the read error. A later watch read showing the value asked for clears an earlier unconfirmed one.
… by its answer The read that confirms the editor value comes after the edit's answer, so only the answer to a start or a bounds edit made after it is observed on top. Covers both editor directions on ready and stop_failed deployments.
james00012
left a comment
There was a problem hiding this comment.
Approve: the create, move and editor-alone requests carry editor only when a flag says, and the deploy tests pass on the head.
I read this as: up could not say whether a deployment keeps its editor CPU server, and now --editor/--no-editor sets it and ls shows it. Reviewed at dc5b4d0.
Should fix, not blocking: editor write is lost from the report if the next request fails
Checked: the 1026 deploy and error-code tests pass on the head.
Not checked: comfy-deploy's server behavior for editor on a stopped or stop_failed deployment.
…it after it fails
|
Thanks @james00012. The one should-fix is done in ec22374 (reply in its thread). On what was not checked, a stopped or |
|
Thanks @james00012. The new tests run in this PR's test jobs on ec22374; nothing else changes from here. |
…r oversized answer ends the start or bounds edit after it
Why
comfy-deploy gives every deployment a CPU server that keeps it ready to open in the editor, and it stays on as long as the deployment does. A deployment that is only called through the API, often by an agent driving comfy-cli, never opens in the editor, so that server does nothing for it. comfy-deploy now takes an
editorfield to turn the server off (BE-23490), and comfy-cli is the only client that creates deployments: the Python and TypeScript SDKs cannot. Without this flag, a comfy-cli user has no way to use that field. Part of BE-23470.What changes
Every deployment comfy-deploy makes also gets a small CPU server, so the deployment can be opened in the editor. Someone who only calls a deployment through the API, often an agent driving comfy-cli, has no use for it and had no way to say so.
Before:
comfy deploy upalways got that CPU server;comfy deploy lsdid not say which deployments had one.Now:
comfy deploy up --no-editormakes the deployment without it, and--editorturns it back on. With neither flag the CLI sends nothing new: a new deployment gets comfy-deploy's default (on), an existing one keeps what it has, and existing commands send the same requests as before.editor, sochangedis true only when the value was different.editorout of an answer when it cannot look the value up. Soupkeeps the create or move it was answered, and judges the editor value on its own, from the latest answer that shows one.upexits 1 withdeploy_editor_unchanged.datastill carries the created or moved deployment, andchangedsays what changed. A failed read puts its error indetails.read_error. A later read in the watch that shows the value asked for clears the error.comfy deploy lsprintseditor onoreditor offper deployment, and--jsoncarrieseditor(true,falseornull).--no-editor.Chosen behaviour, different from the ticket:
--editoron an existing deployment goes "with the edit". comfy-deploy refuseseditorin the same request as a GPU settings change ("editor goes alone or with a move"), so in that caseupsends it as a separate request first, then the settings change.editorwhen one deployment is read, renamed or switched, but not on its deployment list, which is whatlsreads. Solsshows a blank (nullin JSON) for every deployment until comfy-deploy's list answers it; the CLI side is ready for that and needs no release then.lsdoes not read each deployment one by one to fill the column.Tests
test_a_create_sends_editor_only_when_a_flag_says: a create sends noeditor,falseortruefor no flag,--no-editorand--editor.test_a_move_carries_editor_only_when_a_flag_says: a move to a new release carries the value only when a flag is given.test_editor_on_a_bounds_edit_goes_in_a_request_of_its_own:--editor --min 1 --max 2on an existing deployment sendseditoralone, then the GPU settings change without it.test_editor_alone_on_a_deployment_with_nothing_else_to_change:--no-editoralone sends one request and reportschanged: true.test_an_update_without_a_flag_sends_no_editor: a settings change without the flag sends noeditorrequest.test_an_editor_value_comfy_deploy_did_not_keep_is_not_okandtest_a_move_that_lands_without_the_editor_value_asked_is_not_ok_and_keeps_the_move: an editor value comfy-deploy did not keep exits 1 withdeploy_editor_unchangedand keeps the deployment indata.test_an_editor_edit_is_a_change_only_when_the_deployment_had_the_other_value: repeating a flag the deployment already has reportschanged: false.test_an_editor_edit_on_a_stop_failed_deployment_is_a_changeandtest_an_editor_answer_that_leaves_the_value_out_is_read_again.test_a_move_whose_editor_read_fails_keeps_the_moveandtest_a_create_whose_editor_read_fails_keeps_the_create: a move or create taken, then a read answering 503, keeps the deployment indataandchanged: true, and exits 1 withdeploy_editor_unchangedanddetails.read_error. The move case runs twice: an answer withouteditor, and an editor write that failed.test_a_later_read_showing_the_editor_value_asked_confirms_itandtest_an_editor_edit_a_watch_read_confirms_is_a_change: answers withouteditor, then a watch read showing the value asked for, exit 0; an editor-alone edit then reportschanged: true.test_an_editor_read_that_confirms_the_value_outranks_the_edits_answer: an editor-alone edit whose answer shows the old value, then a read showing the value asked for, reportschanged: trueand nodeploy_editor_unchanged, for--editorand--no-editor, on a ready and astop_faileddeployment.test_a_later_read_showing_the_other_editor_value_is_not_ok: a watch read showing the other value exits 1 and keeps the move.deploy_api_cases.py: four new wire cases check the exact bodies of the create, the move withtrueand withfalse, and the editor-alone request, and the error messages for the new request.test_rows_carry_and_print_the_editor_value_and_blank_where_none_was_sent:ls --jsongivestrue,falseandnulland validates againstdeploy_ls.json; the table showseditor on,editor offand a blank for a deployment from a comfy-deploy that sends noeditor.The full
tests/comfy_clisuite: 10697 passed, 7 failed, all 7 also failing on main (test_code_search,test_run_json,test_http).ruff checkandruff format --checkpass.Not run: a live
comfy deploy up --no-editoragainst a running comfy-deploy; the tests use a recorded fake client.Ref BE-23492
Summary by CodeRabbit
comfy deploy upaccepts--editorand--no-editorto enable or disable a deployment’s editor server. Without either flag, no editor setting is sent.comfy deploy lsshows whether the editor server is on or off when that status is available.