Skip to content

fix:多source的节点跳不到的问题,例如:agent p\u\e, p->u,p->e,u->e 在运行当中,p或u无法跳到e #6728

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rxy007
Copy link

@rxy007 rxy007 commented Jun 29, 2025

Why are these changes needed?

Related issue number

Checks

Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Could you please add a test case in the unit test to show your fix addresses the scenario? Can you also update the PR description to show the original issue with a working code block and output.

@ekzhu ekzhu requested a review from Copilot June 29, 2025 14:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses an issue where nodes from multiple sources are not triggering as expected in the message thread update logic. The key change involves modifying the condition for appending a target node to the ready queue.

  • Changed the condition from "== 0" to ">= 0" in the update_message_thread function to handle node activation.

@@ -415,7 +415,7 @@ async def update_message_thread(self, messages: Sequence[BaseAgentEvent | BaseCh

if self._activation[target][activation_group] == "all":
self._remaining[target][activation_group] -= 1
if self._remaining[target][activation_group] == 0:
if self._remaining[target][activation_group] >= 0:
Copy link
Preview

Copilot AI Jun 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition '>= 0' may allow the target node to be added to the ready queue before all required processing is complete. Consider revisiting this logic to verify if the intended condition should remain '== 0' to ensure that nodes are only activated when their remaining count is exactly zero.

Suggested change
if self._remaining[target][activation_group] >= 0:
if self._remaining[target][activation_group] == 0:

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants