Python: Fix workflow runner concurrent processing#4143
Merged
TaoChenOSU merged 3 commits intomicrosoft:mainfrom Feb 24, 2026
Merged
Conversation
Member
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Python workflow Runner’s message-delivery loop to improve concurrency so that messages from a single source can be delivered to multiple downstream targets in parallel (instead of being blocked behind one another).
Changes:
- Refactors
Runner._run_iteration()to parallelize message delivery across edge runners while preserving per-edge-runner message ordering. - Adds unit tests asserting (1) per-edge-runner ordering and (2) concurrent execution across multiple edge runners for the same source.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
python/packages/core/agent_framework/_workflows/_runner.py |
Changes _run_iteration() delivery scheduling to run different edge runners concurrently while keeping ordering within each edge runner. |
python/packages/core/tests/workflow/test_runner.py |
Adds tests for per-edge-runner ordering and concurrency across multiple edge runners. |
moonbox3
approved these changes
Feb 24, 2026
alliscode
approved these changes
Feb 24, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation and Context
Currently, the runner delivers messages from a source executor one after another regardless of the target. This means if a source sends more than one messages to multiple targets, the targets will be receiving those messages one after another. For example, executor A sends message X to executor B and message Y to executor C, message Y will not be delivered to executor C until executor B finishes processing message X. This breaks our concurrency promise.
Description
The runner will now deliver messages to all targets concurrently.
Summary of the current behavior:
Contribution Checklist