Ship the do-epic launcher, keep its transcripts out of the repo and in the backup list

This commit is contained in:
2026-11-18 22:36:02 +01:00
parent 776a852965
commit b769916928
5 changed files with 26 additions and 1 deletions
+1
View File
@@ -56,6 +56,7 @@
!bin/deploy-release
!bin/deploy_release/
!bin/deploy_release/*.py
!bin/do-epic
!bin/do_epic/
!bin/do_epic/*.py
!bin/do_epic/backend/
+1 -1
View File
@@ -73,7 +73,7 @@ Then pick a model with `/model`.
Link `loop-claude` onto `PATH`: `ln -s ~/.claude/bin/loop-claude ~/.local/bin/loop-claude`. Every claude it starts, the interactive ones included, skips every permission prompt. loop-claude runs each chunk in its own window of a tmux session per project, so it needs tmux 3.2 or later.
Back up two folders: `~/.claude/loop-claude-transcripts`, where loop-claude keeps every transcript, and `~/.local/state/larv-review`, where larv-review keeps each chunk's reports. To keep them small, add a crontab line that gzips each transcript and review file 30 days after it last changed, and logs each run with its date:
Back up three folders: `~/.claude/loop-claude-transcripts`, where loop-claude keeps every transcript, `~/.claude/do-epic-transcripts`, where do-epic keeps its chunks', and `~/.local/state/larv-review`, where larv-review keeps each chunk's reports. To keep the first and the last small, add a crontab line that gzips each transcript and review file 30 days after it last changed, and logs each run with its date:
```sh
17 4 * * * { date; $HOME/.claude/bin/compress-archives; } >> $HOME/.local/state/compress-archives.log 2>&1
Executable
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env python3
import os
import pathlib
import sys
LAUNCHER = pathlib.Path(__file__).resolve()
sys.path.insert(0, str(LAUNCHER.parent))
from loop_effects import effects
from do_epic import main
from loop_state import paths
sys.exit(main.main(sys.argv[1:], os.environ, paths.paths_from(pathlib.Path.home()), LAUNCHER, effects.system_effects()))
+10
View File
@@ -2,6 +2,7 @@ import contextlib
import dataclasses
import io
import pathlib
import subprocess
import sys
import tempfile
import unittest
@@ -58,6 +59,15 @@ class DoEpicTest(unittest.TestCase):
return code, out.getvalue(), err.getvalue()
class TheLauncher(unittest.TestCase):
def test_the_repo_ships_a_do_epic_that_prints_its_help(self) -> None:
launcher = pathlib.Path(__file__).resolve().parents[1] / "do-epic"
ran = subprocess.run([str(launcher), "--help"], capture_output=True, text=True, timeout=60)
self.assertEqual((ran.returncode, ran.stdout.split(" ", 2)[2]), (0, main.HELP + "\n"))
tracked = subprocess.run(["git", "ls-files", "--error-unmatch", launcher.name], capture_output=True, cwd=launcher.parent)
self.assertEqual(tracked.returncode, 0, "bin/do-epic is not in the repo; .gitignore lists what it keeps")
class TheCommand(DoEpicTest):
def test_prints_the_help_for_anything_but_one_epic_key(self) -> None:
for argv, code in ((["--help"], 0), (["-h"], 0), ([], 1), (["abc"], 1), (["ABC-12", "ABC-13"], 1), (["--chunk", "x", "ABC-12"], 1), (["--chunk", "ABC-12"], 1)):
+1
View File
@@ -16,6 +16,7 @@ PRIVATE = [
"daemon.log",
"daemon/control.key",
"debug/a.txt",
"do-epic-transcripts/a/b.jsonl",
"file-history/a/b.md",
"history.jsonl",
"jobs/a/b.json",