Skip to content

fix: guard against KeyError in update_prompt_message_tool loop#35150

Merged
fatelei merged 2 commits intolanggenius:mainfrom
kuishou68:fix/issue-35149-prompt-tool-keyerror
Apr 17, 2026
Merged

fix: guard against KeyError in update_prompt_message_tool loop#35150
fatelei merged 2 commits intolanggenius:mainfrom
kuishou68:fix/issue-35149-prompt-tool-keyerror

Conversation

@kuishou68
Copy link
Copy Markdown
Contributor

Closes #35149

Problem

In api/core/agent/fc_agent_runner.py (and cot_agent_runner.py), the loop that updates prompt tools after each iteration calls tool_instances[prompt_tool.name] without checking if the key exists. This raises a KeyError if a prompt tool name has no matching entry in tool_instances, crashing the entire agent run.

Fix

Replace the bare dict index with a .get() guard and skip the update if the tool instance isn't found — the same defensive pattern already used in _handle_invoke_action:

# Before
for prompt_tool in prompt_messages_tools:
    self.update_prompt_message_tool(tool_instances[prompt_tool.name], prompt_tool)

# After
for prompt_tool in prompt_messages_tools:
    tool_instance = tool_instances.get(prompt_tool.name)
    if tool_instance:
        self.update_prompt_message_tool(tool_instance, prompt_tool)

@kuishou68 kuishou68 requested a review from QuantumGhost as a code owner April 14, 2026 07:36
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-14 11:45:31.573550196 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-14 11:45:21.384278384 +0000
@@ -1655,41 +1655,41 @@
 ERROR `>` is not supported between `None` and `Literal[0]` [unsupported-operation]
    --> tests/test_containers_integration_tests/tasks/test_batch_create_segment_to_index_task.py:708: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/test_containers_integration_tests/tasks/test_clean_dataset_task.py:113:20
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:112: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/test_containers_integration_tests/tasks/test_clean_dataset_task.py:123:20
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:122:20
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:298:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:297:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:301:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:300:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:422:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:409:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:425:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:412:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:498:36
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:477:36
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:501:26
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:480:26
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:555:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:532:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:558:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:535:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:644:36
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:617:36
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:647:26
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:620:26
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:761:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:730:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:764:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:733:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:855:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:816:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:858:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:819:22
 ERROR Argument `IndexTechniqueType | None` is not assignable to parameter `indexing_technique` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1012:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:971:32
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
+   --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:974:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:90:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
@@ -1769,21 +1769,21 @@
 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/test_containers_integration_tests/tasks/test_disable_segment_from_index_task.py:64:20
 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/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:54:20
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:53:20
 ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:59:9
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:58:9
 ERROR Object of class `Account` has no attribute `type` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:60:9
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:59:9
 ERROR `Literal['owner']` is not assignable to attribute `role` with type `TenantAccountRole | None` [bad-assignment]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:61:24
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:60:24
 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/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:71:20
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:70:20
 ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:73:21
+  --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:72:21
 ERROR Object of class `DatasetProcessRule` has no attribute `tenant_id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:234:9
+   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:233:9
 ERROR Object of class `DatasetProcessRule` has no attribute `updated_by` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:246:9
+   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:245:9
 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/test_containers_integration_tests/tasks/test_document_indexing_sync_task.py:33: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]
@@ -1797,9 +1797,9 @@
 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/test_containers_integration_tests/tasks/test_document_indexing_task.py:163:20
 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/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:44:20
+  --> tests/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:43: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/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:49:53
+  --> tests/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:48:53
 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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.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]
@@ -5793,7 +5793,7 @@
 ERROR Cannot index into `object` [bad-index]
    --> tests/unit_tests/extensions/otel/test_celery_sqlcommenter.py:140:20
 ERROR Object of class `Retry` has no attribute `_retries` [missing-attribute]
-  --> tests/unit_tests/extensions/test_redis.py:34:16
+  --> tests/unit_tests/extensions/test_redis.py:31:16
 ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._models.Response.__init__` [bad-argument-type]
   --> tests/unit_tests/factories/test_build_from_mapping.py:75:21
 ERROR Object of class `NoneType` has no attribute `storage_key` [missing-attribute]
@@ -5814,44 +5814,36 @@
    --> tests/unit_tests/libs/_human_input/test_models.py:122:16
 ERROR `<=` is not supported between `None` and `datetime` [unsupported-operation]
    --> tests/unit_tests/libs/_human_input/test_models.py:122:16
-ERROR Object of class `Subscription` has no attribute `_start_if_needed` [missing-attribute]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:158:17
-ERROR Object of class `Subscription` has no attribute `_start_if_needed` [missing-attribute]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:226:17
 ERROR Argument `FakeRedisClient` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis._subscription.RedisSubscriptionBase.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:699:20
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:655:20
 ERROR Argument `FakeRedisClient` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis._subscription.RedisSubscriptionBase.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:719:20
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:675:20
 ERROR Argument `TestRedisShardedSubscription.test_get_message_uses_target_node_for_cluster_client.DummyRedisCluster` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis._subscription.RedisSubscriptionBase.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:903:20
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:859:20
 ERROR Argument `FakeRedisClient` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis._subscription.RedisSubscriptionBase.__init__` [bad-argument-type]
-    --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:1033:20
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:989:20
 ERROR Argument `FakeRedisClient` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis._subscription.RedisSubscriptionBase.__init__` [bad-argument-type]
-    --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:1131:24
-ERROR Argument `FakeStreamsRedis` is not assignable to parameter `redis_client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel.StreamsBroadcastChannel.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:130:36
+    --> tests/unit_tests/libs/broadcast_channel/redis/test_channel_unit_tests.py:1087:24
 ERROR Argument `FakeStreamsRedis` is not assignable to parameter `redis_client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel.StreamsBroadcastChannel.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:158:45
-ERROR Argument `FakeStreamsRedis` is not assignable to parameter `redis_client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel.StreamsBroadcastChannel.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:166:45
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:129:36
 ERROR Argument `FailExpireRedis` is not assignable to parameter `redis_client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel.StreamsBroadcastChannel.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:180:43
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:160:43
 ERROR Argument `FakeStreamsRedis` is not assignable to parameter `redis_client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel.StreamsBroadcastChannel.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:231:43
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:211:43
 ERROR Argument `TestStreamsSubscription.test_listener_normalizes_supported_payloads_and_ignores_unsupported_shapes.OneShotRedis` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel._StreamsSubscription.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:256:45
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:236:45
 ERROR Argument `object` is not assignable to parameter `o` with type `Buffer | Iterable[SupportsIndex] | SupportsBytes | SupportsIndex` in function `bytes.__new__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:264:35
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:244:35
 ERROR Argument `FakeStreamsRedis` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel._StreamsSubscription.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:305:45
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:285:45
 ERROR Argument `FakeStreamsRedis` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel._StreamsSubscription.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:313:45
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:293:45
 ERROR Argument `FakeStreamsRedis` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel._StreamsSubscription.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:322:45
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:302:45
 ERROR Argument `FakeStreamsRedis` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel._StreamsSubscription.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:330:45
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:310:45
 ERROR Argument `BlockingRedis` is not assignable to parameter `client` with type `Redis[Unknown] | RedisCluster[Unknown]` in function `libs.broadcast_channel.redis.streams_channel._StreamsSubscription.__init__` [bad-argument-type]
