refactor(llm): replace retryable monkey-patch with RetryableLLMError subclass #129

Merged
fuzzy merged 1 commit from fix/0085-retryable-llm-error-subclass into main 2026-07-05 16:30:07 +00:00
Owner

What

Replace the _retryable monkey-patch (object.__setattr__) with a proper RetryableLLMError(LLMError) subclass for a cleaner, more idiomatic design.

Why

Monkey-patching exception instances with object.__setattr__ is fragile and non-standard.

Testing

  • 145 unit tests pass
  • Pre-commit hooks pass

Closes #85

## What Replace the `_retryable` monkey-patch (`object.__setattr__`) with a proper `RetryableLLMError(LLMError)` subclass for a cleaner, more idiomatic design. ## Why Monkey-patching exception instances with `object.__setattr__` is fragile and non-standard. ## Testing - [x] 145 unit tests pass - [x] Pre-commit hooks pass Closes #85
refactor(llm): replace retryable monkey-patch with RetryableLLMError subclass
All checks were successful
CI / test (pull_request) Successful in 51s
CI / lint (pull_request) Successful in 1m23s
a46cfb3532
Cleaner, more idiomatic design using proper exception subclass
instead of object.__setattr__ on LLMError instances.
Closes #85
fuzzy force-pushed fix/0085-retryable-llm-error-subclass from a46cfb3532
All checks were successful
CI / test (pull_request) Successful in 51s
CI / lint (pull_request) Successful in 1m23s
to a0b1315996
All checks were successful
CI / lint (pull_request) Successful in 1m23s
CI / test (pull_request) Successful in 50s
2026-07-05 16:27:08 +00:00
Compare
the.auditor left a comment

Automated Review — PR #129

Result: APPROVED


Clean refactor. Replaces object.__setattr__ monkey-patch with proper RetryableLLMError(LLMError) subclass. Removes 15 lines of fragile code, replaces with 5 lines of clean class definition. Also adds py.typed marker for PEP 561 compliance. Closes #85.

No suggestions.

## Automated Review — PR #129 **Result: APPROVED** --- Clean refactor. Replaces `object.__setattr__` monkey-patch with proper `RetryableLLMError(LLMError)` subclass. Removes 15 lines of fragile code, replaces with 5 lines of clean class definition. Also adds `py.typed` marker for PEP 561 compliance. Closes #85. No suggestions.
fuzzy merged commit a0b1315996 into main 2026-07-05 16:30:07 +00:00
fuzzy deleted branch fix/0085-retryable-llm-error-subclass 2026-07-05 16:30:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/kronai!129
No description provided.