Run every claude the loop starts in a Claude home the commands generate from the clone #804

Merged
lilleman merged 15 commits from item-483 into main 2026-12-04 03:56:59 +01:00
2 changed files with 19 additions and 0 deletions
Showing only changes of commit f3fc329e23 - Show all commits
+14
View File
@@ -75,6 +75,20 @@ class Home(unittest.TestCase):
["auth", "status"],
])
def test_a_clone_that_enables_no_plugin_installs_none(self) -> None:
(self.clone / "settings.json").write_text('{"tui": "fullscreen"}', encoding="utf-8")
self.assertIsNone(self.unready())
self.assertEqual(self.ran, [["auth", "status"]])
def test_the_generated_settings_are_written_for_a_person_to_read(self) -> None:
(self.clone / "settings.json").write_text('{"tui": "fullscreen", "env": {"A": "1"}}', encoding="utf-8")
self.unready()
self.assertEqual((self.home / "settings.json").read_text(encoding="utf-8"), '{\n "env": {\n "A": "1"\n },\n "tui": "fullscreen"\n}\n')
def test_a_home_built_from_the_clones_commit_is_left_as_it_is(self) -> None:
self.unready()
(self.home / "settings.json").write_text('{"model": "opus", "tui": "inline"}', encoding="utf-8")
+5
View File
@@ -1670,6 +1670,11 @@ class TranscriptRead(unittest.TestCase):
with self.subTest(path):
self.assertEqual(self.breached("Read", {"file_path": path}), [])
def test_a_read_of_a_jsonl_file_beside_a_homes_projects_folder_passes(self):
for path in ("/home/h/.claude/history.jsonl", "/home/h/.local/share/build-release/claude-home/history.jsonl"):
with self.subTest(path):
self.assertEqual(self.breached("Read", {"file_path": path}), [])
def test_a_jsonl_file_outside_the_projects_folder_passes(self):
self.assertEqual(self.breached("Read", {"file_path": "/home/h/code/acme/cases.jsonl"}), [])
self.assertEqual(self.breached("Read", {"file_path": "/home/h/.local/state/build-release/transcripts/x.jsonl"}), [])