Repository navigation
Fix checkpoint restore when the saved commit is missing #2269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
edelauna
merged 15 commits into
Zoo-Code-Org:main
from
simurg79:fix/validate-checkpoint-before-restore
Nov 3, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e619a65
fix: validate checkpoint before restoring workspace
e7a5c57
fix(checkpoints): only treat missing objects as missing checkpoints
a044e48
fix(checkpoints): surface restore failures to the user and recover sa…
8f29a9a
fix: scope failed-edit cleanup to its own staged edit and recheck tas…
c90b7f3
fix: skip in-place restart replacement when another task became current
965b60e
fix: scope history profile restore to the rehydrated task and skip re…
0171bab
fix: skip mode-config persistence on history profile restore; tighten…
10d1c8d
test: tighten sticky-profile assertions for mismatched task and mode-…
22cb84b
test: assert setModeConfig mode and profile id
86777f9
fix: reject unrecorded or malformed checkpoint hashes before any Git …
584f720
fix: accept SHA-256 checkpoint hashes in restore validation
8a83890
test: cover SHA-256 checkpoint diff and invalid-hash locale contract
7710024
fix: remove listener bookkeeping for a rehydrated task discarded by t…
ba408c1
fix: make task-listener cleanup a module helper so provider doubles k…
94711ae
fix: validate restore hash before cancelling task; compare task insta…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The webview handler calls
provider.cancelTask()before this check runs (webviewMessageHandler.ts:1787). If the hash is malformed or unrecorded, the user's running task is cancelled and then the restore is rejected. Should the hash check run in the handler before the cancel, or is the cancel intended in this case?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — fixed in 94711ae. The
checkpointRestorehandler now runsassertRecordedCheckpointagainst the current task beforeprovider.cancelTask(), so a malformed or unrecorded hash shows the localized error and leaves the running task alone. The check still also runs insidecheckpointRestore. New tests inwebviewMessageHandler.checkpoint.spec.tscover malformed and unrecorded hashes (no cancel, no restore) and confirm a recorded hash still cancels before restoring.