Skip to content

refactor(api): extract app generation and Agent Chat persistence ports - #43677

Open
41tair wants to merge 53 commits into
refactor/api-76-6from
refactor/api-76-7
Open

41tair wants to merge 53 commits into
refactor/api-76-6from
refactor/api-76-7

Conversation

@41tair

@41tair 41tair commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Important

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

Summary

part of #39993

Inject App generation and Agent Chat dependencies.

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've verified the change and added or updated tests where meaningful regression risk justifies coverage.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and vp staged (frontend) to appease the lint gods

From Codex

@ghfind-review ghfind-review Bot added the review: top ghfind author score; see https://ghfind.com label Oct 8, 2026
@github-actions github-actions Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 8, 2026
@41tair
41tair added this pull request to stack #43683 October 8, 2026 09:50
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 86.97% 87.29% +0.32%
Strict coverage 86.63% 86.96% +0.33%
Typed symbols 95,695 99,475 +3,780
Untyped symbols 14,395 14,537 +142
Modules 4633 4813 +180

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-11-19 08:11:20.171433424 +0000
+++ /tmp/pyrefly_pr.txt	2026-11-19 08:11:02.183289059 +0000
@@ -121,45 +121,49 @@
 ERROR Argument `list[Document | SimpleNamespace]` is not assignable to parameter `documents` with type `list[Document]` in function `dify_vdb_pgvector.pgvector.PGVector.add_texts` [bad-argument-type]
    --> providers/vdb/vdb-pgvector/tests/unit_tests/src/dify_vdb_pgvector/test_pgvector.py:392:28
 ERROR Object of class `ModuleType` has no attribute `QdrantClient` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:110:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:113:5
 ERROR Object of class `ModuleType` has no attribute `FilterSelector` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:111:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:114:5
 ERROR Object of class `ModuleType` has no attribute `HnswConfigDiff` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:112:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:115:5
 ERROR Object of class `ModuleType` has no attribute `PayloadSchemaType` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:113:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:116:5
 ERROR Object of class `ModuleType` has no attribute `TextIndexParams` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:114:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:117:5
 ERROR Object of class `ModuleType` has no attribute `TextIndexType` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:115:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:118:5
 ERROR Object of class `ModuleType` has no attribute `TokenizerType` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:116:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:119:5
 ERROR Object of class `ModuleType` has no attribute `VectorParams` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:117:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:120:5
 ERROR Object of class `ModuleType` has no attribute `Distance` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:118:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:121:5
 ERROR Object of class `ModuleType` has no attribute `PointStruct` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:119:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:122:5
 ERROR Object of class `ModuleType` has no attribute `Filter` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:120:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:123:5
 ERROR Object of class `ModuleType` has no attribute `FieldCondition` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:121:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:124:5
 ERROR Object of class `ModuleType` has no attribute `MatchValue` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:122:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:125:5
 ERROR Object of class `ModuleType` has no attribute `MatchAny` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:123:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:126:5
 ERROR Object of class `ModuleType` has no attribute `MatchText` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:124:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:127:5
 ERROR Object of class `ModuleType` has no attribute `UnexpectedResponse` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:125:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:128:5
 ERROR Object of class `ModuleType` has no attribute `models` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:127:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:130:5
 ERROR Object of class `ModuleType` has no attribute `QdrantLocal` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:128:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:131:5
 ERROR Object of class `ModuleType` has no attribute `qdrant_local` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:129:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:132:5
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:389:16
+ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:413:5
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
-   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:431:5
+   --> providers/vdb/vdb-qdrant/tests/unit_tests/src/dify_vdb_qdrant/test_qdrant_vector.py:453:5
 ERROR Object of class `ModuleType` has no attribute `VECTOR` [missing-attribute]
   --> providers/vdb/vdb-relyt/tests/unit_tests/src/dify_vdb_relyt/test_relyt_vector.py:24:5
 ERROR Argument `Index | None` is not assignable to parameter `index` with type `Index` in function `tcvectordb.rpc.model.collection.RPCCollection.__init__` [bad-argument-type]
