Skip to content

chore(api): upgrade graphon to v0.6.0, migrate HITL logic back to Dify#38247

Draft
QuantumGhost wants to merge 14 commits into
langgenius:mainfrom
QuantumGhost:codex/hitl-graphon-v060-migration
Draft

chore(api): upgrade graphon to v0.6.0, migrate HITL logic back to Dify#38247
QuantumGhost wants to merge 14 commits into
langgenius:mainfrom
QuantumGhost:codex/hitl-graphon-v060-migration

Conversation

@QuantumGhost

Copy link
Copy Markdown
Contributor

Summary

Closes #38224
Supersedes #38225

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-07-01 09:28:02.659653115 +0000
+++ /tmp/pyrefly_pr.txt	2026-07-01 09:27:48.924562715 +0000
@@ -1,3 +1,39 @@
+ERROR Argument `list[PauseReason]` is not assignable to parameter `pause_reasons` with type `Sequence[PauseReason]` in function `repositories.api_workflow_run_repository.APIWorkflowRunRepository.create_workflow_pause` [bad-argument-type]
+   --> core/app/layers/pause_state_persist_layer.py:134:27
+ERROR Class member `PluginModelRuntime.invoke_llm` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:277:9
+ERROR Class member `PluginModelRuntime.invoke_text_embedding` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:484:9
+ERROR Class member `PluginModelRuntime.invoke_multimodal_embedding` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:506:9
+ERROR Class member `PluginModelRuntime.invoke_rerank` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:548:9
+ERROR Class member `PluginModelRuntime.invoke_multimodal_rerank` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:574:9
+ERROR Class member `PluginModelRuntime.invoke_tts` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:600:9
+ERROR Class member `PluginModelRuntime.invoke_speech_to_text` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:642:9
+ERROR Class member `PluginModelRuntime.invoke_moderation` overrides parent class `ModelRuntime` in an inconsistent manner [bad-override]
+   --> core/plugin/impl/model_runtime.py:662:9
+ERROR Object of class `ReadOnlyVariablePool` has no attribute `convert_template` [missing-attribute]
+  --> core/workflow/nodes/human_input/callback.py:37:29
+ERROR Class member `ParagraphInputConfig.extract_variable_selectors` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:100:9
+ERROR Class member `ParagraphInputConfig.resolve_default_value` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:108:9
+ERROR Class member `SelectInputConfig.extract_variable_selectors` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:123:9
+ERROR Class member `SelectInputConfig.resolve_default_value` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:128:9
+ERROR Class member `FileInputConfig.extract_variable_selectors` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:169:9
+ERROR Class member `FileInputConfig.resolve_default_value` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:172:9
+ERROR Class member `FileListInputConfig.extract_variable_selectors` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:181:9
+ERROR Class member `FileListInputConfig.resolve_default_value` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> core/workflow/nodes/human_input/entities.py:184:9
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `dify_vdb_alibabacloud_mysql.alibabacloud_mysql_vector.AlibabaCloudMySQLVectorFactory.init_vector` [bad-argument-type]
   --> providers/vdb/vdb-alibabacloud-mysql/tests/unit_tests/test_alibabacloud_mysql_factory.py:42:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `dify_vdb_alibabacloud_mysql.alibabacloud_mysql_vector.AlibabaCloudMySQLVectorFactory.init_vector` [bad-argument-type]
@@ -460,6 +496,12 @@
    --> providers/vdb/vdb-weaviate/tests/unit_tests/test_weaviate_vector.py:891:42
 ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `dify_vdb_weaviate.weaviate_vector.WeaviateVectorFactory.init_vector` [bad-argument-type]
    --> providers/vdb/vdb-weaviate/tests/unit_tests/test_weaviate_vector.py:920:42
+ERROR Class member `_PrivateWorkflowPauseEntity.get_pause_reasons` overrides parent class `WorkflowPauseEntity` in an inconsistent manner [bad-override]
+    --> repositories/sqlalchemy_api_workflow_run_repository.py:1612:9
+ERROR Argument `Self@_DebugHumanInputNode` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.render_form_content_before_submission` [bad-argument-type]
+  --> services/workflow_service.py:98:17
+ERROR Argument `Self@_DebugHumanInputNode` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.resolve_default_values` [bad-argument-type]
+   --> services/workflow_service.py:104:17
 ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
   --> tests/helpers/legacy_model_type_migration.py:64:16
 ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
