From e3256caffa34b494d44f52bca8eabdbfd2826ecd Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Wed, 29 Jul 2026 01:08:45 -0700 Subject: [PATCH] fix: collapse duplicate `server_died` error-code registry entry (BE-5024) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #604 and #605 each registered an `ErrorCode("server_died", ...)` without a textual conflict, so both landed on main and test_no_duplicate_codes started failing for every PR regardless of its diff. The two entries describe the same scenario — a local ComfyUI server dying while a job is in flight — so collapse them into one: keep #604's fuller description (it names the crash/OOM/restart cases), fold in #605's `--wait`/state-file nuance, and merge both hints so each actionable pointer survives. --- comfy_cli/error_codes.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/comfy_cli/error_codes.py b/comfy_cli/error_codes.py index d92e2008..0e7d7599 100644 --- a/comfy_cli/error_codes.py +++ b/comfy_cli/error_codes.py @@ -362,11 +362,6 @@ class ErrorCode: "Background watcher gave up after max runtime without a terminal status.", "the job may still be running — check `comfy jobs status `, or re-watch with a longer `--timeout`", ), - ErrorCode( - "server_died", - "Server connection dropped while a foreground (`--wait`) job was in flight; recorded on the job state file.", - "check the server (it may have been OOM-killed); the prompt_id is in `comfy jobs status `", - ), ErrorCode( "watcher_poll_error", "Background watcher encountered a transient error polling the server.", @@ -375,8 +370,10 @@ class ErrorCode: ErrorCode( "server_died", "The local ComfyUI server became unreachable (or restarted without the job) while it " - "was in flight — the server likely crashed or was killed (e.g. an out-of-memory allocation).", - "check the ComfyUI server log, then `comfy launch` and re-submit the workflow", + "was in flight — the server likely crashed or was killed (e.g. an out-of-memory allocation). " + "Raised by the background watcher and by a foreground (`--wait`) run; recorded on the job state file.", + "check the ComfyUI server log (it may have been OOM-killed), then `comfy launch` and re-submit; " + "the prompt_id is in `comfy jobs status `", ), ErrorCode( "unknown_status_stall",