Repository navigation
test: use sqlite_session in node execution list test - #44998
Merged
asukaminato0721 merged 1 commit intoOct 29, 2026
Merged
asukaminato0721 merged 1 commit into
asukaminato0721 merged 1 commit into
Conversation
asukaminato0721
enabled auto-merge
October 29, 2026 06:30
asukaminato0721
approved these changes
Oct 29, 2026
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-10-29 06:31:40.303396461 +0000
+++ /tmp/pyrefly_pr.txt 2026-10-29 06:31:30.119297788 +0000
@@ -636,6 +636,16 @@
--> tests/e2e_tests/containers/services/test_conversation_service.py:155:20
ERROR Argument `Literal[core.app.entities.app_invoke_entities.InvokeFrom.WEB_APP]` is not assignable to parameter `invoke_from` with type `models.enums.InvokeFrom | SQLCoreOperations[models.enums.InvokeFrom | None] | None` in function `models.model.Message.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_conversation_service.py:156:25
+ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:45:18
+ERROR Argument `Literal['chat']` is not assignable to parameter `mode` with type `AppMode | SQLCoreOperations[AppMode]` in function `models.model.App.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:55:18
+ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `models.model.App.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:56:23
+ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:113:20
+ERROR Argument `Literal['debugger', 'explore', 'openapi', 'published', 'service-api', 'trigger', 'validation', 'web-app']` is not assignable to parameter `invoke_from` with type `InvokeFrom | SQLCoreOperations[InvokeFrom | None] | None` in function `models.model.Conversation.__init__` [bad-argument-type]
+ --> tests/e2e_tests/containers/services/test_conversation_service_variables.py:114:25
ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
--> tests/e2e_tests/containers/services/test_dataset_permission_service.py:39:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -2483,9 +2493,9 @@
ERROR Argument `list[dict[str, Any]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
--> tests/unit_tests/controllers/service_api/app/test_completion.py:256:24
ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `limit` [bad-argument-type]
- --> tests/unit_tests/controllers/service_api/app/test_conversation.py:70:39
+ --> tests/unit_tests/controllers/service_api/app/test_conversation.py:125:39
ERROR Argument value `Literal[101]` violates Pydantic `le` constraint `Literal[100]` for field `limit` [bad-argument-type]
- --> tests/unit_tests/controllers/service_api/app/test_conversation.py:75:39
+ --> tests/unit_tests/controllers/service_api/app/test_conversation.py:130:39
ERROR Argument `Literal['app-run']` is not assignable to parameter `triggered_from` with type `SQLCoreOperations[WorkflowRunTriggeredFrom] | WorkflowRunTriggeredFrom` in function `models.workflow.WorkflowRun.__init__` [bad-argument-type]
--> tests/unit_tests/controllers/service_api/app/test_workflow_events.py:283:24
ERROR Argument `SimpleNamespace` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.advanced_chat.generate_task_pipeline.AdvancedChatAppGenerateTaskPipeline.__init__` [bad-argument-type]
@@ -3428,6 +3438,14 @@
--> tests/unit_tests/core/app/apps/chat/test_app_generator.py:491:28
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:491:49
+ERROR Cannot index into `str` [bad-index]
+ --> tests/unit_tests/core/app/apps/chat/test_generate_response_converter.py:60:16
+ERROR Cannot index into `str` [bad-index]
+ --> 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[Unknown]` [bad-assignment]
+ --> tests/unit_tests/core/app/apps/common/test_graph_runtime_state_support.py:20:36
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
ERROR Class member `_RecordingWorkflowAppRunner._publish_event` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
@@ -3640,6 +3658,8 @@
--> tests/unit_tests/core/app/apps/test_workflow_app_runner.py:1073:29
ERROR Generator function should return `Generator` [bad-return]
--> tests/unit_tests/core/app/apps/workflow/test_active_workflow_tasks.py:15:29
+ERROR Cannot set item in `object` [unsupported-operation]
+ --> tests/unit_tests/core/app/apps/workflow/test_app_config_manager.py:47:17
ERROR Argument `tuple[Literal['layer']]` is not assignable to parameter `graph_engine_layers` with type `Sequence[Layer]` in function `core.app.apps.workflow.app_generator.WorkflowAppGenerator.resume` [bad-argument-type]
--> tests/unit_tests/core/app/apps/workflow/test_app_generator.py:398:33
ERROR Argument `tuple[Literal['base-layer']]` is not assignable to parameter `graph_engine_layers` with type `Sequence[Layer]` in function `core.app.apps.workflow.app_generator.WorkflowAppGenerator._generate` [bad-argument-type]
@@ -5661,17 +5681,17 @@
ERROR Argument `dict[@_, @_]` is not assignable to parameter `headers` with type `HTTPHeaders` in function `botocore.awsrequest.AWSResponse.__init__` [bad-argument-type]
--> tests/unit_tests/libs/test_archive_storage.py:160:50
ERROR `dict[str, str]` is not assignable to attribute `description` with type `str | None` [bad-assignment]
- --> tests/unit_tests/libs/test_external_api.py:84:29
+ --> tests/unit_tests/libs/test_external_api.py:83:29
ERROR Argument `_PassthroughFormatter` is not assignable to parameter `error_body_formatter` with type `ErrorBodyFormatter | None` in function `libs.external_api.ExternalApi.__init__` [bad-argument-type]
- --> tests/unit_tests/libs/test_external_api.py:285:72
+ --> tests/unit_tests/libs/test_external_api.py:284:72
ERROR Argument `Unknown | None` is not assignable to parameter `blueprint` with type `Blueprint` in function `flask.sansio.app.App.register_blueprint` [bad-argument-type]
- --> tests/unit_tests/libs/test_external_api.py:399:28
+ --> tests/unit_tests/libs/test_external_api.py:398:28
ERROR Cannot index into `str` [bad-index]
- --> tests/unit_tests/libs/test_external_api.py:435:12
+ --> tests/unit_tests/libs/test_external_api.py:434:12
ERROR Cannot index into `bool` [bad-index]
- --> tests/unit_tests/libs/test_external_api.py:436:12
+ --> tests/unit_tests/libs/test_external_api.py:435:12
ERROR Cannot index into `str` [bad-index]
- --> tests/unit_tests/libs/test_external_api.py:436:12
+ --> tests/unit_tests/libs/test_external_api.py:435:12
ERROR Class member `User.get_id` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/libs/test_flask_utils.py:18:9
ERROR `str` is not assignable to dict key `error` with type `None` [bad-assignment]
@@ -5779,53 +5799,53 @@
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `AgentIconType | SQLCoreOperations[AgentIconType | None] | None` in function `models.agent.Agent.__init__` [bad-argument-type]
--> tests/unit_tests/services/agent/test_roster_service.py:2497:19
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `AgentIconType | SQLCoreOperations[AgentIconType | None] | None` in function `models.agent.Agent.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:2653:19
+ --> tests/unit_tests/services/agent/test_roster_service.py:2652:19
ERROR Object of class `object` has no attribute `prompt` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:3073:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3064:12
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/agent/test_roster_service.py:3264:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3255:12
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/agent/test_roster_service.py:3265:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3256:12
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/agent/test_roster_service.py:3266:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3257:12
ERROR Argument `list[str | None]` is not assignable to parameter `version_ids` with type `list[str]` in function `services.agent.roster_service.AgentRosterService._load_versions_by_id` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4371:52
+ --> tests/unit_tests/services/agent/test_roster_service.py:4362:52
ERROR Argument `Literal[0]` is not assignable to parameter `message_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4530:36
+ --> tests/unit_tests/services/agent/test_roster_service.py:4521:36
ERROR Argument `Literal[0]` is not assignable to parameter `answer_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4532:35
+ --> tests/unit_tests/services/agent/test_roster_service.py:4523:35
ERROR Argument `Literal[0]` is not assignable to parameter `total_price` with type `Decimal | SQLCoreOperations[Decimal | None] | None` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4533:29
+ --> tests/unit_tests/services/agent/test_roster_service.py:4524:29
ERROR Object of class `NoneType` has no attribute `conversation_id` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5306:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5297:16
ERROR Argument `Literal['simple']` is not assignable to parameter `prompt_type` with type `PromptType | SQLCoreOperations[PromptType]` in function `models.model.AppModelConfig.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:5410:25
+ --> tests/unit_tests/services/agent/test_roster_service.py:5401:25
ERROR Unpacked keyword argument `Any | None` is not assignable to parameter `prompt_type` with type `PromptType | SQLCoreOperations[PromptType]` in function `models.model.AppModelConfig.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:5418:34
+ --> tests/unit_tests/services/agent/test_roster_service.py:5409:34
ERROR Object of class `object` has no attribute `name` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5524:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5515:16
ERROR Object of class `object` has no attribute `mode` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5525:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5516:16
ERROR Object of class `object` has no attribute `agent_role` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5526:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5517:16
ERROR Object of class `object` has no attribute `config_snapshot` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5536:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5527:16
ERROR Object of class `object` has no attribute `home_snapshot_id` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5538:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5529:16
ERROR Object of class `object` has no attribute `summary` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5539:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5530:16
ERROR Object of class `object` has no attribute `version_note` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5540:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5531:16
ERROR Object of class `object` has no attribute `active_config_has_model` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5541:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5532:16
ERROR Object of class `object` has no attribute `active_config_is_published` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5542:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5533:16
ERROR Object of class `object` has no attribute `updated_by` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5543:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5534:16
ERROR Object of class `object` has no attribute `id` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5544:35
+ --> tests/unit_tests/services/agent/test_roster_service.py:5535:35
ERROR Object of class `object` has no attribute `agent_role` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5614:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5605:16
ERROR Argument `object` is not assignable to parameter `pwd` with type `bytes | None` in function `zipfile.ZipFile.read` [bad-argument-type]
--> tests/unit_tests/services/agent/test_skill_package_service.py:306:44
ERROR Object of class `NoneType` has no attribute `node_job_config_dict` [missing-attribute]
@@ -5866,6 +5886,14 @@
--> tests/unit_tests/services/enterprise/test_plugin_manager_service.py:59:25
ERROR Argument `None` is not assignable to parameter `response` with type `Response` in function `httpx._exceptions.HTTPStatusError.__init__` [bad-argument-type]
--> tests/unit_tests/services/enterprise/test_plugin_manager_service.py:60:26
+ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
+ --> tests/unit_tests/services/errors/test_plugin.py:55:13
+ERROR Object of class `NoneType` has no attribute `version` [missing-attribute]
+ --> tests/unit_tests/services/errors/test_plugin.py:85:16
+ERROR Object of class `NoneType` has no attribute `version` [missing-attribute]
+ --> tests/unit_tests/services/errors/test_plugin.py:103:16
+ERROR Object of class `NoneType` has no attribute `credential_id` [missing-attribute]
+ --> tests/unit_tests/services/errors/test_plugin.py:570:16
ERROR Argument `str` is not assignable to parameter `type` with type `Literal['basic', 'bearer', 'custom'] | None` in function `services.entities.external_knowledge_entities.external_knowledge_entities.AuthorizationConfig.__init__` [bad-argument-type]
--> tests/unit_tests/services/knowledge/external/test_service.py:116:60
ERROR Argument `str` is not assignable to parameter `type` with type `Literal['api-key', 'no-auth']` in function `services.entities.external_knowledge_entities.external_knowledge_entities.Authorization.__init__` [bad-argument-type]
@@ -5989,17 +6017,17 @@
ERROR `in` is not supported between `Literal['not found']` and `None` [not-iterable]
--> tests/unit_tests/services/retention/workflow_run/test_restore_archived_workflow_run.py:894:16
ERROR Argument `SimpleNamespace` is not assignable to parameter `version` with type `AgentConfigDraft | AgentConfigSnapshot` in function `services.agent_config_service.AgentConfigTarget.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_agent_config_service.py:161:17
+ --> tests/unit_tests/services/test_agent_config_service.py:159:17
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/test_agent_config_service.py:1021:12
+ --> tests/unit_tests/services/test_agent_config_service.py:1023:12
ERROR Type `object` is not iterable [not-iterable]
- --> tests/unit_tests/services/test_agent_config_service.py:1022:38
+ --> tests/unit_tests/services/test_agent_config_service.py:1024:38
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/test_agent_config_service.py:1179:38
+ --> tests/unit_tests/services/test_agent_config_service.py:1181:38
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/test_agent_config_service.py:1180:12
+ --> tests/unit_tests/services/test_agent_config_service.py:1182:12
ERROR Type `object` is not iterable [not-iterable]
- --> tests/unit_tests/services/test_agent_config_service.py:1216:38
+ --> tests/unit_tests/services/test_agent_config_service.py:1218:38
ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
--> tests/unit_tests/services/test_api_token_service.py:309:13
ERROR Argument `Literal['app']` is not assignable to parameter `value` with type `ApiTokenType | SQLCoreOperations[ApiTokenType]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
@@ -6132,6 +6160,14 @@
--> tests/unit_tests/services/test_snippet_service.py:1035:9
ERROR Object of class `NoneType` has no attribute `use_count` [missing-attribute]
--> tests/unit_tests/services/test_snippet_service.py:1090:12
+ERROR Cannot set item in `dict[str, int]` [unsupported-operation]
+ --> tests/unit_tests/services/test_variable_truncator.py:147:35
+ERROR Argument `list[File]` is not assignable to parameter `value` with type `list[object]` in function `services.variable_truncator.VariableTruncator._truncate_array` [bad-argument-type]
+ --> tests/unit_tests/services/test_variable_truncator.py:724:48
+ERROR Argument `list[File]` is not assignable to parameter `value` with type `list[object]` in function `services.variable_truncator.VariableTruncator._truncate_array` [bad-argument-type]
+ --> tests/unit_tests/services/test_variable_truncator.py:736:48
+ERROR Argument `list[File]` is not assignable to parameter `value` with type `list[object]` in function `services.variable_truncator.VariableTruncator._truncate_array` [bad-argument-type]
+ --> tests/unit_tests/services/test_variable_truncator.py:751:48
ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
--> tests/unit_tests/services/test_workflow_collaboration_service.py:47:56
WARN Call to deprecated overload `contextlib.contextmanager` [deprecated]
@@ -6504,3 +6540,17 @@
--> tests/unit_tests/tasks/test_human_input_timeout_tasks.py:214:12
ERROR Object of class `NoneType` has no attribute `status` [missing-attribute]
--> tests/unit_tests/tasks/test_human_input_timeout_tasks.py:215:12
+ERROR Object of class `ModuleType` has no attribute `is_enabled` [missing-attribute]
+ --> tests/unit_tests/tasks/test_ops_trace_task.py:54:5
+ERROR Object of class `ModuleType` has no attribute `OpsTraceManager` [missing-attribute]
+ --> tests/unit_tests/tasks/test_ops_trace_task.py:56:5
+ERROR Object of class `ModuleType` has no attribute `EnterpriseOtelTrace` [missing-attribute]
+ --> tests/unit_tests/tasks/test_ops_trace_task.py:65:9
+ERROR Missing argument `file_info` in function `celery.app.task.Task.push_request` [missing-argument]
+ --> tests/unit_tests/tasks/test_ops_trace_task.py:91:37
+ERROR Unexpected keyword argument `retries` in function `celery.app.task.Task.push_request` [unexpected-keyword]
+ --> tests/unit_tests/tasks/test_ops_trace_task.py:91:38
+ERROR `*` is not supported between `None` and `int` [unsupported-operation]
+ --> tests/unit_tests/tasks/test_ops_trace_task.py:252:9
+ERROR Argument `int | None` is not assignable to parameter `retries` with type `int` in function `_run_task` [bad-argument-type]
+ --> tests/unit_tests/tasks/test_ops_trace_task.py:332:38
|
Contributor
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44998 +/- ##
=======================================
Coverage 59.61% 59.61%
=======================================
Files 6010 6010
Lines 377012 377012
Branches 76335 76335
=======================================
Hits 224766 224766
Misses 146248 146248
Partials 5998 5998
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #44973.
test_get_node_executionspasses_current_user built its response with aMagicMocksession whosescalarreturnedNone, so the creator lookup never ran against real data. It now uses the sharedsqlite_sessionfixture, seeds a creator account and a decoy account, and asserts the response includes the creator’sidandname.Checked: temporarily changing the account filter in
WorkflowNodeExecutionModel.created_by_account(==to!=) made the new assertion fail; I restored the file afterwards. Therag_pipelinetest folder (155 tests) passes, andruff check/ruff formatare clean.Left untouched: the other tests in this file.
Screenshots
N/A (test-only change)
Checklist
make lint && make type-check(backend) andvp staged(frontend) to appease the lint gods