ARCH-02: show the mutation evidence, not the tool's own docstring
The mutation battery printed every line of the harness's output starting with a warning sign, and the harness's header is four paragraphs of them - so each mutation's evidence arrived buried under "THIS TOOL RUNS THE REAL Controller" repeated six times, and each finding appeared once per transition leg plus once in the summary. The filter now matches a finding's KIND and de-duplicates, so what part 3 prints is the set of distinct findings the mutation caused. No behaviour change: the same six mutations go red for the same reasons. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwRLw7eKYj2byVdwB6kbjU
This commit is contained in:
@@ -283,9 +283,18 @@ for mid, control, what, edits, must_say in MUTATIONS:
|
||||
print()
|
||||
print(f" --- {mid} ({control}) {what}")
|
||||
print(f" exit {code} (0=clean 1=finding 2=could-not-run)")
|
||||
# ⚠️ THE FINDINGS, DE-DUPLICATED AND IN ORDER. The tool prints each finding
|
||||
# once per transition leg and once more in its summary, and its own header
|
||||
# is full of ⚠️ paragraphs - printing every line that starts with one would
|
||||
# bury the evidence this part exists to show under the tool's docstring.
|
||||
seen = []
|
||||
for line in out.splitlines():
|
||||
if line.strip().startswith("⚠️ "):
|
||||
print(f" {line.strip()[:150]}")
|
||||
text = line.strip()
|
||||
if text.startswith("⚠️ ") and re.match(r"⚠️ [A-Z][A-Z -]+[A-Z()]:", text):
|
||||
if text not in seen:
|
||||
seen.append(text)
|
||||
for text in seen:
|
||||
print(f" {text[:160]}")
|
||||
check(f"{mid} turns {control} RED", red)
|
||||
check(f"{mid} says WHY, and it is the right why: {must_say!r}", named)
|
||||
shutil.rmtree(Path(tree).parent, ignore_errors=True)
|
||||
|
||||
Reference in New Issue
Block a user