Skip to content

Python: Gate sequential workflow output on approval - #8595

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
eavanvalkenburg:fix-sequential-approval-output
Sep 22, 2026
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
eavanvalkenburg:fix-sequential-approval-output

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

Motivation & Context

Sequential workflows using with_request_info() can surface an agent response as a normal workflow output while that response is still awaiting human review. Applications that publish output events can therefore expose content before the request-info approval step completes.

The response remains available to the reviewer through the request-info event, while caller-facing workflow output should represent an approved response.

Description & Review Guide

  • What are the major changes? The approval sub-workflow now designates only the request-info executor as an output source. The sequential regression test also verifies that runs paused for another approval emit no output.
  • What is the impact of these changes? Unapproved agent responses remain visible in request-info events but no longer surface as workflow output or downstream approval-wrapper messages. Approved terminal responses retain the existing AgentResponse contract.
  • What do you want reviewers to focus on? Please verify that limiting the inner output source preserves both intermediate participant chaining after approval and terminal output typing.

Related Issue

Fixes #8594

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 is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • 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.

Copilot review overview

🟢 Approval recommended

The focused change resolves premature output exposure with appropriate regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Gates sequential workflow output until request-info approval completes.

Changes:

  • Limits output to the request-info executor.
  • Verifies paused runs expose no unapproved output.
  • Preserves approved terminal responses.
File Description
python/​packages/​orchestrations/​tests/​test_sequential.py Adds regression coverage for approval-gated output.
python/​packages/​orchestrations/​agent_framework_orchestrations/​_orchestration_request_info.py Restricts output to approved responses.

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

@github-actions github-actions Bot 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.

MAF Automated Review — Iteration 1

Result: No findings
Scope: full PR (1 commit(s)): cc1523b08a19
Model: gpt-5.6-sol-fast

Overview

The PR structurally prevents the inner agent executor from surfacing unapproved responses while preserving those responses in request-info events for review. Separate intermediate and terminal approval executors retain the expected AgentExecutorResponse chaining and terminal AgentResponse contract, and the regression test covers initial suspension, repeated approval pauses, and final approved output. No publishable Critical, High, or Medium issue was established.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.

Merged via the queue into microsoft:main with commit 898f6bf Sep 22, 2026
55 of 60 checks passed
@eavanvalkenburg
Eduard van Valkenburg (eavanvalkenburg) deleted the fix-sequential-approval-output branch September 22, 2026 12:16
ZedingZhang (ZedingZhang) pushed a commit to ZedingZhang/agent-framework that referenced this pull request Sep 29, 2026

This branch was previously deployed

1 inactive deployment
github-app-auth — cc1523b0 Deployed Sep 21, 2026 by eavanvalkenburg via team_check #4959
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.

Python: Sequential request-info workflow exposes output before approval

3 participants