Skip to content

Upgrade Rails 7.2 to 8.0#353

Merged
kylefritz merged 6 commits into
masterfrom
rails-8
Jul 14, 2026
Merged

Upgrade Rails 7.2 to 8.0#353
kylefritz merged 6 commits into
masterfrom
rails-8

Conversation

@kylefritz

Copy link
Copy Markdown
Owner

Closes #352

Rails 7.2 security support ends 2026-08-09; this upgrades to Rails 8.0.5 in three staged commits so runtime and behavior changes are reviewable separately.

Commits

  1. Gem bumprails ~> 8.0.3 resolved to 8.0.5 via bundle update rails --conservative; no transitive gem bumps were needed (activeadmin 3.4, devise 4.9.4, sprockets-rails 3.5.2 all already Rails-8-compatible).
  2. bin/rails app:update (still on 7.2 defaults) — accepted new defaults where we had no customizations (puma.rb, CSP/inflections initializers), merged the expanded log parameter-filter list with our :uid, restored all customized files (bin scripts, application.rb, environment configs, custom 500 page; deleted the boilerplate 400/404/406/422/icon files since errors route through ErrorsController). Includes the Rails-generated Active Storage migration dropping NOT NULL on blobs.checksum and the regenerated schema.rb.
  3. config.load_defaults 8.0 — only three defaults change from 7.2 and none affect this app (no to_time callers, no conditional-GET helpers, no long regexes), so no opt-outs were needed and new_framework_defaults_8_0.rb is deleted. Also removes the now-obsolete EOLRails ignore from config/brakeman.ignore.

Verification

  • bin/rails test: 500 runs, 0 failures (run after each stage)
  • bun test (53 pass), bun run typecheck, rubocop, bin/brakeman (exit 0), bin/bundle-audit — all green
  • Manual smoke test on a local server: /menu renders, /menu.json still camelCase via OliveBranch, admin login + dashboard + orders index work, placed a real dev order through the React menu (credits deducted, order visible in ActiveAdmin), mailer preview renders
  • No views/mailers changed, so visual tests were skipped per CLAUDE.md

Notes for deploy

  • The Active Storage migration (change_column_null on active_storage_blobs.checksum) runs in the release phase; it's a metadata-only ALTER, safe on Heroku Postgres.
  • Merging deploys automatically once CI passes — merge when ready.

🤖 Generated with Claude Code

kylefritz and others added 6 commits July 13, 2026 23:45
bundle update rails --conservative resolved cleanly; no transitive
gem bumps were needed. Framework defaults stay at 7.2 for now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Accepted the new defaults where we had no customizations (puma.rb, CSP
and inflections initializers), merged the expanded parameter-filter
list with our :uid entry, and kept the rest of our customized files
(bin scripts, application.rb, environment configs, error pages).

Includes the Rails-generated Active Storage migration dropping the
NOT NULL on blobs.checksum, the regenerated schema.rb (autocorrected
to omakase array style), the new bin/rubocop binstub, and the
commented-out new_framework_defaults_8_0.rb for the defaults flip.

config.load_defaults stays at 7.2 for this commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Only three defaults change from 7.2 to 8.0 and none affect this app:
- to_time_preserves_timezone = :zone — no app code calls to_time; the
  boot-time deprecation warning (from a gem) is gone with the flip
- action_dispatch.strict_freshness — we use no conditional-GET helpers
- Regexp.timeout = 1s — no long-running regexes over unbounded input

All defaults adopted, so new_framework_defaults_8_0.rb is deleted
rather than kept with opt-outs. The EOLRails ignore entry is removed
from brakeman.ignore (brakeman flagged it as obsolete once on 8.0);
bin/brakeman exits 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…skill

[U]se marks the default answer in the port-conflict prompt. The verify
skill documents how to drive the running dev server end-to-end
(login shortcut, order flows, admin/engines, jobs, letter_opener).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
getDeadlineContext() calls useContext, but Layout invoked it after the
loading/error early returns — so the hook only ran once the menu had
loaded, changing the hook order between renders and triggering React's
rules-of-hooks warning on every menu load. Hoist the call above the
early returns; allClosed(menu) still runs only after the null check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The controller only permitted top-level keys, so a client posting the
{error_event: {...}} shape that ParamsWrapper advertises had every
field silently dropped to the fallbacks (error_class "Error", empty
message/stack/context). Fall back to the nested params when the
top-level permit comes up empty; top level still wins because the
auto-wrapped copy excludes non-column keys (stack, context).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kylefritz
kylefritz marked this pull request as ready for review July 14, 2026 05:14
@kylefritz
kylefritz merged commit 34d996a into master Jul 14, 2026
10 checks passed
@kylefritz
kylefritz deleted the rails-8 branch July 14, 2026 05:21
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.

Upgrade Rails 7.2 → 8.x before EOL on 2026-08-09

1 participant