fix: the deletion gate flagged every gem on CI - #242
Conversation
The stray detector matched a bare /snap_diff/ substring against $LOADED_FEATURES. CI checks this repo out at .../snap_diff-capybara/, so every gem under vendor/bundle matched and the gate aborted on nokogiri. It passed locally only because the dev checkout is named capybara-screenshot-diff. Anchored on /lib/snap_diff(/|.rb).
Reviewer's guide (collapsed on small PRs)Reviewer's GuideTightens the deletion gate’s stray file detector in the 3.0 test to only match actual snap_diff library paths instead of any path containing the substring, resolving CI failures where nokogiri and other bundled gems were incorrectly flagged as strays. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe deletion gate test now matches loaded files under ChangesDeletion gate validation
Estimated code review effort: 1 (Trivial) | ~2 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Master has been red since #238. The 3.0 deletion test's stray detector used a bare
/snap_diff/substring against$LOADED_FEATURES. CI checks this repo out at/home/runner/work/snap_diff-capybara/snap_diff-capybara/, so the pattern matched every gem undervendor/bundle— the reported strays were all nokogiri, with no snap_diff file among them. It passed locally only because the dev checkout is namedcapybara-screenshot-diff, which lacks the substring.Anchored to
%r{/lib/snap_diff(/|\.rb\z)}. Verified against all four path shapes:lib/snap_diff.rbentry filestart_with?)ruby -Itest test/unit/deletion_3_0_test.rb→ 8 runs, 38 assertions, 0 failures — including the pre-existing "the gate line rejects an intact tree" case, so the gate still bites.Found by the vocabulary-sweep lane while investigating why its own PR was red.
🤖 Generated with Claude Code
Summary by Sourcery
Bug Fixes:
Summary by CodeRabbit