@@ -232,6 +236,14 @@
    --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:153:35
 ERROR Argument `Any | None` is not assignable to parameter `cluster_response` with type `Mapping[str, Any]` in function `TidbService.extract_qdrant_endpoint` [bad-argument-type]
    --> providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py:154:75
+ERROR Could not import `resolve_model_context_window` from `core.app.llm.model_access` [missing-module-attribute]
+  --> services/app/generation/adapters/agent_request_builder.py:39:39
+ERROR Could not import `resolve_model_supports_vision` from `core.app.llm.model_access` [missing-module-attribute]
+  --> services/app/generation/adapters/agent_request_builder.py:39:69
+ERROR Object of class `OutputModeration` has no attribute `get_final_output` [missing-attribute]
+   --> services/app/generation/adapters/message_pipeline.py:551:63
+ERROR Could not import `resolve_model_context_window` from `core.app.llm.model_access` [missing-module-attribute]
+  --> services/workflow/execution/adapters/agent_v2/runtime_request_builder.py:52:39
 ERROR Object of class `FunctionType` has no attribute `__handler__` [missing-attribute]
   --> tests/e2e_tests/containers/controllers/openapi/test_account_sessions.py:62:22
 ERROR Object of class `FunctionType` has no attribute `__handler__` [missing-attribute]
@@ -337,69 +349,69 @@
 ERROR Argument `str` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/core/workflow/test_human_input_resume_node_execution.py:187:23
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:48:14
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:49:14
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:58:14
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:59:14
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:59:19
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:60:19
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:77:14
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:78:14
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:82:16
+  --> tests/e2e_tests/containers/helpers/execution_extra_content.py:83:16
 ERROR Returned type `int | str` is not assignable to declared return type `str` [bad-return]
    --> tests/e2e_tests/containers/libs/broadcast_channel/redis/test_sharded_channel.py:367:16
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:103:14
+  --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:97:14
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:104:19
+  --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:98:19
 ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.Conversation.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:125:14
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:119:14
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:130:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:124:16
 ERROR Object of class `HumanInputFormReference` has no attribute `submitted` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:348:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:342:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:350:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:344:16
 ERROR Object of class `object` has no attribute `action_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:351:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:345:16
 ERROR Object of class `object` has no attribute `action_text` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:352:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:346:16
 ERROR Object of class `object` has no attribute `rendered_content` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:353:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:347:16
 ERROR Object of class `object` has no attribute `node_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:354:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:348:16
 ERROR Object of class `object` has no attribute `node_title` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:355:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:349:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:386:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:380:16
 ERROR Object of class `object` has no attribute `submitted_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:387:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:381:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_submission_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:474:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:468:16
 ERROR Object of class `object` has no attribute `submitted_data` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:475:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:469:16
 ERROR Object of class `object` has no attribute `rendered_content` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:476:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:470:16
 ERROR Object of class `HumanInputFormReference` has no attribute `submitted` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:517:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:511:16
 ERROR Object of class `HumanInputFormReference` has no attribute `form_definition` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:519:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:513:16
 ERROR Object of class `object` has no attribute `form_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:521:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:515:16
 ERROR Object of class `object` has no attribute `node_id` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:522:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:516:16
 ERROR Object of class `object` has no attribute `node_title` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:523:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:517:16
 ERROR Object of class `object` has no attribute `form_content` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:524:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:518:16
 ERROR Object of class `object` has no attribute `display_in_ui` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:525:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:519:16
 ERROR Object of class `object` has no attribute `form_token` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:526:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:520:16
 ERROR Object of class `object` has no attribute `resolved_default_values` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:527:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:521:16
 ERROR Object of class `object` has no attribute `expiration_time` [missing-attribute]
-   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:528:16
+   --> tests/e2e_tests/containers/repositories/test_sqlalchemy_execution_extra_content_repository.py:522:16
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
    --> tests/e2e_tests/containers/repositories/test_sqlalchemy_workflow_node_execution_repository.py:184:23
 ERROR Argument `str | None` is not assignable to parameter `tenant_id` with type `str` in function `_create_node_execution_model` [bad-argument-type]
