Name the transcript deletion for what it does: delete_transcript_files, not end_session

This commit is contained in:
2026-09-26 14:41:53 +02:00
parent 39b4829ef0
commit e86b15888e
3 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -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 ""
+3 -3
View File
@@ -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))
-1
View File
@@ -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".