Skip to content

fix: isolate retry hook callback diagnostics - #712

Open
WSxDemise wants to merge 2 commits into
mainfrom
wblake2/feat/streaming-retry-display-suffix
Open

fix: isolate retry hook callback diagnostics#712
WSxDemise wants to merge 2 commits into
mainfrom
wblake2/feat/streaming-retry-display-suffix

Conversation

@WSxDemise

Copy link
Copy Markdown
Collaborator

[CodePuppy Agent] - ## What

Add a synchronous streaming_retry_display_suffix callback seam to the streaming retry warning path.

Why

Retry warnings can benefit from deployment-specific diagnostics without putting provider or enterprise details into the core harness.

How

  • Add a provider-neutral retry-warning suffix callback phase.
  • Preserve generic warning output when no callback is registered.
  • Collect additive suffixes in registration order.
  • Isolate callback exceptions, invalid returns, and oversized values so plugins cannot interrupt retry recovery.
  • Add walk_exception_tree() for shared traversal of wrapped causes, contexts, and ExceptionGroup members.
  • Support callable objects safely in callback diagnostics rather than assuming callbacks always expose __name__.

Testing

  • /pr-me local gate: changed-file Ruff and formatter checks passed.
  • /pr-me affected tests: 209 passed.
  • /pr-me independent pre-PR review: clean.
  • Full validation previously passed: 12,692 passed, 81 skipped, 1 xpassed.
  • i18n audit completed.

Scope

Provider-neutral OSS infrastructure only. This PR contains no Walmart, Element, gateway response-body, or private diagnostic behavior.

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