Commit 9bd5482
authored
Centralize RuboCop ownership in root bundle (#3836)
Fixes #3825.
## Summary
- Add a committed root `Gemfile.lock` and make the top-level `Gemfile`
own the single project RuboCop version (`rubocop 1.61.0` plus the
existing Performance/RSpec plugins).
- Remove RuboCop gems from the shared package development dependency
file and regenerate package lockfiles so RuboCop only appears in the
root lock.
- Point local lint tasks, package scripts, CI Ruby lint jobs, and lint
docs at the root bundle for RuboCop while leaving package Gemfiles in
charge of RBS/test/runtime bundles.
- Update the benchmark workflow setup and release lockfile update path
now that the root bundle is a committed CI input.
## Duplicate / prior-work search
- #3825 is the open target issue; latest maintainer direction is: "Top
level Gemfile/Gemfile.lock should have one version of rubocop for the
project."
- #2214 is closed and explicitly superseded by #3825.
- #3827 is merged docs-only follow-up and did not implement the root
Gemfile/lock ownership change.
- `gh issue list --search "rubocop Gemfile Gemfile.lock" --state all
--limit 20` found no open duplicate implementation issue. #2224 is
related to bundler caching, not a duplicate of this ownership change.
- `gh pr list --search "rubocop Gemfile Gemfile.lock" --state all
--limit 20` found #3827 plus unrelated historical PRs, with no open
duplicate PR for this implementation.
## Validation
- `bundle install` at repo root -> pass.
- `bundle install` in `react_on_rails`, `react_on_rails_pro`, and
`react_on_rails_pro/spec/dummy` -> pass.
- `bundle exec rubocop --version` -> `1.61.0`.
- `(cd react_on_rails && BUNDLE_GEMFILE=../Gemfile bundle exec rubocop
--version)` -> `1.61.0`.
- `(cd react_on_rails_pro && BUNDLE_GEMFILE=../Gemfile bundle exec
rubocop --version)` -> `1.61.0`.
- `(cd react_on_rails && BUNDLE_GEMFILE=../Gemfile bundle exec rubocop)`
-> pass, 214 files, no offenses.
- `(cd react_on_rails_pro && BUNDLE_GEMFILE=../Gemfile bundle exec
rubocop --ignore-parent-exclusion)` -> pass, 228 files, no offenses;
existing RuboCop AST `EnsureNode#body` deprecation warnings printed.
- `bundle exec rake lint:rubocop` from root -> pass.
- `(cd react_on_rails_pro && bundle exec rake lint:rubocop)` -> pass.
- `(cd react_on_rails && bundle exec rake rbs:validate)` -> pass.
- `(cd react_on_rails_pro && bundle exec rake rbs:validate)` -> pass.
- `bundle exec rspec benchmarks/spec` -> pass, 238 examples, 0 failures.
- `ruby script/check-gemfile-lock-platforms` -> pass, all 6 lockfiles
include `x86_64-linux`.
- `pnpm exec prettier --check AGENTS.md
internal/contributor-info/linters.md
.github/workflows/lint-js-and-ruby.yml
.github/workflows/pro-test-package-and-gem.yml
.github/workflows/benchmark.yml react_on_rails_pro/package-scripts.yml`
-> pass.
- `ruby -e 'require "yaml"; ARGV.each { |path| YAML.load_file(path);
puts "parsed #{path}" }' .github/workflows/lint-js-and-ruby.yml
.github/workflows/pro-test-package-and-gem.yml
.github/workflows/benchmark.yml react_on_rails_pro/package-scripts.yml`
-> pass.
- `actionlint` -> pass.
- `yamllint .github/` -> not run; `yamllint` is not installed in this
worker environment.
- `script/ci-changes-detector origin/main` -> recommends broad
Ruby/JS/dummy/Pro/CI coverage and benchmark jobs.
- `git diff --check origin/main...HEAD` -> pass.
- `autoreview --mode branch --base origin/main` -> clean, no
accepted/actionable findings, overall patch correct 0.84.
- Pre-push hook -> pass: branch Ruby RuboCop and Markdown link checks.
## Workflow Change Audit
- Secret references: no added or changed secret references. Existing
benchmark workflow secret references are unchanged.
- `permissions:`: no changes.
- `on:` triggers: no changes.
- Third-party actions: no new third-party actions and no third-party
action version changes. The benchmark workflow now uses the existing
local `./.github/actions/setup-bundle`; lint workflows add existing
local setup-bundle steps for the root bundle.
## CI label recommendation
Labels: `full-ci, benchmark`.
Reason: this changes committed Bundler lock ownership, Ruby lint entry
points, CI workflow setup, package lockfiles, and the benchmark
workflow. The local CI detector also recommends broad suites and
benchmark jobs.
## Known residual risk / UNKNOWN
- UNKNOWN whether maintainers eventually want the top-level `Gemfile` to
be a pure lint-only bundle. This PR keeps the existing root Gemfile
behavior of delegating to `react_on_rails/Gemfile` while making RuboCop
itself root-owned, which is the narrowest change that follows the
maintainer comment without breaking root rake/development usage.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touches committed lockfiles, multiple CI workflows, and every RuboCop
invocation path; wrong `BUNDLE_GEMFILE` wiring could break lint locally
or in CI without affecting runtime gem behavior.
>
> **Overview**
> **RuboCop is now owned by the root `Gemfile` / committed
`Gemfile.lock`**, with pinned `rubocop` 1.61.0 and plugins; RuboCop gems
were removed from `Gemfile.shared_dev_dependencies` and from OSS/Pro
package lockfiles.
>
> **Lint entry points** (CI, `bin/ci-local`, rake `lint` tasks, Pro
package scripts, dummy `bin/rubocop`, `AGENTS.md`, contributor docs) now
run RuboCop via `BUNDLE_GEMFILE` pointing at the repo root. OSS/Pro
**RBS validation** still uses each package’s Gemfile.
>
> **CI** adds root `setup-bundle` for lint workflows; benchmark job
drops manual `bundle install` in favor of root `setup-bundle` for
benchmark specs. **Release** runs `bundle install` at the monorepo root
when refreshing lockfiles. Root `Gemfile.lock` is no longer gitignored.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e4910a0. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## Agent Merge Confidence
Mode: accelerated-rc
Score: 9/10
Auto-merge recommendation: yes
Affected areas: RuboCop ownership, Bundler lockfiles, CI lint wiring,
Pro/core lint boundary, benchmark workflow
CI detector: `script/ci-changes-detector origin/main` -> broad
Ruby/JS/dummy/Pro/CI coverage and benchmark jobs recommended
Validation run:
- `cd react_on_rails_pro && BUNDLE_GEMFILE="$(git rev-parse
--show-toplevel)/Gemfile" bundle exec rubocop --ignore-parent-exclusion
rakelib/lint.rake rakelib/task_helpers.rb` -> pass, RuboCop 1.61.0
- `script/ci-changes-detector origin/main` -> full suite + benchmarks
recommended
- Full GitHub checks for `e4910a0f889ef7b4b07b658c97e1c921ea381e4a` ->
50 pass, 4 expected skips
Review/check gate:
- Claude review: complete for
`e4910a0f889ef7b4b07b658c97e1c921ea381e4a`, no unresolved review threads
- Cursor Bugbot: complete for `e4910a0f889ef7b4b07b658c97e1c921ea381e4a`
- GitHub checks: complete for
`e4910a0f889ef7b4b07b658c97e1c921ea381e4a`; skipped benchmark
confirmation/report rows and docs-format-check are expected non-running
paths
Known residual risk: low; root bundle ownership is broad but
current-head full CI, Pro lint, and benchmark suites passed
Finalized by: Claude Code Review check `claude-review` SUCCESS for
`e4910a0f889ef7b4b07b658c97e1c921ea381e4a` (GitHub Actions job
80360583030)1 parent 28702ff commit 9bd5482
22 files changed
Lines changed: 790 additions & 197 deletions
File tree
- .github/workflows
- bin
- internal/contributor-info
- rakelib
- react_on_rails_pro
- rakelib
- spec/dummy
- bin
- react_on_rails
- rakelib
- spec/dummy
- bin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
| 138 | + | |
140 | 139 | | |
141 | | - | |
| 140 | + | |
142 | 141 | | |
| 142 | + | |
143 | 143 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | 144 | | |
153 | 145 | | |
154 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| |||
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
163 | | - | |
164 | | - | |
| 169 | + | |
| 170 | + | |
165 | 171 | | |
166 | 172 | | |
167 | | - | |
| 173 | + | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
173 | | - | |
| 179 | + | |
174 | 180 | | |
175 | 181 | | |
176 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
183 | 190 | | |
184 | 191 | | |
185 | | - | |
| 192 | + | |
186 | 193 | | |
187 | 194 | | |
188 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | 1 | | |
5 | 2 | | |
6 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
46 | | - | |
| 51 | + | |
47 | 52 | | |
48 | | - | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | | - | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
277 | 282 | | |
278 | 283 | | |
279 | 284 | | |
280 | | - | |
| 285 | + | |
281 | 286 | | |
282 | | - | |
| 287 | + | |
283 | 288 | | |
284 | | - | |
| 289 | + | |
285 | 290 | | |
286 | | - | |
| 291 | + | |
287 | 292 | | |
288 | 293 | | |
289 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments