Repository navigation
[dotnet-code] Extract aggregate turn send helper #465
Description
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.gogo 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 · ◷
Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch dotnet-code/aggregate-turn-helper-20260709224807-b59b2293ee5c4bc0.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch (38 lines)
From 90d3c3e70990e265b14db93cf3173e6d0d34c7e6 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Thu, 9 Jul 2026 22:48:57 +0000
Subject: [PATCH] Extract aggregate turn send helper
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
workflow/agentworkflow/concurrent.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/workflow/agentworkflow/concurrent.go b/workflow/agentworkflow/concurrent.go
index 67f52e539..758d328a0 100644
--- a/workflow/agentworkflow/concurrent.go
+++ b/workflow/agentworkflow/concurrent.go
@@ -156,7 +156,7 @@ func newAggregateTurnMessagesBinding(id string) workflow.ExecutorBinding {
StateKey: aggregateTurnMessagesStateKey,
DisableAutoSendTurnToken: true,
TakeTurnHandler: func(ctx *workflow.Context, _ workflow.TurnToken, messages []*message.Message) error {
- return ctx.SendMessage("", messages)
+ return sendAggregatedTurnMessages(ctx, messages)
},
})
return &executor, nil
@@ -164,6 +164,10 @@ func newAggregateTurnMessagesBinding(id string) workflow.ExecutorBinding {
}
}
+func sendAggregatedTurnMessages(ctx *workflow.Context, messages []*message.Message) error {
+ return ctx.SendMessage("", messages)
+}
+
func newConcurrentEndBinding(expectedInputs int, aggregator MessageAggregator) workflow.ExecutorBinding {
if aggregator == nil {
aggregator = defaultConcurrentMessageAggregator
--
2.54.0
Activity
michelle-clayton-work commentedon Jul 10, 2026
Pull request #468 is linked to this issue and will close it when merged.