Skip to content

Make CI green again: pin json below 3 on Rails < 8.1 lanes, fix RuboCop offenses - #9

Merged
rameerez merged 1 commit into
mainfrom
fix/ci-json-3-and-rubocop
Oct 18, 2026
Merged

rameerez merged 1 commit into
mainfrom
fix/ci-json-3-and-rubocop

Conversation

@rameerez

Copy link
Copy Markdown
Owner

Why

Tests on main has been red since the 0.3.3 release on 2026-08-31 (latest run 39176873199), for two unrelated reasons:

  1. lint — three autocorrectable offenses left by the actor_class commit: Layout/ArgumentAlignment ×2 in test/configuration_test.rb, Style/DirectiveScope in test/documentation_examples_test.rb.
  2. sqlite lanes on Rails 7.1 / 7.2 / 8.0 — since json 3.0.0 (2026-09-08):
    ArgumentError: unknown keyword: quirks_mode
    
    ActiveSupport < 7.2.4 and 8.0.x still pass quirks_mode: to JSON.generate; the install migration JSON-encodes a column default, so db:migrate died before any test ran. The Rails 8.1 lanes were green.

What

  • RuboCop's own corrections applied (-a, then -A for the directive-scope one: the disable/enable pair becomes # rubocop:disable-next Security/Eval).
  • gem "json", "~> 2.7" on the 7.1, 7.2 and 8.0 appraisals and their generated gemfiles. Same pin chats and pricing_plans carry. Rails 8.1 keeps json 3.

Verified locally (Ruby 3.4.7)

lane result
rails_7.1 (7.1.6, json 2.21.2) 837 runs, 0 failures
rails_7.2 (7.2.3, json 2.21.2) 837 runs, 0 failures
rails_8.0 (8.0.5.1, json 2.21.2) 837 runs, 0 failures
rubocop 173 files, no offenses

Test gemfiles and lint only, no library code touched; CI is the review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FKwnuouKrCTFGCidHgwSuS

…op offenses

Two independent breaks had main red since 2026-08-31:

- lint: the 0.3.3 actor_class commit left three autocorrectable offenses
  (Layout/ArgumentAlignment twice in test/configuration_test.rb,
  Style/DirectiveScope in test/documentation_examples_test.rb). Applied
  RuboCop's own corrections.
- sqlite lanes on Rails 7.1, 7.2 and 8.0: json 3.x (3.0.0 on 2026-09-08)
  rejects the quirks_mode: keyword that ActiveSupport < 7.2.4 and 8.0.x
  still pass to JSON.generate. The install migration JSON-encodes a
  column default, so db:migrate died before a single test ran. json is
  pinned to ~> 2.7 on those three appraisals (same pin chats and
  pricing_plans carry); Rails 8.1 is untouched and runs json 3.

Verified locally on Ruby 3.4.7: 837 runs, 0 failures on each of the
7.1, 7.2 and 8.0 gemfiles; rubocop reports no offenses.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKwnuouKrCTFGCidHgwSuS
@rameerez
rameerez merged commit d221347 into main Oct 18, 2026
23 checks passed
@rameerez
rameerez deleted the fix/ci-json-3-and-rubocop branch October 18, 2026 23:53
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