Repository navigation
Patch release: ruby_llm_contract:optimize rake task now auto-loads in Rails apps.
Why this matters
Adopter running bin/rails ruby_llm_contract:optimize per the docs got Unrecognized command. The docs claimed the task was "included" with RubyLLM::Contract::RakeTask, but the railtie did not load rake_task.rb — adopters had to manually add require "ruby_llm/contract/rake_task" to their Rakefile or lib/tasks/*.rake.
Fixed
- Railtie auto-loads the rake task file using the standard
rake_tasks { require ... }idiom. Boot path is unchanged — the file is loaded lazily duringrakeinvocation, not on Rails app startup. Adopters from 0.10.4+ get bothruby_llm_contract:optimizeandruby_llm_contract:evalwithout touching their Rakefile. - Docs corrected.
docs/guide/optimizing_retry_policy.mdpreviously stated the task came withRubyLLM::Contract::RakeTask.new(...). The new wording is explicit: Rails apps on 0.10.4+ auto-load; older Rails versions and non-Rails projects still need the explicitrequire.
Background
Discovered via dogfooding on the seo-audit project trying to run the optimize task after the 0.10.3 nullable-validator fix unblocked its strict-mode contracts.
Notes
- Non-Rails / older-Rails setup unchanged: add
require "ruby_llm/contract/rake_task"to any file underlib/tasks/or toRakefile. - Suite: 1406 examples / 0 failures / 7 pending (unchanged from 0.10.3).
Full diff: v0.10.3...v0.10.4