This is related to Rail 7.0 upgrade. We're setting cookies_serializer to :hybrid to allow for gradual upgrade. Once all cookies are rewritten, we can remove the setting to apply the default :json.
# To migrate an existing application to the `:json` serializer, use the `:hybrid` option.
#
# Rails transparently deserializes existing (Marshal-serialized) cookies on read and
# re-writes them in the JSON format.
#
# It is fine to use `:hybrid` long term; you should do that until you're confident *all* your cookies
# have been converted to JSON. To keep using `:hybrid` long term, move this config to its own
# initializer or to `config/application.rb`.
config.action_dispatch.cookies_serializer = :hybrid
That means, we need a released version where value is `:hybrid` and the next version can be left to the default.