Gzip loop-claude's archive and the review folders 30 days after each file last changed, and read gzipped files by their plain name #572

Merged
lilleman merged 12 commits from item-306 into main 2026-11-17 02:58:40 +01:00
Showing only changes of commit abe30ab893 - Show all commits
@@ -77,7 +77,9 @@ class Main(unittest.TestCase):
self.assertEqual(self.run_main(now=None), (0, "Compressed 4 files.\n", ""))
def test_skips_a_file_removed_while_it_walks(self):
gone = mock.Mock(**{"name": "gone.jsonl", "is_file.return_value": True, "is_symlink.return_value": False, "stat.side_effect": FileNotFoundError})
gone = mock.Mock(**{"is_file.return_value": True, "is_symlink.return_value": False, "stat.side_effect": FileNotFoundError})
# Mock(name=...) names the mock itself, so the path's name is set after.
gone.name = "gone.jsonl"
kept = self.archive / "a.jsonl"
root = mock.Mock(**{"rglob.return_value": [gone, kept]})
self.assertEqual(main.old_files(root, "*.jsonl", NOW), [kept])