From fb711c196274ea2781c53757560a74c9fcf6df91 Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 1 Nov 2026 08:24:14 +0200 Subject: [PATCH 1/4] fix(efficacy): name the benchmark's revision and the arms' templates in the report The report's "Templates revision" row listed the benchmark trees that ran the trials, which a trial records under a key named for the templates. It now reads "Benchmark revision, per trial", and each arm's row names the templates its file was made from. Two counted runs read "two runs", and the summary row that lists every primary that moved is named for that. Round 5c's row in the rounds index links its report. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX --- docs/rounds/README.md | 2 +- tests/efficacy/report.py | 35 ++++++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/docs/rounds/README.md b/docs/rounds/README.md index cce1662..9b53deb 100644 --- a/docs/rounds/README.md +++ b/docs/rounds/README.md @@ -27,5 +27,5 @@ repository existed. | 4 | 2026-10-17 | Spec: thin, and builder: Haiku 4.5 | [Summary](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-10-17-round-4.md), [thin spec](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-10-17-efficacy-thin.md), [weaker model](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-10-17-efficacy-weaker.md) | | 5 | Stopped 2026-10-29, after four trials | Context file: how the rules are delivered | — | | 5b | Stopped 2026-10-29, after four trials | Context file: how the rules are delivered | — | -| 5c | Not run yet | Context file: how the rules are delivered | — | +| 5c | 2026-10-29 to 2026-10-31 | Context file: how the rules are delivered | [Report](https://github.com/solid-ai-dev/solid-ai-templates/blob/main/docs/audits/2026-11-01-efficacy.md) | | 5d | Not run yet | Context file: a hand-written one and a 40-line one, against 5c | — | diff --git a/tests/efficacy/report.py b/tests/efficacy/report.py index 9492f94..c55aa7b 100644 --- a/tests/efficacy/report.py +++ b/tests/efficacy/report.py @@ -1408,7 +1408,11 @@ def write_report(root, trials, table, results, seed, escalation, else "%d to %d, uneven" % (counts[0], counts[-1]))) else: lines.append("| Judge | not run |") - for label, key in (("Templates revision", "templates_tree"), + # A trial's record names the benchmark tree that ran it under the key + # `templates_tree`, from when the benchmark lived in the templates + # repository; the templates an arm was made from are its generation + # record's, in the arm rows below. + for label, key in (("Benchmark revision, per trial", "templates_tree"), ("Hidden suite", "suite_revision")): seen = sorted({str(trial["scores"].get(key) or "unknown") for trial in trials.values()}) or ["unknown"] @@ -1421,10 +1425,12 @@ def write_report(root, trials, table, results, seed, escalation, continue record = generation.get(arm) if record: - lines.append("| Arm %s's file | generated %s, %s lines, leak " - "scan: %s |" + made_from = (record.get("commit") or record.get("ref") + or "unknown")[:8] + lines.append("| Arm %s's file | generated %s from the templates " + "at `%s`, %s lines, leak scan: %s |" % (arm, record.get("started_at", "unknown"), - record.get("output_lines", "?"), + made_from, record.get("output_lines", "?"), "clean" if not (record.get("output_leak") or {}) .get("hits") else "HITS")) else: @@ -2006,6 +2012,10 @@ def results(verdict, within): got = suite_cell({"task_success": {"values": values}}, "skills-none") checks.append(("a dip among fifteen runs is named without a crash", got == "97 %%, one run of %d at 50 %%" % ROUND5_K, got)) + values["skills"][4] = 0.0 + got = suite_cell({"task_success": {"values": values}}, "skills-none") + checks.append(("two dips are named as two runs", + got == "90 %%, two runs of %d at 0 %%" % ROUND5_K, got)) return checks @@ -2114,6 +2124,11 @@ def moved_cell(results, name): return ", ".join(cells) if cells else "did not move" +def runs(count): + """`run` or `runs`, as a count of them reads.""" + return "run" if count == 1 else "runs" + + def suite_cell(table, name): """The arm's hidden-suite pass rate, naming any run under the bare arm's mean by more than the practical threshold.""" @@ -2126,8 +2141,9 @@ def suite_cell(table, name): text = "%d %%" % round(100 * statistics.fmean(left)) dipped = [value for value in left if value < right - SUITE_DIP] if dipped: - text += ", %s run of %s at %d %%" % ( - counted(len(dipped)), counted(len(left)), round(100 * min(dipped))) + text += ", %s %s of %s at %d %%" % ( + counted(len(dipped)), runs(len(dipped)), counted(len(left)), + round(100 * min(dipped))) return text @@ -2250,8 +2266,9 @@ def why_line(trials, results, arm, name, answered, length): "the app unable to boot" if errors[0].startswith("ModuleNotFoundError") else "left the app unable to boot (`%s`)" % errors[0]) - sentences.append("%s run of %s %s." % ( - counted(len(errors)).capitalize(), counted(count), cause)) + sentences.append("%s %s of %s %s." % ( + counted(len(errors)).capitalize(), runs(len(errors)), + counted(count), cause)) built = [word for word, key in STRUCTURE if read_as(results, name, key, "worse")] @@ -2342,7 +2359,7 @@ def finding_lines(trials, table, results, active): rows = [ ("Improves the code?", ["**%s**" % answers[arm] for arm in arms]), - ("Readability, design, maintainability", + ("Primary rows that moved", [moved_cell(results, name) for name in names]), (suite, [suite_cell(table, name) for name in names]), ("Code size", [size_cell(table, results, name) for name in names]), From 267b3dce983719adf47ce0a3d04a8a7409f301c2 Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 1 Nov 2026 08:27:15 +0200 Subject: [PATCH 2/4] fix(efficacy): end the report in one newline Every section ends in a blank line, so the last left two at the end of the file, which the templates' Markdown lint refuses. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX --- tests/efficacy/report.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/efficacy/report.py b/tests/efficacy/report.py index c55aa7b..ee7aabe 100644 --- a/tests/efficacy/report.py +++ b/tests/efficacy/report.py @@ -1601,10 +1601,20 @@ def write_report(root, trials, table, results, seed, escalation, target = os.path.join(out_dir, "%s-efficacy.md" % datetime.date.today().isoformat()) with io.open(target, "w", encoding="utf-8", newline="\n") as handle: - handle.write("\n".join(wrap_prose(lines, markdown_width())) + "\n") + handle.write(report_text(lines, markdown_width())) return target +def report_text(lines, width): + """The report's lines as one text, wrapped to `width`, ending in exactly + one newline.""" + + # Sections each end in a blank line, so the last one would leave two + # blank lines at the end of the file, which the templates' Markdown lint + # refuses. + return "\n".join(wrap_prose(lines, width)).rstrip("\n") + "\n" + + def markdown_width(): """The Markdown line width the repository declares.""" with io.open(os.path.join(lib.ROOT, ".markdownlint.json"), @@ -2016,6 +2026,9 @@ def results(verdict, within): got = suite_cell({"task_success": {"values": values}}, "skills-none") checks.append(("two dips are named as two runs", got == "90 %%, two runs of %d at 0 %%" % ROUND5_K, got)) + got = report_text(["# Report", "", "Body.", "", ""], 88) + checks.append(("a report ends in one newline, however its last section " + "ends", got == "# Report\n\nBody.\n", got)) return checks From 07686681281124770ca34438685bab54cfa6dc2b Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 1 Nov 2026 08:38:29 +0200 Subject: [PATCH 3/4] fix(efficacy): report each dip, held growth, short pair counts and the judge plainly A finding cell named the lowest of several dipped runs as though all sat there, and a size held within its margin read as no change. Each dipped run is now named with its rate, held growth is printed and marked, and a contrast over fewer pairs than the round's blocks names its count. A round with no second judge says the judge is checked only by its evidence lines, instead of calling it same-vendor. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX --- tests/efficacy/report.py | 71 +++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 16 deletions(-) diff --git a/tests/efficacy/report.py b/tests/efficacy/report.py index ee7aabe..7cb2bbf 100644 --- a/tests/efficacy/report.py +++ b/tests/efficacy/report.py @@ -944,8 +944,8 @@ def cross_check_section(check): lines = ["## The other vendor's judge", ""] if not check: lines.append("Not run: no other vendor's judging was read for this " - "round, so the judge shares a vendor with the generator " - "unchecked.") + "round, so the judge is checked only by its evidence " + "lines.") return lines lines.append("`%s` read %d trial(s) of this round: %s. Its scores are " "never meaned with the rounds' judge's. A judge-row contrast " @@ -1372,7 +1372,9 @@ def write_report(root, trials, table, results, seed, escalation, "report repeats rather than footnotes." % k) else: lines.append("Each interval below is a 95 %% bootstrap interval over " - "the K = %d paired differences of its contrast." % k) + "the paired differences of its contrast, one per block " + "that measured both arms: K = %d at most, and a cell " + "that had fewer names its count." % k) lines.append("") lost = lost_trials(root) @@ -2025,7 +2027,7 @@ def results(verdict, within): values["skills"][4] = 0.0 got = suite_cell({"task_success": {"values": values}}, "skills-none") checks.append(("two dips are named as two runs", - got == "90 %%, two runs of %d at 0 %%" % ROUND5_K, got)) + got == "90 %%, two runs of %d at 0 %% and 50 %%" % ROUND5_K, got)) got = report_text(["# Report", "", "Body.", "", ""], 88) checks.append(("a report ends in one newline, however its last section " "ends", got == "# Report\n\nBody.\n", got)) @@ -2143,8 +2145,8 @@ def runs(count): def suite_cell(table, name): - """The arm's hidden-suite pass rate, naming any run under the bare arm's - mean by more than the practical threshold.""" + """The arm's hidden-suite pass rate, naming each run under the bare arm's + mean by more than the practical threshold with its own rate.""" treatment, baseline = name.split("-") left = [value for value in table["task_success"]["values"] .get(treatment, {}).values() if value is not None] @@ -2152,11 +2154,11 @@ def suite_cell(table, name): if not left or right is None: return NOT_MEASURED text = "%d %%" % round(100 * statistics.fmean(left)) - dipped = [value for value in left if value < right - SUITE_DIP] + dipped = sorted(value for value in left if value < right - SUITE_DIP) if dipped: - text += ", %s %s of %s at %d %%" % ( + text += ", %s %s of %s at %s" % ( counted(len(dipped)), runs(len(dipped)), counted(len(left)), - round(100 * min(dipped))) + spoken(["%d %%" % round(100 * value) for value in dipped])) return text @@ -2173,8 +2175,9 @@ def share_cell(table, results, key, name, held): def size_cell(table, results, name): - """Source lines and files as signed shares of the bare arm's, naming - only the ones the interval separated.""" + """Source lines and files as signed shares of the bare arm's, naming the + ones the interval separated and, marked so, the ones held within their + margin.""" parts, measured = [], False for word, key in SIZE: if key not in results: @@ -2183,6 +2186,14 @@ def size_cell(table, results, name): measured = measured or cell != NOT_MEASURED if cell not in (None, NOT_MEASURED): parts.append("%s %s" % (word, cell)) + elif results[key][name]["verdict"] == "held": + + # Held means the growth stayed inside the margin, not that there + # was none, so the share is printed beside the word. + entry = results[key][name] + baseline = arm_mean(table, key, name.split("-")[1]) + parts.append("%s %+d %% (held)" % ( + word, round(100 * entry["mean"] / baseline))) if not measured: return NOT_MEASURED return ", ".join(parts) if parts else "no change shown" @@ -2314,7 +2325,7 @@ def why_line(trials, results, arm, name, answered, length): if answered == "Yes" and length is not None and length <= SHORT_FILE: lead = "A few rules the agent could hold: " + lead if not built: - lead += ", and it wrote no more code than without a file" + lead += ", and its code grew no more than its size margin allows" if effort: lead += " — for more %s" % spoken(effort) elif computed: @@ -2618,7 +2629,7 @@ def escalation_section(escalation): return lines -def contrast_cell(contrast, verdicts=True): +def contrast_cell(contrast, verdicts=True, full=None): """One contrast, as the mean, its interval, its verdict and its method. Without `verdicts` the cell stops at the interval, for a row that may @@ -2642,6 +2653,12 @@ def contrast_cell(contrast, verdicts=True): method = interval.get("method") or "" if not method.startswith("BCa"): body += " ‡" + + # A block missing either arm's measure drops out of the pair, so an + # interval over fewer pairs than the round's blocks says how many. + pairs = len(contrast.get("pairs") or []) + if full and 0 < pairs < full: + body += ", %d pairs" % pairs if not verdicts: return body verdict_text = contrast["verdict"] @@ -2665,6 +2682,9 @@ def contrast_table(table, results, keys, verdicts=True, active=None): " | ".join("%s−%s" % pair for pair in active)), "|---|---|%s|" % "|".join("---" for _ in arms + active)] degenerate = False + full = max((len(contrast.get("pairs") or []) + for by_name in results.values() for contrast in by_name.values() + if isinstance(contrast, dict)), default=0) for key in keys: entry = table[key] means = {} @@ -2675,7 +2695,7 @@ def contrast_table(table, results, keys, verdicts=True, active=None): cells = [] for treatment, baseline in active: contrast = results[key]["%s-%s" % (treatment, baseline)] - cell = contrast_cell(contrast, verdicts) + cell = contrast_cell(contrast, verdicts, full) degenerate = degenerate or "‡" in cell cells.append(cell) lines.append("| %s | %s | %s | %s |" @@ -3467,6 +3487,25 @@ def executive_checks(seed): got = (size_cell(bare, planted, "full-none"), size_cell(bare, planted, "hand-none")) checks.append(("the size cell names the separated measure as a share", got == ("files +40 %", "no change shown"), got)) + planted["source_lines"]["hand-none"] = {"mean": 14.0, "verdict": "held"} + got = size_cell(bare, planted, "hand-none") + checks.append(("growth held within its margin is printed, marked held", + got == "lines +14 % (held)", got)) + + # An interval over fewer pairs than the round's blocks names its count; + # one over every block does not. + contrast = {"mean": 0.1, "verdict": "better", "non_inferior": None, + "interval": {"low": 0.05, "high": 0.2, "method": "BCa"}, + "pairs": [0.1] * 14} + short, whole = (contrast_cell(contrast, True, 15), + contrast_cell(dict(contrast, pairs=[0.1] * 15), True, 15)) + checks.append(("a contrast over fewer pairs than blocks names its count", + ", 14 pairs" in short and "pairs" not in whole, + (short, whole))) + got = " ".join(cross_check_section(None)) + checks.append(("no second judge is said to be unchecked, not same-vendor", + "checked only by its evidence lines" in got + and "shares a vendor" not in got, got)) # A why-line says, in words, what stands on a record or verdict below: # the run that could not boot, the structure built beyond the task and @@ -3521,8 +3560,8 @@ def executive_checks(seed): checks.append(("a short Yes file is a few rules the agent could hold", got == "**Hand-written file, Yes.** A few rules the agent " "could hold: the judge read its code as more readable " - "and better tested, and it wrote no more code than " - "without a file — for more turns and cost.", got)) + "and better tested, and its code grew no more than its " + "size margin allows — for more turns and cost.", got)) # The planted change run has no primary, suite, size or cost values, so # every cell reads not measured and the columns carry the arm files' From f90ff4c818dae87da68884c6b1431a851ba17643 Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 1 Nov 2026 08:43:16 +0200 Subject: [PATCH 4/4] fix(efficacy): read a contrast's pair count against the round's blocks The count was read against the most pairs any contrast had, so a table whose every contrast was short named none. Each table now takes the round's block count. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xPB8YTAMW2Msp4aPTX --- tests/efficacy/report.py | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/tests/efficacy/report.py b/tests/efficacy/report.py index 7cb2bbf..c04fd3c 100644 --- a/tests/efficacy/report.py +++ b/tests/efficacy/report.py @@ -1452,7 +1452,8 @@ def write_report(root, trials, table, results, seed, escalation, % (counted(len(PRIMARY) - len(PROBE_RATES)), counted(len(PROBE_RATES)))) lines.append("") - lines.extend(contrast_table(table, results, PRIMARY, active=active)) + lines.extend(contrast_table(table, results, PRIMARY, active=active, + blocks=k)) lines.append("") lines.extend(escalation_section(escalation)) @@ -1463,7 +1464,7 @@ def write_report(root, trials, table, results, seed, escalation, lines.extend(contrast_table(table, results, ("task_success", "install", "adherence", "output_tokens", "turns", "wall_seconds", - "cost_usd"), active=active)) + "cost_usd"), active=active, blocks=k)) lines.append("") lines.append("## The change task") @@ -1472,7 +1473,8 @@ def write_report(root, trials, table, results, seed, escalation, "was not built for, read beside whether the change works and " "whether the build still passes after it.") lines.append("") - lines.extend(contrast_table(table, results, CHANGE, active=active)) + lines.extend(contrast_table(table, results, CHANGE, active=active, + blocks=k)) lines.append("") lines.append("## Every other metric") @@ -1481,11 +1483,12 @@ def write_report(root, trials, table, results, seed, escalation, if key not in PRIMARY and key not in CHANGE and key not in ("task_success", "install", "adherence", "output_tokens", "turns", "wall_seconds", "cost_usd")] - lines.extend(contrast_table(table, results, rest, active=active)) + lines.extend(contrast_table(table, results, rest, active=active, + blocks=k)) lines.append("") if posthoc: - lines.extend(posthoc_section(*posthoc, active=active)) + lines.extend(posthoc_section(*posthoc, active=active, blocks=k)) lines.append("") if is_round5(trials): @@ -1658,7 +1661,7 @@ def posthoc_owed(trials): for reading in readings) -def posthoc_section(table, results, active=None): +def posthoc_section(table, results, active=None, blocks=None): """The report's lines on the security checks declared after the run.""" lines = ["## Security, read with checks declared after the results", "", @@ -1670,7 +1673,8 @@ def posthoc_section(table, results, active=None): ""] lines.extend(contrast_table(table, results, [key for key, _, _, _ in POSTHOC], - verdicts=False, active=active)) + verdicts=False, active=active, + blocks=blocks)) return lines @@ -2672,9 +2676,11 @@ def contrast_cell(contrast, verdicts=True, full=None): return "%s — %s" % (body, verdict_text) -def contrast_table(table, results, keys, verdicts=True, active=None): +def contrast_table(table, results, keys, verdicts=True, active=None, + blocks=None): """One table of contrasts: every metric, each arm's mean, and every - comparison the run holds.""" + comparison the run holds. `blocks` is the round's block count, against + which a contrast over fewer pairs names its count.""" active = list(CONTRASTS if active is None else active) arms = contrast_arms(active) lines = ["| Metric | Direction | %s | %s |" @@ -2682,9 +2688,6 @@ def contrast_table(table, results, keys, verdicts=True, active=None): " | ".join("%s−%s" % pair for pair in active)), "|---|---|%s|" % "|".join("---" for _ in arms + active)] degenerate = False - full = max((len(contrast.get("pairs") or []) - for by_name in results.values() for contrast in by_name.values() - if isinstance(contrast, dict)), default=0) for key in keys: entry = table[key] means = {} @@ -2695,7 +2698,7 @@ def contrast_table(table, results, keys, verdicts=True, active=None): cells = [] for treatment, baseline in active: contrast = results[key]["%s-%s" % (treatment, baseline)] - cell = contrast_cell(contrast, verdicts, full) + cell = contrast_cell(contrast, verdicts, blocks) degenerate = degenerate or "‡" in cell cells.append(cell) lines.append("| %s | %s | %s | %s |" @@ -3502,6 +3505,16 @@ def executive_checks(seed): checks.append(("a contrast over fewer pairs than blocks names its count", ", 14 pairs" in short and "pairs" not in whole, (short, whole))) + + # Every contrast in the table short of the round's blocks: the count is + # read against the round's K, not the most pairs any contrast had. + one_table = {"cost_usd": {"label": "Cost", "direction": "down", + "values": {"none": {1: 1.0}, "skills": {1: 2.0}}}} + one_result = {"cost_usd": {"skills-none": contrast}} + rows = contrast_table(one_table, one_result, ["cost_usd"], + active=[("skills", "none")], blocks=15) + checks.append(("a table whose every contrast is short still names counts", + any(", 14 pairs" in row for row in rows), rows)) got = " ".join(cross_check_section(None)) checks.append(("no second judge is said to be unchecked, not same-vendor", "checked only by its evidence lines" in got