[dotnet-code] Clarify workflow merger metadata collection - #1177
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
Conversation
Separate merged response collection from response metadata aggregation in the internal workflow message merger. This keeps the Go structure closer to the .NET MessageMerger ComputeMerged flow without changing public APIs or intended behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The refactor preserves existing ordering and metadata merge semantics with no public API changes.
Review effort: Balanced
Findings: None
What changed in this PR
Refactors workflow response merging to separate response assembly from metadata aggregation without changing public behavior.
Changes:
- Collects merged responses before processing metadata.
- Adds a helper for agent IDs, finish reasons, and additional properties.
| File | Description |
|---|---|
workflow/agentworkflow/message_merger.go |
Separates merged-response collection from metadata aggregation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
API consistency review
This PR only refactors the unexported
|
|
Don't like this ine. |
Tip
Your pull request is ready to create! 🎉 ✅
Everything is OK—the changes have been pushed to branch
dotnet-code-workflow-merger-metadata-b5bc3cdfe601b78d. Please review the changes, including any protected files, before creating the pull request.Create the pull request
The original pull request description is below.
Summary
Separated merged response collection from response metadata aggregation in the internal workflow message merger. This keeps the Go implementation structurally closer to the .NET
MessageMerger.ComputeMergedflow, where merged responses are assembled first and response metadata is collected afterward..NET Reference
dotnet/src/Microsoft.Agents.AI.Workflows/MessageMerger.cs-ComputeMergedfirst gathers merged responses/messages, then separately aggregates agent IDs, finish reasons, and additional properties.Public API and Behavior
No public Go API changed. No intentional behavior change was made.
Tests
go test ./workflow/agentworkflowNotes
Rejected candidates: Anthropic client extension shape mostly maps to public construction APIs, so changing it risked public behavior; OpenAI
FeatureIndex.cshas no close Go analogue; message unwrap/helper work was skipped because open PR #1108 already covers a[dotnet-code]message-helper area. Directgit fetchof the .NET upstream was blocked by the environment (CONNECT tunnel failed, response 403), so upstream files were inspected via the provided read-only GitHub MCP bridge instead.Closes #1142