Skip to content

[dotnet-code] Extract aggregate turn send helper - #468

Merged
Michelle Clayton (michelle-clayton-work) merged 3 commits into
mainfrom
dotnet-code/aggregate-turn-helper-20260709224807-b59b2293ee5c4bc0
Jul 14, 2026
Merged

Michelle Clayton (michelle-clayton-work) merged 3 commits into
mainfrom
dotnet-code/aggregate-turn-helper-20260709224807-b59b2293ee5c4bc0

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

Extracted the aggregate-turn message release operation into a small unexported helper. This keeps the Go concurrent workflow internals closer to the .NET AggregateTurnMessagesExecutor.TakeTurnAsync shape, making future .NET-to-Go comparisons easier without changing the public surface.

.NET Reference

  • dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/AggregateTurnMessagesExecutor.cs - releases the accumulated chat messages from a named turn handler.

Public API and Behavior

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

Tests

  • gofmt -w workflow/agentworkflow/concurrent.go
  • go test ./workflow/agentworkflow

Notes

Rejected sampled candidates:

  • dotnet/src/Microsoft.Agents.AI.Workflows/Specialized/RequestInfoExecutor.cs - the corresponding Go request-info flow is spread through in-process runner request tracking and already has extensive checkpoint/request tests, so a tiny structural cleanup risked churn.
  • dotnet/src/Microsoft.Agents.AI.Workflows/IWorkflowContextExtensions.cs - closest Go equivalents are public workflow context methods and shared state-cache helpers, so changes there would risk public API or broader runtime behavior.
  • dotnet/src/Microsoft.Agents.AI.Workflows/OrchestrationBuilderBase.cs - Go already centralizes metadata and output designation handling with unexported helpers across builders.
  • dotnet/src/Microsoft.Agents.AI/Harness/ToolApproval/ToolApprovalRule.cs - skipped because open PR [dotnet-code] Align tool approval state internals #463 already covers adjacent tool approval state internals.

Avoided current open [dotnet-code] PR overlap in message forwarding (#462), tool approval state (#463), and group chat scoped state (#461); also avoided adjacent open telemetry work (#446).

Generated by .NET-to-Go Code Portability Refactoring Agent · 181.4 AIC · ⌖ 29.4 AIC · ⊞ 20.8K · ◷

Closes #465

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

This PR extracts the aggregate-turn message “send/release” operation into a small unexported helper within the concurrent workflow executor wiring, to better mirror the structure of the corresponding .NET aggregate-turn executor without changing Go’s public API.

Changes:

  • Replaced an inline ctx.SendMessage("", messages) call with an unexported helper.
  • Introduced sendAggregatedTurnMessages to centralize the aggregate-turn send behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread workflow/agentworkflow/concurrent.go
Comment thread workflow/agentworkflow/concurrent.go Outdated
@github-actions

This comment has been minimized.

@michelle-clayton-work

Copy link
Copy Markdown
Contributor Author

Copilot address PR feedback and resolve conversations once addressed

Co-authored-by: michelle-clayton-work <262183035+michelle-clayton-work@users.noreply.github.com>

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Copilot address PR feedback and resolve conversations once addressed

Addressed in bce4b25: renamed the helper and call site to use AggregateTurnMessages terminology consistently (sendAggregateTurnMessages). Targeted package tests and full go test ./... pass.

@github-actions

Copy link
Copy Markdown
Contributor

Cross-Repo API Consistency Review

Result: No parity issues.

This PR only extracts an unexported helper function (sendAggregateTurnMessages) from an existing inline closure in workflow/agentworkflow/concurrent.go. The sole changed file has:

  • 0 exported symbol changes — no public types, functions, methods, fields, or constants were added or modified
  • No observable behavior change — the extracted helper is a direct 1-line wrapper around the same ctx.SendMessage("", messages) call that was already there

Since no public Go API surface changed and no user-visible behavior was altered, this refactor is out of scope for cross-repo parity review. The structural alignment with the .NET AggregateTurnMessagesExecutor.TakeTurnAsync shape noted in the PR description is the intent of the change, not a divergence from it.

Generated by Go API Consistency Review Agent for issue #468 · 27.8 AIC · ⌖ 10.5 AIC · ⊞ 26.7K · ◷

Merged via the queue into main with commit 716602d Jul 14, 2026
20 checks passed
@michelle-clayton-work
Michelle Clayton (michelle-clayton-work) deleted the dotnet-code/aggregate-turn-helper-20260709224807-b59b2293ee5c4bc0 branch July 14, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-code] Extract aggregate turn send helper

4 participants