@@ -801,9 +813,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/e2e_tests/containers/services/test_file_service.py:76: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/e2e_tests/containers/services/test_human_input_delivery_test.py:45:18
+  --> tests/e2e_tests/containers/services/test_human_input_delivery_test.py:40:18
 ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
-  --> tests/e2e_tests/containers/services/test_human_input_delivery_test.py:54:19
+  --> tests/e2e_tests/containers/services/test_human_input_delivery_test.py:49:19
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/test_message_export_service.py:53: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]
@@ -1201,123 +1213,123 @@
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
   --> tests/e2e_tests/containers/services/tools/test_mcp_tools_manage_service.py:72:20
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:752:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:754:20
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:753:32
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:755:32
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:754:32
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:756:32
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:763:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:765:20
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:764:34
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:766:34
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:778:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:780:20
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:779:16
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:781:16
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:787:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:789:20
 ERROR Argument `list[ToolParameter] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:795:20
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:797:20
 ERROR Type `None` is not iterable [not-iterable]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:804:33
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:806:33
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:805:16
+   --> tests/e2e_tests/containers/services/tools/test_tools_transform_service.py:807:16
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:109:38
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:111:38
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:113:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:115:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:188:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:190:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:208:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:210:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:223:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:225:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:257:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:259:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:273:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:275:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:290:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:292:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:323:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:325:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:340:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:342:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:369:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:371:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:395:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:397:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:425:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:427:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:442:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:444:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:459:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:461:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:494:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:496:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:510:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:512:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:546:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:548:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:559:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:561:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:592:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:594:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:606:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:608:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:624:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:626:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:625:30
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:627:30
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:671:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:673:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:683:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:685:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:704:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:706:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:705:30
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:707:30
 ERROR Object of class `NoneType` has no attribute `name` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:715:16
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:717:16
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:743:27
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:745:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:760:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:762:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:790:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:792:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:804:51
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:806:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:813:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:815:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:814:30
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:816:30
 ERROR Object of class `NoneType` has no attribute `name` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:827:16
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:829:16
 ERROR Object of class `NoneType` has no attribute `updated_at` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:828:16
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:830:16
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:892:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:894:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:970:23
+   --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:972:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1014:27
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1016:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1031:51
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1033:51
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1055:23
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1057:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1066:54
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1068:54
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1071:77
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1073:77
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1088:83
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1090:83
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1102:80
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1104:80
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1114:79
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1116:79
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1126:78
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1128:78
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1139:23
+    --> tests/e2e_tests/containers/services/tools/test_workflow_tools_manage_service.py:1141:23
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
    --> tests/e2e_tests/containers/services/workflow/test_workflow_converter.py:107: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]
@@ -1626,11 +1638,11 @@
    --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:137:9
 ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
    --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:205:32
-ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
+ERROR Argument `models.human_input_entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
    --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:209:14
 ERROR Argument `_TestFileReferenceFactory` is not assignable to parameter `file_reference_factory` with type `DifyFileReferenceFactory | None` in function `core.workflow.nodes.human_input.callback.DifyHITLCallback.__init__` [bad-argument-type]
    --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:221:32
-ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
+ERROR Argument `models.human_input_entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
    --> tests/e2e_tests/contracts/core/workflow/graph_engine/test_parallel_human_input_join_resume.py:225:14
 ERROR Cannot index into `object` [bad-index]
   --> tests/e2e_tests/contracts/core/workflow/nodes/http_request/test_http_request_node.py:32:15
@@ -1677,15 +1689,15 @@
 ERROR Argument `Iterator[ToolRuntimeMessage]` is not assignable to parameter `messages` with type `Generator[ToolRuntimeMessage]` in function `graphon.nodes.tool.tool_node.ToolNode._transform_message` [bad-argument-type]
    --> tests/e2e_tests/contracts/core/workflow/nodes/tool/test_tool_node.py:128:18
 ERROR Argument `list[ParagraphInputConfig]` is not assignable to parameter `inputs` with type `list[FormInputConfig]` in function `tests.helpers.unit.libs._human_input.support.FormService.create_form` [bad-argument-type]
-   --> tests/e2e_tests/contracts/libs/_human_input/test_form_service.py:311:34
+   --> tests/e2e_tests/contracts/libs/_human_input/test_form_service.py:306:34
 ERROR `-` is not supported between `None` and `datetime` [unsupported-operation]
-  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:64:21
+  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:59:21
 ERROR `-` is not supported between `None` and `datetime` [unsupported-operation]
-  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:75:21
+  --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:70:21
 ERROR `<=` is not supported between `datetime` and `None` [unsupported-operation]
-   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:120:16
+   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:115:16
 ERROR `<=` is not supported between `None` and `datetime` [unsupported-operation]
-   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:120:16
+   --> tests/e2e_tests/contracts/libs/_human_input/test_models.py:115:16
 ERROR `*` is not supported between `float` and `str` [unsupported-operation]
   --> tests/e2e_tests/knowledge_fs_vector/test_backends.py:54:37
 ERROR `*` is not supported between `str` and `float` [unsupported-operation]
@@ -3167,11 +3179,11 @@
 ERROR Argument `DummyQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.chat.app_runner.ChatAppRunner.run` [bad-argument-type]
    --> tests/unit_tests/core/app/apps/chat/test_app_generator.py:495:49
 ERROR Object of class `NoneType` has no attribute `data` [missing-attribute]
-    --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:1175:20
+    --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:1170:20
 ERROR Class member `_RecordingWorkflowAppRunner._publish_event` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-    --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:1477:9
+    --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:1472:9
 ERROR Object of type `FileInputConfig | FileListInputConfig | ParagraphInputConfig | SelectInputConfig` has no attribute `option_source` [missing-attribute]
-    --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:1877:16
+    --> tests/unit_tests/core/app/apps/common/test_workflow_response_converter.py:1872:16
 ERROR Object of class `CompletionAppGenerator` has no attribute `generate_entity` [missing-attribute]
   --> tests/unit_tests/core/app/apps/completion/test_app_generator.py:62:5
 ERROR Argument `Literal[core.app.entities.app_invoke_entities.InvokeFrom.WEB_APP]` is not assignable to parameter `invoke_from` with type `models.enums.InvokeFrom | SQLCoreOperations[models.enums.InvokeFrom | None] | None` in function `models.model.Conversation.__init__` [bad-argument-type]
@@ -3209,9 +3221,9 @@
 ERROR Object of class `NoneType` has no attribute `error` [missing-attribute]
     --> tests/unit_tests/core/app/apps/pipeline/test_pipeline_generator.py:1242:12
 ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/test_base_app_generator.py:609:9
+   --> tests/unit_tests/core/app/apps/test_base_app_generator.py:610:9
 ERROR `list[str]` is not assignable to attribute `allowed_file_types` with type `Sequence[FileType] | None` [bad-assignment]
-   --> tests/unit_tests/core/app/apps/test_base_app_generator.py:770:35
+   --> tests/unit_tests/core/app/apps/test_base_app_generator.py:784:35
 ERROR Missing argument `model` in function `graphon.model_runtime.entities.model_entities.AIModelEntity.model_construct` [missing-argument]
    --> tests/unit_tests/core/app/apps/test_base_app_runner.py:433:53
 ERROR Missing argument `label` in function `graphon.model_runtime.entities.model_entities.AIModelEntity.model_construct` [missing-argument]
@@ -3885,11 +3897,11 @@
 ERROR `in` is not supported between `Literal['Service temporarily unavailable']` and `None` [not-iterable]
     --> tests/unit_tests/core/plugin/impl/test_plugin.py:1917:24
 ERROR Argument `dict[str, str]` is not assignable to parameter `reranking_model` with type `RerankingModelDict | None` in function `core.rag.data_post_processor.data_post_processor.DataPostProcessor.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/rag/data_post_processor/test_data_post_processor.py:28:37
