Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s

This commit is contained in:
2026-12-03 18:56:28 +01:00
parent 20c83f861f
commit 1ca2c8efe0
142 changed files with 1095 additions and 933 deletions
+4 -4
View File
@@ -3,8 +3,8 @@
usage: compress-archives
It gzips each file that last changed over 30 days ago: in build-release's archive,
$BUILD_RELEASE_TRANSCRIPTS (default ~/.claude/loop-claude-transcripts), each transcript, *.jsonl;
in the review folders, ~/.local/state/larv-review, every file but a lock, *.lock. A file's last change is the later
$BUILD_RELEASE_TRANSCRIPTS (default ~/.local/state/build-release/transcripts), each transcript, *.jsonl;
in the review folders, ~/.local/state/build-release/larv-review, every file but a lock, *.lock. A file's last change is the later
of its mtime and ctime, so a copied or unpacked file counts from when it landed.
The gzip lands beside the file as <name>.gz, with the same times. The file is removed only once
@@ -21,7 +21,7 @@ import typing
from transcript_archive.location import archive_root
from failure import Failure
from review_rules.review_folder import REPORTS
from review_rules.review_folder import reports_folder
from text_files.compressed import SUFFIX
# Why 30 days: docs/decisions.md → `archives: gzip each transcript in build-release's archive and each file in the review folders 30 days after it last changed, keeping all of them`.
@@ -37,7 +37,7 @@ def main(argv: list[str], env: typing.Mapping[str, str], home: pathlib.Path, now
return 1
cutoff = now() - AGE_DAYS * 24 * 60 * 60
count = 0
for path in [*old_files(archive_root(home, env), "*.jsonl", cutoff), *old_files(home / REPORTS, "*", cutoff)]:
for path in [*old_files(archive_root(home, env), "*.jsonl", cutoff), *old_files(reports_folder(home, env), "*", cutoff)]:
if failed := compress(path):
print(failed.reason, file=sys.stderr)
return 1