Answer prose round 1: 0 🔴, 7 🟡 (0 misread); name the transcripts and review files the tool takes, scope the readers' claim, and rewrite the flagged comments
CI / tests (pull_request) Successful in 2m59s
CI / tests (pull_request) Successful in 2m59s
This commit is contained in:
@@ -17,7 +17,7 @@ class Typed(typing.NamedTuple):
|
||||
|
||||
|
||||
def read_transcript(path: str) -> list[Entry] | Failure:
|
||||
"""The entries of the transcript at path, or of its gzip where the archive compressed it."""
|
||||
"""The entries of the transcript at path, or of its gzip where compress-archives gzipped it."""
|
||||
try:
|
||||
return [entry for raw in io.BytesIO(read_stored(pathlib.Path(path))) if (entry := parse_entry(raw))]
|
||||
except OSError as failure:
|
||||
|
||||
@@ -152,7 +152,7 @@ def copy_reports(found: Round, folder: pathlib.Path, reports: str) -> None:
|
||||
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.
|
||||
# A gzipped report. Where a plain report of the same name stands beside it, that one is newer and the gzip is skipped; the plain report is copied only if it was written before the round.
|
||||
elif not (folder / name).is_file():
|
||||
(pathlib.Path(reports) / name).write_bytes(read_stored(folder / name))
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ class Main(unittest.TestCase):
|
||||
self.assertIn("claude-opus-5-5 at low effort found 0, 0%, and missed 1 such 🔴: it doesn't qualify.", out)
|
||||
|
||||
def review_folder_with_round_1(self):
|
||||
"""The chunk's review folder, holding round 1's report, written the second the chunk began at 09:15; that round's own report, written after the replayed round began at 10:00, and a later pass's, written the second it began; and an earlier attempt's report, from before the chunk began."""
|
||||
"""The chunk's review folder. The chunk began at 09:15 and the replayed round 2 at 10:00. It holds round 1's report, written at 09:15:00; round 2's report, written after 10:00; the prose pass's report, written at 10:00:00; and an earlier attempt's report, from before 09:15."""
|
||||
folder = self.home / ".local" / "state" / "larv-review" / "code" / "proj-x"
|
||||
folder.mkdir(parents=True)
|
||||
(folder / "stability-round-1.md").write_text("round 1\n")
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
- judge/ holds each judge run an outcome names on its `Judge run:` line: the prompt the judge read and claude's
|
||||
json reply, named by the hash of that content (judge_run.JudgeRun). judge-replay reads the prompt back.
|
||||
|
||||
compress-archives gzips each .jsonl 30 days after it was last written, as <name>.jsonl.gz beside its plain name,
|
||||
compress-archives gzips each .jsonl 30 days after it last changed, as <name>.jsonl.gz beside its plain name,
|
||||
and every reader reads it by that name (text_files.compressed); a plain file beside its gzip is the newer.
|
||||
|
||||
write.archive writes the layout, at every interrupt and as every cycle ends. read.py and the tools that
|
||||
|
||||
@@ -94,7 +94,7 @@ def files_under(folder: pathlib.Path) -> list[pathlib.Path]:
|
||||
|
||||
|
||||
# Claude Code rewrites some files whole, such as custom-title.json, so a copy is replaced only by a file that grew from it.
|
||||
# A grown copy lands plain beside its gzip, which compress-archives then replaces losing nothing, since the gzip holds a prefix of it.
|
||||
# A grown copy lands plain beside its gzip, which compress-archives then replaces without losing anything, since the gzip holds a prefix of it.
|
||||
def copy_for(copy: pathlib.Path, data: bytes) -> pathlib.Path | None:
|
||||
if not stored(copy):
|
||||
return copy
|
||||
|
||||
Reference in New Issue
Block a user