-   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:350:45
+   --> tests/unit_tests/libs/broadcast_channel/redis/test_streams_channel_unit_tests.py:330:45
 ERROR Argument `VisualConfig | str` is not assignable to parameter `frequency` with type `str` in function `services.trigger.schedule_service.ScheduleService.visual_to_cron` [bad-argument-type]
    --> tests/unit_tests/libs/test_cron_compatibility.py:318:60
 ERROR Argument `VisualConfig | str` is not assignable to parameter `visual_config` with type `VisualConfig` in function `services.trigger.schedule_service.ScheduleService.visual_to_cron` [bad-argument-type]

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 14, 2026
@crazywoola crazywoola added this pull request to the merge queue Apr 14, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-17 06:49:36.323861314 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-17 06:49:25.914888892 +0000
@@ -1,9 +1,5 @@
-ERROR Object of class `Server` has no attribute `app` [missing-attribute]
-   --> app_factory.py:132:5
 ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
-   --> controllers/console/app/app.py:552:13
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> controllers/console/app/conversation_variables.py:48:24
+   --> controllers/console/app/app.py:561:13
 ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
   --> controllers/console/auth/email_register.py:75:108
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
@@ -16,12 +12,8 @@
   --> controllers/console/setup.py:40:2
 ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
   --> controllers/console/setup.py:65:2
-ERROR Object of class `Server` has no attribute `app` [missing-attribute]
-  --> controllers/console/socketio/workflow.py:45:14
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
   --> controllers/console/version.py:30:2
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> controllers/service_api/app/conversation.py:87:24
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
@@ -47,25 +39,25 @@
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[SystemPromptMessage | UserPromptMessage], model_parameters=dict[str, float], stream=Literal[False]) [no-matching-overload]
    --> core/llm_generator/llm_generator.py:582:60
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:171:17
+   --> core/model_manager.py:172:17
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:196:13
+   --> core/model_manager.py:197:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:216:13
+   --> core/model_manager.py:217:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:238:13
+   --> core/model_manager.py:239:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:255:13
+   --> core/model_manager.py:256:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:280:13
+   --> core/model_manager.py:281:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:308:13
+   --> core/model_manager.py:309:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:327:13
+   --> core/model_manager.py:328:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:343:13
+   --> core/model_manager.py:344:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:360:13
+   --> core/model_manager.py:361:13
 ERROR Argument `dict[str, list[str] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
    --> core/ops/mlflow_trace/mlflow_trace.py:271:24
 ERROR Argument `dict[str, dict[str, Any] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
@@ -86,6 +78,18 @@
    --> core/rag/datasource/keyword/jieba/jieba.py:157:29
 ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
   --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:116:61
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:126:62
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:152:61
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:158:62
+ERROR `response` may be uninitialized [unbound-name]
+   --> core/rag/extractor/firecrawl/firecrawl_app.py:183:16
+ERROR `response` may be uninitialized [unbound-name]
+   --> core/rag/extractor/firecrawl/firecrawl_app.py:192:16
 ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.post` [bad-argument-type]
    --> core/rag/extractor/notion_extractor.py:106:25
 ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.request` [bad-argument-type]
@@ -113,7 +117,7 @@
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/qa_index_processor.py:209:16
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[SystemPromptMessage | UserPromptMessage], tools=list[PromptMessageTool], stream=Literal[False], model_parameters=dict[str, float | int]) [no-matching-overload]
-  --> core/rag/retrieval/router/multi_dataset_function_call_router.py:31:58
+  --> core/rag/retrieval/router/multi_dataset_function_call_router.py:32:58
 ERROR Class member `MCPToolProviderController.entity` overrides parent class `ToolProviderController` in an inconsistent manner [bad-override]
   --> core/tools/mcp_tool/provider.py:33:14
 ERROR Class member `PluginToolProviderController.entity` overrides parent class `BuiltinToolProviderController` in an inconsistent manner [bad-override]
@@ -126,8 +130,6 @@
   --> extensions/storage/huawei_obs_storage.py:27:23
 ERROR Cannot index into `Literal['']` [bad-index]
   --> extensions/storage/huawei_obs_storage.py:31:20
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> fields/conversation_variable_fields.py:60:24
 ERROR Argument `Module[Crypto.Hash.SHA1] | Unknown` is not assignable to parameter with type `Hash | HashModule` [bad-argument-type]
   --> libs/gmpy2_pkcs10aep_cipher.py:73:49
 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]
@@ -609,15 +611,15 @@
 ERROR Class member `DuplicateDocumentIndexingTaskProxy.PRIORITY_TASK_FUNC` overrides parent class `BatchDocumentIndexingProxy` in an inconsistent manner [bad-override]
   --> services/document_indexing_proxy/duplicate_document_indexing_task_proxy.py:15:5
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | int | Any` is not assignable to parameter `top_k` with type `int` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:85:19
+  --> services/hit_testing_service.py:86:19
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | float | int | Any` is not assignable to parameter `score_threshold` with type `float | None` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:86:29
+  --> services/hit_testing_service.py:87:29
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | int | Any | None` is not assignable to parameter `reranking_model` with type `RerankingModelDict | None` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:89:29
+  --> services/hit_testing_service.py:90:29
 ERROR Argument `Literal['reranking_model', True] | RetrievalMethod | dict[str, str] | int | Any` is not assignable to parameter `reranking_mode` with type `str` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:92:28
+  --> services/hit_testing_service.py:93:28
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | int | Any | None` is not assignable to parameter `weights` with type `WeightsDict | None` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:93:21
+  --> services/hit_testing_service.py:94:21
 ERROR `handled_tenant_count` was assigned in the current scope before the nonlocal declaration [unknown-name]
   --> services/plugin/plugin_migration.py:92:34
 ERROR `dict[str, Any]` is not assignable to attribute `credentials` with type `Never` [bad-assignment]
