Skip to content

fix(retry): support callable objects in failure diagnostics - #28

Closed
xiehuanyi wants to merge 1 commit into
cased:mainfrom
xiehuanyi:fix/retry-callable-names
Closed

xiehuanyi wants to merge 1 commit into
cased:mainfrom
xiehuanyi:fix/retry-callable-names

Conversation

@xiehuanyi

Copy link
Copy Markdown

RetryHandler.execute() accepts callable objects, but a failure in a functools.partial or an instance with __call__ raises AttributeError from the retry log's func.__name__ lookup. That prevents a transient failure from being retried and replaces the original exception when retries are disabled.

Use the callable's name when available, otherwise its type name, for retry diagnostics. Retry decisions and operation arguments are unchanged.

Validation: all three new regressions fail on main; they now prove retry success for partials and callable instances and preservation of the original terminal error. All 211 offline tests pass (1 credential-dependent skip, 30 integration tests deselected), plus full Ruff and Black. Mypy reports the same 57 base diagnostics and is advisory in repository CI. No provider service was contacted.

AI assistance: implemented and tested with Codex.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 16:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@xiehuanyi xiehuanyi closed this Oct 10, 2026
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.

2 participants