Summary
PR #1055 (WA-VERIFY-077) created script/default_appraisal_zeitwerk_check. The Wave 2 test-quality reviewer identified three non-blocking but recommended improvements:
-
Fragile cd ../../.. — if a zeitwerk:check call fails mid-way, the working directory is wrong for subsequent engines. Use subshell pattern instead: (cd "$engine/test/dummy" && bin/rails zeitwerk:check)
-
Missing Redis wait — the service-readiness block waits for ES and Mongo but not Redis. zeitwerk:check may false-fail if Redis isn't up (Sidekiq/ActionCable initializers can fail).
-
RAILS_ENV not exported — defaults to development if CI doesn't set it. Should be explicit: export RAILS_ENV=test.
Approach
# Current fragile pattern
for engine in core admin storefront; do
cd "$engine/test/dummy" && bin/rails zeitwerk:check || exit 1
cd ../../..
done
# Safer subshell pattern
for engine in core admin storefront; do
(cd "$engine/test/dummy" && RAILS_ENV=test bin/rails zeitwerk:check) || exit 1
done
Acceptance Criteria
Client Impact
None — CI-only script.
Related
Summary
PR #1055 (WA-VERIFY-077) created
script/default_appraisal_zeitwerk_check. The Wave 2 test-quality reviewer identified three non-blocking but recommended improvements:Fragile
cd ../../..— if azeitwerk:checkcall fails mid-way, the working directory is wrong for subsequent engines. Use subshell pattern instead:(cd "$engine/test/dummy" && bin/rails zeitwerk:check)Missing Redis wait — the service-readiness block waits for ES and Mongo but not Redis.
zeitwerk:checkmay false-fail if Redis isn't up (Sidekiq/ActionCable initializers can fail).RAILS_ENV not exported — defaults to development if CI doesn't set it. Should be explicit:
export RAILS_ENV=test.Approach
Acceptance Criteria
(cd ...)patternRAILS_ENV=testset explicitlyClient Impact
None — CI-only script.
Related