Repository navigation
fix(checkpoints): require the token for a deleted chat's later files - #339
Closed
cursor[bot] wants to merge 1 commit into
Closed
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
A file restore whose other chats are all deleted asked for the sibling-changes token only when those chats had turns inside the event window. Files written after this thread's last checkpoint sit past that window, so git restore and git clean deleted them with no acknowledgement. The preview and the worker now use the same outside-change check live siblings already use. Co-Authored-By: mubeda <1380447+mubeda@users.noreply.github.com>
mubeda
force-pushed
the
claude/multi-agent-github-issues-9a230b
branch
from
November 8, 2026 23:41
eba3f92 to
9f2835b
Compare
mubeda
force-pushed
the
fix/deleted-chat-checkpoint-restore
branch
from
November 8, 2026 23:41
30a09ef to
5456203
Compare
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.
What Changed
A file restore in a checkout whose other chats are all deleted now requires the sibling-changes token when those chats have turns in the event window or when files changed since this thread's last checkpoint. The preview returns that token and the paths, and the worker repeats the check under the checkout gate.
Why
The deleted-chat path asked for the token only when
turnswas non-empty. The event window ends at this thread's newest checkpoint, so a deleted chat's later edits are not turns in that window. They still show up as paths changed since the last checkpoint. Without the token, the restore rangit restoreandgit clean -fdand deleted those files with no acknowledgement.Live siblings already use
outside_changes()(paths or turns). The deleted-only path now uses the same check. Confirming with the returned token still restores.Checklist
No new UI. The existing revert dialog already lists
siblingChanges.pathsonce the preview returns them.Validation:
cargo test -p bibcode-server --lib shared_checkout_restore_tests(42 passed, includinga_deleted_chat_file_change_since_the_last_turn_needs_the_token),cargo clippy -p bibcode-server --lib --no-deps -- -D warnings,cargo fmton the changed Rust files, andvp check.