[GH-ISSUE #3303] Correlate legacy Model Manager completion events with the active batch #1143

Open
opened 2026-10-27 21:26:10 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @ltdrdata on GitHub (Sep 18, 2026).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/3303

Problem

The v4 legacy Model Manager sends a batch_id with an installation request, but its batch-done event handler does not compare the received ID with the active request. An unrelated completion can hide Stop and invoke completion handling against an in-progress install context. The Custom Nodes Manager already checks this correlation.

The handler is unchanged from the manager-v4 base. Review consensus accepts this as a separate correctness fix from UI escaping.

Required behavior

  • Only completion belonging to the active model batch may finalize that batch's controls/context and show its result.
  • Preserve successful and failed completion behavior for the matching batch.
  • Keep unrelated node/model batches and stale completions from clearing the active model operation.
  • Check the in-progress event path as well as completion for the same ownership assumption; use the existing batch identifier rather than introducing another tracking mechanism.

Validation

  • Playwright with the actual legacy UI: start batch A, deliver a nonempty completion for batch B, and verify that A's controls and context remain in progress. Then deliver A's completion and verify the correct terminal state. Establish Red/Green on the previous handler.
  • Cover success, failure and stale completion, retaining the ordinary single-batch installation path.
  • Use overlapping real backend batches to verify the actual event payload and routing when feasible; distinguish controlled-event tests from end-to-end delivery.

This case is distinct from the user's v3 multi-tab report where a tab never received a WebSocket completion. No shared root cause has been established. Retain that missed-event/reconnect investigation separately; batch filtering alone does not recover a missing event.

Originally created by @ltdrdata on GitHub (Sep 18, 2026). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/3303 ## Problem The v4 legacy Model Manager sends a batch_id with an installation request, but its batch-done event handler does not compare the received ID with the active request. An unrelated completion can hide Stop and invoke completion handling against an in-progress install context. The Custom Nodes Manager already checks this correlation. The handler is unchanged from the manager-v4 base. [Review consensus](https://github.com/Comfy-Org/ComfyUI-Manager/pull/3297#issuecomment-5737207402) accepts this as a separate correctness fix from UI escaping. ## Required behavior - Only completion belonging to the active model batch may finalize that batch's controls/context and show its result. - Preserve successful and failed completion behavior for the matching batch. - Keep unrelated node/model batches and stale completions from clearing the active model operation. - Check the in-progress event path as well as completion for the same ownership assumption; use the existing batch identifier rather than introducing another tracking mechanism. ## Validation - Playwright with the actual legacy UI: start batch A, deliver a nonempty completion for batch B, and verify that A's controls and context remain in progress. Then deliver A's completion and verify the correct terminal state. Establish Red/Green on the previous handler. - Cover success, failure and stale completion, retaining the ordinary single-batch installation path. - Use overlapping real backend batches to verify the actual event payload and routing when feasible; distinguish controlled-event tests from end-to-end delivery. This case is distinct from the user's v3 multi-tab report where a tab never received a WebSocket completion. No shared root cause has been established. Retain that missed-event/reconnect investigation separately; batch filtering alone does not recover a missing event.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#1143
No description provided.