Python: Fix workflow samples for bugbash: part 1#4055
Merged
TaoChenOSU merged 3 commits intomicrosoft:mainfrom Feb 18, 2026
Merged
Python: Fix workflow samples for bugbash: part 1#4055TaoChenOSU merged 3 commits intomicrosoft:mainfrom
TaoChenOSU merged 3 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes various issues in workflow samples discovered during a bugbash, focusing on correcting parameters, improving comments, fixing paths, refactoring event handling logic, and adding test coverage for middleware functionality.
Changes:
- Fixed parameter names and configuration values in workflow agent samples
- Corrected file system path calculation for workflow loading
- Refactored human-in-the-loop event handling patterns
- Added test coverage for handoff middleware functionality
- Updated comments and documentation to match actual workflow behavior
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
python/samples/03-workflows/tool-approval/group_chat_builder_tool_approval.py |
Updated max_rounds from 4 to 2 and revised comments to explain the rationale for preventing empty message errors |
python/samples/03-workflows/orchestrations/magentic.py |
Added blank line for formatting consistency |
python/samples/03-workflows/human-in-the-loop/agents_with_HITL.py |
Corrected sample description from "AzureOpenAI Chat Agents" to "Azure AI Agents" |
python/samples/03-workflows/declarative/human_in_loop/main.py |
Refactored event handling to properly check event type before casting ExternalInputRequest |
python/samples/03-workflows/declarative/deep_research/main.py |
Fixed path calculation by removing one extra parent level (was going outside repo root) |
python/samples/03-workflows/control-flow/workflow_cancellation.py |
Changed asyncio.create_task to asyncio.ensure_future and reformatted workflow builder chain |
python/samples/03-workflows/agents/workflow_as_agent_human_in_the_loop.py |
Fixed Worker parameter from chat_client to client and changed feedback value from "Approved" to empty string |
python/samples/03-workflows/agents/concurrent_workflow_as_agent.py |
Removed unused clear_and_redraw function |
python/samples/03-workflows/agents/azure_chat_agents_tool_calls_with_feedback.py |
Refactored to add AsyncIterable import, remove unused AgentResponseUpdate, simplify event handling with consume_stream helper, and fix workflow run loop logic |
python/packages/orchestrations/tests/test_handoff.py |
Added imports and two new test cases for auto handoff middleware behavior |
python/packages/orchestrations/agent_framework_orchestrations/_handoff.py |
Fixed handoff middleware to properly parse function results using FunctionTool.parse_result |
Member
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
dmytrostruk
approved these changes
Feb 18, 2026
giles17
approved these changes
Feb 18, 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
Fix workflow samples
Description
Contribution Checklist