Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(human-input): align backend timeout handle with frontend DSL (#40746)

Taranum Wasu6e0e32848eac
diff --git a/api/core/workflow/nodes/human_input/callback.py b/api/core/workflow/nodes/human_input/callback.py
index 8095078b455..9f83c3c85e4 100644
--- a/api/core/workflow/nodes/human_input/callback.py
+++ b/api/core/workflow/nodes/human_input/callback.py
@@ -68,7 +68,7 @@ class DifyHITLCallback:
_OUTPUT_FIELD_ACTION_ID = "__action_id"
_OUTPUT_FIELD_ACTION_VALUE = "__action_value"
_OUTPUT_FIELD_RENDERED_CONTENT = "__rendered_content"
- _TIMEOUT_HANDLE = "__timeout__"
+ _TIMEOUT_HANDLE = "__timeout"
def __init__(
self,
diff --git a/api/tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py b/api/tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py
index 33d1a41fad8..74b35217cae 100644
--- a/api/tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py
+++ b/api/tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py
@@ -264,4 +264,4 @@ def test_human_input_node_emits_timeout_event_before_succeeded():
assert isinstance(events[0], NodeRunStartedEvent)
assert isinstance(events[1], NodeRunSucceededEvent)
- assert events[1].node_run_result.edge_source_handle == "__timeout__"
+ assert events[1].node_run_result.edge_source_handle == "__timeout"
diff --git a/api/tests/unit_tests/core/workflow/test_human_input_callback.py b/api/tests/unit_tests/core/workflow/test_human_input_callback.py
index 88477049d84..54a14f06f1e 100644
--- a/api/tests/unit_tests/core/workflow/test_human_input_callback.py
+++ b/api/tests/unit_tests/core/workflow/test_human_input_callback.py
@@ -132,7 +132,7 @@ def test_dify_hitl_callback_returns_timeout_for_explicit_timeout_form() -> None:
decision = callback(_ctx("run-1", "node-1"))
- assert decision.selected_handle == "__timeout__"
+ assert decision.selected_handle == "__timeout"
assert decision.outputs == {
"__action_id": build_segment(""),
"__action_value": build_segment(""),
@@ -159,7 +159,7 @@ def test_dify_hitl_callback_returns_timeout_for_waiting_form_past_node_deadline(
decision = callback(_ctx("run-1", "node-1"))
- assert decision.selected_handle == "__timeout__"
+ assert decision.selected_handle == "__timeout"
assert decision.outputs == {
"__action_id": build_segment(""),
"__action_value": build_segment(""),