Skip to content

docs: test fixtures README and ADR-006 cleanup#177

Merged
pftg merged 2 commits intomasterfrom
feat/test-simplification-adr006
Apr 12, 2026
Merged

docs: test fixtures README and ADR-006 cleanup#177
pftg merged 2 commits intomasterfrom
feat/test-simplification-adr006

Conversation

@pftg
Copy link
Copy Markdown
Collaborator

@pftg pftg commented Apr 12, 2026

Summary

  • T2: Add test/fixtures/images/README.md documenting fixture images
  • T3: Investigated — nested test classes already inherit parent setup, no duplication
  • T4: Investigated — assertion helpers serve different contexts, not duplicated
  • T6: Investigated — param order follows Minitest convention, not a bug

ADR-006 test simplification is now complete (T1-T8 all resolved across PRs #174 and this one).

Test plan

  • All tests pass (218 runs, 651 assertions)

Generated with Claude Code

Summary by Sourcery

Documentation:

  • Add README describing image fixture files and their purposes, including notes on generated diff artifacts that are gitignored.

Summary by CodeRabbit

  • Documentation

    • Added documentation describing test image fixtures for visual-comparison tests, listing expected fixture variants and the generated diff artifact patterns (not to be committed).
  • Chores

    • Added a cleanup routine to find and remove generated screenshot/diff artifacts and updated the general cleanup behavior and console messaging.

Document fixture images and generated artifacts for contributors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 12, 2026

Reviewer's Guide

Documents the purpose and usage of image test fixtures and their generated artifacts via a new README in the test fixtures directory.

File-Level Changes

Change Details Files
Document image-based test fixtures and their generated artifacts for the test suite.
  • Added a README describing each committed image fixture and its role in image comparison tests.
  • Documented which image files are generated during tests and must remain untracked, including diff and heatmap outputs.
  • Clarified the distinction between committed fixtures and gitignored artifacts to reduce confusion in future test maintenance.
test/fixtures/images/README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 12, 2026

📝 Walkthrough

Walkthrough

Added test/fixtures/images/README.md documenting test fixture images and generated artifact patterns. Added a new Rake task snap_diff:clean to remove screenshot diff artifacts and adjusted the clobber task's cleanup message/behavior to target tmp/.

Changes

Cohort / File(s) Summary
Test Fixture Documentation
test/fixtures/images/README.md
New README describing fixture images (a.png, b.png, c.png, d.png, a_cropped.png, portrait.png, portrait_b.png, a.webp) and noting generated artifact patterns (*.diff.png, *.base.diff.png, *.heatmap.diff.png) that should not be committed.
Rake Tasks / Cleanup
Rakefile
Added task "snap_diff:clean" which globs for screenshot diff artifact filenames under tmp/ and doc/screenshots/ and deletes matches; updated clobber task output and its cleanup to reference tmp/ and remove ./tmp/*.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibble keys and tidy bits of fluff,
A README sprouted from my hopping stuff.
Rake clears crumbs of diffs that made a mess,
Now fixtures sit in order—neat and bless.
Hop on, tests, into the rabbit-verified press!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions 'test fixtures README and ADR-006 cleanup' which directly aligns with the main changes: adding test/fixtures/images/README.md and a new Rake cleanup task.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/test-simplification-adr006

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 and usage tips.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

bin/rake snap_diff:clean removes diff artifacts (*.diff.png, *.heatmap.diff.png,
snap_diff_report.html) from tmp/ and doc/screenshots/ while keeping baselines.

Addresses tmp/ bloat — 262 files accumulated after a development session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Rakefile`:
- Around line 40-45: The removal count over-reports because overlapping glob
patterns in patterns produce duplicate paths in removed; deduplicate the matched
file list (e.g., call .uniq on the array returned from flat_map or convert to a
Set) before iterating and before the puts message so FileUtils.rm_f is still
called for each path but puts "Removed #{removed.size}" reports the true number;
update the variables referenced (patterns, removed, FileUtils.rm_f, and the
final puts) to use the deduplicated collection.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2d9b641b-2a0e-4c43-a8c4-ca749b51ac91

📥 Commits

Reviewing files that changed from the base of the PR and between 4e1891c and 1ef64f8.

📒 Files selected for processing (1)
  • Rakefile

Comment thread Rakefile
@pftg pftg merged commit e032565 into master Apr 12, 2026
2 checks passed
@pftg pftg deleted the feat/test-simplification-adr006 branch April 12, 2026 20:45
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