MailboxRPC 7/7: end-to-end behavior tests - #91
Conversation
Summary of ChangesHello @bhandras, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the robustness of the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds two important end-to-end behavioral tests for the RPC-over-mailbox client. The first test, TestClient_ConcurrentResponsesSurviveRestart, correctly verifies that concurrent in-flight responses are persisted and can be retrieved after a client restart. The second test, TestClient_CursorPersistenceIsMonotonic, ensures that the cursor used for pulling messages is always updated monotonically. The tests are well-written and cover their intended functionality thoroughly. I have one suggestion to improve the robustness of a test.
3b8e28a to
0d65873
Compare
0bc97d2 to
f43028a
Compare
0d65873 to
fc91f22
Compare
f43028a to
44e85a8
Compare
fc91f22 to
e51553c
Compare
47737d1 to
a683047
Compare
e51553c to
6fcf2ea
Compare
a683047 to
d1b256d
Compare
6fcf2ea to
3d5610d
Compare
d1b256d to
2a367f6
Compare
3d5610d to
8261f1d
Compare
2a367f6 to
800d01a
Compare
|
@codex review pls |
|
To use Codex here, create a Codex account and connect to github. |
|
@bhandras, remember to re-request review from reviewers when ready |
5e4c822 to
895cb7d
Compare
|
@claude review this |
|
Claude finished @Roasbeef's task in 4m 31s —— View job Code Review
Overall this is a clean PR — the layering between Bug:
|
897b583 to
2c7abe0
Compare
744bf65 to
44e0502
Compare
2c7abe0 to
2f98ea1
Compare
2f98ea1 to
1191a21
Compare
|
@claude review this |
|
Claude finished @Roasbeef's task in 4m 49s —— View job Code Review
The layering is well thought out — Bug:
|
1191a21 to
4e2c202
Compare
44e0502 to
d8b972e
Compare
|
@claude review this |
|
Claude finished @Roasbeef's task in 3m 20s —— View job Code Review
This is a well-structured PR — the layering between Bug:
|
4e2c202 to
ab4a5c5
Compare
c573fc3 to
2b19f47
Compare
ab4a5c5 to
e60c18a
Compare
…port Add EncodeErrorHeaders and DecodeErrorHeaders for round-tripping gRPC status errors through mailbox envelope headers using base64-encoded google.rpc.Status protobufs. The canonical header key is mailboxrpc.grpc_status_b64. This enables the unary facade to propagate typed gRPC errors across the mailbox transport without requiring a dedicated error envelope kind. The encoder preserves existing gRPC status codes and falls back to codes.Unknown for plain errors. Includes comprehensive test coverage for nil input, round-trip for various gRPC codes, empty/absent headers, and malformed payloads. NEWMSG "$@"
This commit introduces the actor-aware event routing layer for inbound server push events. EventRouter maps (service, method) envelope keys to typed durable actor mailboxes via ServiceKey, complementing the existing EventMux in mailbox/rpc which uses plain function callbacks. InboundServerMessage is added to actor.go as the symmetric counterpart to ServerMessage.ToProto, completing the bidirectional proto<->actor message conversion pair. Types implementing InboundServerMessage can use the NewEventRoute convenience helper to avoid boilerplate Adapt closures. Key additions: - InboundServerMessage interface with FromProto(proto.Message) error - InboundActorMessage constraint combining actor.Message + InboundServerMessage - EventRouteConfig[M, R] for fully customizable route registration - AddRoute[M, R] generic function (package-level, Go disallows method type params) - NewEventRoute[M InboundActorMessage, R any] convenience wrapper - DispatcherMap type alias for ConnectorConfig.Dispatchers compatibility
Add a purpose-built protobuf definition for the e2e integration tests in serverconn/testdata/hello.proto. The HelloService defines two unary RPCs (SayHello, SayGoodbye) for testing the UnaryFacade round-trip, plus three event messages for exercising server push and client fire-and-forget dispatch: - JoinGreetingRequest: client-to-server KIND_EVENT via DurableActor - HelloStartedEvent: server-to-client push via EventRouter - HelloFinalizedEvent: server-to-client push with multi-field payload Generated Go stubs live in serverconn/hellotestpb/ and include both the standard protoc output and the protoc-gen-mailboxrpc typed client and server wrappers (HelloServiceMailboxClient, RegisterHelloServiceMailboxServer).
e60c18a to
afa0465
Compare
|
@claude review this |
|
Claude finished @Roasbeef's task in 3m 32s —— View job Code Review
All previously flagged issues have been addressed. Here's the current state: Previously flagged — now resolvedAll items from the prior reviews are fixed:
Minor:
|
afa0465 to
74f8b76
Compare
|
@claude review this |
|
Claude finished @Roasbeef's task in 2m 34s —— View job Code Review
All issues from the three prior reviews have been addressed. Here's the current state: Resolved since last reviewThe one remaining item flagged in the third review has been fixed:
All prior issues — confirmed resolved
Observation:
|
74f8b76 to
2902009
Compare
Add four end-to-end integration tests that exercise the full mailbox transport stack through a real DurableActor with in-memory durability. Each test stands up a testServer that simulates server-side behavior using the same inMemoryMailbox transport, and wires up EventRouter for inbound push events alongside the UnaryFacade for request/response. Test coverage: - TestE2E_UnaryRPC: round-trips SayHello and SayGoodbye through the UnaryFacade, verifying KIND_REQUEST/KIND_RESPONSE envelope pairs flow correctly through Send/Pull/AckUpTo. - TestE2E_ServerPushEvent: registers a HelloStartedEvent route via EventRouter backed by a greetingBehavior actor, then pushes an event from the server and verifies the actor receives the correctly deserialized message through its durable mailbox. - TestE2E_ClientFireAndForget: sends a JoinGreetingRequest as a KIND_EVENT through the DurableActor's egress path (TLV type 2000), verifying the server receives the envelope with the correct service and method metadata. - TestE2E_UnaryAndPush: combines unary RPC and server push in a single session, verifying both dispatch paths coexist without interference on a shared transport.
AwaitRPC was not calling DecodeErrorHeaders on the response envelope before attempting to unmarshal the body. When the server returned a gRPC error, the body contained an empty anypb.Any rather than a populated response. The proto unmarshal of empty bytes succeeded silently, yielding a zero-value response and nil error — swallowing the server-side failure completely. Insert a DecodeErrorHeaders check immediately after the nil body guard so server-side gRPC errors are surfaced to callers as proper status errors.
2902009 to
8015a34
Compare
Summary
Adds end-to-end behavioral tests for the MailboxRPC client stack.
Covers:
Motivation
These tests make the expected durability semantics explicit and help prevent
regressions as we introduce additional mailboxrpc payload types and client-side
storage backends.
Stack order
References