Skip to content

Hold three mutation entries to guards that can see them - #109

Merged
donislawdev merged 2 commits into
mainfrom
test/missed-mutations-633
Nov 3, 2026
Merged

donislawdev merged 2 commits into
mainfrom
test/missed-mutations-633

Conversation

@donislawdev

@donislawdev donislawdev commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

What

The weekly full mutation run (mutation.yml) has been red for two Saturdays, 2026-10-24 and 2026-10-31, with three entries MISSED in both or in the later one. All three reproduce on a developer machine. None of them is a broken promise of the product - in each the guard was asking something other than what its entry claims, so the fix is the guard or the entry's sentence.

Entry Why it was missed Fix
rights: the shield takes the left padding so the bar still fits Held to the narrowest-window guard, written when the narrowest window was 640. Since it went to 1000 the bar fits with the shield's whole width added too. A new guard, RightsMarkGuards.A_shield_takes_its_room_from_the_padding_rather_than_widening_its_button_by_all_of_it, measures how much each of the six write buttons grows with the shield against the laid-out shield and its gap. The entry is held to it, under a name that says what it guards. Same mutation.
site: an address in capitals is still checked The test accepted any problem naming the path. The parity check reads attributes in any case as well and names the same path, so the test passed with the link check reading one case only. The test asks for the link check's own sentence. Same mutation.
window snapshot: a file that is not a snapshot is never written over Its mutation took away the ask before the machine is read - a courtesy another entry already holds - and since the write asks again (logic report R11) the file stayed. Two gates for one rule, so no mutation of either gate proves the rule. The entry mutates the rule both asks reach (S-8 in SnapshotOnDisk.WhyNotWritten), and the window's test catches it. The courtesy keeps its own entry.

The fourth entry from the same runs, search: a run ends no process past a cascade step that failed, is caught locally - a property test whose draw on 2026-10-24 did not reach the case.

No product code changes, nothing for CHANGELOG.md.

Checked

  • The changed tests and their neighbours: RightsMarkGuards 4 of 4, SnapshottingTests.A_file_that_is_not_a_snapshot* 2 of 2, GeneratorTests.An_address_in_capitals_and_single_quotes_is_still_checked.
  • Size, shape, prose, public surface, dead code and analyzer guards: 58 of 58.
  • tests/mutation staleness check: nothing stale.
  • The four entries involved, narrowly: all caught (they were 3 MISSED and 1 caught before the change).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added checks that rights shields do not cause write buttons to grow beyond the expected layout allowance.
    • Improved validation for missing image paths in generated sites.
    • Updated mutation test coverage for shield spacing and snapshot behavior.

The weekly full mutation run in CI reported three entries MISSED on
2026-10-24 and 2026-10-31. All three reproduce locally, and in none of
them is a product promise broken - each guard was asking something other
than what its entry claims.

- The shield on the write buttons takes its room out of the left padding.
  The entry was held to the narrowest-window guard, which stopped seeing
  it when the narrowest window went from 640 to 1000. A new guard measures
  how much a shield widens its button against the shield's own footprint.
- An address in capitals on the site was checked by a test that accepted
  any problem naming the path. The parity check names the same path, so
  the test passed with the link check reading one case only. The test now
  asks for the link check's own sentence.
- A file that is not a snapshot is never written over by the window. The
  entry's mutation removed the ask before the reading, a courtesy another
  entry already holds, and since the write asks again the file stayed. The
  entry now mutates the rule both asks reach, and the window's test
  catches it.

Narrow runs: the changed tests, the size, shape and prose guards (58 of
58), the registry's staleness check, and the four entries involved, all
caught.

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

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a29fbff9-a9da-4918-80bc-bb3e148dfb71

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Walkthrough

The changes add a GUI layout test for rights shields, make a site-generator test assert a specific missing-asset diagnostic, and update two mutation registry entries.

Changes: Rights Shield Width Guard

Layer / File(s) Summary
Measure shield impact on write-button widths
tests/Bws.Gui.Tests/RightsMarkGuards.cs, tests/mutation/entries.ps1
The new test compares six write-button widths with and without shields. It checks that each button grows by less than the shield’s laid-out width plus its horizontal margins. The shield-padding mutation now names this test.

Site Generator Diagnostic Assertion

Layer / File(s) Summary
Assert the missing-asset diagnostic
tests/Bws.Site.Tests/GeneratorTests.cs
The test now checks for the specific missing-asset diagnostic instead of matching the damaged path anywhere in the reported problems.

Window Snapshot Mutation Anchor

Layer / File(s) Summary
Re-anchor the snapshot mutation
tests/mutation/entries.ps1
The window snapshot mutation now targets the WhyNotASnapshot force check in SnapshotOnDisk.cs. Its test name remains unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Merge Risk: Low · previous review d7f35

The changes improve regression detection, but the new shield guard still permits two incorrect padding outcomes. No product-code regression is established; merging carries bounded test-coverage risk.

Pre-merge checks: Passed 14
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: linking three mutation entries to guards that detect them. It is specific and suitable for release notes or git history.
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.
Tests For Changed Behavior Passed The PR changes only test files and the mutation-test registry; it adds no non-UI runtime behavior. It adds the RightsMarkGuards layout test, strengthens the generator assertion to require the link c…
No Secrets Or Debug Leftovers Passed PASS. The pull request changes only three existing test/mutation files. The diff adds no CLAUDE.md, CLAUDE.local.md, AGENTS.md, .claude, or .env files. Added lines contain no credentials, tokens, priv…
No Hardcoded Ui Styling Passed PASS. The PR changes one WPF test file, one site test, and the mutation registry. The WPF changes only measure and arrange an existing ActionBar with test bounds; they do not set control colors, fonts…
No Obvious Performance Problems Passed No clear performance problem was introduced. The PR changes tests and mutation metadata only. The new WPF test performs two layouts and a visual-tree traversal over a fixed action bar with six write b…
Desktop Robustness Passed PASS. The pull request changes only test code and mutation-registry entries. The new GUI test performs local WPF layout measurement, and the site test only tightens an assertion. No changed code loads…
Safe File Parsing Passed No unsafe file parsing was introduced. The PR changes a WPF layout test, a diagnostic assertion, and mutation-registry metadata. The added code uses visual-tree APIs and does not read, import, export,…
System Changes Are Reversible Passed The pull request changes only test code and mutation-entry metadata: RightsMarkGuards.cs, GeneratorTests.cs, and tests/mutation/entries.ps1. The diff adds no code that changes network filters, p…
Clear User-Facing Text Passed PASS — The PR changes only test code and mutation-registry metadata. It does not change product UI labels, tooltips, buttons, error messages, confirmations, or other user-facing text. The new strings …
No Resource Leaks Passed The pull request changes only test code and mutation metadata. The added WPF test creates an ActionBar for layout measurement, but it does not add event handlers, timers, files, streams, processes, …
Scope, Duplication And Docs Passed The PR changes only three test/mutation-registry files, with 77 additions and 8 deletions. The title and description explicitly cover the new rights-layout guard, the diagnostic assertion, and the sna…
Full details: Tests For Changed Behavior

Explanation

The PR changes only test files and the mutation-test registry; it adds no non-UI runtime behavior. It adds the RightsMarkGuards layout test, strengthens the generator assertion to require the link check’s own diagnostic, and re-anchors mutation entries to matching tests. No tests were deleted, skipped, or weakened. The assertion change has explicit justification in the PR description.

Full details: No Secrets Or Debug Leftovers

Explanation

PASS. The pull request changes only three existing test/mutation files. The diff adds no CLAUDE.md, CLAUDE.local.md, AGENTS.md, .claude, or .env files. Added lines contain no credentials, tokens, private URLs, local absolute paths, machine names, internal hostnames/IPs, personal e-mails, or listed debug calls.

Full details: No Hardcoded Ui Styling

Explanation

PASS. The PR changes one WPF test file, one site test, and the mutation registry. The WPF changes only measure and arrange an existing ActionBar with test bounds; they do not set control colors, fonts, margins, padding, sizes, or corner radii. No XAML styling or copy-pasted controls were added.

Full details: No Obvious Performance Problems

Explanation

No clear performance problem was introduced. The PR changes tests and mutation metadata only. The new WPF test performs two layouts and a visual-tree traversal over a fixed action bar with six write buttons; it does not process a large collection, poll, perform blocking I/O, or invoke an expensive operation per item.

Full details: Desktop Robustness

Explanation

PASS. The pull request changes only test code and mutation-registry entries. The new GUI test performs local WPF layout measurement, and the site test only tightens an assertion. No changed code loads working-directory assets, performs non-atomic settings/data writes, parses culture-sensitive values, starts uncancellable long work, adds destructive actions, requests admin rights, leaves new background work running, or makes network calls.

Full details: Safe File Parsing

Explanation

No unsafe file parsing was introduced. The PR changes a WPF layout test, a diagnostic assertion, and mutation-registry metadata. The added code uses visual-tree APIs and does not read, import, export, deserialize, or write files. The existing JsonDocument.Parse(File.ReadAllText(...)) call is unchanged and is outside the PR changes.

Full details: System Changes Are Reversible

Explanation

The pull request changes only test code and mutation-entry metadata: RightsMarkGuards.cs, GeneratorTests.cs, and tests/mutation/entries.ps1. The diff adds no code that changes network filters, proxies, firewalls, system time, processes, Windows services, registry, or drivers. The reversibility warning condition does not apply.

Full details: Clear User-Facing Text

Explanation

PASS — The PR changes only test code and mutation-registry metadata. It does not change product UI labels, tooltips, buttons, error messages, confirmations, or other user-facing text. The new strings are test assertions, diagnostics, and comments, not product text.

Full details: No Resource Leaks

Explanation

The pull request changes only test code and mutation metadata. The added WPF test creates an ActionBar for layout measurement, but it does not add event handlers, timers, files, streams, processes, tasks, caches, or native resources. The other changes tighten an assertion and reassign mutation metadata. No explicit resource leak condition is introduced.

Full details: Scope, Duplication And Docs

Explanation

The PR changes only three test/mutation-registry files, with 77 additions and 8 deletions. The title and description explicitly cover the new rights-layout guard, the diagnostic assertion, and the snapshot mutation re-anchoring. No product source, UI style, configuration, build step, public API, persisted format, or user-facing behavior changes. The repository has README.md and CHANGELOG.md, but no documentation update is required for test-only mutation coverage changes. Searches found no pre-existing WriteWidths helper or duplicate RightsMarkGuards implementation.

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f48f606e-589b-4f18-9190-e21d06e216b7
Commits

Reviewing files that changed from the base of the PR and between abbcef5 and d7f3556.

Files selected for processing: 3
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/mutation/entries.ps1

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

Recent review details
Context from checks skipped due to timeout: 4
  • GitHub Check: part 0
  • GitHub Check: CodeRabbit
  • GitHub Check: Analyse csharp
  • GitHub Check: build and the tests that do not need this machine
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:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
Verify tests check real behavior and would fail if the implementation were broken.

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
  • tests/mutation/entries.ps1
These are end-user desktop applications.

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
Performance is a known weak spot of these projects.

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
Applies only to code that builds or styles a GUI.

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
SECURITY, HIGH PRIORITY.

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
These apps are QA/developer tools.

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
C# / .NET code.

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
All code in this repository is written by an AI coding agent (Claude Code).

CodeRabbit configuration file

Files:

  • tests/Bws.Site.Tests/GeneratorTests.cs
  • tests/Bws.Gui.Tests/RightsMarkGuards.cs
  • tests/mutation/entries.ps1
Learnings: 1
Learning: 2026-11-02T16:16:55.322Z
Learnt from: CR
Repo: donislawdev/BetterWindowsServices PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-11-02T16:16:55.322Z
Learning: Source excerpt:
# Contributing to Better Windows Services

## Building and checking

### Conventions the test suite enforces

These are guards rather than preferences. Each one exists because the thing it forbids happened at
least once, and most of them read the compiled assemblies or the source tree rather than trusting
a declaration:

- **Everything inside the repository is English**, including comments and commit messages. The
  criterion is the place, not the reader.

Applied to files:

  • tests/Bws.Gui.Tests/RightsMarkGuards.cs

Comment thread tests/Bws.Gui.Tests/RightsMarkGuards.cs Resolved
Comment thread tests/Bws.Gui.Tests/RightsMarkGuards.cs Resolved
The review found two shapes the new shield guard let through: a left
padding of 9, which grows each write button by ten units rather than
five, and the two sides swapped, which keeps the width and moves every
label seven units to the right.

The guard now measures the ordinary left padding off a write button with
no shield and asks the shield to take more than half of it - "most of the
left padding", as the style says - rather than writing the theme's
numbers into the test. And it asks each label to keep its distance from
its button's right edge. Two new mutation entries, one for each shape.

Narrow runs: RightsMarkGuards 4 of 4, the size, shape and prose guards
58 of 58, the registry's staleness check, and the three shield entries,
all caught.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@donislawdev
donislawdev merged commit 2ab2ccd into main Nov 3, 2026
13 checks passed
@donislawdev
donislawdev deleted the test/missed-mutations-633 branch November 3, 2026 09:29
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