+  --> tests/unit_tests/core/rag/data_post_processor/test_data_post_processor.py:30:37
 ERROR Argument `dict[str, str]` is not assignable to parameter `weights` with type `WeightsDict | None` in function `core.rag.data_post_processor.data_post_processor.DataPostProcessor.__init__` [bad-argument-type]
-  --> tests/unit_tests/core/rag/data_post_processor/test_data_post_processor.py:29:29
+  --> tests/unit_tests/core/rag/data_post_processor/test_data_post_processor.py:31:29
 ERROR Argument `dict[str, str]` is not assignable to parameter `reranking_model` with type `RerankingModelDict | None` in function `core.rag.data_post_processor.data_post_processor.DataPostProcessor._get_rerank_model_instance` [bad-argument-type]
-   --> tests/unit_tests/core/rag/data_post_processor/test_data_post_processor.py:192:33
+   --> tests/unit_tests/core/rag/data_post_processor/test_data_post_processor.py:198:33
 ERROR Argument `str` is not assignable to parameter `doc_form` with type `IndexStructureType | SQLCoreOperations[IndexStructureType]` in function `models.dataset.Document.__init__` [bad-argument-type]
    --> tests/unit_tests/core/rag/datasource/test_retrieval_service.py:148:18
 ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
@@ -3899,103 +3911,161 @@
 ERROR Argument `object | None` is not assignable to parameter `session` with type `Session | None` in function `core.rag.extractor.extract_processor.ExtractProcessor.extract` [bad-argument-type]
    --> tests/unit_tests/core/rag/extractor/test_extract_processor.py:251:85
 ERROR Method `run` inherited from class `BaseRerankRunner` has no implementation and cannot be accessed via `super()` [abstract-method-call]
-   --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:425:16
+   --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:429:16
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1270:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1276:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1327:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1333:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1375:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1384:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1422:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1434:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1458:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1473:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1492:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1510:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1535:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1556:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1569:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1593:9
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1662:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1689:9
 ERROR Object of class `FunctionType` has no attribute `assert_called_once` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1679:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1709:9
 ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1680:16
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1710:16
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1707:9
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1737:9
 ERROR Object of class `FunctionType` has no attribute `call_count` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1724:16
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1757:16
 ERROR Object of class `FunctionType` has no attribute `side_effect` [missing-attribute]
-    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1814:9
-ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
     --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1847:9
+ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
+    --> tests/unit_tests/core/rag/rerank/test_rerank_model.py:1883:9
 ERROR Unpacked keyword argument `object` is not assignable to parameter `id` with type `SQLCoreOperations[str] | str` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `tenant_id` with type `SQLCoreOperations[str] | str` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `name` with type `SQLCoreOperations[str] | str` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `description` with type `SQLCoreOperations[str | None] | str | None` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `provider` with type `SQLCoreOperations[str] | str` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `maintainer` with type `SQLCoreOperations[str | None] | str | None` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `updated_by` with type `SQLCoreOperations[str | None] | str | None` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `built_in_field_enabled` with type `SQLCoreOperations[bool] | bool` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `enable_api` with type `SQLCoreOperations[bool] | bool` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
 ERROR Unpacked keyword argument `object` is not assignable to parameter `is_multimodal` with type `SQLCoreOperations[bool] | bool` in function `models.dataset.Dataset.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:186:20
-ERROR Argument `_FakeFlaskApp` is not assignable to parameter `flask_app` with type `Flask` in function `core.rag.retrieval.dataset_retrieval.DatasetRetrieval._run_retriever_thread` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3932:31
-ERROR Argument `_FakeFlaskApp` is not assignable to parameter `flask_app` with type `Flask` in function `core.rag.retrieval.dataset_retrieval.DatasetRetrieval._run_retriever_thread_safely` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3954:31
-ERROR Argument `_FakeFlaskApp` is not assignable to parameter `flask_app` with type `Flask` in function `core.rag.retrieval.dataset_retrieval.DatasetRetrieval._run_retriever_thread_safely` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3978:31
+   --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:188:20
+ERROR Object of class `DatasetRetriever` has no attribute `_multiple_retrieve_thread` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:1982:13
+ERROR Object of class `DatasetRetriever` has no attribute `_multiple_retrieve_thread` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2104:13
+ERROR Object of class `DatasetRetriever` has no attribute `_multiple_retrieve_thread` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2212:13
+ERROR Object of class `DatasetRetriever` has no attribute `_check_knowledge_rate_limit` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2506:13
+ERROR Object of class `DatasetRetriever` has no attribute `_check_knowledge_rate_limit` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2556:13
+ERROR Object of class `DatasetRetriever` has no attribute `_check_knowledge_rate_limit` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2603:17
+ERROR Object of class `DatasetRetriever` has no attribute `_records` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2742:21
+ERROR Object of class `DatasetRetriever` has no attribute `_records` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2803:35
+ERROR Object of class `DatasetRetriever` has no attribute `_records` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2855:35
+ERROR Object of class `DatasetRetriever` has no attribute `_records` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2910:35
+ERROR Object of class `DatasetRetriever` has no attribute `_records` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:2987:35
+ERROR Object of class `DatasetRetriever` has no attribute `_multiple_retrieve_thread_safely` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3879:21
+ERROR Object of class `DatasetRetriever` has no attribute `_thread` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3901:21
+ERROR Object of class `DatasetRetriever` has no attribute `_run_retriever_thread` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3916:17
+ERROR Object of class `DatasetRetriever` has no attribute `_run_retriever_thread_safely` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3938:17
+ERROR Object of class `DatasetRetriever` has no attribute `_run_retriever_thread_safely` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:3962:17
+ERROR Object of class `DatasetRetriever` has no attribute `_multiple_retrieve_thread` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4016:17
+ERROR Returned type `DatasetRetriever` is not assignable to declared return type `DatasetRetrieval` [bad-return]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4040:20
+ERROR Object of class `DatasetRetriever` has no attribute `_send_trace_task` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4160:13
+ERROR Object of class `DatasetRetriever` has no attribute `_send_trace_task` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4195:13
 ERROR Argument `Literal['completed']` is not assignable to parameter `indexing_status` with type `IndexingStatus | SQLCoreOperations[IndexingStatus]` in function `models.dataset.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4496:37
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4495:37
 ERROR Argument `Literal['completed']` is not assignable to parameter `indexing_status` with type `IndexingStatus | SQLCoreOperations[IndexingStatus]` in function `models.dataset.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4624:37
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4619:37
+ERROR Returned type `DatasetRetriever` is not assignable to declared return type `DatasetRetrieval` [bad-return]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4673:20
+ERROR Returned type `DatasetRetriever` is not assignable to declared return type `DatasetRetrieval` [bad-return]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4769:20
 ERROR Argument `SimpleNamespace` is not assignable to parameter `provider_model_bundle` with type `ProviderModelBundle` in function `core.app.entities.app_invoke_entities.ModelConfigWithCredentialsEntity.model_construct` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4779:39
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4780:39
 ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4849:13
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4848:13
 ERROR Argument `Literal['completed']` is not assignable to parameter `indexing_status` with type `IndexingStatus | SQLCoreOperations[IndexingStatus]` in function `models.dataset.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4984:33
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4981:33
 ERROR Argument `Literal['completed']` is not assignable to parameter `status` with type `SQLCoreOperations[SegmentStatus] | SegmentStatus` in function `models.dataset.DocumentSegment.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5000:24
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:4997:24
+ERROR Returned type `DatasetRetriever` is not assignable to declared return type `DatasetRetrieval` [bad-return]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5083:20
+ERROR Returned type `DatasetRetriever` is not assignable to declared return type `DatasetRetrieval` [bad-return]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5526:20
 ERROR Argument `Literal['completed']` is not assignable to parameter `indexing_status` with type `IndexingStatus | SQLCoreOperations[IndexingStatus]` in function `models.dataset.Document.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5573:37
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5563:37
 ERROR Argument `Literal['completed']` is not assignable to parameter `status` with type `SQLCoreOperations[SegmentStatus] | SegmentStatus` in function `models.dataset.DocumentSegment.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5603:28
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5593:28
 ERROR Argument `str | None` is not assignable to parameter `doc_id` with type `str` in function `_doc` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5644:28
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5634:28
 ERROR Argument `str | None` is not assignable to parameter `doc_id` with type `str` in function `_doc` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5655:28
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5645:28
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5697:17
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5686:17
 ERROR Argument `None` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5733:45
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5719:45
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5738:25
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5724:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5747:25
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5733:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5756:25
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5742:25
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5771:17
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5756:17
+ERROR Object of class `KnowledgeRetrievalRecords` has no attribute `_sessions` [missing-attribute]
+    --> tests/unit_tests/core/rag/retrieval/test_dataset_retrieval.py:5763:30
 ERROR Argument `SimpleNamespace` is not assignable to parameter\n\n... (truncated) ...

@41tair 41tair changed the title refactor(api): extract app generation and Agent Chat persistence ports refactor(api): extract app generation and Agent Chat persistence ports (API-76 7/12) Oct 8, 2026
@41tair 41tair changed the title refactor(api): extract app generation and Agent Chat persistence ports (API-76 7/12) refactor(api): extract app generation and Agent Chat persistence ports Oct 8, 2026
@41tair
41tair removed this pull request from stack #43683 October 8, 2026 10:47
@41tair
41tair added this pull request to stack #43700 October 8, 2026 10:47
@41tair
41tair force-pushed the refactor/api-76-7 branch from d22e665 to fd27f52 Compare October 9, 2026 04:13
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 7.77880% with 4019 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (refactor/api-76-6@52615ae). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ution/adapters/agent_v2/runtime_request_builder.py 0.00% 519 Missing ⚠️
...i/services/app/generation/adapters/agent_runner.py 0.00% 497 Missing ⚠️
.../execution/adapters/agent_v2/dify_tools_builder.py 0.00% 248 Missing ⚠️
api/services/agent/chat/base_runner.py 0.00% 225 Missing ⚠️
api/repositories/human_input/form_repository.py 28.15% 222 Missing ⚠️
api/services/agent/chat/function_call_runner.py 0.00% 214 Missing ⚠️
api/repositories/app/generation_repository.py 32.55% 196 Missing and 7 partials ⚠️
api/services/agent/chat/cot_runner.py 0.00% 202 Missing ⚠️
api/services/tools/tool_engine.py 0.00% 187 Missing ⚠️
...s/app/generation/adapters/agent_request_builder.py 0.00% 164 Missing ⚠️
... and 18 more
Additional details and impacted files
@@                 Coverage Diff                  @@
##             refactor/api-76-6   #43677   +/-   ##
====================================================
  Coverage                     ?   81.22%           
====================================================
  Files                        ?     6436           
  Lines                        ?   408442           
  Branches                     ?    82595           
====================================================
  Hits                         ?   331738           
  Misses                       ?    70473           
  Partials                     ?     6231           
Flag Coverage Δ
api 75.39% <7.77%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@41tair
41tair removed this pull request from stack #43700 October 9, 2026 09:41
@41tair
41tair added this pull request to stack #43755 October 9, 2026 09:42
@41tair
41tair marked this pull request as ready for review October 9, 2026 09:49

@Stream29 Stream29 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the dataset-tool compatibility regression noted inline.

Comment thread api/services/tools/dataset/tool.py Resolved

@Stream29 Stream29 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also sync the plugin dispatch identity check noted inline.

Stream29 and others added 5 commits November 5, 2026 22:25
Adapt moved App, Agent and Tool adapters to trace scopes without restoring kernel persistence. Preserve worker-owned Agent terminals, post-commit events, knowledge filter resolution and plugin installation pins.
Propagate the verified frontend-only main update without changing backend contents.
@41tair
41tair requested a review from JohnJyong as a code owner November 6, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: top ghfind author score; see https://ghfind.com size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants