Repository navigation
Conversation
- undo after `compact off` no longer puts the block back: undo passes over the off switch and the `compact on` it took out, and reverses the change before them. - `compact off` deletes a file that `compact on` created when nothing else is in it (backed up first; new "delete" change kind, undo restores it and never writes over a new file). - setup on a file with a standalone compact block leaves one block. - Mixed CRLF/LF, no final line ending and non-UTF-8 bytes come back byte for byte: no existing line ending is rewritten, and off on an unchanged file puts the backup back. - Described as "shorter, cleaner reports"; no saving claimed (bench 0.97). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Review item 4. One fix, four defects, all in compact mode's on/off/undo path.
What changes
undoaftercompact offput the block back.undonow passes over acompact offand thecompact onit took out, and reverses the change before them. With nothing before them it says so and changes nothing. Manifests record"compact": "on"/"off"; manifests from 0.9.6/0.9.7 are read by profile and title.compact offleft an empty file wherecompact onhad created it. It now deletes the file (backed up first). New change kinddeleteinapply_changes;undo_manifestrestores a deleted file and refuses if a new file is in its place.add_rules_blocknow moves the compact rules inside the new block, short form: one block, no rule twice.compact onno longer rewrites any existing line ending (the block uses the file's majority ending).compact offon a file unchanged sincecompact onputs the backup bytes back. Files are read and written as bytes, so non-UTF-8 bytes survive.Tests
tests/test_compact.py(8 line-ending cases parametrized).sandbox-exec deny network*,-m 'not p00_outer'): 557 passed, 6 skipped (loopback-only tests), 1 deselected.Not sure about
compact onandcompact offgets text removal, which cannot tell whether a blank line before the block was there before. Byte-exact restore holds only for the unchanged file.compact on→setup→compact off→undo: undo of setup refusesCLAUDE.md(changed since setup), as for any file edited after setup. It does not put the compact block back. Existing behaviour, seen here: the setup steps before that file are already undone when it refuses.🤖 Generated with Claude Code