From e86b15888e38fbab21d0a94e7567401a721bf216 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 26 Sep 2026 14:41:53 +0200 Subject: [PATCH] Name the transcript deletion for what it does: delete_transcript_files, not end_session --- bin/loop-claude | 4 ++-- bin/test_loop_claude.py | 6 +++--- todo.md | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/loop-claude b/bin/loop-claude index 36b307b3..4a060d5d 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -133,7 +133,7 @@ def session_file(session_id): return hit[0] if hit else "" -def end_session(path): +def delete_transcript_files(path): for sibling in glob.glob(glob.escape(path.removesuffix(".jsonl")) + "*"): try: shutil.rmtree(sibling) if os.path.isdir(sibling) else os.remove(sibling) @@ -358,7 +358,7 @@ def run_cycle(root, task, premises, name, session_id): verdict = judge(root, task, premises, render(entries(path))) if verdict["finished"]: archive(root, path, f"Task: {task}\n\nVerdict: finished") - end_session(path) + delete_transcript_files(path) return "" diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index a1eb06ec..ffe8742f 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -174,8 +174,8 @@ class Said(unittest.TestCase): self.assertEqual(loop.said("not a part"), "") -class EndSession(unittest.TestCase): - def test_removes_the_transcript_and_its_siblings_and_closes_the_session(self): +class DeleteTranscriptFiles(unittest.TestCase): + def test_deletes_the_transcript_and_its_siblings_so_the_session_is_gone(self): with tempfile.TemporaryDirectory() as home, unittest.mock.patch.dict(os.environ, {"HOME": home}): root = os.path.join(home, ".claude", "projects", "p") os.makedirs(root) @@ -185,7 +185,7 @@ class EndSession(unittest.TestCase): os.makedirs(os.path.join(root, f"{SESSION_ID}.superseded-1", "tool-results")) open(os.path.join(root, f"{SESSION_ID}.orphaned-1-ab.jsonl"), "w").write("{}\n") self.assertTrue(loop.session_open(SESSION_ID)) - loop.end_session(transcript) + loop.delete_transcript_files(transcript) self.assertEqual(os.listdir(root), []) self.assertFalse(loop.session_open(SESSION_ID)) diff --git a/todo.md b/todo.md index e38eb146..12d1ccb2 100644 --- a/todo.md +++ b/todo.md @@ -4,7 +4,6 @@ Ordered by how many seats of the 2026-09-25 scoring panel (`docs/decisions.md`) named the place; each is one chunk. -- Name `end_session` for what it does, today it deletes the session's transcript files. - Define looping reviewer and round cap under `CLAUDE.md` → "Vocabulary", today inline at `agents/review-protocol.md`. - Give "scoring run" a heading in `skills/comprehension-panel/SKILL.md`, today inside a paragraph `larv-review` cites. - Give `agents/systems-architect.md`'s promotion signal and size signal words other than `trigger`, today three meanings against the one under "Vocabulary".