Skip to content

chore: refresh dependencies (keep parallel on 1.x) + hermetic test env#82

Merged
igmarin merged 1 commit into
mainfrom
fix/test-hermetic-env-keys
Jul 1, 2026
Merged

chore: refresh dependencies (keep parallel on 1.x) + hermetic test env#82
igmarin merged 1 commit into
mainfrom
fix/test-hermetic-env-keys

Conversation

@igmarin

@igmarin igmarin commented Jun 30, 2026

Copy link
Copy Markdown
Owner

What

Two related bits of release hygiene:

Dependencies

  • Keep parallel on ~> 1.26 (resolves 1.28.0). parallel 2.x requires Ruby ≥ 3.3, which would silently break this gem's declared required_ruby_version = '>= 3.1'. The code only uses the stable Parallel.map(…, in_threads:) API, so there's no reason to require 2.x. This keeps Ruby 3.1/3.2 installable.
  • Patch-bump cgi (~> 0.5.2) and json (~> 2.20); dev-dep concurrent-ruby (>= 1.3.7).
  • .gitignore local review-tool artifacts.

Tests

  • test_helper strips inherited *_API_KEY env vars so the validate/provider-resolution tests are hermetic. Previously, a real OPENAI_API_KEY exported in the shell made 'missing credentials' assertions pass, so rake test went red locally while CI (no keys) stayed green.

Verification

  • rake test → 888 runs, 0 failures/errors (parallel 1.28.0).
  • rubocop clean.
  • parallel 1.28.0 requires Ruby ≥ 2.7, consistent with >= 3.1.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates dependency version constraints in the Gemfile and gemspec (concurrent-ruby, cgi, json, parallel), adds new .gitignore patterns for rs-guard runtime artifacts, and modifies test_helper.rb to delete ENV variables matching _API_KEY before tests run to prevent leaked credentials from affecting test results.

Changes

Dependency and Configuration Updates

Layer / File(s) Summary
Gem dependency version bumps
Gemfile, ruby-skill-bench.gemspec
Updates concurrent-ruby to >= 1.3.7, cgi to ~> 0.5.2, json to ~> 2.20, and parallel to ~> 2.1.0.
Test environment hermeticity
test/test_helper.rb
Deletes ENV keys matching _API_KEY before tests run to prevent leaked developer credentials from affecting assertions.
Gitignore additions
.gitignore
Adds ignore patterns for .rs-guard/cache/, review-result.txt, and rs-guard-metrics.json.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

Hop along, the gems renewed,
No stray keys shall be construed,
.rs-guard's cache tucked out of sight,
A tidy burrow, clean and light,
Carrot-crunch, the build runs true! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title captures the main themes of the PR: dependency refresh and a hermetic test environment.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

Dependencies:
- Keep parallel on ~> 1.26 (resolves 1.28.0). parallel 2.x requires Ruby >= 3.3,
  which would silently break this gem's declared required_ruby_version '>= 3.1';
  the code only uses the stable Parallel.map(..., in_threads:) API, so 1.x is fine.
- Patch-bump cgi (~> 0.5.2) and json (~> 2.20); dev dep concurrent-ruby (>= 1.3.7).
- gitignore local review-tool artifacts (.rs-guard/, review-result.txt, rs-guard-metrics.json).

Tests:
- test_helper strips inherited *_API_KEY env vars so validate/provider-resolution
  tests are hermetic and don't pass/fail based on the developer's exported keys.
@igmarin
igmarin force-pushed the fix/test-hermetic-env-keys branch from 4f47673 to 5868400 Compare July 1, 2026 00:10
@igmarin igmarin changed the title test: make suite hermetic against inherited provider API keys chore: refresh dependencies (keep parallel on 1.x) + hermetic test env Jul 1, 2026
@igmarin
igmarin merged commit 4f6cdf2 into main Jul 1, 2026
5 checks passed
@igmarin
igmarin deleted the fix/test-hermetic-env-keys branch July 1, 2026 00:12
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