fix(agent): align config detail and output contracts#37535
Merged
Conversation
Contributor
Pyrefly Type Coverage
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-06-16 18:09:23.822589349 +0000
+++ /tmp/pyrefly_pr.txt 2026-06-16 18:09:15.800528915 +0000
@@ -1865,31 +1865,31 @@
ERROR No attribute `MethodView` in module `builtins` [missing-attribute]
--> tests/unit_tests/controllers/common/test_fields.py:9:5
ERROR Argument `SimpleNamespace` is not assignable to parameter `current_user` with type `Account` in function `controllers.console.app.completion._create_chat_message` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:575:74
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:583:74
ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `controllers.console.app.completion._create_chat_message` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:575:98
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:583:98
ERROR Argument `SimpleNamespace` is not assignable to parameter `current_user` with type `Account` in function `controllers.console.app.completion._create_chat_message` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:625:30
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:633:30
ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `controllers.console.app.completion._create_chat_message` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:626:27
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:634:27
ERROR Object of class `object` has no attribute `data` [missing-attribute]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:706:50
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:714:50
ERROR Object of class `object` has no attribute `limit` [missing-attribute]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:707:30
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:715:30
ERROR Object of class `object` has no attribute `has_more` [missing-attribute]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:708:33
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:716:33
ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `controllers.console.app.message._list_chat_messages` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:720:67
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:728:67
ERROR Argument `SimpleNamespace` is not assignable to parameter `current_user` with type `Account` in function `controllers.console.app.message._update_message_feedback` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:736:30
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:744:30
ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `controllers.console.app.message._update_message_feedback` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:737:27
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:745:27
ERROR Argument `SimpleNamespace` is not assignable to parameter `current_user` with type `Account` in function `controllers.console.app.message._get_message_suggested_questions` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:773:26
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:781:26
ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `controllers.console.app.message._get_message_suggested_questions` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:774:23
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:782:23
ERROR Argument `Literal['00000000-0000-0000-0000-000000000002']` is not assignable to parameter `message_id` with type `UUID` in function `controllers.console.app.message._get_message_suggested_questions` [bad-argument-type]
- --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:775:24
+ --> tests/unit_tests/controllers/console/agent/test_agent_controllers.py:783:24
ERROR Object of class `int` has no attribute `lower` [missing-attribute]
--> tests/unit_tests/controllers/console/app/test_annotation_security.py:221:38
ERROR Object of class `int` has no attribute `lower` [missing-attribute]
@@ -6067,33 +6067,33 @@
ERROR Argument `list[SimpleNamespace]` is not assignable to parameter `recipients` with type `Sequence[HumanInputFormRecipient]` in function `repositories.sqlalchemy_api_workflow_run_repository._build_human_input_required_reason` [bad-argument-type]
--> tests/unit_tests/repositories/test_sqlalchemy_api_workflow_run_repository.py:56:9
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.project_draft_bindings_to_graph` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1273:21
+ --> tests/unit_tests/services/agent/test_agent_services.py:1331:21
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_roster_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1329:21
+ --> tests/unit_tests/services/agent/test_agent_services.py:1390:21
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1398:21
+ --> tests/unit_tests/services/agent/test_agent_services.py:1459:21
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1453:25
+ --> tests/unit_tests/services/agent/test_agent_services.py:1514:25
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1485:25
+ --> tests/unit_tests/services/agent/test_agent_services.py:1546:25
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1517:25
+ --> tests/unit_tests/services/agent/test_agent_services.py:1578:25
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1563:25
+ --> tests/unit_tests/services/agent/test_agent_services.py:1624:25
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_roster_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1623:21
+ --> tests/unit_tests/services/agent/test_agent_services.py:1684:21
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_roster_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1693:21
+ --> tests/unit_tests/services/agent/test_agent_services.py:1754:21
ERROR Argument `FakeSession` is not assignable to parameter `session` with type `Session` in function `services.agent.workflow_publish_service.WorkflowAgentPublishService.sync_roster_agent_bindings_for_draft` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_agent_services.py:1726:21
+ --> tests/unit_tests/services/agent/test_agent_services.py:1787:21
ERROR Object of class `object` has no attribute `skills_files` [missing-attribute]
- --> tests/unit_tests/services/agent/test_agent_services.py:1938:37
+ --> tests/unit_tests/services/agent/test_agent_services.py:1999:37
ERROR Object of class `object` has no attribute `skills_files` [missing-attribute]
- --> tests/unit_tests/services/agent/test_agent_services.py:1975:34
+ --> tests/unit_tests/services/agent/test_agent_services.py:2036:34
ERROR Object of class `object` has no attribute `skills_files` [missing-attribute]
- --> tests/unit_tests/services/agent/test_agent_services.py:1999:34
+ --> tests/unit_tests/services/agent/test_agent_services.py:2060:34
ERROR Object of class `object` has no attribute `skills_files` [missing-attribute]
- --> tests/unit_tests/services/agent/test_agent_services.py:2000:12
+ --> tests/unit_tests/services/agent/test_agent_services.py:2061:12
ERROR Object of class `NoneType` has no attribute `workflow_prompt` [missing-attribute]
--> tests/unit_tests/services/agent/test_composer_mention_validation.py:113:5
ERROR Class member `ConcreteApiKeyAuth.validate_credentials` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #37535 +/- ##
=======================================
Coverage 86.29% 86.29%
=======================================
Files 4777 4777
Lines 240794 240874 +80
Branches 44459 44476 +17
=======================================
+ Hits 207788 207874 +86
+ Misses 28959 28955 -4
+ Partials 4047 4045 -2
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:
|
lyzno1
approved these changes
Jun 17, 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
active_config_is_publishedto Agent app list/detail and roster responses so the UI can tell whether the current active Agent config has been published.valuesupport for Agent secret refs and map it to the Agent backend shell-layerrefat runtime.Linear
Validation
uv run ruff check api/models/agent_config_entities.py api/core/workflow/nodes/agent_v2/runtime_request_builder.py api/services/agent/roster_service.py api/controllers/console/agent/roster.py api/controllers/console/app/app.py api/fields/agent_fields.py api/tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py api/tests/unit_tests/services/agent/test_agent_services.pyuv run --project api python -m py_compile ...targeted files...deploy/agentat186f5a8274and verified onhttps://agent.dify.dev:GET /console/api/agentandGET /console/api/agent/{agent_id}returnactive_config_is_published.PUT/GET /console/api/agent/{agent_id}/composerpersists and returnsenv.secret_refs[].value.valueto Agent backendsecret_refs[].ref.PUT/GET /console/api/apps/{app_id}/workflows/draft/nodes/{node_id}/agent-composerpreserves nested declared outputchildren.GET /console/api/apps/{app_id}/workflows/draftprojects nestedagent_declared_outputsinto graph node data.Note: local pytest still exits with 139 before targeted tests run in this workspace, matching the previous local environment behavior.