Repository navigation
Conversation
This was referenced Oct 21, 2026
Draft
Draft
Preserve current tracing and dependency updates alongside complete-call validation and replay state. Load app ownership with history messages to avoid per-message queries, and adapt regression fixtures to the current dataclass models.
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-10-28 06:35:55.180842040 +0000
+++ /tmp/pyrefly_pr.txt 2026-10-28 06:35:43.912772370 +0000
@@ -2811,91 +2811,91 @@
ERROR No matching overload found for function `str.join` called with arguments: (list[AgentScratchpadUnit.Action | str]) [no-matching-overload]
--> tests/unit_tests/core/agent/output_parser/test_cot_output_parser.py:249:25
ERROR `None` is not assignable to attribute `agent_callback` with type `DifyAgentCallbackHandler` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:121:29
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:122:29
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:124:5
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:125:5
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:129:9
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:130:9
ERROR Missing required key `action` for TypedDict `ActionDict` [bad-typed-dict-key]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:157:44
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:158:44
ERROR Missing required key `action_input` for TypedDict `ActionDict` [bad-typed-dict-key]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:157:44
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:158:44
ERROR Key `invalid` is not defined in TypedDict `ActionDict` [bad-typed-dict-key]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:157:45
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:158:45
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:211:55
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:212:55
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:224:55
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:225:55
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:248:35
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:249:35
ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:250:33
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:251:33
ERROR Object of class `FunctionType` has no attribute `call_args_list` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:251:61
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:252:61
ERROR `None` is not assignable to attribute `agent_callback` with type `DifyAgentCallbackHandler` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:269:33
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:270:33
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:272:29
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:273:29
ERROR Object of class `NoneType` has no attribute `max_iteration` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:275:9
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:276:9
ERROR `None` is not assignable to attribute `agent_callback` with type `DifyAgentCallbackHandler` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:291:33
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:292:33
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:294:29
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:295:29
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:305:35
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:306:35
ERROR Object of class `NoneType` has no attribute `max_iteration` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:309:9
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:310:9
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:321:29
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:322:29
ERROR Object of class `NoneType` has no attribute `max_iteration` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:326:9
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:327:9
ERROR `Literal[1]` is not assignable to attribute `prompt_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:332:32
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:333:32
ERROR `Literal[1]` is not assignable to attribute `completion_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:333:36
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:334:36
ERROR `Literal[2]` is not assignable to attribute `total_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:334:31
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:335:31
ERROR `Literal[1]` is not assignable to attribute `prompt_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:340:32
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:341:32
ERROR `Literal[1]` is not assignable to attribute `completion_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:341:36
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:342:36
ERROR `Literal[2]` is not assignable to attribute `total_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:342:31
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:343:31
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:370:35
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:371:35
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:382:19
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:383:19
ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:402:9
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:405:9
ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:410:16
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:413:16
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:428:25
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:431:25
ERROR Object of class `NoneType` has no attribute `max_iteration` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:448:9
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:451:9
ERROR `None` is not assignable to attribute `agent_callback` with type `DifyAgentCallbackHandler` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:456:33
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:459:33
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:458:25
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:461:25
ERROR `list[str]` is not assignable to attribute `_agent_scratchpad` with type `list[AgentScratchpadUnit]` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:488:36
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:491:36
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:510:55
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:513:55
ERROR Object of class `FunctionType` has no attribute `assert_called` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:514:9
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:517:9
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:580:35
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:582:35
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:594:35
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:596:35
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:608:35
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:610:35
ERROR Object of class `DummyRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_cot_agent_runner.py:623:35
+ --> tests/unit_tests/core/agent/test_cot_agent_runner.py:625:35
ERROR `list[DummyTool]` is not assignable to attribute `_prompt_messages_tools` with type `Sequence[PromptMessageTool]` [bad-assignment]
--> tests/unit_tests/core/agent/test_cot_chat_agent_runner.py:49:37
ERROR `DummyGenerateEntity` is not assignable to attribute `application_generate_entity` with type `AgentChatAppGenerateEntity` [bad-assignment]
- --> tests/unit_tests/core/agent/test_cot_chat_agent_runner.py:53:42
+ --> tests/unit_tests/core/agent/test_cot_chat_agent_runner.py:54:42
ERROR `in` is not supported between `Literal['History']` and `None` [not-iterable]
--> tests/unit_tests/core/agent/test_cot_completion_agent_runner.py:175:16
ERROR `in` is not supported between `Literal['Thought: Thinking']` and `None` [not-iterable]
@@ -2909,79 +2909,69 @@
ERROR `in` is not supported between `Literal['Question: What is Python?']` and `None` [not-iterable]
--> tests/unit_tests/core/agent/test_cot_completion_agent_runner.py:180:16
ERROR `Literal[0]` is not assignable to attribute `prompt_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:51:26
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:48:26
ERROR `Literal[0]` is not assignable to attribute `completion_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:52:30
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:49:30
ERROR `Literal[0]` is not assignable to attribute `total_price` with type `Decimal` [bad-assignment]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:53:25
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:50:25
ERROR Missing argument `session` in function `core.agent.base_agent_runner.BaseAgentRunner.__init__` [missing-argument]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:194:37
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:165:37
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:227:5
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:198:5
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:238:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:209:9
ERROR Argument `None` is not assignable to parameter `query` with type `str` in function `core.agent.fc_agent_runner.FunctionCallAgentRunner._organize_user_query` [bad-argument-type]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:339:46
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:310:46
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:407:58
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:358:58
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:455:19
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:406:19
ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:512:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:463:9
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:514:35
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:465:35
ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:516:33
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:467:33
ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:517:33
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:468:33
ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:518:16
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:469:16
ERROR Object of class `FunctionType` has no attribute `assert_called` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:523:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:474:9
ERROR Object of class `FunctionType` has no attribute `call_args_list` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:525:23
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:476:23
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:531:19
-ERROR Argument `list[TextPromptMessageContent]` is not assignable to parameter `content` with type `str | None` in function `DummyMessage.__init__` [bad-argument-type]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:548:57
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:482:19
ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:554:9
-ERROR Argument `list[TextPromptMessageContent]` is not assignable to parameter `content` with type `str | None` in function `DummyMessage.__init__` [bad-argument-type]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:570:57
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:505:9
ERROR Object of class `FunctionType` has no attribute `side_effect` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:578:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:526:9
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:580:35
-ERROR Argument `list[TextPromptMessageContent]` is not assignable to parameter `content` with type `str | None` in function `DummyMessage.__init__` [bad-argument-type]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:586:46
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:528:35
ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:589:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:537:9
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:591:35
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:539:35
ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:593:16
-ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:609:9
-ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:620:35
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:541:16
ERROR Object of class `FunctionType` has no attribute `side_effect` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:636:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:553:9
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:638:35
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:555:35
ERROR Object of class `FunctionType` has no attribute `side_effect` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:653:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:567:9
ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:658:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:572:9
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:667:35
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:581:35
ERROR Object of class `FunctionType` has no attribute `call_args_list` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:673:25
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:587:25
ERROR Object of class `NoneType` has no attribute `max_iteration` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:677:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:591:9
ERROR Object of class `FunctionType` has no attribute `return_value` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:689:9
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:600:9
ERROR Object of class `FunctionCallAgentRunner` has no attribute `session` [missing-attribute]
- --> tests/unit_tests/core/agent/test_fc_agent_runner.py:692:29
+ --> tests/unit_tests/core/agent/test_fc_agent_runner.py:603:29
ERROR Missing argument `description` in function `core.agent.plugin_entities.AgentStrategyEntity.__init__` [missing-argument]
--> tests/unit_tests/core/agent/test_plugin_entities.py:292:32
ERROR Argument `dict[str, dict[str, str | dict[str, float | list[str]]]]` is not assignable to parameter `config` with type `AppModelConfigDict` in function `core.app.app_config.easy_ui_based_app.model_config.manager.ModelConfigManager.convert` [bad-argument-type]
@@ -4066,8 +4056,22 @@
--> tests/unit_tests/core/memory/test_token_buffer_memory.py:59:16
ERROR `in` is not supported between `int` and `object` [not-iterable]
--> tests/unit_tests/core/memory/test_token_buffer_memory.py:325:16
+ERROR Object of class `PromptMessage` has no attribute `files` [missing-attribute]
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:354:47
+ERROR Object of class `PromptMessage` has no attribute `is_user_message` [missing-attribute]
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:355:16
+ERROR Object of class `PromptMessage` has no attribute `files` [missing-attribute]
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:356:16
ERROR Object of class `FunctionType` has no attribute `side_effect` [missing-attribute]
- --> tests/unit_tests/core/memory/test_token_buffer_memory.py:429:9
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:439:9
+ERROR Object of class `PromptMessage` has no attribute `files` [missing-attribute]
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:697:16
+ERROR Object of class `PromptMessage` has no attribute `files` [missing-attribute]
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:698:20
+ERROR Object of class `PromptMessage` has no attribute `image_detail` [missing-attribute]
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:699:16
+ERROR Object of class `PromptMessage` has no attribute `files` [missing-attribute]
+ --> tests/unit_tests/core/memory/test_token_buffer_memory.py:792:21
ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow_execution` with type `WorkflowExecution | None` in function `core.ops.ops_trace_manager.TraceTask.__init__` [bad-argument-type]
--> tests/unit_tests/core/ops/entities/test_trace_entity.py:103:28
ERROR Object of class `dict` has no attribute `metadata` [missing-attribute]
|
Contributor
Pyrefly Type Coverage
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #44502 +/- ##
=======================================
Coverage 89.52% 89.53%
=======================================
Files 6009 6011 +2
Lines 376843 376876 +33
Branches 76238 76230 -8
=======================================
+ Hits 337380 337433 +53
+ Misses 33465 33443 -22
- Partials 5998 6000 +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:
|
Keep a single migration head after the current KnowledgeFS chain, emit complete calls once in the model fixture, and update history fixtures and their types for complete database turns.
Include the existing replay tests in the KnowledgeFS glue gate and verify that a malformed persisted snapshot falls back atomically to legacy tool history without leaking stale replay data.
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 #41092; replaces the closed, unmerged #41095.
Agents rebuild provider responses from visible text, losing signed or encrypted state and ordered content blocks during tool turns and later history restoration.
Preserve complete messages in legacy Function Calling/CoT, workflow Agent strategies, and Agent v2, and extract text at display boundaries.
Legacy Agent thoughts store provider/model-scoped messages in the nullable
model_messagescolumn.Workflow Agents store
model_historyin execution process data and remove it from public node outputs.History reads validate tenant, app, workflow run, node, provider, and model ownership.
Interrupted saved calls receive matching interrupted results.
Agent v2 retains Dify content in provider details while Pydantic AI owns native tool calls.
Workflow Agent history restores the default 2,000-token history budget using complete database message turns, including intermediate ReAct observations and tool results.
Old turns are removed as units, and an oversized final turn is omitted as a unit.
App ownership is loaded with the initial message query so replay restoration does not issue a separate ownership query for every message.
This retains the existing token-count setting: when
PLUGIN_BASED_TOKEN_COUNTING_ENABLEDis disabled, the counter returns zero and token trimming does not run.This is a history budget, not a guarantee that the full prompt fits every model context.
Model streams use complete calls with unique, nonempty IDs and cumulative usage snapshots.
Agent v2 validates a batch before creating native tool events and preserves provider IDs.
Dependencies and release gates
API and Agent v2 lock Graphon
86f1e11.The candidate is published and both frozen environments install it from the Git source.
It includes the shared result accumulator and the container output changes from the still-open Graphon #344.
Coordinate release with SDK #390, daemon #828, and official plugins #4034 / #4035.
Replace review Git sources with published versions and set plugin minimum Dify versions once the target release is selected.
Keep this PR in draft until those release requirements are met.
Validation
It verified exact 2,000-token retention, whole-turn removal at 2,001 tokens, large legacy/saved history, and the disabled-counter behavior.
just check; its existing documentation-age test remains failing because repository documents have not been reviewed within seven days.Controlled endpoints were used for provider and daemon HTTP.
Live vendor signature acceptance, production deployment, and the full Dify integration suite remain untested.
Screenshots
Not applicable: backend behavior only.
Checklist