@@ -638,12 +640,14 @@
   --> tests/integration_tests/controllers/console/app/test_feedback_export_api.py:32:22
 ERROR Argument `Literal['normal']` is not assignable to parameter `value` with type `AppStatus | SQLCoreOperations[AppStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
   --> tests/integration_tests/controllers/console/app/test_model_config_permissions.py:28:22
+ERROR Attribute `current_tenant_id` of class `Account` is a read-only property and cannot be set [read-only]
+  --> tests/integration_tests/controllers/console/workspace/test_trigger_provider_permissions.py:46:9
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
-  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:75:21
+  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:76:21
 ERROR Argument `_GP` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.nodes.datasource.datasource_node.DatasourceNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:85:27
+  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:86:27
 ERROR Argument `_GS` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.workflow.nodes.datasource.datasource_node.DatasourceNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:86:29
+  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:87:29
 ERROR Could not import `Overflow` from `libs.broadcast_channel.channel` [missing-module-attribute]
   --> tests/integration_tests/libs/broadcast_channel/redis/utils/test_data.py:11:44
 ERROR `unpatch` may be uninitialized [unbound-name]
@@ -664,6 +668,8 @@
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:651:21
 ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:817:21
+ERROR Argument `Literal['unsupported_language']` is not assignable to parameter `language` with type `CodeLanguage` in function `core.helper.code_executor.code_executor.CodeExecutor.execute_workflow_code_template` [bad-argument-type]
+  --> tests/integration_tests/workflow/nodes/code_executor/test_code_executor.py:10:62
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.code.code_node.CodeNode.__init__` [bad-argument-type]
   --> tests/integration_tests/workflow/nodes/test_code.py:68:16
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
@@ -671,27 +677,31 @@
 ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
   --> tests/integration_tests/workflow/nodes/test_http.py:84:35
 ERROR Argument `dict[str, dict[str, dict[str, dict[str, str] | str] | str | Unknown | None] | str] | dict[str, dict[str, str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
-   --> tests/integration_tests/workflow/nodes/test_http.py:727:16
+   --> tests/integration_tests/workflow/nodes/test_http.py:728:16
 ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
-   --> tests/integration_tests/workflow/nodes/test_http.py:732:35
+   --> tests/integration_tests/workflow/nodes/test_http.py:733:35
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.llm.node.LLMNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_llm.py:79:16
+  --> tests/integration_tests/workflow/nodes/test_llm.py:80:16
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.parameter_extractor.parameter_extractor_node.ParameterExtractorNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:73:16
+  --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:74:16
 ERROR Argument `dict[str, dict[str, list[dict[str, list[str] | str]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_template_transform.py:90:16
+  --> tests/integration_tests/workflow/nodes/test_template_transform.py:91:16
 ERROR Argument `_SimpleJinja2Renderer` is not assignable to parameter `jinja2_template_renderer` with type `Jinja2TemplateRenderer` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_template_transform.py:93:34
+  --> tests/integration_tests/workflow/nodes/test_template_transform.py:94:34
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.tool.tool_node.ToolNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_tool.py:64:16
+  --> tests/integration_tests/workflow/nodes/test_tool.py:65:16
 ERROR `dict[str, str | None]` is not assignable to attribute `env` with type `dict[str, str]` [bad-assignment]
    --> tests/test_containers_integration_tests/conftest.py:204:39
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
-   --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:633:51
+   --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:632:51
+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/test_containers_integration_tests/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:196:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
+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/test_containers_integration_tests/controllers/console/helpers.py:40:48
 ERROR `SimpleNamespace` is not assignable to attribute `mcp_ns` with type `Namespace` [bad-assignment]
   --> tests/test_containers_integration_tests/controllers/mcp/test_mcp.py:27:21
 ERROR Attribute `payload` of class `Namespace` is a read-only property and cannot be set [read-only]
@@ -704,8 +714,6 @@
    --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:183:29
 ERROR Missing argument `tag_id` in function `controllers.service_api.dataset.dataset.TagDeletePayload.__init__` [missing-argument]
    --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:195:29
-ERROR `in` is not supported between `Literal['webapp-logo']` and `None` [not-iterable]
-   --> tests/test_containers_integration_tests/controllers/web/test_site.py:133:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:74:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
@@ -720,6 +728,10 @@
    --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:162:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
    --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:179:33
+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/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
+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/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:104:20
 ERROR Attribute `file_service` of class `TestPauseStatePersistenceLayerTestContainers` is a read-only descriptor with no `__set__` and cannot be set [read-only]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:156:9
 ERROR Attribute `workflow_run_service` of class `TestPauseStatePersistenceLayerTestContainers` is a read-only descriptor with no `__set__` and cannot be set [read-only]
@@ -802,18 +814,26 @@
    --> tests/test_containers_integration_tests/core/rag/retrieval/test_dataset_retrieval_integration.py:574: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:584:23
+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/test_containers_integration_tests/core/repositories/test_human_input_form_repository_impl.py:32:48
+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/test_containers_integration_tests/core/repositories/test_human_input_form_repository_impl.py:42:20
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:105:40
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:120:40
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:134:38
+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/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:178:20
+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/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:187:20
 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:264: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:270: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
+  --> tests/test_containers_integration_tests/helpers/execution_extra_content.py:49:14
 ERROR Object of class `TypeEngine` has no attribute `length` [missing-attribute]
    --> tests/test_containers_integration_tests/models/test_types_enum_text.py:104:16
 ERROR Object of class `NoneType` has no attribute `user_type` [missing-attribute]
@@ -886,6 +906,12 @@
     --> tests/test_containers_integration_tests/services/test_account_service.py:2320:33
 ERROR TypedDict `TenantCustomConfigDict` does not have key `feature_flags` [bad-typed-dict-key]
     --> tests/test_containers_integration_tests/services/test_account_service.py:2321:33
+ERROR Argument `Literal['pending']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:2854:35
+ERROR Argument `Literal['active']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:2944:35
+ERROR Argument `Literal['archive']` is not assignable to parameter `value` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:3334:25
 ERROR Argument `dict[str, AppMode | str] | dict[str, str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_advanced_prompt_template_service.py:701:63
 ERROR Argument `dict[str, AppMode | str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
@@ -909,15 +935,15 @@
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_agent_service.py:800:24
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_agent_service.py:894:29
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:895:29
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_agent_service.py:963:29
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:964:29
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_agent_service.py:964:24
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:965:24
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/services/test_agent_service.py:1004:29
+    --> tests/test_containers_integration_tests/services/test_agent_service.py:1005:29
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/services/test_agent_service.py:1005:24
+    --> tests/test_containers_integration_tests/services/test_agent_service.py:1006:24
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_annotation_service.py:102:38
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
@@ -1114,8 +1140,6 @@
     --> tests/test_containers_integration_tests/services/test_app_service.py:1294:41
 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/services/test_conversation_service.py:43:18
-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/services/test_conversation_service_variables.py:46:18
 ERROR Object of class `NoneType` has no attribute `quota_used` [missing-attribute]
   --> tests/test_containers_integration_tests/services/test_credit_pool_service.py:90:16
 ERROR Object of class `NoneType` has no attribute `quota_used` [missing-attribute]
@@ -1141,12 +1165,6 @@
 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/test_containers_integration_tests/services/test_dataset_service_get_segments.py:44:62
 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/test_containers_integration_tests/services/test_dataset_service_permissions.py:37: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/test_containers_integration_tests/services/test_dataset_service_permissions.py:39:58
-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/test_containers_integration_tests/services/test_dataset_service_permissions.py:66:20
-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/test_containers_integration_tests/services/test_dataset_service_retrieval.py:45: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/test_containers_integration_tests/services/test_dataset_service_retrieval.py:49:20
@@ -1156,6 +1174,10 @@
    --> tests/test_containers_integration_tests/services/test_dataset_service_retrieval.py:156:29
 ERROR Argument `Literal['knowledge']` is not assignable to parameter `type` with type `SQLCoreOperations[TagType] | TagType` in function `models.model.Tag.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_dataset_service_retrieval.py:179:18
+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/test_containers_integration_tests/services/test_dataset_service_update_dataset.py:29: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/test_containers_integration_tests/services/test_dataset_service_update_dataset.py:34:61
 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/services/test_end_user_service.py:37:18
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -1248,7 +1270,7 @@
    --> tests/test_containers_integration_tests/services/test_model_provider_service.py:187:24
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
   --> tests/test_containers_integration_tests/services/test_ops_service.py:59:13
-ERROR Argument `dict[str, Any] | dict[Unknown, Unknown] | object | None` is not assignable to parameter `tracing_config` with type `SQLCoreOperations[dict[str, Any] | None] | dict[str, Any] | None` in function `models.model.TraceAppConfig.__init__` [bad-argument-type]
+ERROR Argument `dict[Unknown, Unknown] | object | None` is not assignable to parameter `tracing_config` with type `SQLCoreOperations[dict[Unknown, Unknown] | None] | dict[Unknown, Unknown] | None` in function `models.model.TraceAppConfig.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_ops_service.py:84:28
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/test_containers_integration_tests/services/test_recommended_app_service.py:198:16
@@ -1281,16 +1303,6 @@
 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/test_containers_integration_tests/services/test_saved_message_service.py:602:67
 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/test_containers_integration_tests/services/test_schedule_service.py:30: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/test_containers_integration_tests/services/test_schedule_service.py:32:58
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:319:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:353:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:382:22
-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/test_containers_integration_tests/services/test_tag_service.py:59: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/test_containers_integration_tests/services/test_tag_service.py:68:20
@@ -1378,10 +1390,6 @@
    --> tests/test_containers_integration_tests/services/test_webhook_service.py:496:79
 ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_webhook_service.py:505:79
-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/test_containers_integration_tests/services/test_webhook_service_relationships.py:36:72
-ERROR Class `WebhookServiceRelationshipFactory` has no class attribute `_read_cache` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_webhook_service_relationships.py:468:26
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_workflow_app_service.py:101:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `log` with type `WorkflowAppLog` in function `services.workflow_app_service.LogView.__init__` [bad-argument-type]
@@ -1481,11 +1489,11 @@
 ERROR Cannot index into `object` [bad-index]
    --> tests/test_containers_integration_tests/services/test_workspace_service.py:602: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/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:60:20
+  --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:56: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/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:69:20
+  --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:65:20
 ERROR Argument `Literal['bad-schema-type']` is not assignable to parameter `schema_type` with type `ApiProviderSchemaType` in function `services.tools.api_tools_manage_service.ApiToolManageService.test_api_tool_preview` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:862:29
+   --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:684:29
 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/test_containers_integration_tests/services/tools/test_mcp_tools_manage_service.py:63: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]
@@ -1683,65 +1691,65 @@
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
     --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:100:23
+  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:91:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:117:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:108:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:140:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:131:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:228:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:271:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:277:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:283:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:289:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:310:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:354:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:365:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:366:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:377:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:388:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:399:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:437:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:453:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:454:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:470:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:476:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:492:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:539:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:582:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:551:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:594:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:576:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:619:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:629:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:682:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:641:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:694:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:661:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:714:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:711:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:764:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:729:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:782:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:752:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:805:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:773:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:833:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:817:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:882:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:922:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1004:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:948:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1030:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:970:31
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1052:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1028:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1119:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1041:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1132:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1078:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1169:27
 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/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75: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]
@@ -1777,6 +1785,10 @@
 ERROR Object of class `DatasetProcessRule` has no attribute `updated_by` [missing-attribute]
    --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:246:9
 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/test_containers_integration_tests/tasks/test_document_indexing_sync_task.py:34: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/test_containers_integration_tests/tasks/test_document_indexing_sync_task.py:39:61
+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/test_containers_integration_tests/tasks/test_document_indexing_task.py:74: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/test_containers_integration_tests/tasks/test_document_indexing_task.py:81:20
@@ -1789,13 +1801,13 @@
 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/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:49:53
 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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:85:20
+  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.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]
-  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:92:20
+  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:91:20
 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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:220:20
+   --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:219: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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:227:20
+   --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:226:20
 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/test_containers_integration_tests/tasks/test_enable_segments_to_index_task.py:55: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]
