Surface every bus-forwarding RPC kind in the gRPC endpoint manifest (GH-3265)#3266
Merged
jeremydmiller merged 1 commit intoJun 27, 2026
Merged
Conversation
…t manifest (GH-3265) The IGrpcEndpointManifest (GH-3235) only surfaced unary proto-first/code-first endpoints. But server-streaming and bidirectional-streaming RPCs also forward their request to the message bus via IMessageBus.StreamAsync, so they are equally valid PublisherKind.GrpcEndpoint origins for CritterWatch's event model. Extend the manifest to surface every RPC kind Wolverine actually forwards to the bus, and add a GrpcRpcStreamKind discriminator (Unary / ServerStreaming / BidirectionalStreaming) to GrpcEndpointDescriptor so consumers can render the right cardinality. For bidirectional RPCs the published message is the per-item element type of the inbound request stream (unwrapped from IAsyncStreamReader<T>), not the reader wrapper. Hand-written and direct-mapped services remain excluded by design: Wolverine delegates those to the user's own implementation rather than forwarding to the bus, so there is no reliable message-publishing origin to surface. This resolves the "or decide it's N/A" half of GH-3265 for those two modes. Adds comprehensive coverage across every supported gRPC configuration: proto-first unary/server-streaming/bidirectional, code-first unary/server-streaming, and the hand-written/direct-mapped exclusions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ArieGato
pushed a commit
to ArieGato/wolverine
that referenced
this pull request
Jun 28, 2026
…iptor source (JasperFxGH-3267) The gRPC endpoint manifest (JasperFxGH-3266) lived only inside Wolverine.Grpc and never reached the ServiceCapabilities capability path, so a monitoring console (CritterWatch) had no way to discover the gRPC services a Wolverine app exposes the way it discovers HTTP chains (IHttpGraphUsageSource) and ASP.NET endpoints (IAspNetEndpointDescriptorSource). This adds the parallel descriptor/source plumbing for gRPC: - GrpcRpcDescriptor : OptionsDescription (Wolverine core, next to ServiceCapabilities) carrying per-RPC service name, method, RPC kind, the published/request message type, response type, and the forwarding origin (all types as serializable TypeDescriptors). - IGrpcEndpointDescriptorSource — discovery source mirroring IAspNetEndpointDescriptorSource; registered in DI by Wolverine.Grpc, projecting the runtime IGrpcEndpointManifest into descriptors. - ServiceCapabilities.GrpcEndpoints + readGrpcEndpoints, folding every registered source into the snapshot ordered by service::method (mirrors AspNetEndpoints). The descriptor lives in Wolverine core rather than JasperFx.Descriptors: ServiceCapabilities is itself a Wolverine-core type and CritterWatch already references WolverineFx, so a core-resident descriptor is equally consumable without a coordinated JasperFx release. Hand-written and direct-mapped services stay excluded (inherited from the manifest) — they delegate to user code and have no message-publishing origin. Adds coverage across every supported configuration: proto-first unary/server-streaming/bidirectional and code-first unary/server-streaming through both the raw source and the end-to-end ServiceCapabilities.ReadFrom path, plus the no-gRPC (empty, no source registered) case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 29, 2026
Open
This was referenced Jul 9, 2026
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 #3265.
Summary
IGrpcEndpointManifest(#3235) exposed Wolverine's discovered gRPC endpoint → message-type mapping so CritterWatch can populatePublisherKind.GrpcEndpoint, but it surfaced only unary proto-first/code-first endpoints. Server-streaming and bidirectional-streaming RPCs also forward their request to the message bus (viaIMessageBus.StreamAsync), so they are equally valid message-publishing origins — they were invisible.This PR completes #3265:
GrpcRpcStreamKinddiscriminator (Unary/ServerStreaming/BidirectionalStreaming) toGrpcEndpointDescriptorso consumers can render the right cardinality on a chain-detail page.IAsyncStreamReader<T>), not the reader wrapper — each item is forwarded individually viaStreamAsync.The "or decide it's N/A" half
Hand-written and direct-mapped services remain excluded by design: Wolverine delegates those to the user's own service implementation rather than forwarding to the bus, so there is no reliable message-publishing origin to surface. The decision is now encoded in code, docs, and tests rather than left implicit.
Test coverage
Comprehensive coverage across every supported gRPC configuration (
grpc_endpoint_manifest_3265.cs):SayHello,SayGoodbye,Fault)StreamGreetings)Echo)Greet)StreamGreetings)IAsyncEnumerable<T>element responsePlus manifest-wide invariants (every descriptor carries a request message, a known stream kind, and a bus-forwarding discovery mode). The pre-existing #3235 test was updated where it previously asserted streaming was excluded.
Wolverine.Grpc.Tests— 236/236 passing locally (net9.0).🤖 Generated with Claude Code