Skip to content

fix: always run headers through external storage regardless of encode_headers#1398

Open
thakoreh wants to merge 1 commit intotemporalio:mainfrom
thakoreh:fix/headers-always-external-storage
Open

fix: always run headers through external storage regardless of encode_headers#1398
thakoreh wants to merge 1 commit intotemporalio:mainfrom
thakoreh:fix/headers-always-external-storage

Conversation

@thakoreh
Copy link
Copy Markdown

Fixes #1395

The encode_headers/decode_headers flags were gating the entire payload transform pipeline for headers — including external storage store/retrieve and payload size validation. Headers could bypass external storage when encoding was disabled.

Split the concern: external storage and validation now always apply to headers. Codec encoding/decoding remains gated by the flag.

Changes:

  • bridge/worker.py: store/validate and retrieve passes always visit headers
  • client.py: _apply_headers always calls _transform_outbound_payload
  • worker/_activity.py: always calls _transform_inbound_payload for headers
  • converter/_data_converter.py: add encode/decode keyword params
  • Tests verify store/retrieve happens regardless of encode flag

…_headers

The encode_headers/decode_headers flags were gating the entire payload
transform pipeline for headers, including external storage store/retrieve
and payload size validation. This meant headers could bypass external
storage and size validation when encoding was disabled.

Split the concern: external storage and validation now always apply to
headers. Codec encoding/decoding remains gated by the flag.

Changes:
- bridge/worker.py: store/validate and retrieve passes always visit headers
- client.py: _apply_headers always calls _transform_outbound_payload
- worker/_activity.py: always calls _transform_inbound_payload for headers
- converter/_data_converter.py: add encode/decode keyword params to
  _transform_outbound_payload and _transform_inbound_payload
- tests: verify store/retrieve happens regardless of encode flag
@thakoreh thakoreh requested a review from a team as a code owner March 29, 2026 15:05
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.

[Bug] Headers should always run through external storage

1 participant