ComfyUI/tests-unit/execution_test
Glary-Bot 7ca4457fd1 Capture workflow_id before execute() to fix terminal 'executing' reset
The previous commit cleared server.last_workflow_id in PromptExecutor's
finally block to prevent racing progress callbacks from leaking stale
ids. That fix introduced a new bug: prompt_worker in main.py reads
server.last_workflow_id *after* e.execute() returns to populate the
terminal 'executing' (node=None) message that tells the client a prompt
is done. Because the executor has already cleared the field by then,
this message always emitted workflow_id=None.

Capture the workflow id from extra_data into a local variable before
calling e.execute(), and use that local in the send_sync() call so the
per-prompt id is preserved through the executor's finally cleanup.

Adds an AST-based regression test asserting that prompt_worker extracts
workflow_id locally and that the terminal 'executing' send_sync never
reads server.last_workflow_id. Verified the test fails on the buggy
revision and passes after the fix.
2026-05-12 08:24:47 +00:00
..
preview_method_override_test.py feat(preview): add per-queue live preview method override (#11261) 2025-12-15 15:57:39 -08:00
test_cache_provider.py Revert "Revert "feat: Add CacheProvider API for external distributed caching"" (#12915) 2026-03-12 21:17:50 -07:00
test_workflow_id_in_ws_messages.py Capture workflow_id before execute() to fix terminal 'executing' reset 2026-05-12 08:24:47 +00:00
validate_node_input_test.py Reland union type (#5900) 2024-12-04 15:12:10 -05:00