-
-
Notifications
You must be signed in to change notification settings - Fork 754
Fix #864: Fix parallel task loop #865
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
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@claude review this pull request and do a detailed analysis and fix this if the existing code doesn't have the solution implemented. Making sure it has backward compatibility, no existing features removed. After making those changes, again review the applied changes. Use @web to search if you dont know any information or to find the latest documentation or to find the latest version. Run the code if you think you need to run it to test it. Minimal code change to start with if required any changes. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude finished @MervinPraison's task —— View job PR Review Complete ✅Todo List
📋 SummaryI've implemented a proper fix for issue #864 that prevents infinite loops in parallel task execution while maintaining backward compatibility. 🔧 Changes MadeInstead of commenting out the entire task reset logic, I've:
The Fix:if (getattr(task_to_check, 'rerun', True) and
task_to_check.task_type != "loop" and
not any(t.task_type == "loop" and subtask_name.startswith(t.name + "_")
for t in self.tasks.values()) and
not task_to_check.async_execution): # Don't reset async parallel tasks✅ Benefits of This Approach
🧪 TestingTo test the fix, run: cd /home/runner/work/PraisonAI/PraisonAI/src/praisonai-agents
python tests/parallelisation.pyExpected behavior:
📌 Final RecommendationThis fix is ready for merge. It properly addresses issue #864 while maintaining backward compatibility and not removing any existing features. The solution is minimal, targeted, and well-documented with debug logging. |
- Uncommented the task reset logic that was causing issue #864 - Added check for async_execution to prevent resetting parallel tasks - Preserves backward compatibility for non-parallel tasks that need rerun - Fixes infinite loop issue while maintaining existing functionality Co-authored-by: Mervin Praison <MervinPraison@users.noreply.github.com>
|
@claude review if the changes made are as per the requirements |
|
Claude finished @MervinPraison's task —— View job ✅ Review Complete: Changes Meet RequirementsTodo List
📋 Review SummaryYES, the changes in this PR properly meet the requirements for fixing issue #864. 🔍 AnalysisRequirements from Issue #864:
Changes Implemented:1. Sync Workflow Method (lines 1106-1116):if (getattr(task_to_check, 'rerun', True) and
task_to_check.task_type != "loop" and
not any(t.task_type == "loop" and subtask_name.startswith(t.name + "_")
for t in self.tasks.values()) and
not task_to_check.async_execution): # Don't reset async parallel tasks2. Async Workflow Method (lines 474-484):if (getattr(task_to_check, 'rerun', True) and
task_to_check.task_type != "loop" and
not any(t.task_type == "loop" and subtask_name.startswith(t.name + "_")
for t in self.tasks.values()) and
not task_to_check.async_execution): # Don't reset async parallel tasks✅ Requirements Compliance:
🎯 ConclusionThe implementation correctly addresses the parallel task infinite loop issue while preserving all existing functionality. The fix is minimal, targeted, and properly implemented in both workflow methods. No further changes are needed. |
Fixes #864\n\nSummary of changes:\n- Commented out the task reset logic in and methods in to prevent infinite loops in parallel task execution.