Skip to content

Conversation

@trevorturk
Copy link

Summary

  • Adds Zeitwerk::Loader.eager_load_all validation to CI pipeline
  • Runs after linter, before test matrix for fast feedback
  • Currently blocked by upstream ruby_llm ActiveRecord dependency issues

Problem

Without automated Zeitwerk eager loading validation, autoloading issues can slip into production causing crashes. These issues include:

  • Inflector configuration errors
  • Constant definition problems
  • Missing conditional checks for optional dependencies

Solution

Add a simple validation step that runs Zeitwerk::Loader.eager_load_all after dependency installation. This structural validation completes in ~2 seconds and provides rapid feedback before expensive test suites run.

Upstream Dependencies

This PR is currently blocked and marked as draft because it depends on upstream fixes in ruby_llm:

  • ruby_llm#504 - Fixes ActiveRecord dependency issues that cause NameError during eager loading
  • ruby_llm#505 - Adds the same eager loading check to ruby_llm's CI

Once these PRs are merged and a new version of ruby_llm is released, this PR can be updated and marked ready for review.

Testing

Currently fails with:

uninitialized constant RubyLLM::ActiveRecord::ActsAs::ActiveSupport (NameError)

This is expected and will be resolved by ruby_llm#504.

🤖 Generated with Claude Code

Adds a validation step that runs Zeitwerk::Loader.eager_load_all after
dependency installation to catch autoloading issues early in the CI pipeline.

This check helps prevent production crashes by detecting:
- Inflector configuration errors
- Constant definition issues
- Missing conditional checks for optional dependencies

The check runs quickly (~2 seconds) before the test matrix, providing
rapid feedback on structural issues.

Note: This check currently fails due to upstream ruby_llm ActiveRecord
dependency issues. See:
- crmne/ruby_llm#504
- crmne/ruby_llm#505

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant