Skip to content

chore(api): Fix several typing errors#37237

Open
cqjjjzr wants to merge 3 commits into
langgenius:mainfrom
cqjjjzr:fix-type-excl
Open

chore(api): Fix several typing errors#37237
cqjjjzr wants to merge 3 commits into
langgenius:mainfrom
cqjjjzr:fix-type-excl

Conversation

@cqjjjzr

@cqjjjzr cqjjjzr commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

No associated issue.

Need @JohnJyong to confirm changes in api/core/rag/index_processor/index_processor_base.py about the score of documents.

Checklist

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

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-06-09 11:48:25.945135704 +0000
+++ /tmp/pyrefly_pr.txt	2026-06-09 11:48:16.437030997 +0000
@@ -1,67 +1,9 @@
-ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override-mutable-attribute]
-  --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
-ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:324:37
-ERROR Argument `list[dict[str, list[dict[Unknown, Unknown]] | str]]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:392:27
-ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:113:60
-ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int] | dict[str, object] | dict[Unknown, Unknown], stop=list[str] | list[Unknown], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:223:60
-ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:268:64
-ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:316:70
-ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:347:73
-ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:356:73
-ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:403:60
-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, Any], stream=Literal[False]) [no-matching-overload]
-   --> core/llm_generator/llm_generator.py:465:60
-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:653:60
-ERROR `list[dict[str, str | dict[str, str]]] | list[Unknown]` is not assignable to TypedDict key `tool_calls` with type `list[dict[str, str]] | str` [bad-typed-dict-key]
-  --> core/prompt/utils/prompt_message_util.py:83:44
-ERROR Argument `Unknown | None` is not assignable to parameter `result_object` with type `dict[str, Any]` in function `WaterCrawlProvider._structure_data` [bad-argument-type]
-   --> core/rag/extractor/watercrawl/provider.py:108:37
-ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
-   --> core/rag/extractor/word_extractor.py:450:24
-ERROR Object of class `Document` has no attribute `score` [missing-attribute]
-   --> core/rag/index_processor/processor/paragraph_index_processor.py:208:33
-ERROR Object of class `Document` has no attribute `score` [missing-attribute]
-   --> core/rag/index_processor/processor/paragraph_index_processor.py:209:16
-ERROR Object of class `Document` has no attribute `score` [missing-attribute]
-   --> core/rag/index_processor/processor/parent_child_index_processor.py:249:33
-ERROR Object of class `Document` has no attribute `score` [missing-attribute]
-   --> core/rag/index_processor/processor/parent_child_index_processor.py:250:16
-ERROR Object of class `Document` has no attribute `score` [missing-attribute]
-   --> core/rag/index_processor/processor/qa_index_processor.py:213:33
-ERROR Object of class `Document` has no attribute `score` [missing-attribute]
-   --> core/rag/index_processor/processor/qa_index_processor.py:214:16
-ERROR Argument `DatasetMultiRetrieverTool` is not assignable to parameter `object` with type `DatasetRetrieverTool` in function `list.append` [bad-argument-type]
-    --> core/rag/retrieval/dataset_retrieval.py:1241:26
-ERROR Returned type `list[DatasetRetrieverTool]` is not assignable to declared return type `list[DatasetRetrieverBaseTool] | None` [bad-return]
-    --> core/rag/retrieval/dataset_retrieval.py:1243:16
 ERROR Class member `MCPToolProviderController.entity` overrides parent class `ToolProviderController` in an inconsistent manner [bad-override-mutable-attribute]
   --> core/tools/mcp_tool/provider.py:34:14
 ERROR Class member `PluginToolProviderController.entity` overrides parent class `BuiltinToolProviderController` in an inconsistent manner [bad-override-mutable-attribute]
   --> core/tools/plugin_tool/provider.py:12:5
 ERROR `list[Never]` is not assignable to attribute `tools` with type `Never` [bad-assignment]
    --> core/tools/workflow_as_tool/provider.py:240:26
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:176:63
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:194:51
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:200:53
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:233:51
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:239:53
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:246:61
 ERROR Cannot index into `Literal['']` [bad-index]
   --> extensions/storage/huawei_obs_storage.py:30:23
 ERROR Cannot index into `Literal['']` [bad-index]
@@ -2931,7 +2873,7 @@
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:193:60
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.apps.advanced_chat.generate_task_pipeline.AdvancedChatAppGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:202:57
-ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
+ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline[Unknown], e: Exception) -> ErrorStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:217:65
 ERROR `() -> _GeneratorContextManager[SimpleNamespace]` is not assignable to attribute `_database_session` with type `(self: AdvancedChatAppGenerateTaskPipeline) -> _GeneratorContextManager[Session]` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:223:38
@@ -2963,7 +2905,7 @@
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:400:84
 ERROR `(**kwargs: Unknown) -> list[str]` is not assignable to attribute `workflow_pause_to_stream_response` with type `(self: WorkflowResponseConverter, *, event: QueueWorkflowPausedEvent, task_id: str, graph_runtime_state: GraphRuntimeState) -> list[StreamResponse]` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:401:83
-ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
+ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline[Unknown], e: Exception) -> ErrorStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:406:65
 ERROR `(**kwargs: Unknown) -> SimpleNamespace` is not assignable to attribute `_get_message` with type `(self: AdvancedChatAppGenerateTaskPipeline, *, session: Session) -> Message` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:407:33
@@ -2989,7 +2931,7 @@
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:614:40
 ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: AdvancedChatAppGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:622:52
-ERROR `(answer: Unknown) -> Literal['safe']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: BasedGenerateTaskPipeline, completion: str) -> str | None` [bad-assignment]
+ERROR `(answer: Unknown) -> Literal['safe']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: BasedGenerateTaskPipeline[Unknown], completion: str) -> str | None` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:649:84
 ERROR `(**kwargs: Unknown) -> Literal['replace']` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline_core.py:650:78
@@ -3123,7 +3065,7 @@
   --> tests/unit_tests/core/app/apps/chat/test_generate_response_converter.py:61:16
 ERROR Cannot index into `str` [bad-index]
   --> tests/unit_tests/core/app/apps/chat/test_generate_response_converter.py:65:16
-ERROR `SimpleNamespace` is not assignable to attribute `_base_task_pipeline` with type `BasedGenerateTaskPipeline` [bad-assignment]
+ERROR `SimpleNamespace` is not assignable to attribute `_base_task_pipeline` with type `BasedGenerateTaskPipeline[Unknown]` [bad-assignment]
   --> tests/unit_tests/core/app/apps/common/test_graph_runtime_state_support.py:20:36
 ERROR Argument `None` is not assignable to parameter `value` with type `Segment | dict[Unknown, Unknown] | list[Unknown]` in function `core.app.apps.common.workflow_response_converter.WorkflowResponseConverter._fetch_files_from_variable_value` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:45:77
@@ -3598,7 +3540,7 @@
   --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:88:33
 ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.apps.workflow.generate_task_pipeline.WorkflowAppGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:171:57
-ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
+ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline[Unknown], e: Exception) -> ErrorStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:186:65
 ERROR `(**kwargs: Unknown) -> Literal['started']` is not assignable to attribute `workflow_start_to_stream_response` with type `(self: WorkflowResponseConverter, *, task_id: str, workflow_run_id: str, workflow_id: str, reason: WorkflowStartReason) -> WorkflowStartStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:198:83
@@ -3606,7 +3548,7 @@
    --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:214:89
 ERROR `(**kwargs: Unknown) -> Literal['finish']` is not assignable to attribute `workflow_finish_to_stream_response` with type `(self: WorkflowResponseConverter, *, task_id: str, workflow_id: str, status: WorkflowExecutionStatus, graph_runtime_state: GraphRuntimeState, error: str | None = None, exceptions_count: int = 0) -> WorkflowFinishStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:239:84
-ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
+ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: BasedGenerateTaskPipeline[Unknown], e: Exception) -> ErrorStreamResponse` [bad-assignment]
    --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:241:65
 ERROR Argument `TestWorkflowGenerateTaskPipeline.test_handle_text_chunk_event_publishes_tts._Publisher` is not assignable to parameter `tts_publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.apps.workflow.generate_task_pipeline.WorkflowAppGenerateTaskPipeline._handle_text_chunk_event` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/workflow/test_generate_task_pipeline_core.py:261:68
@@ -3814,286 +3756,14 @@
   --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:88:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter `graph_runtime_state` with type `ReadOnlyGraphRuntimeState` in function `graphon.graph_engine.layers.base.GraphEngineLayer.initialize` [bad-argument-type]
    --> tests/unit_tests/core/app/layers/test_trigger_post_layer.py:110:30
