Skip to content

[dotnet-code] Consolidate delivery mapping construction - #988

Open
Michelle Clayton (michelle-clayton-work) wants to merge 2 commits into
mainfrom
copilot/dotnet-code-delivery-mapping-1788388227-c60872f5139c3e3b
Open

[dotnet-code] Consolidate delivery mapping construction#988
Michelle Clayton (michelle-clayton-work) wants to merge 2 commits into
mainfrom
copilot/dotnet-code-delivery-mapping-1788388227-c60872f5139c3e3b

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

Centralized internal DeliveryMapping construction behind unexported helpers and reused them in the workflow edge, input, and response delivery paths. This mirrors the corresponding .NET DeliveryMapping shape where construction is centralized, making future .NET-to-Go ports easier to compare without changing runtime behavior.

.NET Reference

  • dotnet/src/Microsoft.Agents.AI.Workflows/Execution/DeliveryMapping.cs - centralizes delivery mapping initialization through constructors for single and multiple envelopes/targets.

Public API and Behavior

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

Tests

go test ./workflow/internal/execution

Notes

Rejected candidates from the random sample:

  • dotnet/src/Microsoft.Agents.AI.Workflows/Execution/StateScope.cs mapped to Go state internals that were already structurally close and risked behavior-sensitive churn around nil/delete semantics.
  • dotnet/src/Microsoft.Agents.AI.Abstractions/FeatureIndex.cs did not have a useful corresponding Go internal abstraction to clean up without inventing a feature placeholder.
  • dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/Extensions/DataValueExtensions.cs mapped to declarative conversion logic not clearly present in this Go checkout, so changing it would have been speculative.

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

Closes #979

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 4, 2026 00:14
@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 Sep 4, 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.

🟢 Approval recommended

Small internal refactor with straightforward call-site updates and no apparent behavior change or API impact.

Pull request overview

Centralizes internal DeliveryMapping construction behind unexported helper functions and reuses them across edge, input, and response delivery paths in workflow/internal/execution, aligning the Go structure with the referenced .NET shape while keeping behavior unchanged.

Changes:

  • Added unexported constructor helpers newDeliveryMapping and newSingleDeliveryMapping for consistent DeliveryMapping initialization.
  • Updated EdgeRunner delivery preparation methods to use the new helpers instead of inline struct literals.
File summaries
File Description
workflow/internal/execution/run.go Introduces unexported helpers to construct DeliveryMapping instances consistently.
workflow/internal/execution/edgerunner.go Switches edge/input/response delivery paths to use the centralized constructors.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@github-actions

This comment has been minimized.

@github-actions github-actions Bot added kind:code Changes production behavior or code pending-auto-risk Automatic risk classification is in progress risk:low Limited blast radius and straightforward rollback and removed pending-auto-risk Automatic risk classification is in progress labels Sep 4, 2026
@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Sep 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Scope: internal-only

Changed Go contract: None — DeliveryMapping struct (exported fields Targets, Envelopes) is unchanged; only new unexported constructor helpers newDeliveryMapping and newSingleDeliveryMapping were added in workflow/internal/execution/run.go and reused in workflow/internal/execution/edgerunner.go.

Upstream evidence reviewed: dotnet/src/Microsoft.Agents.AI.Workflows/Execution/DeliveryMapping.cs (cited in PR description as the mirrored shape). No public API or behavior comparison was needed since no exported Go surface changed.

Result: out of scope — this is a pure internal refactor (unexported helpers only) with no observable behavior, API, or default change. No parity issues to report.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"
    - "github.com"

See Network Configuration for more information.

Generated by Go API Consistency Review Agent for #988 · copilot · auto · 23.9 AIC · ⌖ 6.6 AIC · ⊞ 9.5K ·

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@github-actions github-actions Bot added pending-auto-risk Automatic risk classification is in progress risk:low Limited blast radius and straightforward rollback and removed risk:low Limited blast radius and straightforward rollback pending-auto-risk Automatic risk classification is in progress labels Sep 4, 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 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] Consolidate delivery mapping construction

3 participants