@@ -724,10 +766,12 @@
    --> tests/test_containers_integration_tests/core/rag/retrieval/test_dataset_retrieval_integration.py:593:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/core/rag/retrieval/test_dataset_retrieval_integration.py:603:23
+ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:130:14
 ERROR Argument `Connection | Engine` is not assignable to parameter `session_factory` with type `Engine | sessionmaker[Unknown]` in function `core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:265:29
+   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:273:29
 ERROR Argument `Connection | Engine` is not assignable to parameter `session_factory` with type `Engine | sessionmaker[Unknown]` in function `core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:271:29
+   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:279:29
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/helpers/execution_extra_content.py:48:14
 ERROR Returned type `int | str` is not assignable to declared return type `str` [bad-return]
@@ -744,10 +788,16 @@
    --> tests/test_containers_integration_tests/models/test_types_enum_text.py:147:20
 ERROR Cannot instantiate `DifyAPISQLAlchemyWorkflowNodeExecutionRepository` because the following members are abstract: `save`, `save_execution_data`, `get_by_workflow_execution` [bad-instantiation]
    --> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_node_execution_repository.py:122:70
+ERROR Could not import `HumanInputRequired` from `graphon.entities.pause_reason` [missing-module-attribute]
+  --> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:20:43
 ERROR Class member `_TestWorkflowRunRepository.save` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
   --> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:44:9
 ERROR Generator function should return `Generator` [bad-return]
    --> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:138:56
+ERROR Class `PauseReasonType` has no class attribute `HUMAN_INPUT_REQUIRED` [missing-attribute]
+   --> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:718:19
+ERROR Class `PauseReasonType` has no class attribute `HUMAN_INPUT_REQUIRED` [missing-attribute]
+   --> tests/test_containers_integration_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:822:19
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
    --> tests/test_containers_integration_tests/repositories/test_sqlalchemy_workflow_node_execution_repository.py:181:23
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
@@ -2068,6 +2118,8 @@
   --> tests/unit_tests/controllers/console/app/test_conversation_api.py:90:52
 ERROR Argument `SimpleNamespace` is not assignable to parameter `current_user` with type `Account` in function `controllers.console.app.conversation._get_conversation` [bad-argument-type]
    --> tests/unit_tests/controllers/console/app/test_conversation_api.py:105:47
+ERROR Could not import `HumanInputRequired` from `graphon.entities.pause_reason` [missing-module-attribute]
+  --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:14:43
 ERROR Missing argument `app_model` in function `handler` [missing-argument]
    --> tests/unit_tests/controllers/console/app/test_wraps.py:104:19
 ERROR Unexpected keyword argument `app_id` in function `handler` [unexpected-keyword]
@@ -3105,12 +3157,16 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.resume` [bad-argument-type]
     --> tests/unit_tests/core/app/apps/advanced_chat/test_app_generator.py:1366:33
 ERROR Object of class `Generator` has no attribute `ok`
+ERROR Class `PauseReasonType` has no class attribute `HUMAN_INPUT_REQUIRED` [missing-attribute]
+  --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:46:31
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:129:16
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:130:16
 ERROR Cannot index into `str` [bad-index]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_response_converter.py:131:16
+ERROR Could not import `HumanInputRequired` from `graphon.entities.pause_reason` [missing-module-attribute]
+  --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline.py:20:43
 ERROR `SimpleNamespace` is not assignable to attribute `_application_generate_entity` with type `AdvancedChatAppGenerateEntity` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline.py:109:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AdvancedChatAppGenerateEntity` in function `core.app.apps.advanced_chat.generate_task_pipeline.AdvancedChatAppGenerateTaskPipeline.__init__` [bad-argument-type]
@@ -3127,6 +3183,8 @@
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:101:23
 ERROR Argument `(**kwargs: Unknown) -> None` is not assignable to parameter `draft_var_saver_factory` with type `DraftVariableSaverFactory` in function `core.app.apps.advanced_chat.generate_task_pipeline.AdvancedChatAppGenerateTaskPipeline.__init__` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:107:33
