You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Improves the robustness of the workflow engine's streaming output by fixing two core issues that caused streaming to fail in complex topologies where multiple conditional branches merge.
**1. Corrected Runtime State Management ("Pruning"):**
The primary bug was located in the `_remove_unreachable_nodes` method. Its aggressive recursive "pruning" algorithm incorrectly removed shared downstream nodes (including LLM and Answer) when handling conditional branches that led to a join point. This prematurely emptied the `rest_node_ids` list, causing the stream processor to fail its initial state check.
The fix replaces the recursive logic with a more conservative, non-recursive approach that only prunes the immediate first node of an unreachable branch. This ensures the integrity of the `rest_node_ids` list throughout the workflow execution.
**2. Improved Static Dependency Analysis:**
A secondary, underlying issue was found in the static dependency analysis (`_recursive_fetch_answer_dependencies`). It incorrectly identified all upstream, mutually exclusive `If/Else` nodes as parallel dependencies of the Answer node.
The fix enhances this analysis by adding "join point awareness". The upward trace now stops when it encounters a node with more than one incoming edge, correctly identifying the join point itself as the dependency rather than its upstream branches.
Together, these changes ensure that streaming output remains reliable and predictable, even in complex workflows with reusable, multi-input nodes.
|
10 months ago | |
|---|---|---|
| .. | ||
| agent | 10 months ago | |
| app | 10 months ago | |
| base | 1 year ago | |
| callback_handler | 11 months ago | |
| entities | 10 months ago | |
| errors | 1 year ago | |
| extension | 11 months ago | |
| external_data_tool | 1 year ago | |
| file | 10 months ago | |
| helper | 10 months ago | |
| llm_generator | 10 months ago | |
| mcp | 10 months ago | |
| memory | 10 months ago | |
| model_runtime | 10 months ago | |
| moderation | 1 year ago | |
| ops | 10 months ago | |
| plugin | 10 months ago | |
| prompt | 10 months ago | |
| rag | 10 months ago | |
| repositories | 10 months ago | |
| tools | 10 months ago | |
| variables | 10 months ago | |
| workflow | 10 months ago | |
| __init__.py | 2 years ago | |
| hosting_configuration.py | 1 year ago | |
| indexing_runner.py | 10 months ago | |
| model_manager.py | 11 months ago | |
| provider_manager.py | 11 months ago | |