@@ -1828,6 +1840,14 @@
   --> tests/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py:72: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/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py:79: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/test_containers_integration_tests/test_workflow_pause_integration.py:184:20
+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/test_containers_integration_tests/test_workflow_pause_integration.py:193: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/test_containers_integration_tests/test_workflow_pause_integration.py:699:20
+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/test_containers_integration_tests/test_workflow_pause_integration.py:708:20
 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/trigger/conftest.py:37:79
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
@@ -1897,17 +1917,9 @@
 ERROR Object of class `object` has no attribute `exec_module` [missing-attribute]
    --> tests/unit_tests/controllers/console/app/test_app_response_models.py:111:5
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:25:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:405:5
-ERROR `in` is not supported between `Literal['Maximum']` and `None` [not-iterable]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:433:12
-ERROR Argument `dict[str, float | list[Unknown] | str]` is not assignable to parameter `payload` with type `dict[str, object] | None` in function `_patch_payload` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow_comment_api.py:157:29
-ERROR Argument `dict[str, float | str]` is not assignable to parameter `payload` with type `dict[str, object] | None` in function `_patch_payload` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow_comment_api.py:189:29
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:43:42
 ERROR Type `Response` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:87:9
 ERROR Type `Response` is not iterable [not-iterable]
@@ -2006,6 +2018,8 @@
   --> tests/unit_tests/controllers/console/test_human_input_form.py:47:57
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
   --> tests/unit_tests/controllers/console/test_workspace_account.py:23:5
