-
-
Notifications
You must be signed in to change notification settings - Fork 24.7k
fix(agentflow): condition node leaks parallel branches when an output fans out to multiple nodes #6532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kimyongari
wants to merge
7
commits into
FlowiseAI:main
Choose a base branch
from
Kimyongari:fix/agentflow-condition-multi-edge-ignore
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6
−2
Open
fix(agentflow): condition node leaks parallel branches when an output fans out to multiple nodes #6532
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
20183ea
fix: condition node only ignores first edge when output fans out to m…
Kimyongari 5baf274
Merge branch 'main' into fix/agentflow-condition-multi-edge-ignore
Kimyongari b8babbf
Merge branch 'main' into fix/agentflow-condition-multi-edge-ignore
Kimyongari 258ae7f
Merge branch 'main' into fix/agentflow-condition-multi-edge-ignore
Kimyongari 17dec73
Merge branch 'main' into fix/agentflow-condition-multi-edge-ignore
Kimyongari 0ad6a7f
Merge branch 'main' into fix/agentflow-condition-multi-edge-ignore
Kimyongari 44e4ebc
Merge branch 'main' into fix/agentflow-condition-multi-edge-ignore
Kimyongari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix. I think this deserves a focused regression test because this branch execution bug is easy to bring back accidentally.
The case I would like to highlight in is a condition node where one unfulfilled output handle fans out to two target nodes, while another output is fulfilled. The test should assert that both targets connected to the unfulfilled handle are ignored and neither is enqueued/executed so that would specifically protect the difference between the old
find(...)behavior and the newfilter(...)behavior here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, and I appreciate the suggestion. You're right that this branch execution bug is easy to reintroduce, so a focused regression test makes a lot of sense.
I looked into adding one, but determineNodesToIgnore currently lives inside buildAgentflow.ts, which imports the full execution and runtime dependency graph (storage providers and so on) at module load time. Because of that, unit testing the function in isolation would mean either extracting it into its own module or mocking a lot of unrelated internals in the test. Both of those go well beyond the small fix in this PR.
Since that's a more structural change, I'd rather not expand the scope here on my own. @HenryHengZJ, would you prefer I extract the function and add the regression test in this PR, or keep this one minimal and follow up separately? I'm happy to go either way based on your call.