Python: fix(core): align in-memory checkpoint isolation - #7848
Closed
Patel Namraa (Namraa310806) wants to merge 1 commit into
Closed
Python: fix(core): align in-memory checkpoint isolation#7848Patel Namraa (Namraa310806) wants to merge 1 commit into
Patel Namraa (Namraa310806) wants to merge 1 commit into
Conversation
Patel Namraa (Namraa310806)
requested a review
from Giles Odigwe (giles17)
as a code owner
August 24, 2026 18:44
Patel Namraa (Namraa310806)
deployed
to
github-app-auth
August 24, 2026 18:44 — with
GitHub Actions
Active
Patel Namraa (Namraa310806)
deployed
to
github-app-auth
August 24, 2026 18:44 — with
GitHub Actions
Active
Patel Namraa (Namraa310806)
deployed
to
github-app-auth
August 24, 2026 18:44 — with
GitHub Actions
Active
Patel Namraa (Namraa310806)
deployed
to
github-app-auth
August 24, 2026 18:44 — with
GitHub Actions
Active
Patel Namraa (Namraa310806)
deployed
to
github-app-auth
August 24, 2026 18:47 — with
GitHub Actions
Active
Contributor
|
Superseded by #7847 |
Open
5 tasks
Author
|
Tao Chen (@TaoChenOSU)
Since this PR is now superseded by #7847, I won't duplicate the work. If any of |
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
This PR fixes checkpoint state isolation issues tracked in #7683.
Checkpoint state could previously share mutable references with the live workflow
state or with the internal
InMemoryCheckpointStoragerepresentation. As aresult, mutating a restored or loaded checkpoint could silently modify the
original checkpoint snapshot.
This is especially problematic for nested mutable values such as lists and
dictionaries because the mutation happens without an exception and without
another
save()operation.Description & Review Guide
What are the major changes?
Stateusing the existingcheckpoint-value serialization mechanism.
InMemoryCheckpointStoragereturn caller-owned checkpoint copies usingcopy.deepcopy()forload(),list_checkpoints(), andget_latest().save()isolated so changes to the caller's checkpoint after savingcannot modify stored state.
CheckpointStorageprotocol.storage backends.
What is the impact of these changes?
or listed.
checkpoint.
Stateexport/import path is also isolated, including nestedmutable values.
behavior; it only prevents unintended reference sharing.
What do you want reviewers to focus on?
State,WorkflowCheckpoint,and
CheckpointStorage.State, whileInMemoryCheckpointStorageusescopy.deepcopy()as requested for thein-memory backend.
the checkpoint ownership contract.
Related Issue
Fixes #7683
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.