-ERROR Argument `SimpleNamespace` is not assignable to parameter `application_generate_entity` with type `AppGenerateEntity` in function `core.app.task_pipeline.based_generate_task_pipeline.BasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:23:41
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:99:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:100:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:101:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:119:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:120:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:121:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:139:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:140:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:141:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:153:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:154:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:155:21
-ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:183:41
-ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:184:66
-ERROR `(**kwargs: Unknown) -> Literal['chunk']` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:185:70
-ERROR `(**kwargs: Unknown) -> Literal['replace']` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:186:78
-ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:188:52
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:226:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:227:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:228:21
-ERROR `TestEasyUiBasedGenerateTaskPipeline.test_handle_output_moderation_chunk_directs_output._Moderation` is not assignable to attribute `output_moderation_handler` with type `OutputModeration | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:240:46
-ERROR `(event: AppQueueEvent, publish_from: Unknown) -> None` is not assignable to attribute `publish` with type `(self: AppQueueManager, event: AppQueueEvent, pub_from: PublishFrom) -> None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:241:42
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:289:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:290:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:291:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:323:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:324:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:325:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:415:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:416:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:417:21
-ERROR `() -> Iterator[SimpleNamespace]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:438:41
-ERROR `(event: QueueAnnotationReplyEvent) -> SimpleNamespace` is not assignable to attribute `handle_annotation_reply` with type `(self: MessageCycleManager, event: QueueAnnotationReplyEvent) -> MessageAnnotation | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:439:67
-ERROR `(event: QueueAgentThoughtEvent) -> Literal['thought']` is not assignable to attribute `_agent_thought_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, event: QueueAgentThoughtEvent) -> AgentThoughtStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:440:54
-ERROR `(event: QueueMessageFileEvent) -> Literal['file']` is not assignable to attribute `message_file_to_stream_response` with type `(self: MessageCycleManager, event: QueueMessageFileEvent) -> MessageFileStreamResponse | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:441:75
-ERROR `(**kwargs: Unknown) -> Literal['agent']` is not assignable to attribute `_agent_message_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, answer: str, message_id: str) -> AgentMessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:442:54
-ERROR `(err: Unknown) -> Unknown` is not assignable to attribute `error_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, e: Exception) -> ErrorStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:444:45
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:482:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:483:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:484:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:531:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:532:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:533:21
-ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:537:53
-ERROR `(generator: Generator[StreamResponse]) -> Literal['streamed']` is not assignable to attribute `_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> Generator[ChatbotAppStreamResponse | CompletionAppStreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:538:40
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:552:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:553:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:554:21
-ERROR `(trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_wrapper_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:558:53
-ERROR `(generator: Generator[StreamResponse]) -> Literal['blocking']` is not assignable to attribute `_to_blocking_response` with type `(self: EasyUIBasedGenerateTaskPipeline, generator: Generator[StreamResponse]) -> ChatbotAppBlockingResponse | CompletionAppBlockingResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:559:42
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:571:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:572:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:573:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:588:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:589:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:590:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:605:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:606:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:607:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:624:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:625:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:626:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:643:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:644:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:645:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:650:57
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:660:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:661:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:662:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `publisher` with type `AppGeneratorTTSPublisher | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._listen_audio_msg` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:667:53
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:674:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:675:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:676:21
-ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:679:45
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:694:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:695:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:696:21
-ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:707:45
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:728:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:729:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:730:21
-ERROR `(publisher: AppGeneratorTTSPublisher | None, trace_manager: Unknown) -> Iterator[Any]` is not assignable to attribute `_process_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline, publisher: AppGeneratorTTSPublisher | None, trace_manager: TraceQueueManager | None = None) -> Generator[StreamResponse]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:747:45
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:765:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:766:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:767:21
-ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:771:41
-ERROR `(answer: Unknown) -> Literal['moderated answer']` is not assignable to attribute `handle_output_moderation_when_task_finished` with type `(self: EasyUIBasedGenerateTaskPipeline, completion: str) -> str | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:775:64
-ERROR `(answer: str) -> str` is not assignable to attribute `message_replace_to_stream_response` with type `(self: MessageCycleManager, answer: str, reason: str = '') -> MessageReplaceStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:776:78
-ERROR `() -> Literal['end']` is not assignable to attribute `_message_end_to_stream_response` with type `(self: EasyUIBasedGenerateTaskPipeline) -> MessageEndStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:778:52
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:809:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:810:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:811:21
-ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:826:41
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:844:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:845:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:846:21
-ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:855:41
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:866:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:867:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:868:21
-ERROR `(message_id: str) -> None` is not assignable to attribute `get_message_event_type` with type `(self: MessageCycleManager, message_id: str) -> StreamEvent` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:875:66
-ERROR `(**kwargs: Unknown) -> Unknown` is not assignable to attribute `message_to_stream_response` with type `(self: MessageCycleManager, answer: str, message_id: str, from_variable_selector: list[str] | None = None, event_type: StreamEvent | None = None) -> MessageStreamResponse` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:876:70
-ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:877:41
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:890:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:891:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:892:21
-ERROR `object` is not assignable to attribute `_conversation_name_generate_thread` with type `Thread | None` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:895:55
-ERROR `() -> Iterator[MessageQueueMessage | WorkflowQueueMessage] | Iterator[Any]` is not assignable to attribute `listen` with type `(self: AppQueueManager) -> Generator[MessageQueueMessage | WorkflowQueueMessage, Unknown]` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:896:41
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:907:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:908:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:909:21
-ERROR `SimpleNamespace` is not assignable to attribute `_model_config` with type `ModelConfigWithCredentialsEntity` [bad-assignment]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:913:34
-ERROR Argument `SimpleNamespace` is not assignable to parameter `trace_manager` with type `TraceQueueManager | None` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline._save_message` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:947:63
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:965:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:966:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:967:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:981:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:982:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:983:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:997:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:998:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:999:21
-ERROR Cannot index into `object` [bad-index]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1030:16
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1037:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1038:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1039:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1075:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1076:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1077:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1155:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1156:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1157:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1171:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1172:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1173:21
-ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1205:27
-ERROR Argument `SimpleNamespace` is not assignable to parameter `conversation` with type `Conversation` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1206:26
-ERROR Argument `SimpleNamespace` is not assignable to parameter `message` with type `Message` in function `core.app.task_pipeline.easy_ui_based_generate_task_pipeline.EasyUIBasedGenerateTaskPipeline.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1207:21
-ERROR `TestEasyUiBasedGenerateTaskPipeline.test_handle_output_moderation_chunk_appends_token_when_not_directing._Moderation` is not assignable to attribute `output_moderation_handler` with type `OutputModeration | None` [bad-assignment]
-    --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:1219:46
+ERROR `SimpleNamespace` is not assignable to upper bound `AppGenerateEntity` of type variable `AppGenerateEntityT` [bad-specialization]
+  --> tests/unit_tests/core/app/task_pipeline/test_based_generate_task_pipeline.py:22:41
+ERROR Class member `_FakeQueueManager.listen` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:112:9
+ERROR Class member `_FakeQueueManager.publish` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:115:9
+ERROR Class member `_FakeQueueManager._publish` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+   --> tests/unit_tests/core/app/task_pipeline/test_easy_ui_based_generate_task_pipeline_core.py:118:9
 ERROR `None` is not subscriptable [unsupported-operation]
    --> tests/unit_tests/core/app/task_pipeline/test_message_cycle_manager_optimization.py:247:16
 ERROR `None` is not subscriptable [unsupported-operation]
@@ -4633,8 +4303,6 @@
   --> tests/unit_tests/core/prompt/test_extract_thread_messages.py:95:13
 ERROR Argument `list[MockMessage]` is not assignable to parameter `messages` with type `Sequence[Message]` in function `core.prompt.utils.extract_thread_messages.extract_thread_messages` [bad-argument-type]
    --> tests/unit_tests/core/prompt/test_extract_thread_messages.py:102:38
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/core/prompt/test_prompt_message.py:78:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `model_config` with type `ModelConfigWithCredentialsEntity | None` in function `core.prompt.prompt_transform.PromptTran\n\n... (truncated) ...

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 47.25% 47.26% +0.01%
Strict coverage 46.75% 46.76% +0.01%
Typed symbols 26,553 26,571 +18
Untyped symbols 29,962 29,968 +6
Modules 2853 2853 0

@cqjjjzr

cqjjjzr commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@dosu before this change, a few processors accessed Document().score, which I found nowhere written into. some suggested changes as is written in api/core/rag/index_processor/index_processor_base.py. Please check

@dosubot

dosubot Bot commented Jun 9, 2026

Copy link
Copy Markdown

I checked the codebase and here's what I found:

Document does not have a .score attribute. The model only defines page_content, vector, metadata, provider, children, and attachments [1]. Scores are always stored in document.metadata["score"] throughout the pipeline.

Where scores are actually written:

  • During retrieval in each index processor (paragraph, parent-child, QA), result.score from the vector/keyword search is written into metadata["score"] [2] [3] [4]
  • During reranking, rerank models write rerank_document.metadata["score"] = result.score [5]
  • During weighted fusion reranking [6]

Your PR's utility methods look correct. Adding _retrieval_score(document) and _copy_retrieved_document(document, score) to the base class provides a standardized, type-safe way to extract scores from metadata["score"] with graceful fallbacks to 0.0. This is a good pattern since it handles the fact that scores can arrive as various types (bool, int, float, string) depending on the source.

So to confirm: if any code was previously accessing Document().score directly (as a class attribute), that would indeed have been broken — that attribute doesn't exist on the model. Your fix to route score access through document.metadata["score"] (via the new utility methods) is the correct approach.

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about dify with Dosu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants