Skip to content

[dotnet-code] Clarify workflow merger metadata collection - #1177

Closed
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dotnet-code-workflow-merger-metadata-b5bc3cdfe601b78d
Closed

Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dotnet-code-workflow-merger-metadata-b5bc3cdfe601b78d

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

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.ComputeMerged flow, where merged responses are assembled first and response metadata is collected afterward.

.NET Reference

  • dotnet/src/Microsoft.Agents.AI.Workflows/MessageMerger.cs - ComputeMerged first 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/agentworkflow

Notes

Rejected candidates: Anthropic client extension shape mostly maps to public construction APIs, so changing it risked public behavior; OpenAI FeatureIndex.cs has no close Go analogue; message unwrap/helper work was skipped because open PR #1108 already covers a [dotnet-code] message-helper area. Direct git fetch of 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

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>
Copilot AI balanced review requested due to automatic review settings September 24, 2026 19:26
@github-actions github-actions Bot added area:workflow Changes files in the workflow area size:medium At most 100 changed lines across at most 5 files labels Sep 24, 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.

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.

@github-actions

Copy link
Copy Markdown
Contributor

API consistency review

Result Scope
out of scope internal-only

This PR only refactors the unexported messageMerger.ComputeMerged metadata-collection logic in workflow/agentworkflow/message_merger.go into a new unexported helper collectMergedResponseMetadata; it changes no exported Go APIs and produces identical observable output (same agentIDs, finishReasons, additionalProperties, and messages computed from the same inputs), so no cross-repo parity review is needed.

Generated by Go API Consistency Review Agent for #1177 · copilot · auto · 15.8 AIC · ⌖ 6.19 AIC · ⊞ 12K · ◷

@github-actions github-actions Bot added the kind:code Changes production behavior or code label Sep 24, 2026
@qmuntal

Copy link
Copy Markdown
Member

Don't like this ine.

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 size:medium At most 100 changed lines across at most 5 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-code] Clarify workflow merger metadata collection

3 participants