+ERROR Class `PauseReasonType` has no class attribute `HUMAN_INPUT_REQUIRED` [missing-attribute]
+   --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:171:25
 ERROR `SimpleNamespace` is not assignable to attribute `_message_cycle_manager` with type `MessageCycleManager` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:188:43
 ERROR Argument `SimpleNamespace` is not assignable to parameter `event` with type `QueueTextChunkEvent` in function `core.app.apps.advanced_chat.generate_task_pipeline.AdvancedChatAppGenerateTaskPipeline._handle_text_chunk_event` [bad-argument-type]
@@ -3682,71 +3740,75 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `pause_state_config` with type `PauseStateLayerConfig | None` in function `core.app.apps.workflow.app_generator.WorkflowAppGenerator.resume` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_app_generator.py:321:28
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:52:55
+  --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:53:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:59:55
+  --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:60:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:91:55
+  --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:92:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:120:55
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:121:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._prepare_single_node_execution` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:125:51
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:126:51
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:128:55
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:129:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._get_graph_and_variable_pool_for_single_node_run` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:167:22
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:168:22
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:182:55
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:183:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._get_graph_and_variable_pool_for_single_node_run` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:218:22
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:219:22
 ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:247:27
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:248:27
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:248:29
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:249:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._get_graph_and_variable_pool_for_single_node_run` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:311:22
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:312:22
 ERROR Object of class `NoneType` has no attribute `value` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:320:16
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:321:16
 ERROR Argument `TestWorkflowBasedAppRunner.test_handle_graph_run_events_and_pause_notifications._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:329:55
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:330:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:355:30
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:366:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:356:30
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:367:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:357:30
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:368:30
 ERROR Type `object` is not iterable [not-iterable]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:359:69
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:370:69
 ERROR Type `object` is not iterable [not-iterable]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:360:71
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:371:71
 ERROR Type `object` is not iterable [not-iterable]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:361:39
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:372:39
 ERROR Argument `TestWorkflowBasedAppRunner.test_handle_node_events_publishes_queue_events._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:372:55
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:383:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:380:13
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:390:13
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:391:13
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:401:13
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:412:13
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:428:13
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:423:13
+ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:439:13
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:442:13
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:453:13
 ERROR Argument `TestWorkflowBasedAppRunner.test_handle_human_input_form_filled_event_preserves_submitted_data._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:470:55
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:481:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:482:13
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:493:13
 ERROR Argument `TestWorkflowBasedAppRunner.test_handle_start_node_result_events_project_outputs._QueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:559:55
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:570:55
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:577:30
+   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_core.py:588:30
+ERROR Could not import `HumanInputRequired` from `graphon.entities.pause_reason` [missing-module-attribute]
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_notifications.py:7:43
 ERROR Argument `_DummyQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_notifications.py:36:51
 ERROR Argument `_DummyWorkflowEntry` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/test_workflow_app_runner_notifications.py:52:26
+ERROR Could not import `HumanInputRequired` from `graphon.entities.pause_reason` [missing-module-attribute]
+  --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:22:43
 ERROR Class member `_RecordingWorkflowAppRunner._publish_event` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
   --> tests/unit_tests/core/app/apps/test_workflow_pause_events.py:54:9
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_entry` with type `WorkflowEntry` in function `core.app.apps.workflow_app_runner.WorkflowBasedAppRunner._handle_event` [bad-argument-type]
@@ -5779,27 +5841,37 @@
 ERROR Cannot set item in `dict[str, str]` [unsupported-operation]
    --> tests/unit_tests/core/workflow/graph_engine/test_mock_nodes.py:866:52
 ERROR Class member `StaticForm.id` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:89:9
+  --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:95:9
 ERROR Class member `StaticForm.submission_token` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:93:9
+  --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:99:9
 ERROR Class member `StaticForm.recipients` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:97:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:103:9
 ERROR Class member `StaticForm.rendered_content` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:101:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:107:9
 ERROR Class member `StaticForm.selected_action_id` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:105:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:111:9
+ERROR Class member `StaticForm.created_at` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:115:9
 ERROR Class member `StaticForm.submitted_data` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:109:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:119:9
 ERROR Class member `StaticForm.submitted` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:113:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:123:9
 ERROR Class member `StaticForm.status` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:117:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:127:9
 ERROR Class member `StaticForm.expiration_time` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:121:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:131:9
 ERROR Class member `StaticRepo.get_form` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:129:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:139:9
 ERROR Class member `StaticRepo.create_form` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:135:9
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:145:9
+ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:206:32
+ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:210:14
+ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:224:32
+ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:228:14
 ERROR Argument `Sequence[type[GraphEngineEvent]]` is not assignable to parameter `expected_sequence` with type `list[type[GraphEngineEvent]]` in function `TableTestRunner._validate_event_sequence` [bad-argument-type]
    --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:403:21
 ERROR `graph` is uninitialized [unbound-name]
