refactor(api): clarify DSL import and plugin migration boundaries#38483
Merged
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-07-06 18:35:16.891334074 +0000
+++ /tmp/pyrefly_pr.txt 2026-07-06 18:35:08.056296938 +0000
@@ -7428,6 +7428,18 @@
--> tests/unit_tests/services/test_annotation_service.py:1194:59
ERROR TypedDict `AnnotationSettingDisabledDict` does not have key `embedding_model` [bad-typed-dict-key]
--> tests/unit_tests/services/test_annotation_service.py:1231:27
+ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.app_dsl_service.AppDslService.__init__` [bad-argument-type]
+ --> tests/unit_tests/services/test_app_dsl_service.py:9:37
+ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.app_dsl_service.AppDslService.import_app` [bad-argument-type]
+ --> tests/unit_tests/services/test_app_dsl_service.py:12:17
+ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.app_dsl_service.AppDslService.__init__` [bad-argument-type]
+ --> tests/unit_tests/services/test_app_dsl_service.py:27:37
+ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.app_dsl_service.AppDslService.import_app` [bad-argument-type]
+ --> tests/unit_tests/services/test_app_dsl_service.py:30:17
+ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.app_dsl_service.AppDslService.__init__` [bad-argument-type]
+ --> tests/unit_tests/services/test_app_dsl_service.py:44:37
+ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.app_dsl_service.AppDslService.import_app` [bad-argument-type]
+ --> tests/unit_tests/services/test_app_dsl_service.py:47:17
ERROR Class member `_TrackingRateLimit.exit` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/services/test_app_generate_service.py:560:17
ERROR Class member `_TrackingRateLimit.exit` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
@@ -7717,97 +7729,105 @@
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
--> tests/unit_tests/services/test_snippet_dsl_service.py:112:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:119:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:120:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:129:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:132:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:133:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:139:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:155:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:149:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:158:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:156:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:168:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:166:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:171:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:170:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:181:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:192:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:184:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:195:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:194:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:205:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:210:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:208:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:220:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:218:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:235:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:221:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:250:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:231:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:263:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:247:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:274:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:257:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:294:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:272:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:306:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:287:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:300:17
+ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:311:41
+ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.import_snippet` [bad-argument-type]
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:331:17
+ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:343:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.confirm_import` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:309:66
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:346:66
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:316:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:353:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.confirm_import` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:319:62
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:356:62
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:326:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:363:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.confirm_import` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:353:67
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:390:67
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:368:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:405:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.confirm_import` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:376:67
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:413:67
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:383:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:420:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService.confirm_import` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:394:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:431:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:402:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:439:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_dsl_service.SnippetDslService.check_dependencies` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:408:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:445:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:414:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:451:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_dsl_service.SnippetDslService.check_dependencies` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:432:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:469:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:449:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:486:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet | None` in function `services.snippet_dsl_service.SnippetDslService._create_or_update_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:458:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:495:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService._create_or_update_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:469:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:506:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:482:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:519:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `account` with type `Account` in function `services.snippet_dsl_service.SnippetDslService._create_or_update_snippet` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:497:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:534:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:509:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:546:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_dsl_service.SnippetDslService.export_snippet_dsl` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:516:36
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:553:36
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:520:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:557:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_dsl_service.SnippetDslService.export_snippet_dsl` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:542:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:579:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:550:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:587:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_dsl_service.SnippetDslService._append_workflow_export_data` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:595:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:632:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `services.snippet_dsl_service.SnippetDslService._append_workflow_export_data` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:596:18
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:633:18
ERROR Argument `SimpleNamespace` is not assignable to parameter `session` with type `Session` in function `services.snippet_dsl_service.SnippetDslService.__init__` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:608:41
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:645:41
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_dsl_service.SnippetDslService._append_workflow_export_data` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:635:17
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:672:17
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `services.snippet_dsl_service.SnippetDslService._append_workflow_export_data` [bad-argument-type]
- --> tests/unit_tests/services/test_snippet_dsl_service.py:636:18
+ --> tests/unit_tests/services/test_snippet_dsl_service.py:673:18
ERROR Argument `Iterator[Any]` is not assignable to parameter `response` with type `Generator[Mapping[str, Any] | str] | Mapping[str, Any]` in function `services.snippet_generate_service.SnippetGenerateService._filter_virtual_start_events` [bad-argument-type]
--> tests/unit_tests/services/test_snippet_generate_service.py:44:68
ERROR Argument `SimpleNamespace` is not assignable to parameter `snippet` with type `CustomizedSnippet` in function `services.snippet_generate_service.SnippetGenerateService._ensure_start_node` [bad-argument-type]
|
Contributor
Pyrefly Type Coverage
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #38483 +/- ##
=======================================
Coverage 85.34% 85.35%
=======================================
Files 5003 5004 +1
Lines 265284 265285 +1
Branches 50424 50425 +1
=======================================
+ Hits 226418 226427 +9
+ Misses 34416 34411 -5
+ Partials 4450 4447 -3
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:
|
agarwalpranav0711
pushed a commit
to agarwalpranav0711/dify
that referenced
this pull request
Jul 7, 2026
…nggenius#38483) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This was referenced Jul 7, 2026
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
Validation
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u NO_PROXY -u http_proxy -u https_proxy -u all_proxy -u no_proxy DEBUG=false uv run --project api pytest api/tests/unit_tests/services/test_app_dsl_service.py api/tests/unit_tests/services/test_snippet_dsl_service.py api/tests/unit_tests/services/rag_pipeline/test_rag_pipeline_dsl_service.py api/tests/unit_tests/services/rag_pipeline/test_rag_pipeline_transform_service.py api/tests/unit_tests/services/plugin/test_plugin_migration.pyCloses #38482