Skip to content

[dotnet-code] Clarify edge runner kind internals - #1091

Merged
Quim Muntal (qmuntal) merged 1 commit into
mainfrom
dotnet-code-edge-kind-internals-20260909222836-5dd8b328a27fec17
Sep 16, 2026
Merged

Quim Muntal (qmuntal) merged 1 commit into
mainfrom
dotnet-code-edge-kind-internals-20260909222836-5dd8b328a27fec17

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-edge-kind-internals-20260909222836-5dd8b328a27fec17. 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

Introduces a small unexported edge-kind helper in the workflow edge runner and routes telemetry/stateful-edge setup through it. This keeps the Go internals closer to the .NET workflow model's explicit EdgeKind classification while preserving the existing public API and runtime behavior.

.NET Reference

  • dotnet/src/Microsoft.Agents.AI.Workflows/Edge.cs - defines explicit EdgeKind values for direct, fan-out, and fan-in workflow edges.
  • dotnet/src/Microsoft.Agents.AI.Workflows/EdgeData.cs - keeps edge data tied to a connection representation used by the edge kind.

Public API and Behavior

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

Tests

  • go test ./workflow/internal/execution ./workflow

Notes

Random .NET sample inspection covered workflow edge/run internals and shared agent JSON utilities. I rejected Run.cs because the corresponding Go run handle code already has distinct lifecycle responsibilities and any cleanup risked behavior churn. I rejected AgentJsonUtilities.cs because the Go JSON helper is already a narrow generic utility and changing serializer defaults would not be portability-only. Visible open PR checks did not show an open [dotnet-code] PR covering the workflow edge candidate; two lower-integrity PR records were unavailable to inspect. The required direct git fetch of microsoft/agent-framework was blocked by the environment, so the .NET files were inspected through the configured GitHub read bridge instead.

Closes #1050

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

No unresolved issues were identified.

Pull request overview

Clarifies workflow edge-runner internals with an unexported edge-kind classifier, preserving the public API and runtime behavior.

Changes:

  • Adds direct, fan-out, and fan-in edge kinds.
  • Reuses classification for stateful-edge setup and telemetry metadata.
File summaries
File Description
workflow/internal/execution/edgerunner.go Centralizes edge classification and integrates it into runner setup and telemetry.
Review details
  • Files reviewed: 1/1 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 github-actions Bot added the kind:code Changes production behavior or code label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Scope: internal-only

Changed Go contract: None. edgeKind, directEdge/fanOutEdge/fanInEdge, and kindOfEdge are all unexported symbols in workflow/internal/execution/edgerunner.go. edgeGroupType's returned strings ("DirectEdgeRunner", "FanOutEdgeRunner", "FanInEdgeRunner") and the fan-in detection logic (len(SourceIDs) > 1, len(SinkIDs) > 1 || Assigner != nil) are unchanged, so observable behavior (telemetry values, stateful-edge registration) is identical before and after this PR.

Upstream evidence reviewed: dotnet/src/Microsoft.Agents.AI.Workflows/Edge.cs — public enum EdgeKind { Direct, FanOut, FanIn } and the Edge.Kind property used to classify edges. The new unexported Go edgeKind type mirrors this same three-way classification without exposing it publicly.

Result: aligned. This is a pure internal refactor that consolidates duplicated fan-in/fan-out detection into a single kindOfEdge helper, bringing the Go internals conceptually closer to .NET's explicit EdgeKind classification. No exported Go API changed, and no runtime/telemetry behavior changed (go build ./workflow/... succeeds; the derived strings and fan-in threshold logic are preserved exactly). public-api-change label not applicable; no parity-approved label added since no cross-language public API comparison was needed beyond confirming internal alignment.

Generated by Go API Consistency Review Agent for #1091 · copilot · auto · 21 AIC · ⌖ 7.06 AIC · ⊞ 9.6K ·

@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 8e53322 Sep 16, 2026
29 checks passed
@qmuntal
Quim Muntal (qmuntal) deleted the dotnet-code-edge-kind-internals-20260909222836-5dd8b328a27fec17 branch September 16, 2026 19:44
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: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] Clarify edge runner kind internals

3 participants