able-engine-47078
10/31/2025, 1:47 PMreload! that I traced back to this commit in Rails: https://github.com/rails/rails/commit/d43dc9af18766f91eb450e1c6b8c8c5e64f925e6
The basic gist of it is that config.active_support.executor_around_test_case defaults to true since Rails 7 and this causes the nesting behaviour of ActiveSupport::ExecutionContext to act as nested regardless of the environment you're in, although that nesting behaviour is only supposed to have any impact on the test environment. In our case, something in Avo's use of ExecutionContext in combination with our own app causes this new nesting behaviour to call pop too many times on the ExecutionContext, causing @current_attribute_instances to eventually become nil rather than the expected hash. This results in an exception after trying to reload in the console that reads:
NoMethodError: undefined method '[]' for nil (NoMethodError)
current_instances[current_instances_key] ||= new
^^^^^^^^^^^^^^^^^^^^^^^
The workaround that we've put in is to just set config.active_support.executor_around_test_case to false in environments other than the test environment. So far so good, although we haven't tried the upgrade in production and won't be for a few weeks at least.
I haven't been able to reproduce this behaviour in a minimal test case yet, so there may be something deeper in our app that intersects with this issue, but the error itself was consistent in terms of happening by way of Avo::ExecutionContext#initialize.miniature-optician-85831
10/31/2025, 1:47 PMloud-jewelry-99127
10/31/2025, 1:57 PMAvo::ExecutionContext and ActiveSupport::ExecutionContext are two different classes.
Since you can't reproduce it in a different repository, it's most likely that some configuration in your application is causing the error with ActiveSupport::ExecutionContext. I think it's unrelated to Avo.
I'm curious whether the issue persists if you remove Avo from the project in development, though I understand that might not be easy to testable-engine-47078
10/31/2025, 3:25 PMAvo::Current specifically that were floating around in the backtrace for us, so I'll be contacting the gem authors for that. The basic gist of it is: don't include test-related files in non-test-related environments willy nilly, 'cause this inclusion to me looks a little willy-nilly.loud-jewelry-99127
10/31/2025, 3:47 PMable-engine-47078
10/31/2025, 3:55 PMTestCase classes, that's what sets it all offable-engine-47078
10/31/2025, 3:55 PMloud-jewelry-99127
10/31/2025, 4:46 PMable-engine-47078
11/12/2025, 2:01 PMloud-jewelry-99127
11/12/2025, 2:44 PM