@@ -5828,12 +5900,16 @@
    --> tests/unit_tests/core/workflow/graph_engine/test_table_runner.py:712:27
 ERROR Argument `Iterator[Unknown]` is not assignable to parameter `messages` with type `Generator[ToolInvokeMessage]` in function `core.workflow.nodes.agent.message_transformer.AgentMessageTransformer.transform` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/agent/test_message_transformer.py:15:26
+ERROR Could not import `HumanInputRequired` from `graphon.entities.pause_reason` [missing-module-attribute]
+  --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:32:43
 ERROR Class member `FakeBindingResolver.resolve` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:125:9
 ERROR Class member `FileOutputBackendClient._events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:182:9
 ERROR Argument `dict[str, str]` is not assignable to parameter `node_data` with type `DifyAgentNodeData` in function `core.workflow.nodes.agent_v2.agent_node.DifyAgentNode._extract_variable_selector_to_variable_mapping` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:260:19
+ERROR Could not import `HumanInputRequired` from `graphon.entities.pause_reason` [missing-module-attribute]
+  --> tests/unit_tests/core/workflow/nodes/agent_v2/test_ask_human_resume.py:15:43
 ERROR Class member `FakeTool.tool_provider_type` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:73:9
 ERROR Class member `FakeTool._invoke` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
@@ -6009,47 +6085,57 @@
 ERROR Argument `Response` is not assignable to parameter `response` with type `HttpResponse` in function `graphon.nodes.http_request.entities.Response.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/http_request/test_http_request_node.py:161:17
 ERROR Class member `_InMemoryFormEntity.id` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:75:9
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:81:9
 ERROR Class member `_InMemoryFormEntity.submission_token` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:79:9
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:85:9
 ERROR Class member `_InMemoryFormEntity.recipients` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:83:9
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:89:9
 ERROR Class member `_InMemoryFormEntity.rendered_content` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:87:9
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:93:9
 ERROR Class member `_InMemoryFormEntity.selected_action_id` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:91:9
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:97:9
+ERROR Class member `_InMemoryFormEntity.created_at` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:101:9
 ERROR Class member `_InMemoryFormEntity.submitted_data` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:95:9
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:105:9
 ERROR Class member `_InMemoryFormEntity.submitted` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:99:9
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:109:9
 ERROR Class member `_InMemoryFormEntity.status` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:103:9
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:113:9
 ERROR Class member `_InMemoryFormEntity.expiration_time` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:107:9
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:117:9
 ERROR Class member `InMemoryHumanInputFormRepository.create_form` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:120:9
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:130:9
 ERROR Class member `InMemoryHumanInputFormRepository.get_form` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:133:9
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:143:9
 ERROR Class member `_TestFileReferenceFactory.build_from_mapping` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:149:9
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:159:9
+ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:192:32
+ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:196:14
 ERROR Object of class `HumanInputNodeData` has no attribute `delivery_methods` [missing-attribute]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:325:20
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:343:20
 ERROR Object of class `HumanInputNodeData` has no attribute `delivery_methods` [missing-attribute]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:348:20
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:366:20
 ERROR Object of class `ExternalRecipient` has no attribute `reference_id` [missing-attribute]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:441:16
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:459:16
 ERROR Object of class `BoundRecipient` has no attribute `email` [missing-attribute]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:442:16
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:460:16
 ERROR Missing argument `reference_id` in function `core.workflow.human_input_adapter.BoundRecipient.__init__` [missing-argument]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:446:28
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:464:28
 ERROR Unexpected keyword argument `user_id` in function `core.workflow.human_input_adapter.BoundRecipient.__init__` [unexpected-keyword]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:446:61
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:464:61
 ERROR Unexpected keyword argument `whole_workspace` in function `core.workflow.human_input_adapter.EmailRecipients.__init__` [unexpected-keyword]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:448:38
