Repository navigation
Run synchronous evaluation callbacks on the managed blocking pool - #144
Closed
Stephen Belanger (Qard) wants to merge 1 commit into
Closed
Stephen Belanger (Qard) wants to merge 1 commit into
Stephen Belanger (Qard) wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Synchronous evaluation callbacks previously ran inline on the selected async worker, so a callback waiting for a span write could block the worker responsible for delivering it. Evaluation runs now invoke synchronous tasks and scorers on their selected runtime's managed blocking pool. Built-in scorers use that path as well; async functions and closures retain their borrowing contracts.
The task/scorer traits expose synchronous bodies and an explicit dispatch marker, with defaults for existing async implementations. Named scorer wrappers preserve dispatch as well as validated names. Cases and outputs use shared ownership only while invocations are active, then return ownership to the result without adding Clone or serialization bounds. Shared hook metadata, tags, expected values and recording spans remain available to synchronous tasks.
Dropping an invocation aborts queued blocking work. An already-running synchronous callback retains its owned data until it returns; run timeout revokes its recording permission. Blocking panics retain the Tokio JoinError as a case error, allowing later cases and recording finalization to continue. No new public cancellation policy is introduced.
This continues stage 8, stacked on #143. Experiment-backed recording, dataset case sources and remaining CLI adapters are next.
Validation: