Give record, verdict and judge one meaning each

This commit is contained in:
2026-10-03 17:53:25 +02:00
parent 9f75fe8c51
commit 5f7d34b87d
12 changed files with 39 additions and 39 deletions
@@ -1,4 +1,4 @@
You judge a bench of two code-review processes, A and B, on one real chunk of work. Each process reviewed the same chunk three times, independently: runs A1–A3 and B1–B3. Rule whether B reviews at least as well as A, and whether A reviews at least as well as B.
You compare two code-review processes, A and B, on one real chunk of work. Each process reviewed the same chunk three times, independently: runs A1–A3 and B1–B3. Rule whether B reviews at least as well as A, and whether A reviews at least as well as B.
Everything is under `{dir}`; read nothing outside it:
@@ -7,7 +7,7 @@ Everything is under `{dir}`; read nothing outside it:
- `<run>/report.md`: the run's own account of its passes, findings and outcomes. Its claims are not evidence.
- `<run>/fixes.diff`: what the run actually changed. This is the evidence.
Judge each run on:
Rate each run on:
1. **Truth coverage**: for each truth issue, caught and fixed ✔, partly ◐, or missed ✘, checked against `fixes.diff`. A filed or declined issue with a sound reason counts ◐.
2. **Other real defects**: a finding the truth lacks that is a real defect in the chunk, fixed or filed.
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Blind-judge each case's six runs: BENCH_SOURCES=<as for bench.py> judge.py <case> ..."""
"""Blind-compare each case's six runs: BENCH_SOURCES=<as for bench.py> compare.py <case> ..."""
import concurrent.futures
import json
import pathlib
@@ -33,7 +33,7 @@ def blind(text):
def prepare(case):
folder = BENCH / "judge" / case
folder = BENCH / "compare" / case
if folder.exists():
shutil.rmtree(folder)
folder.mkdir(parents=True)
@@ -53,15 +53,15 @@ def prepare(case):
(run / "report.md").write_text(blind(report.read_text()))
(run / "fixes.diff").write_text(bench.git(clone, "diff", head, "chunk") + "\n")
mapping[f"{label}{n}"] = str(report)
(BENCH / "judge" / f"{case}.mapping.json").write_text(json.dumps(mapping, indent="\t") + "\n")
(BENCH / "compare" / f"{case}.mapping.json").write_text(json.dumps(mapping, indent="\t") + "\n")
return folder
def judge(case):
def compare(case):
folder = prepare(case)
ruling = BENCH / "judge" / f"{case}.ruling.md"
prompt = (BENCH / "judge-prompt.md").read_text().format(dir=folder, ruling=ruling)
with (BENCH / "logs" / f"judge-{case}.jsonl").open("w") as out:
ruling = BENCH / "compare" / f"{case}.ruling.md"
prompt = (BENCH / "compare-prompt.md").read_text().format(dir=folder, ruling=ruling)
with (BENCH / "logs" / f"compare-{case}.jsonl").open("w") as out:
subprocess.run(
["claude", "-p", prompt, "--model", "claude-opus-5-5", "--allowedTools", "Read,Grep,Glob,Write", "--output-format", "stream-json", "--verbose"],
cwd=folder, stdout=out, stderr=subprocess.STDOUT)
@@ -70,5 +70,5 @@ def judge(case):
if __name__ == "__main__":
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool:
for result in pool.map(judge, sys.argv[1:]):
for result in pool.map(compare, sys.argv[1:]):
print(result, flush=True)