feat: support multi-select input in start node - #41137
Draft
ddddajie wants to merge 7 commits into
Draft
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-08-24 05:40:21.002850779 +0000
+++ /tmp/pyrefly_pr.txt 2026-08-24 05:40:07.489719983 +0000
@@ -460,6 +460,10 @@
--> 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 `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> core/app/apps/base_app_generator.py:265:18
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> core/workflow/variable_pool_initializer.py:21:29
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]
@@ -4333,17 +4337,19 @@
ERROR Argument `Literal['CHAT']` is not assignable to parameter `app_mode` with type `AppMode` in function `core.app.app_config.base_app_config_manager.BaseAppConfigManager.convert_features` [bad-argument-type]
--> tests/unit_tests/core/app/app_config/test_base_app_config_manager.py:178:71
ERROR Cannot index into `VariableEntity` [bad-index]
- --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:119:16
+ --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:120:16
ERROR Cannot index into `VariableEntity` [bad-index]
- --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:140:16
+ --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:141:16
ERROR Cannot index into `VariableEntity` [bad-index]
- --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:159:16
+ --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:160:16
ERROR Cannot index into `VariableEntity` [bad-index]
- --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:178:16
+ --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:179:16
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:194:34
ERROR Cannot index into `RagPipelineVariableEntity` [bad-index]
- --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:246:16
+ --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:264:16
ERROR Cannot index into `RagPipelineVariableEntity` [bad-index]
- --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:273:16
+ --> tests/unit_tests/core/app/app_config/workflow_ui_based_app/test_workflow_ui_based_app_manager.py:291:16
ERROR Expected a mapping, got Unknown | None [invalid-argument]
--> tests/unit_tests/core/app/apps/advanced_chat/test_app_config_manager.py:50:29
ERROR No matching overload found for function `core.app.apps.advanced_chat.app_generator.AdvancedChatAppGenerator.generate` called with arguments: (app_model=SimpleNamespace, workflow=SimpleNamespace, user=SimpleNamespace, args=dict[str, dict[@_, @_]], invoke_from=Literal[InvokeFrom.WEB_APP], workflow_run_id=Literal['run-id'], streaming=Literal[False], session=Session) [no-matching-overload]
@@ -4978,8 +4984,16 @@
--> tests/unit_tests/core/app/apps/test_base_app_generate_response_converter.py:40:9
ERROR Class member `_DummyConverter.convert_stream_simple_response` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/core/app/apps/test_base_app_generate_response_converter.py:47:9
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> tests/unit_tests/core/app/apps/test_base_app_generator.py:346:14
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> tests/unit_tests/core/app/apps/test_base_app_generator.py:373:14
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> tests/unit_tests/core/app/apps/test_base_app_generator.py:388:14
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> tests/unit_tests/core/app/apps/test_base_app_generator.py:648:22
ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
- --> tests/unit_tests/core/app/apps/test_base_app_generator.py:599:9
+ --> tests/unit_tests/core/app/apps/test_base_app_generator.py:684:9
ERROR Class member `DummyQueueManager._publish` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/core/app/apps/test_base_app_queue_manager.py:18:9
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState | None` in function `core.app.apps.base_app_queue_manager.AppQueueManager.graph_runtime_state` [bad-argument-type]
@@ -5152,6 +5166,8 @@
--> 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:57:26
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> tests/unit_tests/core/app/apps/test_workflow_app_runner_single_node.py:187:18
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:38: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]
@@ -7938,20 +7954,24 @@
--> tests/unit_tests/core/workflow/test_node_runtime.py:883:23
ERROR Object of class `object` has no attribute `tool` [missing-attribute]
--> tests/unit_tests/core/workflow/test_node_runtime.py:886:12
+ERROR Class `VariableEntityType` has no class attribute `MULTI_SELECT` [missing-attribute]
+ --> tests/unit_tests/core/workflow/test_variable_pool.py:111:68
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.workflow.workflow_entry.WorkflowEntry.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:69:29
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:70:29
ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.workflow.workflow_entry.WorkflowEntry.__init__` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:127:37
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:128:37
+ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `core.workflow.workflow_entry.WorkflowEntry.single_step_run` [bad-argument-type]
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:447:26
ERROR Class member `EmptySplitKey.split` overrides parent class `UserString` in an inconsistent manner [bad-override]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:710:17
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:782:17
ERROR Class member `EmptySplitKey.split` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:710:17
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:782:17
ERROR `TestMappingUserInputsBranches.test_rejects_invalid_node_variable_key.EmptySplitKey` is not assignable to dict key type `str` [bad-assignment]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:715:35
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:787:35
ERROR Argument `TestWorkflowEntryNodeLayers.test_run_node_with_layers_reports_success.FakeNode` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.workflow.workflow_entry.WorkflowEntry._run_node_with_layers` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:784:78
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:856:78
ERROR Argument `TestWorkflowEntryNodeLayers.test_run_node_with_layers_reports_errors.FakeNode` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.workflow.workflow_entry.WorkflowEntry._run_node_with_layers` [bad-argument-type]
- --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:818:73
+ --> tests/unit_tests/core/workflow/test_workflow_entry_helpers.py:890:73
ERROR Missing argument `case` in function `enterprise.telemetry.contracts.TelemetryEnvelope.__init__` [missing-argument]
--> tests/unit_tests/enterprise/telemetry/test_contracts.py:110:30
ERROR Missing argument `tenant_id` in function `enterprise.telemetry.contracts.TelemetryEnvelope.__init__` [missing-argument]
|
Contributor
Pyrefly Type Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This is a Draft PR while the Graphon prerequisite is pending. It depends on langgenius/graphon#259, which adds
VariableEntityType.MULTI_SELECT.Summary
Fixes #40575
Adds a dedicated
multi-selectuser input type for Start Nodes.The implementation keeps selected values as a native
string[]/array[string]throughout the workflow path instead of serializing them into a scalar string.What is included
multi-selectStart Node input type and map it toarray[string]downstream.Dependency / current Draft status
This PR depends on langgenius/graphon#259.
That Graphon PR introduces
VariableEntityType.MULTI_SELECTwhile reusing the existingARRAY_STRINGruntime type, so no new Graphon segment/runtime type is required.The Dify-side feature implementation is complete on this branch. I am intentionally not bumping the Graphon dependency to an unreleased commit. Once Graphon #259 is merged and released, the remaining work for this PR is:
MULTI_SELECT;api/uv.lock;Until that release exists, CI may fail where the currently pinned Graphon version does not yet expose
VariableEntityType.MULTI_SELECT.Verification performed on the implementation branch
14 passed.vp lint: exited successfully (existing warnings only).vp check --no-fmt: 0 errors (existing warnings only).git diff --check: passed.Screenshots
Not added yet because this PR is still a Draft waiting on the Graphon prerequisite. UI screenshots can be added before marking it ready for review if requested.
Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint godsFrom ChatGPT