Skip to content

Conversation

@moonbox3
Copy link
Contributor

@moonbox3 moonbox3 commented Feb 4, 2026

Motivation and Context

Updates TypeVar naming in core/_workflows to use suffix convention consistent with the rest of the codebase:

  • T_Out → OutT
  • T_W_Out → W_OutT
  • _T_EdgeGroup → EdgeGroupT (moved to module level)
  • GroupChatWorkflowContext_T_Out → GroupChatWorkflowContextOutT

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@moonbox3 moonbox3 self-assigned this Feb 4, 2026
@moonbox3 moonbox3 added python workflows Related to Workflows in agent-framework labels Feb 4, 2026
Copilot AI review requested due to automatic review settings February 4, 2026 02:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes TypeVar naming conventions in the _workflows module by changing from prefix to suffix convention, aligning with the naming patterns used elsewhere in the codebase (e.g., ExecutorT, ContextT, ArgsT, ReturnT).

Changes:

  • Renamed TypeVars to use suffix convention: T_OutOutT, T_W_OutW_OutT, _T_EdgeGroupEdgeGroupT, and GroupChatWorkflowContext_T_OutGroupChatWorkflowContextOutT
  • Moved EdgeGroupT TypeVar from class scope to module level for better accessibility
  • Removed SharedState from public API exports (remains available internally via private import)

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
_workflow_context.py Updated TypeVar declarations (OutT, W_OutT) and all references in type annotations, comments, and error messages
_magentic.py Updated import and all type annotations using GroupChatWorkflowContextOutT
_group_chat.py Updated import and all type annotations using GroupChatWorkflowContextOutT
_function_executor.py Updated documentation comments referencing the renamed TypeVars
_executor.py Updated documentation comments referencing the renamed TypeVars
_edge.py Moved EdgeGroupT TypeVar to module level and updated register method signature
_base_group_chat_orchestrator.py Updated TypeAlias and all handler method signatures using GroupChatWorkflowContextOutT
__init__.py Removed SharedState from public exports (internal implementation detail)

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Feb 4, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/core/agent_framework/_workflows
   _base_group_chat_orchestrator.py1701292%135, 301, 316, 350–352, 356, 375, 436, 480–482
   _edge.py2272887%44, 66–67, 69, 164, 194, 443–444, 449, 453–458, 460–462, 578, 692, 699–701, 748, 776, 802, 856, 870
   _executor.py1731094%212, 334, 336, 345, 365, 368, 475, 480, 490, 649
   _function_executor.py73593%112, 139, 145, 151, 168
   _group_chat.py2853787%172, 333, 340, 367, 378–379, 385, 390, 406, 433–438, 440, 473–476, 478, 483–487, 648, 653, 667, 748, 754, 799, 819, 915, 934, 953, 963
   _magentic.py6149185%69–78, 83, 87–98, 263, 274, 278, 298, 359, 368, 370, 412, 429, 438–439, 441–443, 445, 456, 598, 600, 640, 688, 724–726, 728, 736–739, 743–746, 789, 816–819, 910, 916, 922, 961, 999, 1028, 1045, 1056, 1110–1111, 1115–1117, 1141, 1162–1163, 1176, 1192, 1214, 1262–1263, 1301–1302, 1458, 1467, 1470, 1475, 1871, 1913, 1928, 1957
   _workflow_context.py1772486%63–64, 72, 76, 90, 166, 191, 309, 428, 471–473, 475, 477–478, 480–481, 490–492, 494–496, 498
TOTAL16338198287% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3822 221 💤 0 ❌ 0 🔥 1m 8s ⏱️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python workflows Related to Workflows in agent-framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Adjust workflows generic TypeVar to suffix from prefix

3 participants