fix(agent): pass workflow files to agent node runtime#38453
Merged
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-07-06 05:04:07.127264594 +0000
+++ /tmp/pyrefly_pr.txt 2026-07-06 05:03:55.072232899 +0000
@@ -6228,25 +6228,29 @@
ERROR Cannot index into `object` [bad-index]
--> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:218:22
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1116:25
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1125:25
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1117:18
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1126:18
ERROR Class member `FileVariablePool.get` overrides parent class `FakeVariablePool` in an inconsistent manner [bad-override]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1134:13
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1143:13
ERROR Class member `FileVariablePool.get` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1134:13
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1143:13
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1159:12
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1168:12
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1195:12
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1204:12
ERROR Class member `FileArrayVariablePool.get` overrides parent class `FakeVariablePool` in an inconsistent manner [bad-override]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1206:13
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1215:13
ERROR Class member `FileArrayVariablePool.get` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1206:13
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1215:13
+ERROR Class member `UploadedFilesVariablePool.get` overrides parent class `FakeVariablePool` in an inconsistent manner [bad-override]
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1268:13
+ERROR Class member `UploadedFilesVariablePool.get` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1268:13
ERROR Class member `LongRemoteUrlVariablePool.get` overrides parent class `FakeVariablePool` in an inconsistent manner [bad-override]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1259:13
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1310:13
ERROR Class member `LongRemoteUrlVariablePool.get` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
- --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1259:13
+ --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:1310:13
ERROR Object of class `LayerConfig` has no attribute `prefix`
ERROR Object of class `LayerConfig` has no attribute `prefix`
ERROR Class member `_WaitableFakeAgentBackendRunClient.wait_run` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
|
Contributor
Pyrefly Type Coverage
|
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\n- include workflow uploaded sys.files in Agent v2 workflow context prompt\n- serialize uploaded workflow files with the existing agent file mapping format\n- add unit coverage for sys.files without explicit prompt markers\n\n## Verification\n- uv run --project api --dev ruff check api/core/workflow/nodes/agent_v2/runtime_request_builder.py api/tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py\n- uv run --project api --dev ruff format --check api/core/workflow/nodes/agent_v2/runtime_request_builder.py api/tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py\n- git diff --check origin/feat/agent-v2...HEAD\n- dev E2E on https://agent.dify.dev: created workflow app, configured inline Agent v2 with OpenAI gpt-5.5, uploaded local file, ran draft workflow Start -> Agent v2 -> End; workflow succeeded and Agent returned FILE_SEEN with dify-file-ref\n\nNote: local pytest crashes before test collection in the existing api/.venv gevent import path (segmentation fault in _pytest/capture.py); not a test assertion failure.