Skip to content

Python: Correct HandoffBuilder output selection documentation - #9717

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
ktz03:docs/handoff-output-selection-20261026-acd80906
Oct 27, 2026
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
ktz03:docs/handoff-output-selection-20261026-acd80906

Conversation

@ktz03

Copy link
Copy Markdown
Contributor

Motivation & Context

HandoffBuilder documents output_from and intermediate_output_from, but its class overview still says that handoff has no intermediate output channel. That contradicts the existing selection API and can mislead readers configuring which participants appear in each event stream.

Description & Review Guide

  • What are the major changes? Qualify the overview's output behavior as the default and describe the existing participant selectors. Update the default-selection test's docstring to describe that default, without changing its assertions.
  • What is the impact of these changes? Two existing docstrings are corrected. The selection API introduced by Evan Mattson (@moonbox3) in Python: Improve the handling of intermediate outputs for workflows and orchestrations #5623 and the runtime behavior are unchanged.
  • What do you want reviewers to focus on? Whether the overview agrees with the constructor's argument documentation, participant selection during build(), and the existing default/custom-selection tests.

On Windows with Python 3.14.3, both modified files parse and compile. Their ASTs are identical after removing docstrings. Ruff 0.17.1 check and format-check pass for both files with the repository configurations. No SDK imports, workflow execution, unit tests, package build, model or cloud calls were run.

Related Issue

N/A - trivial change. This corrects an explicit contradiction between two docstrings and the already implemented API in the same class; it introduces no API, behavior, or design choice. Related original implementation: #5623.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Documentation and PR description.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

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

The docstring-only changes agree with the existing selection behavior and tests, with no unresolved findings.

No open issues 🎉

What changed in this PR

Corrects two HandoffBuilder docstrings to distinguish default output behavior from configurable participant selection. The selection API, runtime behavior, and test assertions remain unchanged.

Changes:

  • Clarifies that per-agent workflow output is the default and documents the existing output selectors.
  • Updates the default-selection test’s docstring to remove the claim that handoff has no intermediate output channel.
File Description
python/​packages/​orchestrations/​tests/​test_orchestration_intermediate_vs_terminal.py Clarifies the default-selection test’s docstring without changing assertions.
python/​packages/​orchestrations/​agent_framework_orchestrations/​_handoff.py Documents default output behavior and configurable participant selection.

Review effort: Balanced

Merged via the queue into microsoft:main with commit c4de86d Oct 27, 2026
54 checks passed

This branch was previously deployed

1 inactive deployment
github-app-auth — 3fe6ff76 Deployed Oct 26, 2026 by ktz03 via team_check #7534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants