Rename loop-claude to build-release, with no alias

This commit is contained in:
2026-12-03 15:22:11 +01:00
parent 38102d5aa5
commit 969190064e
139 changed files with 717 additions and 671 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
"""The archive of loop-claude's transcripts: where each file lives, what it holds, and when a copy is replaced.
"""The archive of build-release's transcripts: where each file lives, what it holds, and when a copy is replaced.
<archive root>/<project key>/<chunk>/<sha256>.jsonl
<archive root>/<project key>/<chunk>/<sha256>.outcomes.md
<archive root>/<project key>/<chunk>/session/...
<archive root>/<project key>/<chunk>/judge/<sha256>.json
- The archive root is $LOOP_CLAUDE_TRANSCRIPTS, or ~/.claude/loop-claude-transcripts (location.archive_root).
- The archive root is $BUILD_RELEASE_TRANSCRIPTS, or ~/.claude/loop-claude-transcripts (location.archive_root).
- The project key is the checkout's path relative to ~/code, or to / outside it (project_key.project_key).
- <chunk> is the hash of the transcript's first line with a timestamp (location.chunk_folder). It is the
same for every cycle of a chunk, and differs between chunks, since a finished chunk's session is deleted
+2 -2
View File
@@ -11,8 +11,8 @@ FILE_SUFFIX = ".outcomes.md"
def archive_root(home: pathlib.Path, env: typing.Mapping[str, str]) -> pathlib.Path:
"""Where loop-claude archives every project's chunks."""
return pathlib.Path(env["LOOP_CLAUDE_TRANSCRIPTS"]).expanduser() if env.get("LOOP_CLAUDE_TRANSCRIPTS") else home / CLAUDE_HOME / "loop-claude-transcripts"
"""Where build-release archives every project's chunks."""
return pathlib.Path(env["BUILD_RELEASE_TRANSCRIPTS"]).expanduser() if env.get("BUILD_RELEASE_TRANSCRIPTS") else home / CLAUDE_HOME / "loop-claude-transcripts"
def project_archive(checkout_root: str, home: pathlib.Path, env: typing.Mapping[str, str]) -> pathlib.Path:
+3 -3
View File
@@ -48,11 +48,11 @@ REVERSED_AT = re.compile(rf"^{re.escape(REVERSED)}\n((?:> .*\n)*> .*)", re.MULTI
class Annotation(typing.NamedTuple):
"""What a verdict, an interrupt or a quoted answer records beside its judge lines, so a change to the setup can be judged before and after: docs/decisions.md → `loop-claude: each verdict records the claude-config release and commit that ran it…`. Each part is left out where empty; the cycle always gives config."""
"""What a verdict, an interrupt or a quoted answer records beside its judge lines, so a change to the setup can be judged before and after: docs/decisions.md → `build-release: each verdict records the claude-config release and commit that ran it…`. Each part is left out where empty; the cycle always gives config."""
config: str = ""
# The block spent_block renders.
spent: str = ""
# The human's whole typed answer that holds the judge's quote of the reversal, as loop-claude checked it.
# The human's whole typed answer that holds the judge's quote of the reversal, as build-release checked it.
reversed: str = ""
@@ -134,7 +134,7 @@ def answered(*, question: str, sources: str, answer: str, evidence: str, escalat
def rejected(why: str, reply: str, judge: str, *, judge_cost: float = 0.0, judge_run: JudgeRun | None = None) -> str:
"""A judge reply loop-claude rejected, with the reason and the reply as json."""
"""A judge reply build-release rejected, with the reason and the reply as json."""
return f"{REJECTED}: {why}\n\nReply:\n{quoted(reply)}\n\n{judge_lines(judge, judge_cost, judge_run)}"
+1 -1
View File
@@ -2,7 +2,7 @@ import pathlib
def project_key(checkout_root: str, home: pathlib.Path) -> str:
"""The checkout's path relative to ~/code, or to / outside it: what names a project's loop-claude session, its entry in the models file and its archive folder."""
"""The checkout's path relative to ~/code, or to / outside it: what names a project's build-release session, its entry in the models file and its archive folder."""
return checkout_root.removeprefix(f"{home / 'code'}/").lstrip("/")
@@ -263,7 +263,7 @@ class Location(unittest.TestCase):
self.assertEqual(project_key("/h/code", home), "h/code")
self.assertEqual(project_key("/srv/log", home), "srv/log")
self.assertEqual(project_archive("/h/code/log", home, {}), pathlib.Path("/h/.claude/loop-claude-transcripts/log"))
self.assertEqual(project_archive("/h/code/log", home, {"LOOP_CLAUDE_TRANSCRIPTS": "/a"}), pathlib.Path("/a/log"))
self.assertEqual(project_archive("/h/code/log", home, {"BUILD_RELEASE_TRANSCRIPTS": "/a"}), pathlib.Path("/a/log"))
def test_finds_the_checkout_a_key_names_under_code_or_else_under_the_root(self):
with tempfile.TemporaryDirectory() as home: