| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Preserves metadata when WorkflowAgent forwards streaming response updates.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| _workflows/_agent.py | Copies metadata into forwarded updates. |
| test_workflow_agent.py | Tests metadata preservation. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
|
@microsoft-github-policy-service agree |
Sorry, something went wrong.
|
HeZzz (@HeZ2z) please fix the failing CI/CD checks |
Sorry, something went wrong.
Forward finish_reason, continuation_token, agent_id and a shallow copy of additional_properties when WorkflowAgent reconstructs AgentResponseUpdate objects from workflow events, matching the documented as-is forwarding contract.
Use an explicit None check instead of a truthiness check so an explicitly empty additional_properties dict is not converted to None, preserving the forwarding contract.
…test Fix type checker failures by constructing continuation_token as an opaque dict per the ContinuationToken TypedDict instead of a bare string, and resolve lint/typing nits in the new tests.
|
Hi Evan Mattson (@moonbox3), I’ve merged the latest main and verified the previously failing typing/lint issues are resolved. The focused workflow tests and Ruff checks pass locally. Could you please re-review when convenient? It also looks like the full Python CI checks have not been triggered for the latest commit. |
Sorry, something went wrong.
|
HeZzz (@HeZ2z) please fix the failing code quality checks. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation & Context
WorkflowAgent wraps a workflow and forwards executor emissions through _convert_workflow_event_to_agent_response_updates(). The method documentation promises that output and intermediate events are forwarded as-is, but when reconstructing an AgentResponseUpdate the code only copied contents, role, author_name, IDs, created_at and raw_representation — silently dropping several response metadata fields.
Consumers streaming through WorkflowAgent.run(stream=True) therefore saw None for fields that were present on the executor's original update. This differs from running the same agent directly, breaks AgentResponse.from_updates() reconstruction for those fields, and can make long-running operations unresumable (lost continuation_token).
Description & Review Guide
What are the major changes?
What is the impact of these changes?
What do you want reviewers to focus on?
Related Issue
Fixes #7952
Contribution Checklist