Skip to content

build: update dev dependencies and migrate to simplecov 1.0 - #172

Merged
svyatov merged 1 commit into
mainfrom
build/update-dependencies
Jul 31, 2026
Merged

build: update dev dependencies and migrate to simplecov 1.0#172
svyatov merged 1 commit into
mainfrom
build/update-dependencies

Conversation

@svyatov

@svyatov svyatov commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Description

Updates every outdated development dependency. Gemfile.lock is not tracked, so the routine bumps (Rails 8.1.3.1, RuboCop 1.88.2, YARD 0.9.45, parser 3.3.12.0, json 2.21.2, rspec-mocks 3.13.8, and others) appear only in the resolved lockfile. Three files change:

  • simplecov ~> 0.22 to ~> 1.0. This unblocks simplecov-cobertura 4.0, which requires simplecov ~> 1.0.
  • spec/spec_helper.rb: add_filter to skip. simplecov 1.0 deprecates add_filter. The matcher grammar is identical, so coverage is unchanged.
  • lib/sec_id/active_model.rb: # :nocov: to # simplecov:disable and # simplecov:enable. simplecov 1.0 deprecates the :nocov: token and warns once per file at load time. Comments only, no behavior change.

Why rbs stays on 4.0.x

rbs 4.1 retypes the block return of Array#to_h from the tuple [K, V] to the Hash::_Pair[K, V] interface. Steep 2.0 cannot infer an array literal as a tuple against an interface hint, so CFI::AttributeSet#to_h stops type-checking. This is tracked upstream in soutaro/steep#2253, which is open. The Gemfile pin carries the same explanation and names the condition for removing it.

Three workarounds were rejected:

  • A #: type assertion type-checks, but makes steep stats report the file as an error. That trips the fail-closed rake steep:coverage gate.
  • map { ... }.to_h type-checks, but RuboCop reports Style/MapToHash.
  • each_with_object type-checks, but RuboCop reports Style/ReduceToHash.

The fix each cop offers is the block form Steep rejects, so lib/sec_id/cfi/attribute_set.rb is left untouched.

Still outstanding

diff-lcs 2.0.0 is held at 1.6.2 by rspec-expectations, which requires diff-lcs >= 1.2.0, < 2.0. Nothing to do here until rspec relaxes it.

Type of Change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation update
  • Other: development dependency updates

Checklist

  • Tests pass (bundle exec rspec)
  • RuboCop clean (bundle exec rubocop)
  • CHANGELOG.md updated (under [Unreleased]) — skipped. Every change is dev and test tooling, invisible to gem consumers. The one lib/ edit is comment text.
  • Documentation updated (if public API changed) — no public API change
  • Commit messages follow Conventional Commits

Validation

Run locally against the updated bundle:

  • rake (RuboCop, rbs validate, 2397 examples) green
  • rake steep reports no type error
  • rake steep:coverage reports 119 untyped calls, exactly at the pinned baseline
  • rake rbs:test green (2392 examples)
  • rake yard:stats reports 100.00% documented
  • COVERAGE=1 bundle exec rspec reports 100% line coverage (1416 / 1416) with no simplecov deprecation warnings
  • CI=1 COVERAGE=1 bundle exec rspec writes coverage/coverage.xml through simplecov-cobertura 4.0.0
  • Rails 7.2, 8.0, and 8.1 gemfile variants each green

Summary by CodeRabbit

  • Chores
    • Updated development tooling compatibility settings.
    • Refined code coverage configuration and annotations.
  • Tests
    • Updated coverage filtering to use the current supported configuration syntax.
    • Maintained existing coverage exclusions and reporting behavior.

Gemfile.lock is not tracked, so the routine bumps (Rails 8.1.3.1, RuboCop
1.88.2, YARD 0.9.45, and others) appear only in the resolved lockfile.

simplecov 1.0 deprecates `add_filter` and the `# :nocov:` token, both of
which this repo uses. The spec helper now calls `skip`, and the two
unreachable regions in the ActiveModel adapter use `# simplecov:disable`
and `# simplecov:enable`. The bump also unblocks simplecov-cobertura 4.0,
which requires simplecov ~> 1.0.

rbs is held at 4.0.x. Version 4.1 retypes the block return of
`Array#to_h` from the tuple `[K, V]` to the `Hash::_Pair[K, V]`
interface. Steep 2.0 cannot infer an array literal as a tuple against an
interface hint, so `CFI::AttributeSet#to_h` stops type-checking. See
soutaro/steep#2253.

Three workarounds were rejected. A `#:` type assertion makes `steep
stats` report the file as an error, which trips the fail-closed coverage
gate. `map { ... }.to_h` and `each_with_object` both type-check. RuboCop
reports `Style/MapToHash` and `Style/ReduceToHash` for them, and the fix
each cop offers is the block form Steep rejects.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f702da57-2cd1-47e9-9af2-f155362db9ca

📥 Commits

Reviewing files that changed from the base of the PR and between 195efce and f4c32ec.

📒 Files selected for processing (3)
  • Gemfile
  • lib/sec_id/active_model.rb
  • spec/spec_helper.rb

📝 Walkthrough

Walkthrough

The pull request updates RBS and SimpleCov dependency constraints. It migrates coverage annotations to SimpleCov directives and changes the SimpleCov filter API call from add_filter to skip.

Changes

Tooling compatibility updates

Layer / File(s) Summary
Dependency pins and SimpleCov configuration
Gemfile, lib/sec_id/active_model.rb, spec/spec_helper.rb
The Gemfile pins RBS to the 4.0.x series and updates SimpleCov to 1.x. Coverage annotations use simplecov:disable and simplecov:enable. The coverage filter uses skip instead of add_filter.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: development dependency updates and migration to SimpleCov 1.0.
Description check ✅ Passed The description follows the template, explains the changes and rationale, and records validation results with only the non-required changelog item skipped.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch build/update-dependencies

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.

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (195efce) to head (f4c32ec).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #172   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           36        36           
  Lines         1416      1416           
=========================================
  Hits          1416      1416           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svyatov
svyatov merged commit 180a1f4 into main Jul 31, 2026
17 checks passed
@svyatov
svyatov deleted the build/update-dependencies branch July 31, 2026 13:34
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