mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 00:02:36 +00:00
feat: add event ordering and parent-child hierarchy
adds emission sequencing, parent-child event hierarchy with scope management, and integrates both into the event bus. introduces flush() for deterministic handling, resets emission counters for test isolation, and adds chain tracking via previous_event_id/triggered_by_event_id plus context variables populated during emit and listener execution. includes tracing listener typing/sorting improvements, safer tool event pairing with try/finally, additional stack checks and cache-hit formatting, context isolation fixes, cassette regen/decoding, and test updates to handle vcr race conditions and flaky behavior.
This commit is contained in:
@@ -1204,7 +1204,8 @@ def test_complex_and_or_branching():
|
||||
|
||||
|
||||
# Final should be after both 2a and 2b
|
||||
assert execution_order[-1] == "final"
|
||||
# Note: we don't assert final is last because branch_1c has no downstream
|
||||
# dependencies and can complete after final due to parallel execution
|
||||
assert execution_order.index("final") > execution_order.index("branch_2a")
|
||||
assert execution_order.index("final") > execution_order.index("branch_2b")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user