Python: Normalize durable workflow inputs#7205
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR normalizes handling of framework-reserved durable-workflow input markers (e.g., __pickled__, __type__) at durable host boundaries so untrusted “marker-shaped” inputs are consistently neutralized before reaching workflow executors, aligning behavior across Durable Task and Azure Functions hosts.
Changes:
- Durable Task orchestrator now strips pickle/type markers from initial input even when the start executor’s input type can’t be selected (e.g., union/unannotated cases).
- Azure Functions workflow
/runroute now strips pickle/type markers in addition to sub-workflow envelope markers before scheduling the orchestration. - Adds end-to-end behavioral tests for both hosts validating neutralization of reserved marker-shaped initial input while preserving ordinary JSON behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/packages/durabletask/tests/test_durabletask_workflow_initial_input.py | New behavioral tests validating marker-shaped initial inputs are neutralized and regular union-shaped inputs are preserved. |
| python/packages/durabletask/agent_framework_durabletask/_workflows/orchestrator.py | Ensures initial input is sanitized via strip_pickle_markers() even when no primary input type is selected. |
| python/packages/azurefunctions/tests/test_azurefunctions_workflow_initial_input.py | New behavioral test validating the Azure Functions /run route neutralizes reserved marker-shaped input. |
| python/packages/azurefunctions/agent_framework_azurefunctions/_app.py | Sanitizes untrusted HTTP client input with strip_pickle_markers() before start_new(). |
Contributor
moonbox3
enabled auto-merge
July 20, 2026 07:15
eavanvalkenburg
approved these changes
Jul 20, 2026
westey-m
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
Keep reserved workflow input handling consistent across durable hosts.
Description & Review Guide
Related Issue
N/A
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and the title prefix in sync automatically.