Answer stability round 1: count an answer the transcript shows written, give worker and judge one finish rule, cite CLAUDE.md by its heading, test a quoted answer that cannot be archived

This commit is contained in:
2026-10-03 21:06:34 +02:00
parent 0d85574a98
commit a43ef188d3
9 changed files with 30 additions and 20 deletions
+4 -4
View File
@@ -29,11 +29,11 @@ def project_key(root: str, code: pathlib.Path) -> str:
return root.removeprefix(f"{code}/").lstrip("/")
def read_checkout_file(root: str, name: str, consequence: str) -> str | Stop:
def read_utf8(folder: str, name: str, consequence: str) -> str | Stop:
try:
return pathlib.Path(root, name).read_text(encoding="utf-8")
return pathlib.Path(folder, name).read_text(encoding="utf-8")
except OSError as failure:
return Stop(1, f"{name} in {root}: {failure.strerror} - {consequence}.")
return Stop(1, f"{name} in {folder}: {failure.strerror} - {consequence}.")
except UnicodeDecodeError as failure:
line = failure.object.count(b"\n", 0, failure.start) + 1
return Stop(1, f"{name} in {root} is not UTF-8 on line {line} - {consequence}.")
return Stop(1, f"{name} in {folder} is not UTF-8 on line {line} - {consequence}.")