+ERROR Argument `Literal['active']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+  --> tests/unit_tests/controllers/console/test_workspace_account.py:36:22
 ERROR `SimpleNamespace | object` is not assignable to attribute `_current_tenant` with type `Tenant | None` [bad-assignment]
   --> tests/unit_tests/controllers/console/test_workspace_account.py:37:31
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
@@ -2059,39 +2073,39 @@
 ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
    --> tests/unit_tests/controllers/files/test_upload.py:170:26
 ERROR Could not find name `Import` [unknown-name]
-   --> tests/unit_tests/controllers/inner_api/app/test_dsl.py:120:71
+   --> tests/unit_tests/controllers/inner_api/app/test_dsl.py:119:71
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:212:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:168:44
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:212:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:168:44
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:229:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:185:31
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:229:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:185:31
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:244:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:200:35
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:244:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:200:35
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:266:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:222:44
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:266:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:222:44
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:294:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:250:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:300:36
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:256:36
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:309:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:265:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:316:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:272:31
 ERROR Argument `type[TestPluginData.test_should_raise_error_on_invalid_payload.InvalidPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:327:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:283:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:334:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:290:31
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:340:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:296:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:346:36
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:302:36
 ERROR Cannot index into `Iterable[bytes]` [bad-index]
    --> tests/unit_tests/controllers/service_api/app/test_audio.py:189:16
 ERROR Cannot index into `Response` [bad-index]
@@ -2101,11 +2115,11 @@
 ERROR Argument `list[dict[str, Any]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
    --> tests/unit_tests/controllers/service_api/app/test_completion.py:156:20
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
-  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:84:35
+  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:80:35
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
-  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:89:35
+  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:85:35
 ERROR Missing argument `session` in function `services.conversation_service.ConversationService.pagination_by_last_id` [missing-argument]
-   --> tests/unit_tests/controllers/service_api/app/test_conversation.py:427:59
+   --> tests/unit_tests/controllers/service_api/app/test_conversation.py:383:59
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
   --> tests/unit_tests/controllers/service_api/app/test_message.py:94:63
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
@@ -2119,27 +2133,27 @@
 ERROR Argument value `Literal[102]` violates Pydantic `le` constraint `Literal[101]` for field `limit` [bad-argument-type]
    --> tests/unit_tests/controllers/service_api/app/test_message.py:188:31
 ERROR Argument `list[dict[str, Any]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:109:20
+  --> tests/unit_tests/controllers/service_api/app/test_workflow.py:92:20
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:171:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:154:30
 ERROR Argument value `Literal[100000]` violates Pydantic `le` constraint `Literal[99999]` for field `page` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:176:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:159:30
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:181:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:164:30
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:186:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:169:30
 ERROR Object of class `dict` has no attribute `page` [missing-attribute]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:237:16
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:220:16
 ERROR Object of class `dict` has no attribute `limit` [missing-attribute]
-   --> tests/u\n\n... (truncated) ...

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-17 06:49:38.135283259 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-17 06:49:27.872268038 +0000
@@ -1,9 +1,5 @@
-ERROR Object of class `Server` has no attribute `app` [missing-attribute]
-   --> app_factory.py:132:5
 ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
-   --> controllers/console/app/app.py:552:13
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> controllers/console/app/conversation_variables.py:48:24
+   --> controllers/console/app/app.py:561:13
 ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
   --> controllers/console/auth/email_register.py:75:108
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
@@ -16,12 +12,8 @@
   --> controllers/console/setup.py:40:2
 ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
   --> controllers/console/setup.py:65:2
-ERROR Object of class `Server` has no attribute `app` [missing-attribute]
-  --> controllers/console/socketio/workflow.py:45:14
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
   --> controllers/console/version.py:30:2
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> controllers/service_api/app/conversation.py:87:24
 ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
@@ -47,25 +39,25 @@
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[SystemPromptMessage | UserPromptMessage], model_parameters=dict[str, float], stream=Literal[False]) [no-matching-overload]
    --> core/llm_generator/llm_generator.py:582:60
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:171:17
+   --> core/model_manager.py:172:17
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:196:13
+   --> core/model_manager.py:197:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:216:13
+   --> core/model_manager.py:217:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:238:13
+   --> core/model_manager.py:239:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:255:13
+   --> core/model_manager.py:256:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:280:13
+   --> core/model_manager.py:281:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:308:13
+   --> core/model_manager.py:309:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:327:13
+   --> core/model_manager.py:328:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:343:13
+   --> core/model_manager.py:344:13
 ERROR Missing positional argument `function` in function `ModelInstance._round_robin_invoke` [bad-argument-count]
-   --> core/model_manager.py:360:13
+   --> core/model_manager.py:361:13
 ERROR Argument `dict[str, list[str] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
    --> core/ops/mlflow_trace/mlflow_trace.py:271:24
 ERROR Argument `dict[str, dict[str, Any] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
@@ -86,6 +78,18 @@
    --> core/rag/datasource/keyword/jieba/jieba.py:157:29
 ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
   --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:116:61
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:126:62
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:152:61
+ERROR `upload_file` may be uninitialized [unbound-name]
+   --> core/rag/extractor/extract_processor.py:158:62
+ERROR `response` may be uninitialized [unbound-name]
+   --> core/rag/extractor/firecrawl/firecrawl_app.py:183:16
+ERROR `response` may be uninitialized [unbound-name]
+   --> core/rag/extractor/firecrawl/firecrawl_app.py:192:16
 ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.post` [bad-argument-type]
    --> core/rag/extractor/notion_extractor.py:106:25
 ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.request` [bad-argument-type]
@@ -113,7 +117,7 @@
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/qa_index_processor.py:209:16
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[SystemPromptMessage | UserPromptMessage], tools=list[PromptMessageTool], stream=Literal[False], model_parameters=dict[str, float | int]) [no-matching-overload]
-  --> core/rag/retrieval/router/multi_dataset_function_call_router.py:31:58
+  --> core/rag/retrieval/router/multi_dataset_function_call_router.py:32:58
 ERROR Class member `MCPToolProviderController.entity` overrides parent class `ToolProviderController` in an inconsistent manner [bad-override]
   --> core/tools/mcp_tool/provider.py:33:14
 ERROR Class member `PluginToolProviderController.entity` overrides parent class `BuiltinToolProviderController` in an inconsistent manner [bad-override]
@@ -126,8 +130,6 @@
   --> extensions/storage/huawei_obs_storage.py:27:23
 ERROR Cannot index into `Literal['']` [bad-index]
   --> extensions/storage/huawei_obs_storage.py:31:20
-ERROR Object of class `object` has no attribute `value` [missing-attribute]
-  --> fields/conversation_variable_fields.py:60:24
 ERROR Argument `Module[Crypto.Hash.SHA1] | Unknown` is not assignable to parameter with type `Hash | HashModule` [bad-argument-type]
   --> libs/gmpy2_pkcs10aep_cipher.py:73:49
 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]
@@ -609,15 +611,15 @@
 ERROR Class member `DuplicateDocumentIndexingTaskProxy.PRIORITY_TASK_FUNC` overrides parent class `BatchDocumentIndexingProxy` in an inconsistent manner [bad-override]
   --> services/document_indexing_proxy/duplicate_document_indexing_task_proxy.py:15:5
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | int | Any` is not assignable to parameter `top_k` with type `int` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:85:19
+  --> services/hit_testing_service.py:86:19
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | float | int | Any` is not assignable to parameter `score_threshold` with type `float | None` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:86:29
+  --> services/hit_testing_service.py:87:29
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | int | Any | None` is not assignable to parameter `reranking_model` with type `RerankingModelDict | None` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:89:29
+  --> services/hit_testing_service.py:90:29
 ERROR Argument `Literal['reranking_model', True] | RetrievalMethod | dict[str, str] | int | Any` is not assignable to parameter `reranking_mode` with type `str` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:92:28
+  --> services/hit_testing_service.py:93:28
 ERROR Argument `RetrievalMethod | bool | dict[str, str] | int | Any | None` is not assignable to parameter `weights` with type `WeightsDict | None` in function `core.rag.datasource.retrieval_service.RetrievalService.retrieve` [bad-argument-type]
-  --> services/hit_testing_service.py:93:21
+  --> services/hit_testing_service.py:94:21
 ERROR `handled_tenant_count` was assigned in the current scope before the nonlocal declaration [unknown-name]
   --> services/plugin/plugin_migration.py:92:34
 ERROR `dict[str, Any]` is not assignable to attribute `credentials` with type `Never` [bad-assignment]
@@ -638,12 +640,14 @@
   --> tests/integration_tests/controllers/console/app/test_feedback_export_api.py:32:22
 ERROR Argument `Literal['normal']` is not assignable to parameter `value` with type `AppStatus | SQLCoreOperations[AppStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
   --> tests/integration_tests/controllers/console/app/test_model_config_permissions.py:28:22
+ERROR Attribute `current_tenant_id` of class `Account` is a read-only property and cannot be set [read-only]
+  --> tests/integration_tests/controllers/console/workspace/test_trigger_provider_permissions.py:46:9
 ERROR `dict[str, str]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
-  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:75:21
+  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:76:21
 ERROR Argument `_GP` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.nodes.datasource.datasource_node.DatasourceNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:85:27
+  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:86:27
 ERROR Argument `_GS` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.workflow.nodes.datasource.datasource_node.DatasourceNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:86:29
+  --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:87:29
 ERROR Could not import `Overflow` from `libs.broadcast_channel.channel` [missing-module-attribute]
   --> tests/integration_tests/libs/broadcast_channel/redis/utils/test_data.py:11:44
 ERROR `unpatch` may be uninitialized [unbound-name]
@@ -664,6 +668,8 @@
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:651:21
 ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:817:21
+ERROR Argument `Literal['unsupported_language']` is not assignable to parameter `language` with type `CodeLanguage` in function `core.helper.code_executor.code_executor.CodeExecutor.execute_workflow_code_template` [bad-argument-type]
+  --> tests/integration_tests/workflow/nodes/code_executor/test_code_executor.py:10:62
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.code.code_node.CodeNode.__init__` [bad-argument-type]
   --> tests/integration_tests/workflow/nodes/test_code.py:68:16
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
@@ -671,27 +677,31 @@
 ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
   --> tests/integration_tests/workflow/nodes/test_http.py:84:35
 ERROR Argument `dict[str, dict[str, dict[str, dict[str, str] | str] | str | Unknown | None] | str] | dict[str, dict[str, str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
-   --> tests/integration_tests/workflow/nodes/test_http.py:727:16
+   --> tests/integration_tests/workflow/nodes/test_http.py:728:16
 ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
-   --> tests/integration_tests/workflow/nodes/test_http.py:732:35
+   --> tests/integration_tests/workflow/nodes/test_http.py:733:35
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.llm.node.LLMNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_llm.py:79:16
+  --> tests/integration_tests/workflow/nodes/test_llm.py:80:16
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.parameter_extractor.parameter_extractor_node.ParameterExtractorNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:73:16
+  --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:74:16
 ERROR Argument `dict[str, dict[str, list[dict[str, list[str] | str]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_template_transform.py:90:16
+  --> tests/integration_tests/workflow/nodes/test_template_transform.py:91:16
 ERROR Argument `_SimpleJinja2Renderer` is not assignable to parameter `jinja2_template_renderer` with type `Jinja2TemplateRenderer` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_template_transform.py:93:34
+  --> tests/integration_tests/workflow/nodes/test_template_transform.py:94:34
 ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.tool.tool_node.ToolNode.__init__` [bad-argument-type]
-  --> tests/integration_tests/workflow/nodes/test_tool.py:64:16
+  --> tests/integration_tests/workflow/nodes/test_tool.py:65:16
 ERROR `dict[str, str | None]` is not assignable to attribute `env` with type `dict[str, str]` [bad-assignment]
    --> tests/test_containers_integration_tests/conftest.py:204:39
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
-   --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:633:51
+   --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:632:51
+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/test_containers_integration_tests/controllers/console/app/test_chat_conversation_status_count_api.py:33:48
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:196:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
    --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:197:9
+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/test_containers_integration_tests/controllers/console/helpers.py:40:48
 ERROR `SimpleNamespace` is not assignable to attribute `mcp_ns` with type `Namespace` [bad-assignment]
   --> tests/test_containers_integration_tests/controllers/mcp/test_mcp.py:27:21
 ERROR Attribute `payload` of class `Namespace` is a read-only property and cannot be set [read-only]
@@ -704,8 +714,6 @@
    --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:183:29
 ERROR Missing argument `tag_id` in function `controllers.service_api.dataset.dataset.TagDeletePayload.__init__` [missing-argument]
    --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:195:29
-ERROR `in` is not supported between `Literal['webapp-logo']` and `None` [not-iterable]
-   --> tests/test_containers_integration_tests/controllers/web/test_site.py:133:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
   --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:74:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
@@ -720,6 +728,10 @@
    --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:162:29
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
    --> tests/test_containers_integration_tests/controllers/web/test_wraps.py:179:33
+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/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:95:20
+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/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:104:20
 ERROR Attribute `file_service` of class `TestPauseStatePersistenceLayerTestContainers` is a read-only descriptor with no `__set__` and cannot be set [read-only]
    --> tests/test_containers_integration_tests/core/app/layers/test_pause_state_persist_layer.py:156:9
 ERROR Attribute `workflow_run_service` of class `TestPauseStatePersistenceLayerTestContainers` is a read-only descriptor with no `__set__` and cannot be set [read-only]
@@ -802,18 +814,26 @@
    --> tests/test_containers_integration_tests/core/rag/retrieval/test_dataset_retrieval_integration.py:574: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:584:23
+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/test_containers_integration_tests/core/repositories/test_human_input_form_repository_impl.py:32:48
+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/test_containers_integration_tests/core/repositories/test_human_input_form_repository_impl.py:42:20
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:105:40
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:120:40
 ERROR `dict[str, Any]` is not assignable to TypedDict key `data` with type `BaseNodeData` [bad-typed-dict-key]
    --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:134:38
+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/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:178:20
+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/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:187:20
 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:264: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:270: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
+  --> tests/test_containers_integration_tests/helpers/execution_extra_content.py:49:14
 ERROR Object of class `TypeEngine` has no attribute `length` [missing-attribute]
    --> tests/test_containers_integration_tests/models/test_types_enum_text.py:104:16
 ERROR Object of class `NoneType` has no attribute `user_type` [missing-attribute]
@@ -886,6 +906,12 @@
     --> tests/test_containers_integration_tests/services/test_account_service.py:2320:33
 ERROR TypedDict `TenantCustomConfigDict` does not have key `feature_flags` [bad-typed-dict-key]
     --> tests/test_containers_integration_tests/services/test_account_service.py:2321:33
+ERROR Argument `Literal['pending']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:2854:35
+ERROR Argument `Literal['active']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:2944:35
+ERROR Argument `Literal['archive']` is not assignable to parameter `value` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+    --> tests/test_containers_integration_tests/services/test_account_service.py:3334:25
 ERROR Argument `dict[str, AppMode | str] | dict[str, str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_advanced_prompt_template_service.py:701:63
 ERROR Argument `dict[str, AppMode | str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
@@ -909,15 +935,15 @@
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_agent_service.py:800:24
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_agent_service.py:894:29
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:895:29
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_agent_service.py:963:29
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:964:29
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_agent_service.py:964:24
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:965:24
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/services/test_agent_service.py:1004:29
+    --> tests/test_containers_integration_tests/services/test_agent_service.py:1005:29
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
-    --> tests/test_containers_integration_tests/services/test_agent_service.py:1005:24
+    --> tests/test_containers_integration_tests/services/test_agent_service.py:1006:24
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_annotation_service.py:102:38
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
@@ -1114,8 +1140,6 @@
     --> tests/test_containers_integration_tests/services/test_app_service.py:1294:41
 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/services/test_conversation_service.py:43:18
-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/services/test_conversation_service_variables.py:46:18
 ERROR Object of class `NoneType` has no attribute `quota_used` [missing-attribute]
   --> tests/test_containers_integration_tests/services/test_credit_pool_service.py:90:16
 ERROR Object of class `NoneType` has no attribute `quota_used` [missing-attribute]
@@ -1141,12 +1165,6 @@
 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/test_containers_integration_tests/services/test_dataset_service_get_segments.py:44:62
 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/test_containers_integration_tests/services/test_dataset_service_permissions.py:37: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/test_containers_integration_tests/services/test_dataset_service_permissions.py:39:58
-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/test_containers_integration_tests/services/test_dataset_service_permissions.py:66:20
-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/test_containers_integration_tests/services/test_dataset_service_retrieval.py:45: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/test_containers_integration_tests/services/test_dataset_service_retrieval.py:49:20
@@ -1156,6 +1174,10 @@
    --> tests/test_containers_integration_tests/services/test_dataset_service_retrieval.py:156:29
 ERROR Argument `Literal['knowledge']` is not assignable to parameter `type` with type `SQLCoreOperations[TagType] | TagType` in function `models.model.Tag.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_dataset_service_retrieval.py:179:18
+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/test_containers_integration_tests/services/test_dataset_service_update_dataset.py:29: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/test_containers_integration_tests/services/test_dataset_service_update_dataset.py:34:61
 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/services/test_end_user_service.py:37:18
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
@@ -1248,7 +1270,7 @@
    --> tests/test_containers_integration_tests/services/test_model_provider_service.py:187:24
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
   --> tests/test_containers_integration_tests/services/test_ops_service.py:59:13
-ERROR Argument `dict[str, Any] | dict[Unknown, Unknown] | object | None` is not assignable to parameter `tracing_config` with type `SQLCoreOperations[dict[str, Any] | None] | dict[str, Any] | None` in function `models.model.TraceAppConfig.__init__` [bad-argument-type]
+ERROR Argument `dict[Unknown, Unknown] | object | None` is not assignable to parameter `tracing_config` with type `SQLCoreOperations[dict[Unknown, Unknown] | None] | dict[Unknown, Unknown] | None` in function `models.model.TraceAppConfig.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_ops_service.py:84:28
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/test_containers_integration_tests/services/test_recommended_app_service.py:198:16
@@ -1281,16 +1303,6 @@
 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/test_containers_integration_tests/services/test_saved_message_service.py:602:67
 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/test_containers_integration_tests/services/test_schedule_service.py:30: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/test_containers_integration_tests/services/test_schedule_service.py:32:58
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:319:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:353:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `events.event_handlers.sync_workflow_schedule_when_app_published.sync_schedule_from_workflow` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/test_schedule_service.py:382:22
-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/test_containers_integration_tests/services/test_tag_service.py:59: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/test_containers_integration_tests/services/test_tag_service.py:68:20
@@ -1378,10 +1390,6 @@
    --> tests/test_containers_integration_tests/services/test_webhook_service.py:496:79
 ERROR Argument `dict[str, dict[str, int | str]]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `services.trigger.webhook_service.WebhookService.generate_webhook_response` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_webhook_service.py:505:79
-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/test_containers_integration_tests/services/test_webhook_service_relationships.py:36:72
-ERROR Class `WebhookServiceRelationshipFactory` has no class attribute `_read_cache` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_webhook_service_relationships.py:468:26
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_workflow_app_service.py:101:38
 ERROR Argument `SimpleNamespace` is not assignable to parameter `log` with type `WorkflowAppLog` in function `services.workflow_app_service.LogView.__init__` [bad-argument-type]
@@ -1481,11 +1489,11 @@
 ERROR Cannot index into `object` [bad-index]
    --> tests/test_containers_integration_tests/services/test_workspace_service.py:602: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/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:60:20
+  --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:56: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/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:69:20
+  --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:65:20
 ERROR Argument `Literal['bad-schema-type']` is not assignable to parameter `schema_type` with type `ApiProviderSchemaType` in function `services.tools.api_tools_manage_service.ApiToolManageService.test_api_tool_preview` [bad-argument-type]
-   --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:862:29
+   --> tests/test_containers_integration_tests/services/tools/test_api_tools_manage_service.py:684:29
 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/test_containers_integration_tests/services/tools/test_mcp_tools_manage_service.py:63: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]
@@ -1683,65 +1691,65 @@
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
     --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:100:23
+  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:91:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:117:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:108:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:140:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:131:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:228:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:271:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:277:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:283:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:289:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:310:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:354:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:365:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:366:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:377:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:388:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:399:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:437:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:453:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:454:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:470:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:476:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:492:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:539:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:582:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:551:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:594:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:576:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:619:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:629:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:682:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:641:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:694:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:661:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:714:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:711:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:764:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:729:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:782:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:752:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:805:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:773:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:833:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:817:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:882:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:922:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1004:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:948:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1030:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:970:31
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1052:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1028:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1119:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1041:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1132:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1078:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1169:27
 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/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75: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]
@@ -1777,6 +1785,10 @@
 ERROR Object of class `DatasetProcessRule` has no attribute `updated_by` [missing-attribute]
    --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:246:9
 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/test_containers_integration_tests/tasks/test_document_indexing_sync_task.py:34: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/test_containers_integration_tests/tasks/test_document_indexing_sync_task.py:39:61
+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/test_containers_integration_tests/tasks/test_document_indexing_task.py:74: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/test_containers_integration_tests/tasks/test_document_indexing_task.py:81:20
@@ -1789,13 +1801,13 @@
 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/test_containers_integration_tests/tasks/test_document_indexing_update_task.py:49:53
 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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:85:20
+  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.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]
-  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:92:20
+  --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:91:20
 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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:220:20
+   --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:219: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/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:227:20
+   --> tests/test_containers_integration_tests/tasks/test_duplicate_document_indexing_task.py:226:20
 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/test_containers_integration_tests/tasks/test_enable_segments_to_index_task.py:55: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]
@@ -1828,6 +1840,14 @@
   --> tests/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py:72: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/test_containers_integration_tests/tasks/test_rag_pipeline_run_tasks.py:79: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/test_containers_integration_tests/test_workflow_pause_integration.py:184:20
+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/test_containers_integration_tests/test_workflow_pause_integration.py:193: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/test_containers_integration_tests/test_workflow_pause_integration.py:699:20
+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/test_containers_integration_tests/test_workflow_pause_integration.py:708:20
 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/trigger/conftest.py:37:79
 ERROR Argument `dict[str, dict[str, dict[str, str] | str] | str]` is not assignable to parameter `node_config` with type `NodeConfigDict` in function `core.trigger.debug.event_selectors.TriggerDebugEventPoller.__init__` [bad-argument-type]
@@ -1897,17 +1917,9 @@
 ERROR Object of class `object` has no attribute `exec_module` [missing-attribute]
    --> tests/unit_tests/controllers/console/app/test_app_response_models.py:111:5
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:25:40
 ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
-  --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
-ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:405:5
-ERROR `in` is not supported between `Literal['Maximum']` and `None` [not-iterable]
-   --> tests/unit_tests/controllers/console/app/test_workflow.py:433:12
-ERROR Argument `dict[str, float | list[Unknown] | str]` is not assignable to parameter `payload` with type `dict[str, object] | None` in function `_patch_payload` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow_comment_api.py:157:29
-ERROR Argument `dict[str, float | str]` is not assignable to parameter `payload` with type `dict[str, object] | None` in function `_patch_payload` [bad-argument-type]
-   --> tests/unit_tests/controllers/console/app/test_workflow_comment_api.py:189:29
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:43:42
 ERROR Type `Response` is not iterable [not-iterable]
   --> tests/unit_tests/controllers/console/app/test_workflow_pause_details_api.py:87:9
 ERROR Type `Response` is not iterable [not-iterable]
@@ -2006,6 +2018,8 @@
   --> tests/unit_tests/controllers/console/test_human_input_form.py:47:57
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
   --> tests/unit_tests/controllers/console/test_workspace_account.py:23:5
+ERROR Argument `Literal['active']` is not assignable to parameter `value` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+  --> tests/unit_tests/controllers/console/test_workspace_account.py:36:22
 ERROR `SimpleNamespace | object` is not assignable to attribute `_current_tenant` with type `Tenant | None` [bad-assignment]
   --> tests/unit_tests/controllers/console/test_workspace_account.py:37:31
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
@@ -2059,39 +2073,39 @@
 ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
    --> tests/unit_tests/controllers/files/test_upload.py:170:26
 ERROR Could not find name `Import` [unknown-name]
-   --> tests/unit_tests/controllers/inner_api/app/test_dsl.py:120:71
+   --> tests/unit_tests/controllers/inner_api/app/test_dsl.py:119:71
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:212:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:168:44
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:212:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:168:44
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:229:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:185:31
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:229:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:185:31
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:244:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:200:35
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:244:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:200:35
 ERROR Missing argument `tenant_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:266:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:222:44
 ERROR Missing argument `user_model` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:266:44
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:222:44
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:294:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:250:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:300:36
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:256:36
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:309:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:265:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:316:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:272:31
 ERROR Argument `type[TestPluginData.test_should_raise_error_on_invalid_payload.InvalidPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:327:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:283:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:334:31
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:290:31
 ERROR Argument `type[PluginTestPayload]` is not assignable to parameter `payload_type` with type `type[BaseModel]` in function `controllers.inner_api.plugin.wraps.plugin_data` [bad-argument-type]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:340:35
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:296:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
-   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:346:36
+   --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:302:36
 ERROR Cannot index into `Iterable[bytes]` [bad-index]
    --> tests/unit_tests/controllers/service_api/app/test_audio.py:189:16
 ERROR Cannot index into `Response` [bad-index]
@@ -2101,11 +2115,11 @@
 ERROR Argument `list[dict[str, Any]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
    --> tests/unit_tests/controllers/service_api/app/test_completion.py:156:20
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
-  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:84:35
+  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:80:35
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
-  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:89:35
+  --> tests/unit_tests/controllers/service_api/app/test_conversation.py:85:35
 ERROR Missing argument `session` in function `services.conversation_service.ConversationService.pagination_by_last_id` [missing-argument]
-   --> tests/unit_tests/controllers/service_api/app/test_conversation.py:427:59
+   --> tests/unit_tests/controllers/service_api/app/test_conversation.py:383:59
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
   --> tests/unit_tests/controllers/service_api/app/test_message.py:94:63
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
@@ -2119,27 +2133,27 @@
 ERROR Argument value `Literal[102]` violates Pydantic `le` constraint `Literal[101]` for field `limit` [bad-argument-type]
    --> tests/unit_tests/controllers/service_api/app/test_message.py:188:31
 ERROR Argument `list[dict[str, Any]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:109:20
+  --> tests/unit_tests/controllers/service_api/app/test_workflow.py:92:20
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:171:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:154:30
 ERROR Argument value `Literal[100000]` violates Pydantic `le` constraint `Literal[99999]` for field `page` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:176:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:159:30
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:181:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:164:30
 ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:186:30
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:169:30
 ERROR Object of class `dict` has no attribute `page` [missing-attribute]
-   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:237:16
+   --> tests/unit_tests/controllers/service_api/app/test_workflow.py:220:16
 ERROR Object of class `dict` has no attribute `limit` [missing-attribute]
-   --> tests/u\n\n... (truncated) ...

@fatelei fatelei added this pull request to the merge queue Apr 17, 2026
Merged via the queue into langgenius:main with commit 0c41d0b Apr 17, 2026
40 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: KeyError crash when updating prompt tools in agent runners

3 participants