Skip to content

Python: fix declarative workflow DevUI message input - #7839

Open
Xiaoping Liao (kyletser) wants to merge 1 commit into
microsoft:mainfrom
kyletser:fix/declarative-devui-message-input
Open

Python: fix declarative workflow DevUI message input#7839
Xiaoping Liao (kyletser) wants to merge 1 commit into
microsoft:mainfrom
kyletser:fix/declarative-devui-message-input

Conversation

@kyletser

Copy link
Copy Markdown

Motivation & Context

The declarative DevUI sample receives chat input as a single Message, while the entry JoinExecutor only accepts list[Message]. The workflow state therefore does not populate System.LastMessage.Text from the DevUI input. The sample also reads a structured inputs.age value and uses expression namespaces that do not match the Python runtime, so every age follows the child branch.

Description & Review Guide

  • What are the major changes? Treat a single Message like a one-item message list during declarative state initialization. Update the sample to parse System.LastMessage.Text with the existing ParseValue action, store per-run values under Local.*, and write the result to Workflow.Outputs.*.
  • What is the impact of these changes? DevUI chat input now reaches the workflow as the expected age value. Existing dict, string, and list[Message] inputs keep their current behavior.
  • What do you want reviewers to focus on? Please check the single-message state initialization and the use of ParseValue for the sample. Regression coverage includes direct state assertions and the child, teenager, adult, and senior branches.

Related Issue

Fixes #7285

#7206 attempted to fix the same issue but was closed with an unresolved concern about a global Int() fallback. This version uses the existing ParseValue action and does not add or override Power Fx conversion behavior.

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Aug 24, 2026
@kyletser

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

.NET: Python: declarative workflow DevUI sample broken — wrong expression namespaces and JoinExecutor single-Message gap

2 participants