Repository navigation
[dotnet-port-api] Add subworkflow host output forwarding gates - #1344
Quim Muntal (qmuntal) merged 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
Copilot break BindSubworkflowAsExecutor by adding the config as last parameter. Then remove BindSubworkflowAsExecutorWithConfig. |
Co-authored-by: qmuntal <3747816+qmuntal@users.noreply.github.com>
Updated in |
There was a problem hiding this comment.
🟡 Changes recommended
The change breaks compatibility for existing callers of the public two-argument API, and the tests do not verify that declared output types respect the auto-yield configuration.
2 open issues
What changed in this PR
Adds configurable output forwarding to the in-process subworkflow host, extending the existing subworkflow execution support.
Changes:
- Adds independent send and yield gates, both enabled by default.
- Omits child output types from the host’s declared yields when yielding is disabled.
- Adds forwarding tests and updates callers and catalog examples for the configuration argument.
| File | Description |
|---|---|
| workflow/inproc/subworkflow.go | Adds configuration and gates output forwarding and yield declarations. |
| workflow/inproc/subworkflow_test.go | Tests forwarding gates and updates existing binding calls. |
| workflow/inproc/sample_test.go | Passes default configuration in sample tests. |
| workflow/inproc/sample_resource_test.go | Updates the resource workflow binding call. |
| workflow/inproc/checkpoint_test.go | Updates the checkpointed subworkflow binding call. |
| examples/03-workflows/subworkflows/request_interception/main.go | Passes default configuration for request interception. |
| examples/03-workflows/subworkflows/nested_order_processing/main.go | Updates nested workflow bindings. |
| examples/03-workflows/01-start-here/05_subworkflow/main.go | Updates the introductory subworkflow example. |
| _catalog/dotnet-go-sdk-symbol-mapping.json | Updates four binding examples to include configuration. |
Review effort: Balanced
Add protocol description check for parent in tests Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
API consistency review
Changed Go contract
Upstream evidence reviewed
AssessmentThe Go behavior matches .NET. Both gates default to enabled, and the yield gate controls both the output-type declaration and the runtime yield. The send gate also matches. I did not find an upstream Python equivalent. The only difference is idiomatic: Go takes a config struct with The upstream workflow file was read at the pinned SHA, but only through truncated tool output. The default-true option and the yield-gate snippets were confirmed from search fragments. The send gate in
|


Summary
Adds
inproc.SubworkflowConfigandinproc.BindSubworkflowAsExecutorWithConfig, letting callers independently gate whether a hosted subworkflow's outputs are sent to downstream executors (AutoSendMessageHandlerResultObject) and/or yielded as parent outputs (AutoYieldOutputHandlerResultObject). Both default to true (nil), soBindSubworkflowAsExecutorbehavior is unchanged. When yield is disabled, the host also no longer declares the child's output types as yielded, matchingWorkflowHostExecutor.ConfigureProtocol.Ported .NET PRs
None specific. Pinned SHA:
0c9944cc9f577d51277ac7c55dbc388b60a577af. Source:Specialized/WorkflowHostExecutor.cs,ExecutorOptions.cs,ExecutorBindingExtensions.BindAsExecutor(Workflow, string, ExecutorOptions)/ConfigureSubWorkflow. Neither is[Experimental].Breaking Changes
None.
Tests and Examples
Added
TestSubworkflowBindingWithConfig_OutputForwardingGates(default / no-send / no-yield).go vet ./workflow/inprocandgo test ./workflow/...pass. No example changes needed.Notes
Catalog leaves (namespace Microsoft.Agents.AI.Workflows, partial):
ExecutorBindingExtensions.BindAsExecutor(Workflow, string, ExecutorOptions) -> ExecutorBindingandExecutorBindingExtensions.ConfigureSubWorkflow(Workflow, string, ExecutorOptions). Expected assessment change: partial → adapted/mapped toinproc.BindSubworkflowAsExecutorWithConfig. Catalog was left unchanged. Screened 676/676 gap rows; inspected one group (subworkflow host options). Duplicate checks (before and after implementation): issue query returned 0 results; PR query returned only closed #325 (base subworkflow port, not this behavior).