Skip to content

Prepare 2.0: bounded retries, pooled clients and reliable diagnostics - #3

Merged
RodrigoAlbe merged 1 commit into
mainfrom
fix/reliable-evaluations
Sep 27, 2026
Merged

RodrigoAlbe merged 1 commit into
mainfrom
fix/reliable-evaluations

Conversation

@RodrigoAlbe

Copy link
Copy Markdown
Owner

Evaluations could sleep for unbounded Retry-After values, opened a new HTTP connection pool on every call, and exposed too little error metadata for callers to recover. The public entropy helper also accepted invalid distributions as full confidence.

This PR adds a configurable 35-second evaluation budget, rejects retry waits that cannot fit, cancels async HTTP I/O at the deadline, and reuses sync/async clients with explicit lifecycle methods and context managers. Provider errors now include status, retryability, attempts, Retry-After and request ID without response bodies. Entropy inputs are validated and softmax retains full precision.

Synchronous deadlines are cooperative: the remaining budget limits HTTP phases and overdue results are rejected, but in-flight sync I/O cannot be interrupted at an exact wall-clock deadline. This limitation is documented. Async clients must be closed in their original event loop.

Prepare version 2.0.0 across package and plugin manifests, document migration and changelog, and add seven synthetic labeled triage fixtures plus a protocol for independent held-out evaluation. Fixtures are not real customer evidence. No release is published and no accuracy or latency improvement is claimed.

Validation: 244 tests passed; source distribution and wheel built; wheel installed in an isolated environment and CLI smoke checks passed; git diff --check passed. No live model calls were made. Repository About metadata is outside these code changes.

@RodrigoAlbe
RodrigoAlbe merged commit 996e514 into main Sep 27, 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.

1 participant