Repository navigation
Open
Labels
bugSomething is broken or behaves incorrectlypriority:p2Normal - queue itscope:repoConfined to this repositorysecurity
Description
Found on 2026-11-17 while fixing redo in #231. Each case was reproduced in a temporary sandbox root.
Defects
rm fwherefis mode 0600, thenundo:fcomes back 0644.apply_rminimpl/rust-cli/src/commands.rsrecords only the content. Ownership is not recorded either. A private file becomes readable by others after an undo.rmdir dwheredis mode 0700, thenundo:dcomes back 0755.apply_rmdirrecords no undo data.X=1; export X; unset X; undo:Xis restored but is no longer exported.apply_unset_variableinimpl/rust-cli/src/state.rsrecords only the previous value. The same gap means the undo record of an assignment cannot hold the export flag (an open review thread on Fix redo: redone operations keep their undo data, and redo restores what the operation produced #231).
Where the tests are
impl/rust-cli/tests/redo_roundtrip_tests.rs, mod laws, scenarios(): three scenarios are marked undo_is_exact: false for these defects.
Design constraint
Operation.undo_data is an opaque Vec<u8> persisted in the history file, decoded per operation type by undo() and rollback_transaction(). Old history files must still load and undo, so a new layout must be distinguishable from the old one. Add a fixture test for an old-format file.
Read #230 first: its plan moves deleted-file contents to a blob store and may change the record format. Coordinate with it, and say in the PR which you did.
Done means
- The three
undo_is_exact: falseflags becometrueandevery_operation_round_tripsstill passes. - 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 warningsandcargo testpass. Commits signed.
Notes
- If Fix redo: redone operations keep their undo data, and redo restores what the operation produced #231 has not merged, base the work on its branch
claude/busy-brahmagupta-lqyiyq. - Do not claim the shell is production-ready or formally verified end to end.
Reacted by coderabbitai
Metadata
Metadata
Assignees
Labels
bugSomething is broken or behaves incorrectlypriority:p2Normal - queue itscope:repoConfined to this repositorysecurity
Activity
coderabbitai commentedon Nov 17, 2026
🔗 Related PRs
#230 - Stress-suite repair and a crash-safe history journal (two steps still open, not ready to merge) [open]
#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!