Python: Allow checkpoint deserialization for orchestrations - #7626
Python: Allow checkpoint deserialization for orchestrations#7626Ruiming Zhao (uuzzrm) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Extends restricted checkpoint decoding to support first-party orchestration request types.
Changes:
- Allowlists the
agent_framework_orchestrations.package prefix. - Adds regression coverage for Handoff and Magentic requests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
python/packages/core/agent_framework/_workflows/_checkpoint_encoding.py |
Expands the restricted-deserialization allowlist. |
python/packages/core/tests/workflow/test_checkpoint_orchestrations_deserialization.py |
Tests orchestration request round-tripping. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| # Module prefixes for framework-internal types that are always allowed | ||
| _FRAMEWORK_MODULE_PREFIXES = ( | ||
| "agent_framework.", | ||
| "agent_framework_orchestrations.", |
There was a problem hiding this comment.
Please do handle this one. Thanks.
There was a problem hiding this comment.
Handled - pushed 04dd9dd which updates the module docstring in _checkpoint_encoding.py and the FileCheckpointStorage description in _checkpoint.py to include agent_framework_orchestrations, so the documented allowlist matches what the code actually permits.
There was a problem hiding this comment.
Done - the docs now mention agent_framework_orchestrations in both places. Thanks for the ping.
Signed-off-by: Ruiming Zhao <uuzzrm@gmail.com>
04dd9dd to
124ccd9
Compare
Motivation & Context
Restricted checkpoint deserialization currently rejects pending orchestration requests from
agent_framework_orchestrations.*. The allowlist only matches the dottedagent_framework.prefix, so workflows that pause for Handoff or Magentic user input cannot be restored through the restricted checkpoint path.Description & Review Guide
agent_framework_orchestrations.package and add a focused regression test covering bothHandoffAgentUserRequestandMagenticPlanReviewRequest.I used an AI coding assistant during the investigation and validation, then reviewed the resulting patch and test coverage manually.
Related Issue
Fixes #7618
Contribution Checklist
breaking changelabel (or add [BREAKING] to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.