Kill the surviving mutants of the replay comparison and the transcript-read rule
This commit is contained in:
@@ -14,12 +14,12 @@ def compared(reviewed: str, project: Rung, chosen: list[Round], change: Change,
|
||||
"""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."""
|
||||
runs: list[list[set[int] | Failure]] = []
|
||||
for applied in (None, None, None, change):
|
||||
label = (applied or change).changed if applied else change.unchanged
|
||||
label = change.changed if applied else change.unchanged
|
||||
|
||||
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, flush=True)
|
||||
print(f" {one.root} {one.at} {label} failed, so the round is left out: {found.reason}", file=sys.stderr)
|
||||
return found
|
||||
|
||||
found: list[set[int] | Failure] | Limited = replayed_on(chosen, project, replay_one, f"{reviewed} rounds {label}")
|
||||
|
||||
@@ -1513,6 +1513,10 @@ class TranscriptRead(unittest.TestCase):
|
||||
found = breaches_of(Call("Read", {"file_path": self.TRANSCRIPT}, "/r"), self.HOME, {})
|
||||
self.assertEqual([breach.detail for breach in found[2] if breach.rule == "transcript-read"], [f"the call reads {self.TRANSCRIPT}, a session transcript that holds every tool result of its session; print only the lines you need with grep or jq"])
|
||||
|
||||
def test_the_refusal_is_logged_in_the_checkout_of_the_working_directory(self):
|
||||
found = breaches_of(Call("Read", {"file_path": self.TRANSCRIPT}, "/r"), self.HOME, {})
|
||||
self.assertEqual([breach.directory for breach in found[2] if breach.rule == "transcript-read"], ["/r"])
|
||||
|
||||
def test_a_read_of_a_long_result_claude_code_saved_to_a_file_or_of_a_memory_file_passes(self):
|
||||
for path in ("/home/h/.claude/projects/-home-h-code-acme/abc-123/tool-results/b3ij9u144.txt", "/home/h/.claude/projects/-home-h-code-acme/memory/MEMORY.md"):
|
||||
with self.subTest(path):
|
||||
|
||||
Reference in New Issue
Block a user