Python: Preserve checkpoint ancestry when workflows resume#4591
Python: Preserve checkpoint ancestry when workflows resume#4591davidahmann wants to merge 1 commit intomicrosoft:mainfrom
Conversation
|
User impact: Resumed workflows now preserve checkpoint ancestry so the next persisted checkpoint points back to the restored checkpoint instead of dropping the chain.
Inspired by research context: CAISI publishes independent, reproducible AI agent governance research: https://caisi.dev |
|
@davidahmann please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Problem
Resuming a workflow from checkpoint dropped the restored checkpoint from the ancestry chain of newly-created checkpoints, which breaks deterministic checkpoint lineage after restart.
Why now
Issue #4588 tracks resume correctness. Without this, resumed runs lose the audit trail needed to explain which checkpoint produced the next persisted state.
What changed
previous_checkpoint_idwith itValidation
uv run pytest packages/core/tests/workflow/test_checkpoint.py -k 'test_workflow_checkpoint_chaining_via_previous_checkpoint_id or test_resumed_workflow_keeps_previous_checkpoint_id_chain'Refs #4588