Inline request/reply over the Wolverine.Grpc transport (GH-2967)#2995
Merged
Conversation
InvokeAsync<T> routed to a gRPC endpoint now reads the reply off a new unary Call(WolverineMessage) RPC — no ReplyListener, no listening endpoint on the sender. GrpcEndpoint implements IInlineRequestReplyEndpoint so MessageRoute.For selects the InlineReplyMessageRoute (shared infra from GH-2966), with no runtime if/then. The receiver-side Call handler mirrors the HTTP transport executor: deserialize the request envelope, set ResponseType from ReplyRequested, run executor.InvokeInlineAsync (flushing the outbox before the response), and return Envelope.Response. Handler failures and missing handlers come back as a FailureAcknowledgement reply (sender rethrows WolverineRequestReplyException); RpcException transport failures map the same way. MessageSucceeded fires on every success path so tracked sessions quiesce. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
10 tasks
This was referenced Jun 1, 2026
Merged
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.
Closes #2967. Companion to #2966/#2990 (HTTP inline request/reply), built on the shared
IInlineRequestReplyEndpoint/MessageRoute.Forinfrastructure that merged with #2990.What
InvokeAsync<T>routed to a gRPC endpoint now reads the reply straight off a new unaryCall(WolverineMessage) returns (WolverineMessage)RPC — noReplyListener, no listening endpoint on the sender, noTaskCompletionSourcereply choreography. gRPC's unary response slot carries the reply envelope in the same exchange.How
wolverine.proto— newrpc Call(WolverineMessage) returns (WolverineMessage); request carries the serialized request envelope, response carries the serialized reply (which may be aFailureAcknowledgement).GrpcEndpointnow implementsIInlineRequestReplyEndpoint, soMessageRoute.For(...)selects theInlineReplyMessageRoutesubclass — no runtime if/then (the same shape Jeremy asked for in Optimized inline request/reply over the Wolverine.Http transport (GH-2966) #2990).InvokeRemoteAsyncserializes the request, calls the unary RPC over a cachedGrpcChannel/client, and deserializes the reply. AnRpcException(transport-level failure) maps to aFailureAcknowledgementreply so the caller still gets the usualWolverineRequestReplyException.Callhandler mirrors the HTTP transport executor: deserialize the request, setResponseTypefromReplyRequested, runexecutor.InvokeInlineAsync(flushing the outbox before the response), and returnEnvelope.Response. Handler failures / missing handlers come back as aFailureAcknowledgementreply.MessageTracking.MessageSucceededfires on every success path so tracked sessions quiesce.Tests
inline_request_reply_grpc— happy path asserts the reply is read off the gRPC response slot (sender has no reply listener, so a pass proves the inline path); failure path asserts a handler throw surfaces asWolverineRequestReplyException.GrpcTransportCompliance.can_request_replypasses unchanged against the inline path.dotnet build wolverine.slnx -c Releaseclean.🤖 Generated with Claude Code