Gzip loop-claude's archive and the review folders 30 days after each file was last written, and read gzipped files by their plain name
CI / tests (pull_request) Failing after 2m59s
CI / tests (pull_request) Failing after 2m59s
This commit is contained in:
@@ -16,6 +16,7 @@ from rung_replay.search import first_reply
|
||||
from record_store.stores import local_file, store
|
||||
from project_config.main import located
|
||||
from review_rules.reviewer_context import principles_line, reviewer_context
|
||||
from text_files.compressed import read_stored, SUFFIX
|
||||
from review_rules.review_folder import REPORTS, review_folder
|
||||
from model_routing.ladder import Rung
|
||||
from claude_code.entries import structured_output
|
||||
@@ -146,8 +147,14 @@ def copy_reports(found: Round, folder: pathlib.Path, reports: str) -> None:
|
||||
"""Copies into reports each report written to folder after found's chunk began and before its round did."""
|
||||
# The round's own report, any later one, and one from an earlier attempt at the item in the same worktree would each hand the reviewer the findings it is to find.
|
||||
for written in folder.iterdir() if folder.is_dir() else ():
|
||||
if written.is_file() and found.began <= written.stat().st_mtime < found.seconds:
|
||||
if not written.is_file() or not found.began <= written.stat().st_mtime < found.seconds:
|
||||
continue
|
||||
name = written.name.removesuffix(SUFFIX)
|
||||
if name == written.name:
|
||||
shutil.copy2(written, reports)
|
||||
# compress-archives gzipped it. A plain file of the same name replaced it later, as it would have replaced the plain file, so only that one is copied, where its time falls before the round.
|
||||
elif not (folder / name).is_file():
|
||||
(pathlib.Path(reports) / name).write_bytes(read_stored(folder / name))
|
||||
|
||||
|
||||
def redirected(prompt: str, home: pathlib.Path, folder: pathlib.Path, worktree: str, copies: Copies) -> str | Failure:
|
||||
|
||||
Reference in New Issue
Block a user