You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Undo identifies a file by path only: a file replaced after an operation is overwritten or cut by its undo #239
Found on 2026-11-17 while fixing redo in #231. Confirmed on that branch with a probe; no redo is involved.
Reproductions
f holds old; /bin/echo hi > f; another file is renamed over f; undo leaves f holding old. The replacement is overwritten.
f holds 10 bytes; /bin/echo hi >> f; a 28-byte file is renamed over f; undo cuts the replacement to 10 bytes.
The replacement can happen at any time between the operation and its undo, from another process or from an external command run in the shell.
Fix direction
Record with each operation what it left at the path (a content hash, or device and inode), and have undo refuse, with a clear error, when the path no longer holds that. The same check applies to redo.
This changes the persisted history record, so it must be coordinated with #230 (blob store, versioned migration). Old history files must still load.
hyperpolymath/januskey's reversible-coreOperationMetadata already has this shape (content_hash, new_content_hash). Use it as a reference, not a dependency (see .claude/CLAUDE.md).
More generally, every operation checks its preconditions by path before it acts. Doing operations through directory and file handles instead of paths would close that class; that is a larger change than this issue.
Done means
The two reproductions end with the replacement file untouched and a clear error from undo.
An old-format history file still loads and undoes (fixture test).
In impl/rust-cli: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings and cargo test pass. Commits signed.
Wider than this repository
The same question applies to hyperpolymath/januskey: does its undo verify new_content_hash before it writes? This has not been checked.
#232 - Runtime holes: 13 of 15 closed, by containment through a directory handle and a fixed session root [open]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Activity
coderabbitai commentedon Nov 17, 2026
🔗 Related PRs
#232 - Runtime holes: 13 of 15 closed, by containment through a directory handle and a fixed session root [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!