Skip to content

Add opt-in client header codec processing - #1700

Closed
Sushisource wants to merge 2 commits into
mainfrom
normalize-header-conversion
Closed

Sushisource wants to merge 2 commits into
mainfrom
normalize-header-conversion

Conversation

@Sushisource

@Sushisource Sushisource commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • Add default-off client header codec processing through DataConverter::with_encode_headers(true), including the default identity codec.
  • Apply only the codec stage to serialized headers across high-level client operations, preserving contexts, interceptor ordering, request reuse, and caller-owned payloads. Existing worker header processing stays unconditional.
  • Preserve retained schedule definitions as wire data while decoding the rest of schedule descriptions, avoiding decoded action headers/arguments/memo being resent unchanged.
  • Add focused coverage, public documentation, and changelog fragments.

Breaking changes: None; existing constructor signatures and client defaults are preserved.
Server PR: Not required.

Why?

Part of temporalio/features#850: make user-set headers capable of consistent converter-plus-codec processing without breaking existing applications. Payload-valued headers must already be serialized; this option must not serialize the Payload object again.

Checklist

  1. Related issue: Normalize Header Data Conversion across languages features#850 (this PR does not close the cross-SDK issue).
  2. How was this tested:
    • Header codec policy, contexts, cardinality/errors, and non-mutation with default and custom converters.
    • Captured client requests verify interceptor headers are encoded once and reused unchanged across retries.
    • Schedule regressions preserve encoded definitions while decoding response metadata.
  3. Any docs updates needed? Public API/migration documentation and Rust changelog fragments are included. Remove manual header codec processing before opting in, and ensure decoders support existing histories.

@Sushisource
Sushisource force-pushed the normalize-header-conversion branch from 3c3063f to 57d845c Compare October 26, 2026 22:13
@Sushisource
Sushisource force-pushed the normalize-header-conversion branch from 57d845c to 159efee Compare October 29, 2026 23:04
@Sushisource

Copy link
Copy Markdown
Member Author

Closing this after iterating more on Go/Java. Since Rust expects users to pass complete Payloads already, they should already be encoded when passed to the client, and already converted when used in workflow commands (and then they are already encoded after that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant