Skip to content

Raise activerecord ceiling to < 9.0 for Rails 8 compatibility#1

Merged
terciodemelo merged 3 commits intodevelopfrom
raise-activerecord-ceiling-for-rails-8
Apr 13, 2026
Merged

Raise activerecord ceiling to < 9.0 for Rails 8 compatibility#1
terciodemelo merged 3 commits intodevelopfrom
raise-activerecord-ceiling-for-rails-8

Conversation

@terciodemelo
Copy link
Copy Markdown
Contributor

@terciodemelo terciodemelo commented Apr 13, 2026

Summary

  • Raises the activerecord runtime dependency upper bound from < 8.0 to < 9.0
  • This unblocks host applications upgrading to Rails 8.x
  • No code changes needed — the gem has no known incompatibilities with Rails 8

Context

Hivecore is upgrading from Rails 7.2 to 8.1. This fork's < 8.0 ceiling is a hard blocker for bundle install.

Summary by CodeRabbit

  • Chores

    • Expanded ActiveRecord compatibility to allow newer 8.x (and up to <9.0)
    • Raised minimum Ruby requirement to >= 3.4.0
    • Simplified development dependencies, removed several legacy/test/reporting gems, and added the debug gem
  • Tests / CI

    • CI matrix extended to run across modern Ruby and multiple ActiveRecord versions; workflow triggers and checkout action updated
    • Added sqlite3 for test runs and updated local tool version to Ruby 3.4.x

The current constraint (< 8.0) blocks bundle resolution when upgrading
a host application to Rails 8.x. The gem has no known incompatibilities
with Rails 8; this simply lifts the version ceiling.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3cef040-3418-4d1f-9b16-55de0f38c0b2

📥 Commits

Reviewing files that changed from the base of the PR and between 3e8667e and 8dffe61.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • Gemfile
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • Gemfile

Walkthrough

Raised local and required Ruby to 3.4.x, widened ActiveRecord compatibility to allow < 9.0, updated Gemfile dependencies and test DB, and adjusted CI workflow to run against multiple ActiveRecord versions and use actions/checkout v4.

Changes

Cohort / File(s) Summary
Gemspec
annotate.gemspec
Updated runtime dependency: activerecord constraint changed from ['>= 3.2', '< 8.0'] to ['>= 3.2', '< 9.0'].
Ruby version / tooling
.tool-versions, Gemfile
Bumped .tool-versions Ruby to 3.4.5 and Gemfile Ruby requirement to >= 3.4.0.
Gemfile — deps & groups
Gemfile
Reworked activerecord requirement to use ENV.fetch('ACTIVERECORD_VERSION', '>= 7.2') with upper bound < 9.0; removed several legacy dev/test gems, added debug, and added sqlite3 to the :test group; made yard unconditional.
CI workflow
.github/workflows/ci.yml
Expanded branch triggers to ['**'], upgraded actions/checkout to v4, introduced matrix for ruby: 3.4 and activerecord: ~> 7.2.0, ~> 8.0.0, ~> 8.1.0, exposed ACTIVERECORD_VERSION from the matrix, and included matrix values in job naming/env.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 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 pull request title accurately summarizes the main change: raising the activerecord dependency ceiling from < 8.0 to < 9.0 to enable Rails 8 compatibility.
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 raise-activerecord-ceiling-for-rails-8

Comment @coderabbitai help to get the list of available commands and usage tips.

@terciodemelo terciodemelo marked this pull request as ready for review April 13, 2026 12:51
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 `@annotate.gemspec`:
- Line 26: The project currently claims activerecord support up to '< 9.0' via
s.add_runtime_dependency(%q<activerecord>, ['>= 3.2', '< 9.0']) but CI/Gemfile
only pins AR '< 6' and lacks multi-version testing; update CI and dependency
test setup by adding Appraisal files (or separate Gemfiles) for ActiveRecord
6.x, 7.x, 8.x and 9.x and modify .github/workflows/ci.yml to run the matrix (or
Appraisal install + appraisal rake test) against those AR versions, and adjust
the Gemfile/dev dependency pins so CI exercises the full range declared by
s.add_runtime_dependency.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 532ead93-7600-4ad4-9386-344142f7c822

📥 Commits

Reviewing files that changed from the base of the PR and between 4567d63 and 673586c.

📒 Files selected for processing (1)
  • annotate.gemspec

@hive-engineering hive-engineering deleted a comment from coderabbitai bot Apr 13, 2026
- Gemfile: drop AR < 6 pin, use env-var-driven version selection
  (ACTIVERECORD_VERSION defaults to >= 7.2)
- CI: matrix of Ruby 3.2/AR 7.2, Ruby 3.4/AR 8.0, Ruby 3.4/AR 8.1
- Remove obsolete dev deps (travis, coveralls, codeclimate, byebug,
  guard, overcommit, terminal-notifier-guard, pry)
- Bump .tool-versions to Ruby 3.4.5
- Bump minimum Ruby to >= 3.2 (required by AR 8.0+)
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: 3

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

Inline comments:
In @.github/workflows/ci.yml:
- Around line 4-6: The workflow uses branches: ['*'] under both the top-level
and push event which won't match branch names containing slashes; update the
branches filters in .github/workflows/ci.yml by replacing branches: ['*'] with
branches: ['**'] (or remove the branches: entries entirely) so that the
top-level and push triggers (the branches keys in the file) will match branches
with slashes such as feature/xyz.

In `@Gemfile`:
- Line 3: Update the minimum Ruby version declared in the Gemfile from "ruby '>=
3.2.0'" to a currently maintained release (for example "ruby '>= 3.3.0'" or a
later maintained version like 3.4/4.0) so the project no longer requires EOL
Ruby 3.2; if you must continue to support 3.2.0, add a brief comment in the
Gemfile explaining the exception and the reason for retaining the EOL
constraint.
- Around line 5-6: The Gemfile currently sets ar_version =
ENV.fetch('ACTIVERECORD_VERSION', '>= 7.2') which lacks the upper bound present
in the gemspec; update the default string returned by ENV.fetch to include the
same ceiling (e.g. ">= 7.2", "< 9.0") so activerecord gem 'activerecord',
ar_version, require: false uses the matching upper bound; modify the ar_version
default value to include the "< 9.0" constraint while leaving
ACTIVERECORD_VERSION override behavior unchanged.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 545d0611-0178-4a28-a9f0-cfc1096a3133

📥 Commits

Reviewing files that changed from the base of the PR and between 673586c and 8721d58.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .tool-versions
  • Gemfile
✅ Files skipped from review due to trivial changes (1)
  • .tool-versions

@terciodemelo terciodemelo force-pushed the raise-activerecord-ceiling-for-rails-8 branch from 8403342 to 3e8667e Compare April 13, 2026 13:22
- Use '**' in branch filters to match names with slashes (e.g. feature/rails-8)
- Bump minimum Ruby from >= 3.2 (EOL March 2026) to >= 3.4 (matches hivecore)
- CI matrix: all 3 entries now use Ruby 3.4
- Add < 9.0 ceiling to Gemfile AR constraint to match gemspec
@terciodemelo terciodemelo force-pushed the raise-activerecord-ceiling-for-rails-8 branch from 3e8667e to 8dffe61 Compare April 13, 2026 13:23
@terciodemelo terciodemelo merged commit 16376e0 into develop Apr 13, 2026
1 check passed
@terciodemelo terciodemelo deleted the raise-activerecord-ceiling-for-rails-8 branch April 13, 2026 15:07
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.

2 participants