fix(sdk): 💥 serialize unit as no payloads or null payload#1181
Merged
chris-olszewski merged 1 commit intomasterfrom Mar 25, 2026
Merged
fix(sdk): 💥 serialize unit as no payloads or null payload#1181chris-olszewski merged 1 commit intomasterfrom
chris-olszewski merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review.
Tip: disable this comment in your organization's Code Review settings.
Member
Author
|
@claude review |
Sushisource
approved these changes
Mar 25, 2026
| val: &T, | ||
| ) -> Result<Payload, PayloadConversionError> { | ||
| // If a single payload is explicitly needed for `()`, then produce a null payload | ||
| if std::any::TypeId::of::<T>() == std::any::TypeId::of::<()>() { |
Member
There was a problem hiding this comment.
Wow you gotta have eagle eyes to read this line lol
This was referenced Apr 3, 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.
What was changed
Update Rust SDK to:
()as an empty payload vec for input e.g. starting workflow, signals, etc()as a newbinary/nullencoded payload for places that expect exactly one output e.g. workflow/handler responsesWhy?
This brings us in line with other SDKs for how requests with no input/args are represented on the wire.
Previously we relied on the
serde_jsonserialization of()so we would produce ajson/plainencodednullpayload. Now we match other SDKs of emitting no payloads in this scenario or a specially markedbinary/nullpayload when exactly one payload is expected.Checklist
Closes N/A
How was this tested:
Additional unit tests that specifically verify
()to payload round trip. Existing integration tests.Any docs updates needed?
N/A