mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
apply_repair's already-present filter (added for interrupted-step Retry idempotency) compared create_node/connect intents against before_graph alone, with no awareness of delete_node intents in the same batch. A from-scratch build sends delete_node(placeholder_start) + create_node(same id) in one apply_repair call to replace the canvas's default placeholder start with the generator's own start node -- the filter dropped the create_node as "already present" while the delete_node still ran, deleting the start node with no re-create, so the following connect raised ValueError: node not found. Mirror handlers_build.py's existing M2 guard: subtract in-batch delete_node targets from the present-node/edge sets before filtering, so a delete+recreate of the same id in one batch survives. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>