-ERROR Object of class `SchedulingPause` has no attribute `resolved_default_values` [missing-attribute]
-   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:526:16
+   --> tests/unit_tests/core/workflow/nodes/human_input/test_entities.py:466:38
 ERROR Class member `_TestFileReferenceFactory.build_from_mapping` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-  --> tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py:44:9
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py:47:9
+ERROR Argument `_FakeFormRepository` is not assignable to parameter `form_repository` with type `HumanInputFormRepository` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py:74:25
+ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py:78:32
+ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/human_input/test_human_input_form_filled_event.py:82:14
 ERROR Argument `dict[str, list[str] | str]` is not assignable to parameter `node_data` with type `KnowledgeIndexNodeData | dict[str, object]` in function `_build_node` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/knowledge_index/test_knowledge_index_node.py:140:23
 ERROR Argument `dict[str, bool]` is not assignable to parameter `summary_index_setting` with type `SummaryIndexSettingDict | None` in function `core.workflow.nodes.knowledge_index.knowledge_index_node.KnowledgeIndexNode._invoke_knowledge_index` [bad-argument-type]
@@ -6164,12 +6250,14 @@
    --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_node.py:106:12
 ERROR Cannot index into `object` [bad-index]
    --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_node.py:107:12
+ERROR Class `PauseReasonType` has no class attribute `HUMAN_INPUT_REQUIRED` [missing-attribute]
+ --> tests/unit_tests/core/workflow/test_enrich_pause_reasons.py:6:32
 ERROR Argument `list[str]` is not assignable to parameter `approval_channels` with type `list[ApprovalChannel]` in function `core.workflow.human_input_policy.FormDisposition.__new__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_enrich_pause_reasons.py:12:68
 ERROR Argument `list[str]` is not assignable to parameter `approval_channels` with type `list[ApprovalChannel]` in function `core.workflow.human_input_policy.FormDisposition.__new__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_enrich_pause_reasons.py:34:92
 ERROR Argument `TypeAlias[FormInputConfig, Annotated[FileInputConfig | FileListInputConfig | ParagraphInputConfig | SelectInputConfig]]` is not assignable to parameter `model_class` with type `type[Any]` in function `_validate_legacy_json` [bad-argument-type]
-  --> tests/unit_tests/core/workflow/test_form_input_serialization_compat.py:94:38
+  --> tests/unit_tests/core/workflow/test_form_input_serialization_compat.py:95:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `variable_pool` with type `VariablePool | None` in function `core.workflow.human_input_adapter.EmailDeliveryConfig.render_body_template` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_adapter.py:31:23
 ERROR Object of class `_InteractiveSurfaceDeliveryConfig` has no attribute `recipients` [missing-attribute]
@@ -6184,6 +6272,31 @@
    --> tests/unit_tests/core/workflow/test_human_input_adapter.py:367:35
 ERROR Argument `Literal[123]` is not assignable to parameter `node_config` with type `BaseModel | Mapping[str, Any]` in function `core.workflow.human_input_adapter.adapt_node_config_for_graph` [bad-argument-type]
    --> tests/unit_tests/core/workflow/test_human_input_adapter.py:372:37
