fix(flow): preserve parallel producers feeding or_ - #7272
Conversation
|
AI assistance is disclosed in the PR body. I attempted to apply the required |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe flow runtime removes first-wins cancellation for multi-event ChangesOR listener execution
Suggested reviewers: Merge Risk: ⚪ Minimal · up to OR joins now preserve independently triggered producer work while still firing the downstream join once. Regression coverage confirms both branches complete and the join remains deduplicated, with no remaining merge-readiness risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related issue
Fixes #7183
Summary
or_()as a first-wins race_fired_or_listenersresponsible for firing the downstream join onceor_()joinVerification
main: the slow producer is absent fromcompleteduv run pytest lib/crewai/tests/test_flow.py::test_or_listener_does_not_cancel_parallel_producers -q -o 'addopts=--tb=short --timeout=60 --block-network --import-mode=importlib'— 1 passeduv run pytest lib/crewai/tests/test_flow.py -x -q— 83 passeduv run pytest lib/crewai/tests/ -x -q— 5283 passed, 44 skippeduv run pre-commit run --files lib/crewai/src/crewai/flow/runtime/__init__.py lib/crewai/tests/test_flow.py— Ruff, format, and mypy passedAdditional context
The public
or_()behavior remains unchanged: the downstream listener fires once. The fix only stops that condition from cancelling independently triggered producer work.AI disclosure: this contribution was developed with OpenAI Codex assistance. Per the contribution policy, it must carry the
llm-generatedlabel.