Answer principles round 1: 1 🔴, 7 🟡 (0 misread); every effect is handed in as an argument, no test patches a global, and the traces principle scopes tools that run on their user's machine
CI / tests (pull_request) Successful in 3m43s
CI / tests (pull_request) Successful in 3m43s
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
"""The experiment behind review-replay's --omit-claude-md, --bash-ceiling and --read-limit: three replays of a pass's rounds unchanged, one with the change, and the report that holds the one with it to what the others found: docs/decisions.md → `agents/: a reviewer starts without CLAUDE.md only where a replay of its pass missed no more findings than the most an unchanged replay missed`."""
|
||||
import sys
|
||||
import typing
|
||||
|
||||
from review_replay.changes import Change
|
||||
@@ -10,8 +9,8 @@ from review_replay.rounds import Round
|
||||
from model_routing.ladder import Rung
|
||||
|
||||
|
||||
def compared(reviewed: str, project: Rung, chosen: list[Round], change: Change, found_on: typing.Callable[[Round, Change | None], set[int] | Failure | Limited]) -> str | Limited:
|
||||
"""Replays chosen three times unchanged and once with change, as found_on(round, change or None) finds, and reports the comparison of the rounds no replay failed on; the Limited where claude hit its usage limit."""
|
||||
def compared(reviewed: str, project: Rung, chosen: list[Round], change: Change, found_on: typing.Callable[[Round, Change | None], set[int] | Failure | Limited], say: typing.Callable[[str], None], at_once: int) -> str | Limited:
|
||||
"""Replays chosen three times unchanged and once with change, as found_on(round, change or None) finds, and reports the comparison of the rounds no replay failed on; the Limited where claude hit its usage limit. It tells say each round a failed replay leaves out."""
|
||||
runs: list[list[set[int] | Failure]] = []
|
||||
for applied in (None, None, None, change):
|
||||
label = change.changed if applied else change.unchanged
|
||||
@@ -19,10 +18,10 @@ def compared(reviewed: str, project: Rung, chosen: list[Round], change: Change,
|
||||
def replay_one(one: Round, _: Rung, applied: Change | None = applied, label: str = label) -> set[int] | Failure | Limited:
|
||||
found = found_on(one, applied)
|
||||
if isinstance(found, Failure):
|
||||
print(f" {one.root} {one.at} {label} failed, so the round is left out: {found.reason}", file=sys.stderr)
|
||||
say(f" {one.root} {one.at} {label} failed, so the round is left out: {found.reason}")
|
||||
return found
|
||||
|
||||
found: list[set[int] | Failure] | Limited = replayed_on(chosen, project, replay_one, f"{reviewed} rounds {label}")
|
||||
found: list[set[int] | Failure] | Limited = replayed_on(chosen, project, replay_one, f"{reviewed} rounds {label}", say, at_once)
|
||||
if isinstance(found, Limited):
|
||||
return found
|
||||
runs.append(found)
|
||||
|
||||
Reference in New Issue
Block a user