0.7.1 — Narrow run_once ArgumentError rescue
Behavioral change (follow-up to v0.7.0)
Closes the known limitation called out in the v0.7.0 CHANGELOG.
Before: Step::Base#run_once wrapped the entire Runner chain in rescue ArgumentError to convert DSL misconfiguration (e.g. prompt has not been set) into :input_error. Side effect: any ArgumentError raised from adapter code during Runner#call — wrong arity, bad config arg, any programmer bug — was silently coerced into :input_error and re-tried as if the user had supplied bad input.
After: the rescue is scoped to the Runner-construction phase only. DSL configuration errors still produce :input_error (the prompt has not been set case is regression-tested). ArgumentError raised during Runner#call propagates to the caller.
Input-type validation failures continue to produce :input_error via InputValidator's own scoped rescue (Dry::Types::CoercionError, TypeError, ArgumentError around the type-check boundary) — unchanged.
Why it matters
v0.7.0's narrative was "programmer errors propagate, provider errors become :adapter_error". AdapterCaller already respected that (narrowed to RubyLLM::Error + Faraday::Error). But run_once's broader rescue ArgumentError was a backdoor that let adapter-code ArgumentError bugs slip back into :input_error and become retry targets.
This release closes that backdoor. Programmer bugs raised during an adapter call now surface loudly instead of being disguised as "user gave bad input".
Compatibility
Technically a behavioral change — callers previously relying on adapter-code ArgumentError to produce :input_error results will now see the exception propagate. If your adapter deliberately raises ArgumentError for expected validation flows, wrap that in RubyLLM::Error (becomes :adapter_error, respected by retry) or add explicit handling at the call site.
Test plan
bundle exec rspec— 1341 examples, 0 failures, 8 pending (all pending are API-key-gated live LLM tests).- New regression specs in
retry_integration_spec.rb:propagates ArgumentError from adapter code (programmer bug, not bad input)— adapter raisingArgumentErrornow propagates.still converts DSL misconfiguration ArgumentError to :input_error (prompt missing)—prompt has not been setstill becomes:input_error.
- Existing BUG 48 adversarial spec (step without prompt →
:input_error) continues to pass.