+ERROR Argument `_Context` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__call__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/test_human_input_callback.py:54:25
+ERROR Argument `_Context` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__call__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/test_human_input_callback.py:85:25
+ERROR Object of class `PauseRequested` has no attribute `selected_handle` [missing-attribute]
+  --> tests/unit_tests/core/workflow/test_human_input_callback.py:87:12
+ERROR Object of class `Expired` has no attribute `inputs`
+ERROR Object of class `PauseRequested` has no attribute `outputs` [missing-attribute]
+  --> tests/unit_tests/core/workflow/test_human_input_callback.py:89:12
+ERROR Argument `_Context` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__call__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:116:25
+ERROR Object of class `PauseRequested` has no attribute `selected_handle` [missing-attribute]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:118:12
+ERROR Object of class `PauseRequested` has no attribute `outputs` [missing-attribute]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:119:12
+ERROR Argument `_Context` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__call__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:145:25
+ERROR Object of class `PauseRequested` has no attribute `selected_handle` [missing-attribute]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:147:12
+ERROR Object of class `PauseRequested` has no attribute `outputs` [missing-attribute]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:148:12
+ERROR Argument `_Context` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__call__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:175:18
+ERROR Argument `_Context` is not assignable to parameter `ctx` with type `HITLContext` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__call__` [bad-argument-type]
+   --> tests/unit_tests/core/workflow/test_human_input_callback.py:198:18
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
   --> tests/unit_tests/core/workflow/test_human_input_forms.py:47:60
 ERROR Argument `_FakeSession` is not assignable to parameter `session` with type `Session | None` in function `core.workflow.human_input_forms.load_form_tokens_by_form_id` [bad-argument-type]
@@ -6615,17 +6728,17 @@
 ERROR Class member `TestVolcengineTos.setup_method` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
   --> tests/unit_tests/oss/volcengine_tos/test_volcengine_tos.py:17:9
 ERROR Argument `SimpleNamespace` is not assignable to parameter `reason_model` with type `WorkflowPauseReason` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
-  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:38:9
-ERROR Argument `SimpleNamespace` is not assignable to parameter `form_model` with type `HumanInputForm | None` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
   --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:39:9
-ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `recipients` with type `Sequence[HumanInputFormRecipient]` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
+ERROR Argument `SimpleNamespace` is not assignable to parameter `form_model` with type `HumanInputForm | None` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
   --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:40:9
+ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `recipients` with type `Sequence[HumanInputFormRecipient]` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
+  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:41:9
 ERROR Argument `SimpleNamespace` is not assignable to parameter `reason_model` with type `WorkflowPauseReason` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
-  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:54:9
+  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:56:9
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form_model` with type `HumanInputForm | None` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
-  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:55:9
+  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:57:9
 ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `recipients` with type `Sequence[HumanInputFormRecipient]` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
-  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:56:9
+  --> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:58:9
 ERROR Argument `SimpleNamespace` is not assignable to parameter `binding` with type `WorkflowAgentNodeBinding` in function `services.agent.composer_service.AgentComposerService._workflow_inline_debug_conversation_id` [bad-argument-type]
    --> tests/unit_tests/services/agent/test_agent_services.py:257:17
 ERROR Argument `SimpleNamespace` is not assignable to parameter `agent` with type `Agent | None` in function `services.agent.composer_service.AgentComposerService._workflow_inline_debug_conversation_id` [bad-argument-type]
@@ -7622,12 +7735,10 @@
    --> tests/unit_tests/services/test_workflow_run_service.py:132:103
 ERROR Argument `dict[str, dict[str, str | dict[str, str]] | str]` is not assignable to parameter `object` with type `dict[str, dict[str, list[Unknown] | str] | str]` in function `list.append` [bad-argument-type]
    --> tests/unit_tests/services/test_workflow_service.py:225:13
-ERROR Missing required key `id` for TypedDict `NodeConfigDict` [bad-typed-dict-key]
-    --> tests/unit_tests/services/test_workflow_service.py:2848:71
-ERROR Missing required key `data` for TypedDict `NodeConfigDict` [bad-typed-dict-key]
-    --> tests/unit_tests/services/test_workflow_service.py:2848:71
+ERROR `dict[@_, @_]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
+    --> tests/unit_tests/services/test_workflow_service.py:2852:54
 ERROR Argument `dict[str, str | dict[str, str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.workflow_service.WorkflowService._build_human_input_node_for_debugging` [bad-argument-type]
-    --> tests/unit_tests/services/test_workflow_service.py:2936:65
+    --> tests/unit_tests/services/test_workflow_service.py:2931:65
 ERROR Argument `Literal['api_key']` is not assignable to parameter `credential_type` with type `CredentialType` in function `services.tools.builtin_tools_manage_service.BuiltinToolManageService.list_builtin_provider_credentials_schema` [bad-argument-type]
   --> tests/unit_tests/services/tools/test_builtin_tools_manage_service.py:91:89
 ERROR Object of class `Mapping` has no attribute `startswith` [missing-attribute]

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 51.87% 51.93% +0.07%
Strict coverage 51.39% 51.45% +0.07%
Typed symbols 31,536 31,624 +88
Untyped symbols 29,540 29,542 +2
Modules 2952 2962 +10

@QuantumGhost QuantumGhost force-pushed the codex/hitl-graphon-v060-migration branch from ae59cfb to 99d1cf3 Compare July 1, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor/Chore] Migrate HITL logic back to Dify

1 participant