Skip to content

mutation: 72 stale entries re-pointed, 15 that stopped compiling fixed - #194

Merged
donislawdev merged 1 commit into
mainfrom
mutation/repoint
Oct 15, 2026
Merged

donislawdev merged 1 commit into
mainfrom
mutation/repoint

Conversation

@donislawdev

@donislawdev donislawdev commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

What

The first full mutation run on CI (#193) listed every entry that could not prove anything. This pull request fixes two kinds of them.

  • 72 stale entries: the pattern an entry broke was gone. Most of that code was rewritten where it stood, and three pieces moved to another file. Each entry now breaks the same behaviour where it lives today.
    • Three entries broke a number that changes with the code. Each now uses a pattern that will not go stale when the number moves:
      • The format count in the README gets a leading digit.
      • The file length ceiling gets 1 +.
      • The Polish catalogue entry is found by its key rather than by its hash.
  • 15 entries no longer compiled. Typical causes: the mutant left a variable unused, a value is now a core.Said rather than a string, or a method no longer exists. Each now compiles and breaks the same thing.
  • The runner: a BROKEN verdict now carries the compiler's first complaint. On CI the verdict was all there was.

Proven locally, entry by entry

  • Re-pointed: 65 caught, 6 not caught, 1 unjudged. The unjudged guard skips without its reference reader on this machine.
  • Fixed to compile: 15 of 15 caught.
  • No pattern is stale any more (staleness.py), and the coverage guard passes.

The six that are not caught, and the 19 that were not caught on CI before this change, are left for the next pull request. This one does not change what they say. The first case looked at shows the shape: the entry finds its pattern and compiles, but the function it breaks is no longer what the guard measures.

The runner itself changed (mutate.py), so the mutation check on this pull request runs every entry, as the first run on #193 did. It is a second full measurement, and it reports as warnings.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated mutation-test coverage to reflect current application behavior across preferences, formats, content handling, and interface tools.
    • Failed mutation checks now show the first relevant compiler-output line when available, making build errors easier to locate.

The first full run on CI named every entry that could not prove anything. Two
kinds are fixed here, and each was run again locally afterwards.

- 72 entries whose pattern was gone. Most of the code they break was rewritten
  in place - messages moved from fmt.Sprintf to core.Says, palette values were
  recomputed - and three moved to another file. Each now breaks the same
  behaviour where it lives today. Where a pattern carried a number that changes
  with the code, the entry takes a shape that does not: the README count gains a
  leading digit, the file ceiling gains "1 +", the Polish catalogue is addressed
  by key rather than by hash. 65 caught, 6 not caught (left for the next pull
  request, with what was found), 1 unjudged here.
- 15 entries whose mutant no longer compiled - a variable the mutant orphaned, a
  string where a core.Said is now asked for, a method that is gone. All 15
  caught. One needed a second aim: the guard looks for a title carrying the
  label, so the break now gives a fragment that title.

A BROKEN verdict now carries the compiler's first complaint. On CI the verdict
was all there was, and these fifteen had to be built again by hand to learn why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

📝 Walkthrough

The mutation catalog is updated to match current source text, paths, and APIs across multiple application areas. Broken mutation outcomes now include the first matching Go compiler-output line when available.

Changes: Mutation guard updates

Layer / File(s) Summary
Align mutation fixtures with current source
internal/guard/mutation/entries.py
Mutation targets and replacement text are updated across validation, refusal handling, settings, GUI behavior, formats, and content processing.
Report compiler locations for broken mutations
internal/guard/mutation/mutate.py
The judge stores the first compiler-output line containing .go: as the broken outcome detail. The broken message prints that detail on a separate line.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 04b1c

The supplied evidence does not establish a material product or workflow risk from these mutation-guard updates. Six mutation cases remain uncaught for follow-up.

Pre-merge checks: Passed 13 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Tests For Changed Behavior Warning The PR changes non-UI runtime behavior in internal/guard/mutation/mutate.py: judge now extracts a compiler complaint into Outcome.detail, and say prints it for BROKEN results (lines 260-264 … Add automated tests for the changed runner behavior. Cover a compiler output containing .go: and verify the first matching line is stored and printed, and cover output without such a line and verify the detail is empty. Keep the existing …
Passed Passed checks: 13 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
No Secrets Or Debug Leftovers Passed PASS: The pull request changes only internal/guard/mutation/entries.py and internal/guard/mutation/mutate.py. The added lines contain no private AI-agent files, .env files, credentials, tokens, …
No Hardcoded Ui Styling Passed PASS: The PR changes only internal/guard/mutation/entries.py and internal/guard/mutation/mutate.py. The GUI-related color and layout values are mutation-test string fixtures, not changes to GUI co…
No Obvious Performance Problems Passed No clear performance problem is introduced. The PR changes mutation fixture strings and adds a single compiler-output scan in mutate.py; it adds no UI I/O, polling, query loop, or collection algorit…
Desktop Robustness Passed The authoritative diff contains only internal/guard/mutation/entries.py and internal/guard/mutation/mutate.py. The first changes mutation-test strings. The second only captures and prints the firs…
Safe File Parsing Passed PASS. The PR changes mutation metadata in internal/guard/mutation/entries.py and compiler-diagnostic handling in internal/guard/mutation/mutate.py. The added code only scans compiler output with `…
System Changes Are Reversible Passed The PR changes only mutation-test entries and compiler-error reporting in internal/guard/mutation/mutate.py. The diff does not add or change network filters, proxies, firewalls, system time, process…
Clear User-Facing Text Passed The only changed runtime text is the mutation runner's BROKEN report. It states what happened (the mutated tree does not compile) and what to do (rewrite the mutation), then adds the first Go compiler…
No Resource Leaks Passed No resource leak is introduced. The PR changes only mutation-entry data in internal/guard/mutation/entries.py and compiler-diagnostic handling in internal/guard/mutation/mutate.py. The runner chan…
Scope, Duplication And Docs Passed The scope matches the PR description. The diff changes only the existing mutation catalog and the internal mutation runner: 87 existing catalog entries were repointed, and BROKEN output now includes c…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main changes: it re-points 72 stale mutation entries and fixes 15 entries that stopped compiling. It is specific, concise, and suitable for release notes or git history…
Full details: Tests For Changed Behavior

Explanation

The PR changes non-UI runtime behavior in internal/guard/mutation/mutate.py: judge now extracts a compiler complaint into Outcome.detail, and say prints it for BROKEN results (lines 260-264 and 285-289). The diff changes only entries.py and mutate.py; it adds or updates no tests. The existing canary only checks that a mutation is detected as non-compiling (lines 97-119), not complaint extraction or output. No deleted or weakened test assertions are present.

Resolution

Add automated tests for the changed runner behavior. Cover a compiler output containing .go: and verify the first matching line is stored and printed, and cover output without such a line and verify the detail is empty. Keep the existing canary as a separate compile-detection check.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 Additional comments: 2
internal/guard/mutation/entries.py: 1

2223-2224: 🎯 Functional Correctness

No change is needed for this mutation.

The replacement changes the dark palette’s success color to its foreground color. It differs from the original success value and matches the mutation description.

internal/guard/mutation/mutate.py-263-264: 1

263-264: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Compiler detail can contain control characters and local paths.

The detail is the first output line that contains .go:. Go can emit # package header lines and vet output that also contain .go:, so the first match may not be the compile error. The line also goes unescaped into CI logs. It can contain absolute worker-tree paths, which conflicts with the "no local paths" rule for public output. Prefer lines that match \.go:\d+:\d+:. Strip the worker tree prefix before storing the detail.

Proposed fix
-        complaint = next((line.strip() for line in result.output.splitlines() if ".go:" in line), "")
+        complaint = next((line.strip().replace(str(tree.path) + os.sep, "")
+                          for line in result.output.splitlines()
+                          if re.search(r"\.go:\d+:\d+:", line)), "")

Add import os, re if they are missing.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 45a1829d-d704-43c3-b4f3-a2d7eb2bf6e6
📥 Commits

Reviewing files that changed from the base of the PR and between 8b92814 and 04b1cce.

📒 Files selected for processing: 2
  • internal/guard/mutation/entries.py
  • internal/guard/mutation/mutate.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

⏰ Context from checks skipped due to timeout: 33
  • GitHub Check: part 12
  • GitHub Check: part 13
  • GitHub Check: part 11
  • GitHub Check: part 4
  • GitHub Check: part 1
  • GitHub Check: part 14
  • GitHub Check: part 0
  • GitHub Check: part 5
  • GitHub Check: part 6
  • GitHub Check: part 2
  • GitHub Check: part 8
  • GitHub Check: part 15
  • GitHub Check: part 9
  • GitHub Check: part 7
  • GitHub Check: part 3
  • GitHub Check: part 10
  • GitHub Check: the installer installs and leaves
  • GitHub Check: test on ubuntu-latest
  • GitHub Check: reference tools actually installed
  • GitHub Check: test on macos-latest
  • GitHub Check: staticcheck
  • GitHub Check: semgrep
  • GitHub Check: linters
  • GitHub Check: known vulnerabilities
  • GitHub Check: test on windows-latest
  • GitHub Check: coverage gate
  • GitHub Check: import table of the window binary
  • GitHub Check: bill of materials
  • GitHub Check: the Chocolatey packages install and leave
  • GitHub Check: new vulnerabilities (OSV)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions: 9
Applies to text shown to the user (labels, buttons, tooltips, placeholders, dialogs, errors, status messages, empty states, translations).

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
These are end-user desktop applications.

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
Performance is a known weak spot of these projects.

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
Applies only to code that builds or styles a GUI.

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
Domain: test file generator (Go; `tfg` CLI and `tfg-gui` Fyne window over one engine).

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
SECURITY, HIGH PRIORITY.

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
These apps are QA/developer tools.

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
Python code.

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py
All code in this repository is written by an AI coding agent (Claude Code).

⚙️ CodeRabbit configuration file

Files:

  • internal/guard/mutation/mutate.py
  • internal/guard/mutation/entries.py

@donislawdev
donislawdev merged commit 6684164 into main Oct 15, 2026
41 checks passed
@donislawdev
donislawdev deleted the mutation/repoint branch October 15, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant