Measure routing figures every 20th cycle and raise each call for a routing change once

This commit is contained in:
2026-10-15 00:37:01 +02:00
parent 8bc0d88b60
commit b1168ca8c5
14 changed files with 606 additions and 12 deletions
+6 -2
View File
@@ -6,9 +6,13 @@ from claude_code.transcript import first_timestamped_line
from project_key import project_key
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" / "loop-claude-transcripts"
def project_archive(checkout_root: str, home: pathlib.Path, env: typing.Mapping[str, str]) -> pathlib.Path:
archive = pathlib.Path(env["LOOP_CLAUDE_TRANSCRIPTS"]).expanduser() if env.get("LOOP_CLAUDE_TRANSCRIPTS") else home / ".claude" / "loop-claude-transcripts"
return archive / project_key(checkout_root, home)
return archive_root(home, env) / project_key(checkout_root, home)
def chunk_folder(project_archive: pathlib.Path, transcript: bytes) -> pathlib.Path: