Skip to content

[dotnet-code] Simplify group chat dispatch internals - #860

Open
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dotnet-code/groupchat-dispatch-helper-20260813223626-6a78effab0551cae
Open

[dotnet-code] Simplify group chat dispatch internals#860
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dotnet-code/groupchat-dispatch-helper-20260813223626-6a78effab0551cae

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

Extracted the GroupChat host's next-agent selection and turn-token dispatch into an unexported dispatchNextAgent helper. This keeps the existing behavior intact while making the Go host structure closer to the .NET GroupChatHost flow, where history update, broadcast, selection, dispatch, and completion are separated into focused steps.

.NET Reference

  • dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/GroupChatHost.cs - separates the group chat host turn flow into broadcast and completion helpers around the manager's next-agent selection and dispatch path.

Public API and Behavior

No public Go API changed. No intentional behavior change was made.

Tests

  • go test ./workflow/agentworkflow

Notes

Rejected sampled candidates:

  • dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/HandoffStartExecutor.cs - no corresponding Go handoff workflow implementation was found in this checkout.
  • dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/EdgeIdConverter.cs - the EdgeId dictionary-key converter pattern is .NET-specific; the Go workflow JSON paths use different marshal/unmarshal shapes.
  • dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/ObjectModel/AddConversationMessageExecutor.cs - no narrow corresponding Go declarative executor surface was found for a safe production-code cleanup.

Open [dotnet-code] PRs checked before editing; none targeted GroupChat.

Generated by .NET-to-Go Code Portability Refactoring Agent · gpt55 · 80.9 AIC · ⌖ 17.6 AIC · ⊞ 23.2K ·

Closes #841

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 21:21
@github-actions github-actions Bot added area:workflow Changes files in the workflow area size:small At most 30 changed lines across at most 2 files labels Aug 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refactors the Go groupChatHostExecutor turn flow by extracting next-agent selection and turn-token dispatch into a focused unexported helper, aligning the internal structure more closely with the referenced .NET GroupChatHost flow while preserving behavior.

Changes:

  • Extracted next-agent selection + dispatch logic into dispatchNextAgent.
  • Simplified handleTurn by delegating dispatch/complete branching to the helper’s result.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Aug 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Parity Review — Approved ✅

This PR only extracts the unexported dispatchNextAgent helper inside workflow/agentworkflow/groupchat.go. No exported Go types, functions, methods, options, or observable runtime behavior changed.

The refactor mirrors the structural separation already present in the upstream .NET GroupChatHost.cs (broadcast → select → dispatch → complete), preserving semantic parity rather than introducing any divergence.

Scope verdict: internal implementation change — no public API surface affected.
Parity verdict: aligned with .NET reference; no Python-side equivalent divergence identified.

Generated by Go API Consistency Review Agent for #860 · sonnet46 · 14.3 AIC · ⌖ 7.49 AIC · ⊞ 5.7K ·

@github-actions github-actions Bot added kind:code Changes production behavior or code failed-auto-risk Automatic risk classification was inconclusive or failed risk:low Limited blast radius and straightforward rollback and removed failed-auto-risk Automatic risk classification was inconclusive or failed labels Aug 18, 2026
@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@gdams
George Adams (gdams) added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@gdams
George Adams (gdams) added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Aug 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workflow Changes files in the workflow area kind:code Changes production behavior or code parity-approved Go API consistency review found no parity issues risk:low Limited blast radius and straightforward rollback size:small At most 30 changed lines across at most 2 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-code] Simplify group chat dispatch internals

4 participants