Record with each archived verdict the setup that ran it, what each model spent by kind, and the human's reversals
CI / tests (pull_request) Failing after 2m12s
CI / tests (pull_request) Failing after 2m12s
This commit is contained in:
@@ -77,8 +77,13 @@ Then, newest first, each finished chunk's later fixes, naming the fixing chunks,
|
||||
that has any, then how many have none: the defects that reappear in what already shipped, the
|
||||
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.
|
||||
|
||||
Exit 1, saying why, on bad arguments, when git cannot start, finds no checkout or reads a shallow
|
||||
clone, or the default branch cannot be read; or, after the rest of the report, when the anchors are
|
||||
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.
|
||||
"""
|
||||
import functools
|
||||
@@ -95,6 +100,8 @@ from score_outcomes.results import file_lines, fixed_later, item_text, misreads,
|
||||
from release_plan.todo_table import item_details, LEVELS, risk, TOP_SCORE
|
||||
from records.markdown_text import listed
|
||||
from release_plan.named_code import named_files
|
||||
from transcript_archive.location import project_archive
|
||||
from score_outcomes.reversals import reversal_lines
|
||||
|
||||
# The scores score-outcomes takes, in order.
|
||||
GIVEN = ("L", "E", "I", "S")
|
||||
@@ -127,12 +134,15 @@ def main(argv: list[str]) -> int:
|
||||
if isinstance(results, Failure):
|
||||
return failed(results)
|
||||
anchored = read_anchors()
|
||||
print(report_text(results, anchored, dict(zip(GIVEN, map(int, argv))) if argv else None))
|
||||
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
|
||||
|
||||
|
||||
def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[str, int] | None) -> 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."""
|
||||
def report_text(results: list[Result], anchored: Anchors | Failure, given: dict[str, int] | None, reversal: list[str]) -> 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:
|
||||
r = risk(given["L"], given["E"], given["I"])
|
||||
@@ -142,6 +152,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])
|
||||
if any(result.landing != "merge" for result in results):
|
||||
sections.append(UNMERGED)
|
||||
return "\n\n".join("\n".join(section) for section in sections)
|
||||
@@ -165,6 +176,14 @@ def read_anchors() -> Anchors | Failure:
|
||||
return Failure(f"cannot read {ANCHORS_PATH}: {failure}")
|
||||
|
||||
|
||||
def read_reversals() -> list[str] | Failure:
|
||||
"""The reversals in loop-claude's archive of this project, which the main checkout's path keys, whichever worktree this runs in."""
|
||||
common = git("rev-parse", "--path-format=absolute", "--git-common-dir")
|
||||
if isinstance(common, Failure):
|
||||
return common
|
||||
return reversal_lines(project_archive(str(pathlib.Path(common.strip()).parent), pathlib.Path.home(), os.environ))
|
||||
|
||||
|
||||
def read_results(default: str) -> list[Result] | Failure:
|
||||
"""What each chunk on the default branch's first-parent line measured."""
|
||||
if partial := full_history():
|
||||
|
||||
Reference in New Issue
Block a user