Commit 31da5ec
authored
Keep root RuboCop bundle lint-only (#3841)
## Summary
Closes #3837.
- Keep the root Gemfile focused on repo-wide RuboCop, hook, release, and
benchmark script tooling instead of evaluating the OSS package Gemfile.
- Delegate package Rake tasks from the monorepo root through the
`react_on_rails` bundle so root callers keep working without
contaminating package locks.
- Update setup/CI helpers and contributor docs so each command selects
the intended Gemfile explicitly.
## Validation
- `bundle install`
- `bundle exec rake lint`
- `(cd react_on_rails && bundle exec rake lint:rubocop)` with
package/root lockfile hashes unchanged
- `bundle exec rubocop Rakefile Gemfile rakelib/release.rake
react_on_rails/rakelib/lint.rake`
- `bundle exec ruby -c Rakefile`
- `ruby -c rakelib/release.rake`
- `ruby -c react_on_rails/rakelib/lint.rake`
- `bundle exec rspec benchmarks/spec`
- `zsh -n conductor-setup.sh`
- `bash -n bin/ci-local bin/ci-rerun-failures bin/setup`
- `shellcheck bin/ci-rerun-failures bin/ci-local bin/setup`
- `pnpm exec prettier --check AGENTS.md .github/dependabot.yml`
- `bundle exec bin/setup --help`
- `bundle exec rake node_package`
- `(cd react_on_rails && bundle exec rake rbs:validate)`
- `(cd react_on_rails && bundle check)`
- `(cd react_on_rails && BUNDLE_GEMFILE="$PWD/Gemfile" bundle exec rspec
spec/react_on_rails/ruby_version_support_spec.rb)`
- `(cd react_on_rails && BUNDLE_GEMFILE=../Gemfile bundle exec rubocop
--format simple --cache false -- Rakefile ../Rakefile
../rakelib/release.rake)`
- `codex review --base origin/main`
- `git diff --check`
Full CI and benchmark are requested because this changes root/package
Rake delegation and setup/CI bundle selection.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touches root vs package bundle boundaries, Rake delegation, and local
CI/setup scripts; wrong Gemfile selection could break contributor
workflows, but runtime gem behavior is unchanged.
>
> **Overview**
> **Splits the monorepo root Ruby bundle from the OSS gem** so `bundle
install` at the repo root only pulls lint, hooks, release, and
benchmark-spec tooling (RuboCop, Rake, RSpec, lefthook, etc.), instead
of evaluating `react_on_rails/Gemfile` and dragging in Rails and the
full test stack. `Gemfile.lock` shrinks accordingly; Dependabot’s
bundler config now includes `/` for that lock.
>
> **Root `rake` still works via delegation**: the root `Rakefile` no
longer loads the package Rakefile; it runs common tasks (`lint`,
`run_rspec:*`, `shakapacker_examples:*`, `node_package`, etc.) inside
`react_on_rails` with `bundle exec`, auto-installing that bundle when
needed. Root `rake lint` is root-tooling RuboCop only; full package lint
stays `cd react_on_rails && bundle exec rake lint`.
>
> **Contributor and CI scripts** (`AGENTS.md`, `bin/setup`,
`bin/ci-local`, `bin/ci-rerun-failures`, `conductor-setup.sh`) now
install and invoke the correct Gemfile per directory via a shared
`bundle_command` helper. Package lint still invokes root RuboCop through
`BUNDLE_GEMFILE=../Gemfile` with `Bundler.with_unbundled_env`.
>
> **Release rake** drops the `ReactOnRails::Utils` require and uses a
local `release_truthy?` for dry-run/override flags.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
8299358. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Centralized Bundler/Gemfile handling across the repo, CI, and setup
scripts to ensure correct dependency installation and selection.
* Improved dependency bootstrapping order and environment isolation for
OSS and Pro flows.
* Unified truthiness parsing for release tooling.
* **Documentation**
* Clarified workflow and setup commands to consistently scope
package-specific bundle and task invocations.
* **Refactor**
* Reworked root-level task delegation and lint/test wrappers for
clearer, safer task execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Agent Merge Confidence
Mode: accelerated-rc
Score: 9/10
Auto-merge recommendation: yes
Affected areas: root/OSS bundle separation, RuboCop lint routing,
setup/CI scripts, Dependabot config.
Checks: current head `82993589292d0d9bd6e9fa0246eb22213b42f763` has 49
passing checks and 5 expected selector-skipped checks; full CI and
benchmark labels are present and exercised.
Review threads: 0 unresolved current review threads.
Known residual risk: root bundle/package boundary touches setup and CI
helper routing; mitigated by local shell/Rake/RuboCop/lint validations,
full CI and benchmark pass, and current-head AI review checks.
Finalized by: Claude Code Review check `claude-review` for current head
`82993589292d0d9bd6e9fa0246eb22213b42f763` (SUCCESS).1 parent 5c8cdcb commit 31da5ec
11 files changed
Lines changed: 368 additions & 674 deletions
File tree
- .github
- bin
- rakelib
- react_on_rails/rakelib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
66 | | - | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | | - | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
8 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
9 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
0 commit comments