Repository navigation
Conversation
Service API segment updates are partial, but for QA documents the shared mutation service wrote args.answer as given. A request that omitted the answer, such as a content-only or keywords-only update, saved answer=NULL and dropped the answer from word_count and tokens. Carry the stored answer in SegmentUpdateState and fall back to it, as the update already does for content.
GYJ99
left a comment
There was a problem hiding this comment.
One partial-update edge case is still missing from the regression coverage: answer = args.answer or previous.answer also treats an explicit empty string as an omitted field. SegmentUpdateArgs.answer is currently str | None without a non-empty constraint, so the Service API accepts {"segment": {"answer": ""}}. Before this patch that request persisted the empty answer; afterwards it silently retains the old answer.
Could we distinguish field omission from an explicitly provided value (e.g. using "answer" in args.model_fields_set) and add an answer="" regression case? The intended semantics for an explicit JSON null are worth choosing/documenting separately: clear it, or reject it at validation, rather than silently equating it with omission. This would preserve the fix for content-only/keywords-only updates without unintentionally changing explicit answer updates.
This is a source-level review of the current head, not a claim of locally executed tests.
Only an omitted answer keeps the stored one. An answer the request does send, including "" or null, is saved as it was before.
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-10-30 16:07:09.366208876 +0000
+++ /tmp/pyrefly_pr.txt 2026-10-30 16:06:51.575983380 +0000
@@ -162,28 +162,10 @@
--> providers/vdb/vdb-tencent/tests/e2e_tests/conftest.py:95:33
ERROR Object of class `ModuleType` has no attribute `VectorType` [missing-attribute]
--> providers/vdb/vdb-tidb-vector/tests/unit_tests/src/dify_vdb_tidb_vector/test_tidb_vector.py:77:5
-ERROR Unpacked keyword argument `str` is not assignable to parameter `port` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `grpc_port` with type `int` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `prefer_grpc` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `https` with type `bool | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `timeout` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `force_disable_check_same_thread` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `grpc_options` with type `dict[str, Any] | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR Unpacked keyword argument `str` is not assignable to parameter `auth_token_provider` with type `(() -> Awaitable[str]) | (() -> str) | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_on_qdrant_vector.py:93:51
-ERROR `None` is not subscriptable [unsupported-operation]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:152:20
-ERROR `None` is not subscriptable [unsupported-operation]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:153:35
-ERROR Argument `Any | None` is not assignable to parameter `cluster_response` with type `Mapping[str, Any]` in function `TidbService.extract_qdrant_endpoint` [bad-argument-type]
- --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:154:75
+ERROR Argument `ModuleSpec | None` is not assignable to parameter `spec` with type `ModuleSpec` in function `_frozen_importlib.module_from_spec` [bad-argument-type]
+ --> tests/unit_tests/migrations/versions/test_2025_07_02_2332-1c9ba48be8e4_add_uuidv7_function_in_sql.py:31:46
+ERROR Object of class `NoneType` has no attribute `loader` [missing-attribute]
+ --> tests/unit_tests/migrations/versions/test_2025_07_02_2332-1c9ba48be8e4_add_uuidv7_function_in_sql.py:32:5
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/controllers/console/app/test_chat_conversation_status_count_api.py:75:16
ERROR Argument `Literal['app-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowRunTriggeredFrom] | WorkflowRunTriggeredFrom` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
@@ -198,6 +180,8 @@
--> tests/e2e_tests/containers/controllers/console/app/test_chat_conversation_status_count_api.py:123:27
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `MessageStatus | SQLCoreOperations[MessageStatus]` in function `models.model.Message.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/controllers/console/app/test_chat_conversation_status_count_api.py:125:16
+ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/controllers/console/app/test_conversation_read_timestamp.py:28:16
ERROR Returned type `set[str | None]` is not assignable to declared return type `set[str]` [bad-return]
--> tests/e2e_tests/containers/controllers/console/test_apikey.py:221:16
ERROR Object of class `FunctionType` has no attribute `__handler__` [missing-attribute]
@@ -335,7 +319,7 @@
ERROR Argument `Literal['workflow-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowNodeExecutionTriggeredFrom] | WorkflowNodeExecutionTriggeredFrom` in function `models.workflow.WorkflowNodeExecutionModel.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/repositories/test_sqlalchemy_api_workflow_node_execution_repository.py:39:24
ERROR Generator function should return `Generator` [bad-return]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_api_workflow_run_repository.py:150:56
+ --> tests/e2e_tests/containers/repositories/test_sqlalchemy_api_workflow_run_repository.py:151:56
ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:103:14
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
@@ -344,50 +328,6 @@
--> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:125:14
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:130:16
-ERROR Object of class `HumanInputFormReference` has no attribute `submitted` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:348:16
-ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:350:16
-ERROR Object of class `object` has no attribute `action_id` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:351:16
-ERROR Object of class `object` has no attribute `action_text` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:352:16
-ERROR Object of class `object` has no attribute `rendered_content` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:353:16
-ERROR Object of class `object` has no attribute `node_id` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:354:16
-ERROR Object of class `object` has no attribute `node_title` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:355:16
-ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:386:16
-ERROR Object of class `object` has no attribute `submitted_data` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:387:16
-ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:474:16
-ERROR Object of class `object` has no attribute `submitted_data` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:475:16
-ERROR Object of class `object` has no attribute `rendered_content` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:476:16
-ERROR Object of class `HumanInputFormReference` has no attribute `submitted` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:517:16
-ERROR Object of class `HumanInputFormReference` has no attribute `form_definition` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:519:16
-ERROR Object of class `object` has no attribute `form_id` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:521:16
-ERROR Object of class `object` has no attribute `node_id` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:522:16
-ERROR Object of class `object` has no attribute `node_title` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:523:16
-ERROR Object of class `object` has no attribute `form_content` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:524:16
-ERROR Object of class `object` has no attribute `display_in_ui` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:525:16
-ERROR Object of class `object` has no attribute `form_token` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:526:16
-ERROR Object of class `object` has no attribute `resolved_default_values` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:527:16
-ERROR Object of class `object` has no attribute `expiration_time` [missing-attribute]
- --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:528:16
ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
--> tests/e2e_tests/containers/repositories/test_sqlalchemy_workflow_node_execution_repository.py:184:23
ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
@@ -537,23 +477,23 @@
ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `dsl_dependencies` with type `list[PluginDependency]` in function `services.app_dsl_service.AppDslService.get_leaked_dependencies` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_app_dsl_service.py:1618:73
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:196:38
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:199:38
ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.workflow.Workflow.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:223:24
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:226:24
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:497:23
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:500:23
ERROR Argument `Literal['invalid_mode']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:576:20
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:579:20
WARN Module `sqlalchemy.exc` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:583:41
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:586:41
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `args` with type `LoopNodeRunPayload` in function `services.app_generate_service.AppGenerateService.generate_single_loop` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:837:18
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:840:18
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `args` with type `LoopNodeRunPayload` in function `services.app_generate_service.AppGenerateService.generate_single_loop` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:869:18
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:872:18
ERROR Argument `dict[str, dict[str, str]]` is not assignable to parameter `args` with type `LoopNodeRunPayload` in function `services.app_generate_service.AppGenerateService.generate_single_loop` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:900:22
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:903:22
ERROR Argument `Literal['agent-chat']` is not assignable to parameter `value` with type `AppMode | SQLCoreOperations[AppMode]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_app_generate_service.py:1017:20
+ --> tests/e2e_tests/containers/services/test_app_generate_service.py:1020:20
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
--> tests/e2e_tests/containers/services/test_app_service.py:86:38
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
@@ -685,17 +625,27 @@
ERROR Argument `Literal['web-app']` is not assignable to parameter `invoke_from` with type `InvokeFrom | SQLCoreOperations[InvokeFrom | None] | None` in function `models.model.Message.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_audio_service_db.py:94:21
ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_conversation_service.py:50:18
+ --> tests/e2e_tests/containers/services/test_conversation_service.py:52:18
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_conversation_service.py:51:23
+ --> tests/e2e_tests/containers/services/test_conversation_service.py:53:23
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_conversation_service.py:106:20
+ --> tests/e2e_tests/containers/services/test_conversation_service.py:108:20
ERROR Argument `Literal['debugger', 'explore', 'openapi', 'published', 'service-api', 'trigger', 'validation', 'web-app']` is not assignable to parameter `invoke_from` with type `InvokeFrom | SQLCoreOperations[InvokeFrom | None] | None` in function `models.model.Conversation.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_conversation_service.py:107:25
+ --> tests/e2e_tests/containers/services/test_conversation_service.py:109:25
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `MessageStatus | SQLCoreOperations[MessageStatus]` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_conversation_service.py:153:20
+ --> tests/e2e_tests/containers/services/test_conversation_service.py:155:20
ERROR Argument `Literal[core.app.entities.app_invoke_entities.InvokeFrom.WEB_APP]` is not assignable to parameter `invoke_from` with type `models.enums.InvokeFrom | SQLCoreOperations[models.enums.InvokeFrom | None] | None` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_conversation_service.py:154:25
+ --> tests/e2e_tests/containers/services/test_conversation_service.py:156:25
+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/e2e_tests/containers/services/test_conversation_service_variables.py:45:18
+ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:55:18
+ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:56:23
+ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:113:20
+ERROR Argument `Literal['debugger', 'explore', 'openapi', 'published', 'service-api', 'trigger', 'validation', 'web-app']` is not assignable to parameter `invoke_from` with type `InvokeFrom | SQLCoreOperations[InvokeFrom | None] | None` in function `models.model.Conversation.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:114:25
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_dataset_permission_service.py:39:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -749,53 +699,57 @@
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_end_user_service.py:430:27
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:131:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:130:20
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:132:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:131:20
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:202:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:201:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:203:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:202:16
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:511:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:510:20
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:512:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:511:20
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:600:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:599:20
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:601:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:600:20
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
+ --> tests/e2e_tests/containers/services/test_feature_service.py:698:20
+ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
--> tests/e2e_tests/containers/services/test_feature_service.py:699:20
+ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
+ --> tests/e2e_tests/containers/services/test_feature_service.py:746:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:700:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:747:16
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:740:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:795:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:741:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:796:16
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:857:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:912:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:858:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:913:16
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1176:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1231:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1177:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1232:16
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1287:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1342:20
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1288:20
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1343:20
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1496:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1551:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1497:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1552:16
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1550:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1608:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1551:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1609:16
ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1653:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1715:16
ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_feature_service.py:1654:16
+ --> tests/e2e_tests/containers/services/test_feature_service.py:1716:16
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_file_service.py:67:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -815,6 +769,18 @@
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_message_export_service.py:96:20
ERROR Cannot index into `bool` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:47:12
+ERROR Cannot index into `float` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:47:12
+ERROR Cannot index into `int` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:47:12
+ERROR Cannot index into `list[JsonValue]` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:47:12
+ERROR Cannot index into `str` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:47:12
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:47:12
+ERROR Cannot index into `bool` [bad-index]
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:48:12
ERROR Cannot index into `float` [bad-index]
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:48:12
@@ -863,17 +829,17 @@
ERROR `None` is not subscriptable [unsupported-operation]
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:51:12
ERROR Cannot index into `bool` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:52:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:54:12
ERROR Cannot index into `float` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:52:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:54:12
ERROR Cannot index into `int` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:52:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:54:12
ERROR Cannot index into `list[JsonValue]` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:52:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:54:12
ERROR Cannot index into `str` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:52:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:54:12
ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:52:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:54:12
ERROR Cannot index into `bool` [bad-index]
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:55:12
ERROR Cannot index into `float` [bad-index]
@@ -911,17 +877,29 @@
ERROR `None` is not subscriptable [unsupported-operation]
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:57:12
ERROR Cannot index into `bool` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:58:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:96:12
ERROR Cannot index into `float` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:58:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:96:12
ERROR Cannot index into `int` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:58:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:96:12
ERROR Cannot index into `list[JsonValue]` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:58:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:96:12
ERROR Cannot index into `str` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:58:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:96:12
ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:58:12
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:96:12
+ERROR Cannot index into `bool` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:97:12
+ERROR Cannot index into `float` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:97:12
+ERROR Cannot index into `int` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:97:12
+ERROR Cannot index into `list[JsonValue]` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:97:12
+ERROR Cannot index into `str` [bad-index]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:97:12
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:97:12
ERROR Cannot index into `bool` [bad-index]
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:98:12
ERROR Cannot index into `float` [bad-index]
@@ -958,62 +936,38 @@
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:100:12
ERROR `None` is not subscriptable [unsupported-operation]
--> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:100:12
-ERROR Cannot index into `bool` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:101:12
-ERROR Cannot index into `float` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:101:12
-ERROR Cannot index into `int` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:101:12
-ERROR Cannot index into `list[JsonValue]` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:101:12
-ERROR Cannot index into `str` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:101:12
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:101:12
-ERROR Cannot index into `bool` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:102:12
-ERROR Cannot index into `float` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:102:12
-ERROR Cannot index into `int` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:102:12
-ERROR Cannot index into `list[JsonValue]` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:102:12
-ERROR Cannot index into `str` [bad-index]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:102:12
-ERROR `None` is not subscriptable [unsupported-operation]
- --> tests/e2e_tests/containers/services/test_message_service_execution_extra_content.py:102:12
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `MessageStatus | SQLCoreOperations[MessageStatus]` in function `models.model.Message.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_message_service_extra_contents.py:44:16
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:129:20
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:128:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:137:20
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:136:20
ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:160:18
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:159:18
ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:182:18
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:181:18
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:185:20
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:184:20
ERROR Argument `Literal['local_file']` is not assignable to parameter `transfer_method` with type `FileTransferMethod | SQLCoreOperations[FileTransferMethod]` in function `models.model.MessageFile.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:267:29
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:266:29
ERROR Argument `Literal['end_user']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageFile.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:270:29
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:269:29
ERROR Argument `Literal['end_user']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.web.SavedMessage.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:279:29
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:278:29
ERROR Object of class `str` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:613:13
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:628:13
ERROR Object of class `str` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:614:13
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:632:13
ERROR Object of class `str` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:901:13
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:942:13
ERROR Object of class `str` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:902:13
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:946:13
ERROR Object of class `str` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:903:13
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:950:13
ERROR Object of class `str` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:907:22
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:957:22
ERROR Object of class `str` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_messages_clean_service.py:907:52
+ --> tests/e2e_tests/containers/services/test_messages_clean_service.py:957:52
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_model_load_balancing_service.py:84:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -1165,37 +1119,37 @@
ERROR Argument `str | None` is not assignable to parameter `user_id` with type `str` in function `services.workflow_draft_variable_service.WorkflowDraftVariableService.get_node_variable` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_workflow_draft_variable_service.py:935:21
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:124:38
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:123:38
ERROR Argument `str | Unknown` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowRunTriggeredFrom] | WorkflowRunTriggeredFrom` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:153:28
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:152:28
ERROR Argument `Literal['succeeded']` is not assignable to parameter `status` with type `SQLCoreOperations[WorkflowExecutionStatus] | WorkflowExecutionStatus` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:157:20
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:156:20
ERROR Argument `float` is not assignable to parameter `value` with type `Decimal | SQLCoreOperations[Decimal]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:210:38
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:209:38
ERROR Argument `float` is not assignable to parameter `value` with type `Decimal | SQLCoreOperations[Decimal]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:211:37
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:210:37
ERROR Argument `float` is not assignable to parameter `value` with type `Decimal | SQLCoreOperations[Decimal]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:212:38
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:211:38
ERROR Argument `float` is not assignable to parameter `value` with type `Decimal | SQLCoreOperations[Decimal]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:213:37
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:212:37
ERROR Argument `Literal['normal']` is not assignable to parameter `value` with type `MessageStatus | SQLCoreOperations[MessageStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:215:26
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:214:26
ERROR Argument `dict[str, int | None]` is not assignable to parameter `args` with type `WorkflowRunListArgs` in function `services.workflow_run_service.WorkflowRunService.get_paginate_workflow_runs` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:256:18
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:255:18
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `args` with type `WorkflowRunListArgs` in function `services.workflow_run_service.WorkflowRunService.get_paginate_workflow_runs` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:349:18
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:348:18
ERROR Argument `dict[str, int | None]` is not assignable to parameter `args` with type `WorkflowRunListArgs` in function `services.workflow_run_service.WorkflowRunService.get_paginate_advanced_chat_workflow_runs` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:400:18
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:399:18
ERROR Argument `Literal['workflow-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowNodeExecutionTriggeredFrom] | WorkflowNodeExecutionTriggeredFrom` in function `models.workflow.WorkflowNodeExecutionModel.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:519:32
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:518:32
ERROR Argument `Literal['workflow-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowNodeExecutionTriggeredFrom] | WorkflowNodeExecutionTriggeredFrom` in function `models.workflow.WorkflowNodeExecutionModel.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:541:28
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:540:28
ERROR Object of class `NoneType` has no attribute `startswith` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:581:20
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:580:20
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:619:38
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:618:38
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
- --> tests/e2e_tests/containers/services/test_workflow_run_service.py:671:38
+ --> tests/e2e_tests/containers/services/test_workflow_run_service.py:670:38
ERROR Argument `str | None` is not assignable to parameter `value` with type `SQLCoreOperations[str] | str` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_workflow_service.py:81:21
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
@@ -1649,21 +1603,21 @@
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/trigger/conftest.py:66:19
ERROR Argument `dict[str, str | dict[str, str | dict[str, str]]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:306:21
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:304:21
ERROR Argument `MockPluginSubscription` is not assignable to parameter `subscription` with type `TriggerSubscription` in function `tasks.trigger_processing_tasks.dispatch_trigger_debug_event` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:357:26
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:355:26
ERROR Argument `dict[str, str | dict[str, dict[Unknown, Unknown] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:471:21
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:469:21
ERROR Argument `dict[str, Any]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.schedule_service.ScheduleService.to_schedule_config` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:666:49
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:664:49
ERROR Argument `Literal['api-key']` is not assignable to parameter `credential_type` with type `CredentialType | SQLCoreOperations[CredentialType]` in function `models.trigger.TriggerSubscription.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:735:25
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:733:25
ERROR Cannot set item in `str` [unsupported-operation]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:741:5
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:739:5
ERROR Argument `Literal['api-key']` is not assignable to parameter `credential_type` with type `CredentialType | SQLCoreOperations[CredentialType]` in function `models.trigger.TriggerSubscription.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:832:25
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:830:25
ERROR Argument `dict[str, str | dict[str, dict[Unknown, Unknown] | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
- --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:859:21
+ --> tests/e2e_tests/containers/trigger/test_trigger_e2e.py:857:21
ERROR Class member `StaticRepo.get_form` overrides parent class `HumanInputFormRepository` in an inconsistent manner [bad-override]
--> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:137: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]
@@ -2116,8 +2070,6 @@
--> tests/helpers/workflow/table_runner.py:389:23
ERROR `graph_runtime_state` is uninitialized [unbound-name]
--> tests/helpers/workflow/table_runner.py:390:37
-WARN `URLError` is already caught earlier in this `try` statement, so it never matches here [unreachable-except-clause]
- --> tests/pytest_dify.py:155:34
ERROR Object of class `object` has no attribute `package` [missing-attribute]
--> tests/unit_tests/commands/test_data_migration.py:218:16
ERROR Object of class `object` has no attribute `options_override` [missing-attribute]
@@ -2198,6 +2150,12 @@
--> tests/unit_tests/controllers/console/app/test_audio.py:357:21
WARN Identity comparison `False is False` is always True [unnecessary-comparison]
--> tests/unit_tests/controllers/console/app/test_audio.py:437:31
+ERROR Argument `Literal[core.app.entities.app_invoke_entities.InvokeFrom.EXPLORE]` is not assignable to parameter `invoke_from` with type `models.enums.InvokeFrom | SQLCoreOperations[models.enums.InvokeFrom | None] | None` in function `models.model.Message.__init__` [bad-argument-type]
+ --> tests/unit_tests/controllers/console/app/test_conversation.py:189:21
+WARN Module `sqlalchemy.sql.selectable` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
+ --> tests/unit_tests/controllers/console/app/test_conversation.py:305:22
+WARN Module `sqlalchemy.sql.selectable` exists, but was not imported explicitly. You are relying on other modules to load it. [implicit-import]
+ --> tests/unit_tests/controllers/console/app/test_conversation.py:325:27
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
--> tests/unit_tests/controllers/console/app/test_message.py:58:16
ERROR Argument `Literal[core.app.entities.app_invoke_entities.InvokeFrom.DEBUGGER]` is not assignable to parameter `invoke_from` with type `models.enums.InvokeFrom | SQLCoreOperations[models.enums.InvokeFrom | None] | None` in function `models.model.Conversation.__init__` [bad-argument-type]
@@ -2220,30 +2178,12 @@
--> tests/unit_tests/controllers/console/app/test_message.py:147:16
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
--> tests/unit_tests/controllers/console/app/test_message.py:150:16
+ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
+ --> tests/unit_tests/controllers/console/app/test_model_config.py:722:51
ERROR Argument `str | None` is not assignable to parameter `s` with type `bytearray | bytes | str` in function `json.loads` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_model_config.py:891:36
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:325:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:336:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:365:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:390:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:431:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:461:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:488:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:529:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:592:34
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/app/test_workflow.py:613:34
+ --> tests/unit_tests/controllers/console/app/test_model_config.py:892:36
ERROR Object of class `WorkflowRun` has no attribute `retry_index` [missing-attribute]
- --> tests/unit_tests/controllers/console/app/test_workflow_run.py:222:5
+ --> tests/unit_tests/controllers/console/app/test_workflow_run.py:217:5
ERROR Missing argument `app_model` in function `handler` [missing-argument]
--> tests/unit_tests/controllers/console/app/test_wraps.py:41:19
ERROR Unexpected keyword argument `app_id` in function `handler` [unexpected-keyword]
@@ -2300,14 +2240,8 @@
--> tests/unit_tests/controllers/console/auth/test_email_register.py:236:12
ERROR Object of class `FunctionType` has no attribute `side_effect` [missing-attribute]
--> tests/unit_tests/controllers/console/auth/test_email_register.py:268:5
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_datasource_auth.py:828:33
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
--> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:83:9
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:303:25
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline.py:334:25
ERROR Unexpected keyword argument `created_at` in function `models.workflow.WorkflowNodeExecutionModel.__init__` [unexpected-keyword]
--> tests/unit_tests/controllers/console/datasets/rag_pipeline/test_rag_pipeline_workflow.py:876:9
ERROR Argument `datetime | None` is not assignable to parameter `value` with type `SQLCoreOperations[datetime] | datetime` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
@@ -2398,18 +2332,18 @@
--> tests/unit_tests/controllers/console/datasets/test_external.py:86:17
ERROR Argument `UUID` is not assignable to parameter `object` with type `ExternalKnowledgeApiPayload` in function `list.append` [bad-argument-type]
--> tests/unit_tests/controllers/console/datasets/test_external.py:88:21
+ERROR Argument `UUID` is not assignable to parameter `object` with type `RequestContext` in function `list.append` [bad-argument-type]
+ --> tests/unit_tests/controllers/console/datasets/test_external.py:88:21
+ERROR Argument `Literal['api', 'console']` is not assignable to parameter `from_source` with type `ConversationFromSource | SQLCoreOperations[ConversationFromSource]` in function `models.model.Conversation.__init__` [bad-argument-type]
+ --> tests/unit_tests/controllers/console/explore/test_completion.py:818:37
ERROR Generator function should return `Generator` [bad-return]
--> tests/unit_tests/controllers/console/tag/test_tags.py:66:23
ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form._jsonify_form_definition` [bad-argument-type]
--> tests/unit_tests/controllers/console/test_human_input_form.py:94:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form.ConsoleHumanInputFormApi._ensure_console_access` [bad-argument-type]
--> tests/unit_tests/controllers/console/test_human_input_form.py:105:57
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/test_human_input_form.py:131:22
-ERROR Argument `(ParamSpec(Unknown)) -> Response | Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/console/test_human_input_form.py:152:22
ERROR Type `Response` is not iterable [not-iterable]
- --> tests/unit_tests/controllers/console/test_wraps.py:306:17
+ --> tests/unit_tests/controllers/console/test_wraps.py:305:17
ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
--> tests/unit_tests/controllers/console/workspace/test_endpoint.py:235:47
ERROR Missing argument `plugin_id` in function `controllers.console.workspace.endpoint.EndpointListForPluginQuery.__init__` [missing-argument]
@@ -2425,7 +2359,7 @@
ERROR Missing argument `endpoint_id` in function `controllers.console.workspace.endpoint.EndpointIdPayload.__init__` [missing-argument]
--> tests/unit_tests/controllers/console/workspace/test_endpoint.py:561:46
ERROR Argument `Literal['team']` is not assignable to parameter `plan` with type `CloudPlan | None` in function `services.workspace.contracts.EffectiveCreditPool.__init__` [bad-argument-type]
- --> tests/unit_tests/controllers/console/workspace/test_model_providers.py:359:18
+ --> tests/unit_tests/controllers/console/workspace/test_model_providers.py:358:18
ERROR `in` is not supported between `Literal['knowledge-retrieval']` and `object` [not-iterable]
--> tests/unit_tests/controllers/console/workspace/test_snippets.py:213:12
WARN Call to deprecated overload `contextlib.contextmanager` [deprecated]
@@ -2462,34 +2396,36 @@
--> tests/unit_tests/controllers/inner_api/plugin/test_wraps.py:423:35
ERROR Missing argument `payload` in function `protected_view` [missing-argument]
--> tests/unit_tests/controllers/inner_api/plugin/test_wraps.py:429:36
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:77:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:107:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:154:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:202:32
-ERROR Argument `(ParamSpec(Unknown)) -> Unknown` is not assignable to parameter `func` with type `(...) -> Any` in function `inspect.unwrap` [bad-argument-type]
- --> tests/unit_tests/controllers/inner_api/test_runtime_credentials.py:216:32
ERROR Attribute `payload` of class `Namespace` is a read-only property and cannot be set [read-only]
--> tests/unit_tests/controllers/mcp/test_mcp.py:32:5
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
--> tests/unit_tests/controllers/mcp/test_mcp.py:168:17
+ERROR Object of class `UnprocessableEntity` has no attribute `data` [missing-attribute]
+ --> tests/unit_tests/controllers/openapi/test__errors.py:108:9
+ERROR Object of class `UnprocessableEntity` has no attribute `data` [missing-attribute]
+ --> tests/unit_tests/controllers/openapi/test__errors.py:121:16
+ERROR Object of class `UnprocessableEntity` has no attribute `data` [missing-attribute]
+ --> tests/unit_tests/controllers/openapi/test__errors.py:125:9
+ERROR Object of class `UnprocessableEntity` has no attribute `data` [missing-attribute]
+ --> tests/unit_tests/controllers/openapi/test__errors.py:140:9
+ERROR Object of class `FunctionType` has no attribute `__handler__` [missing-attribute]
+ --> tests/unit_tests/controllers/openapi/test_account.py:36:13
+ERROR Object of class `FunctionType` has no attribute `__handler__` [missing-attribute]
+ --> tests/unit_tests/controllers/openapi/test_account.py:69:18
ERROR Object of class `FunctionType` has no attribute `__handler__` [missing-attribute]
--> tests/unit_tests/controllers/openapi/test_app_run.py:192:20
ERROR Object of class `FunctionType` has no attribute `__handler__` [missing-attribute]
--> tests/unit_tests/controllers/openapi/test_app_run.py:195:17
ERROR Object of class `Resource` has no attribute `post` [missing-attribute]
- --> tests/unit_tests/controllers/openapi/test_app_run.py:254:20
+ --> tests/unit_tests/controllers/openapi/test_app_run.py:251:20
ERROR Object of class `Resource` has no attribute `post` [missing-attribute]
- --> tests/unit_tests/controllers/openapi/test_app_run.py:269:13
+ --> tests/unit_tests/controllers/openapi/test_app_run.py:266:13
ERROR Object of class `Resource` has no attribute `post` [missing-attribute]
- --> tests/unit_tests/controllers/openapi/test_app_run.py:302:9
+ --> tests/unit_tests/controllers/openapi/test_app_run.py:299:9
ERROR Object of class `Resource` has no attribute `post` [missing-attribute]
- --> tests/unit_tests/controllers/openapi/test_app_run.py:325:20
+ --> tests/unit_tests/controllers/openapi/test_app_run.py:322:20
ERROR Object of class `Resource` has no attribute `post` [missing-attribute]
- --> tests/unit_tests/controllers/openapi/test_app_run.py:343:20
+ --> tests/unit_tests/controllers/openapi/test_app_run.py:340:20
ERROR Object of class `FunctionType` has no attribute `__hand\n\n... (truncated) ... |
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44997 +/- ##
========================================
Coverage 89.52% 89.53%
========================================
Files 6009 6011 +2
Lines 376843 376966 +123
Branches 76238 76257 +19
========================================
+ Hits 337380 337513 +133
+ Misses 33465 33456 -9
+ Partials 5998 5997 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Important
Fixes #<issue number>.Summary
Fixes #41315
The Service API chunk update (
POST /v1/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}) is a partial update: an omittedcontentkeeps the stored text and omittedattachment_idskeep the stored attachments. For QA (qa_model) documents,SegmentMutationService.update_segmentwroteargs.answeras given instead, so a request withoutanswer(for example a content-only or keywords-only update) savedanswer = NULL. The answer was also left out of the chunk'sword_count(and so the document's) and, when the content changed, out oftokens. The console path is not affected becausevalidate_segment_valuesrequires an answer for QA documents. The high-qualitycan only concatenate strerror from the issue no longer happens on main (the token count already usesargs.answer or ""); the answer loss and the counts remain.The issue leaves open whether to reject such requests with 400 or keep the answer. This keeps it: the mutation service's docstring says partial update arguments are accepted there, and #41777 applied the same rule to
attachment_ids.SegmentUpdateStategets a requiredanswerfield, filled bySQLAlchemySegmentRepository.get_segment_update_state.update_segmentkeepsprevious.answeronly when the request omitsanswer("answer" not in args.model_fields_set), and uses that answer for the saved value,word_countandtokens. An answer the request does send, including""ornull, is saved as sent, exactly as before. Non-QA documents are unchanged.test_service_api_partial_qa_update_uses_shared_word_count_and_indexing(SQLite-backed, real repository) gains content-only and keywords-only cases, plus explicit""andnullanswers, which are saved as sent. The three positionalSegmentUpdateState(...)calls intest_application.pypassNonefor the new field.Tests:
AssertionError: assert None == 'answer'. With it, they pass.tests/unit_tests/services/knowledge/segments,tests/unit_tests/repositories/knowledge/test_segment_repository.py,tests/unit_tests/controllers/service_api/dataset/test_segment.pyandtests/unit_tests/controllers/console/datasets/test_datasets_segments.py: 280 passed and 2 failed (the new omission cases) before the fix, 284 passed after (the explicit""andnullcases pass onmaintoo, and fail if the omission check is replaced byargs.answer or previous.answer).dev/pyrefly-check-localon the two changed modules, pyrefly on the two changed test files,lint-importsand thescripts/check_no_*guards pass.Screenshots
answersavesanswer = NULLword_count, and intokenswhen the content changesChecklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint godsFrom Claude Code