Answer product-owner round 1: 0 🔴, 2 🟡 (0 misread); print the report before exiting 1 on an unreadable archive, naming the file

This commit is contained in:
2026-11-12 10:25:30 +01:00
parent d449c552c6
commit 72d9a9f652
4 changed files with 48 additions and 33 deletions
+12 -10
View File
@@ -78,13 +78,14 @@ that has any, then how many have none: the defects that reappear in what already
other half of that counter-signal.
Then, newest first, how many of the human's typed answers each finished chunk's judge quoted as
reversing a choice the worker took on its own, for every chunk loop-claude finished that has any,
then how many have none: goal 1.2's counter-signal. It reads loop-claude's archive, and counts only
chunks whose verdicts record a Config line, since earlier judges didn't look for reversals.
reversing a choice the worker took on its own recommendation, for every chunk loop-claude finished
that has any, then how many have none: how often a choice the worker took on its own recommendation
fails to hold. It reads loop-claude's archive, and counts only chunks whose verdicts record a
Config line, since earlier judges didn't look for reversals.
Exit 1, saying why, on bad arguments, when git cannot start, finds no checkout or reads a shallow
clone, the default branch or loop-claude's archive cannot be read; or, after the rest of the report, when the anchors are
left out.
clone, or the default branch cannot be read; or, after the rest of the report, when the anchors or
loop-claude's archive cannot be read.
"""
import functools
import os
@@ -135,13 +136,14 @@ def main(argv: list[str]) -> int:
return failed(results)
anchored = read_anchors()
reversal = read_reversals()
if isinstance(reversal, Failure):
return failed(reversal)
print(report_text(results, anchored, dict(zip(GIVEN, map(int, argv))) if argv else None, reversal))
return failed(anchored) if isinstance(anchored, Failure) else 0
unread = [found for found in (anchored, reversal) if isinstance(found, Failure)]
for failure in unread:
failed(failure)
return 1 if unread else 0
def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[str, int] | None, reversal: list[str]) -> str:
def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[str, int] | None, reversal: list[str] | Failure) -> str:
"""The report: the finished items nearest the given scores, where any are given, then the anchors, then the medians, then each chunk's misread findings, then its later fixes, then its reversals, as reversal_lines gives them."""
sections = []
if given is not None:
@@ -152,7 +154,7 @@ def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[
sections.append(["Median outcome at each guessed score, among chunks that shipped one item, never-replayed ones left out:", "", *report(results)])
sections.append(["🔴 and 🟡 findings, with how many a reviewer marked `[misread]`, per finished chunk whose round titles count them, newest first:", "", *misreads(results)])
sections.append(["Later fixes: the chunks that fixed code each finished chunk shipped, newest first:", "", *fixed_later(results)])
sections.append(["Reversals: the human's typed answers that reversed a choice the worker took on its own, per chunk loop-claude finished, newest first:", "", *reversal])
sections.append(["Reversals: the human's typed answers that reversed a choice the worker took on its own recommendation, per chunk loop-claude finished, newest first:", "", *([f"- None: {reversal.reason}"] if isinstance(reversal, Failure) else reversal)])
if any(result.landing != "merge" for result in results):
sections.append(UNMERGED)
return "\n\n".join("\n".join(section) for section in sections)