Summary
During WA-VERIFY-071 (PR #1049), the Rails 7.0 deprecation baseline capture was blocked because the test suite cannot boot under the Rails 7.0 appraisal.
Error
uninitialized constant Workarea::EnforceHostMiddleware (NameError)
.../core/config/initializers/10_rack_middleware.rb:56
Impact
- Rails 7.0 test suite cannot run at all — no deprecation warnings can be captured
- The deprecation baseline (goal of WA-VERIFY-071) is blocked until this is resolved
Security Note
EnforceHostMiddleware enforces HTTP Host header validation. Its absence in the Rails 7.0 appraisal means the upgrade path currently lacks this protection. Rails 7.0 introduced native config.hosts allowlist enforcement — this investigation should determine whether:
- The native Rails 7.0 host protection supersedes
EnforceHostMiddleware and the middleware can be removed/shimmed
- Or the middleware needs to be updated for Rails 7.0 compatibility
Steps to Reproduce
BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake core_test
Expected: test suite runs
Actual: aborts with NameError for Workarea::EnforceHostMiddleware
Also Noted
The top-level rake test task is incompatible with the Rails 7.0 appraisal — it prints the rails new usage banner instead of running tests. This may be a separate issue with the Rakefile task definition under the appraisal environment.
Acceptance Criteria
Related
Summary
During WA-VERIFY-071 (PR #1049), the Rails 7.0 deprecation baseline capture was blocked because the test suite cannot boot under the Rails 7.0 appraisal.
Error
Impact
Security Note
EnforceHostMiddlewareenforces HTTP Host header validation. Its absence in the Rails 7.0 appraisal means the upgrade path currently lacks this protection. Rails 7.0 introduced nativeconfig.hostsallowlist enforcement — this investigation should determine whether:EnforceHostMiddlewareand the middleware can be removed/shimmedSteps to Reproduce
BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake core_testExpected: test suite runs
Actual: aborts with NameError for
Workarea::EnforceHostMiddlewareAlso Noted
The top-level
rake testtask is incompatible with the Rails 7.0 appraisal — it prints therails newusage banner instead of running tests. This may be a separate issue with the Rakefile task definition under the appraisal environment.Acceptance Criteria
EnforceHostMiddlewareneeds updating or can be replaced by Rails 7.0 native host enforcementrake core_test(or equivalent) can run at least one test under Rails 7.0 appraisalRelated