Python: include checkpoint_id on AG-UI interrupt metadata (#8150) - #8163
Python: include checkpoint_id on AG-UI interrupt metadata (#8150)#8163lsmlhi_25 (FOWEPJF255) wants to merge 6 commits into
Conversation
…8150) Attach the pause workflow checkpoint id to RUN_FINISHED interrupt metadata.agent_framework so multi-worker clients can resume via forwardedProps.checkpoint_id without a side channel.
There was a problem hiding this comment.
🟡 Changes recommended
Checkpoint selection can advertise a stale or different request owner’s checkpoint ID.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds checkpoint IDs to AG-UI workflow interrupt metadata for durable multi-worker resume.
Changes:
- Resolves and attaches pause checkpoint IDs to interrupts.
- Adds helper and checkpoint-resume coverage.
File summaries
| File | Description |
|---|---|
_workflow_run.py |
Adds checkpoint lookup and interrupt metadata enrichment. |
test_workflow_run.py |
Tests attachment and checkpoint ID propagation. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Addressed review feedback:
|
|
|
Evan Mattson (@moonbox3) Thanks 鈥?addressed your checklist:
|
Move pause-checkpoint selection into Workflow and require a run-scoped baseline so leftover runner ids are not advertised across runs.
|
Evan Mattson (@moonbox3) Follow-up for the run-scoped / core-helper review:
Commit: |
Unblocks Package Checks / merge-gatekeeper on PR microsoft#8163.
- Workflow captures run baseline / restored id inside run(); resolve uses them so callers need not thread baseline_checkpoint_id. - Exclude restored checkpoint from pause candidates after resume. - Drop issue reference in docstring; emit RUN_FINISHED via existing _build_run_finished_event after attaching pause id. - Move core pause-resolve coverage into test_workflow.py (no new test file).
|
Left a follow-up into your branch for the open Eduard van Valkenburg (@eavanvalkenburg) / Evan Mattson (@moonbox3) threads:
Highlights:
Feel free to merge #2 or cherry-pick �58e11f. |
…ip (#2) - Workflow captures run baseline / restored id inside run(); resolve uses them so callers need not thread baseline_checkpoint_id. - Exclude restored checkpoint from pause candidates after resume. - Drop issue reference in docstring; emit RUN_FINISHED via existing _build_run_finished_event after attaching pause id. - Move core pause-resolve coverage into test_workflow.py (no new test file).
|
Merged the pause-checkpoint ownership follow-up on the PR branch (FOWEPJF255#2). Ready for another maintainer pass. |
|
All open review threads from Evan Mattson (@moonbox3) / Eduard van Valkenburg (@eavanvalkenburg) are addressed on the PR head (
Ready for another look when you have a moment. |
1 similar comment
|
All open review threads from Evan Mattson (@moonbox3) / Eduard van Valkenburg (@eavanvalkenburg) are addressed on the PR head (
Ready for another look when you have a moment. |
Motivation & Context
AG-UI workflow interrupts need a durable pause
checkpoint_idso multi-worker clients can resume viaforwardedProps.checkpoint_idwithout a side-channel lookup (Option A from #8150).Description & Review Guide
checkpoint_idto each interrupt'smetadata.agent_frameworkwhen AG-UI workflow runs finish with interrupts and checkpoint storage is active.get_latest(workflow_name=...)(avoids cross-owner races / stale ids).run_workflow_streamdoes not passcheckpoint_storage.interruptsis empty; remove the unusedcheckpoint_idkwarg on_workflow_interrupt_metadata.get_latest, builder-only storage path, and empty-interrupt short-circuit.Related Issue
Fixes #8150
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.