Skip to content

fix(checkpoints): require the token for a deleted chat's later files - #339

Closed
cursor[bot] wants to merge 1 commit into
claude/multi-agent-github-issues-9a230bfrom
fix/deleted-chat-checkpoint-restore
Closed

cursor[bot] wants to merge 1 commit into
claude/multi-agent-github-issues-9a230bfrom
fix/deleted-chat-checkpoint-restore

Conversation

@cursor

@cursor cursor Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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 turns was 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 ran git restore and git clean -fd and 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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

No new UI. The existing revert dialog already lists siblingChanges.paths once the preview returns them.

Validation: cargo test -p bibcode-server --lib shared_checkout_restore_tests (42 passed, including a_deleted_chat_file_change_since_the_last_turn_needs_the_token), cargo clippy -p bibcode-server --lib --no-deps -- -D warnings, cargo fmt on the changed Rust files, and vp check.

Open in Web View Automation 

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>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Nov 8, 2026
@mubeda
mubeda force-pushed the claude/multi-agent-github-issues-9a230b branch from eba3f92 to 9f2835b Compare November 8, 2026 23:41
@mubeda
mubeda force-pushed the fix/deleted-chat-checkpoint-restore branch from 30a09ef to 5456203 Compare November 8, 2026 23:41
@mubeda
mubeda deleted the branch claude/multi-agent-github-issues-9a230b November 9, 2026 11:14
@mubeda mubeda closed this Nov 9, 2026
@mubeda
mubeda deleted the fix/deleted-chat-checkpoint-restore branch November 9, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants