Describe the bug
Today it seems user metadata (and maybe other things) aren't encoded outbound. Not only must we make sure every non-search attribute payload is decoded on activation and encoded on completion, we must write a test to ensure this for all future payloads.
The ideal way forward here would be to write a general code generated payload visitor utility that everyone can use, even ourselves. We have done this in Go and Ruby. The visitor could be used for this. It would also help solve temporalio/features#468.