From bf7b6699e53819393c73785f9e3359e9d570a97f Mon Sep 17 00:00:00 2001 From: Trevor Turk Date: Tue, 18 Nov 2025 11:31:18 -0600 Subject: [PATCH] Add Zeitwerk eager loading check to CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds validation that Zeitwerk can eager load all files without errors. This catches autoloading issues like inflector bugs and missing conditional checks before they reach production. - Added check after linter step for fast fail - Runs on all Ruby/Rails matrix combinations - ~2 second check prevents production crashes ## Blocked This PR depends on #504 (ActiveRecord dependency fix) to pass. Without it, the eager loading check fails with NameError. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/cicd.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 18b4e8510..8bd732490 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -68,6 +68,9 @@ jobs: - name: Check code format run: bundle exec rubocop + - name: Check Zeitwerk eager loading + run: bundle exec ruby -e "require 'ruby_llm'; Zeitwerk::Loader.eager_load_all" + - name: Run tests if: matrix.ruby-version != '3.4' || matrix.rails-version != 'rails-8.0' run: bundle exec appraisal ${{ matrix.rails-version }} rspec --tag '~generator'