Skip to content

Add opt-in worker header codec processing - #2579

Open
Sushisource wants to merge 5 commits into
mainfrom
normalize-header-conversion
Open

Sushisource wants to merge 5 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 WorkerOptions.codecHeaders to decode incoming Workflow/Activity headers and encode headers emitted by Workflows, including tracing headers and nested System Nexus payload headers.
  • Leave client-supplied Payload headers wire-ready. There is no converter-wide or client header-encoding option, and no client/schedule/converter source changes in this PR.
  • Add focused boundary tests, worker documentation, and a changelog fragment.

Breaking changes: None; existing worker header behavior is the default.
Server PR: Not required.

Why?

A .NET client with a codec can write an encoded tracing header that the TS worker's OpenTelemetry interceptor cannot read because worker header decoding is skipped. This worker-only option fixes that boundary without double-encoding user-provided client Payloads.

Checklist

  1. Related issues: [Feature Request] Run headers through codec #514 and Normalize Header Data Conversion across languages features#850.
  2. How was this tested:
    • Cross-language evidence: features regression and driver, commit 5f040bd. Real .NET 1.21.1 → this TS implementation passes with codecHeaders: true: encoded _tracer-data verified in history, input/result round-trip, caller trace identity preserved, and no failed Workflow Tasks. No temporary SDK patch or decoding interceptor workaround was used. TS 1.25.0 reproduces Unknown encoding: binary/encrypted with the same feature.
    • 41 focused tests passed: workflow header opt-in/out, activity ingress, nested System Nexus headers, and wire-ready client headers across starts, retained schedules, and update-with-start retries.
    • Worker/dependency build, focused test compilation, formatting, and changelog validation passed. ESLint reported no errors and three warnings in unchanged client code.
    • The full test-package build remains blocked by OpenTelemetry dependency-type conflicts in tracing test files under unlocked dependency resolution; full suites and remote CI were not verified. The pre-existing local lockfile edit was not changed or committed.
  3. Any docs updates needed? Worker README, API comments, and changelog included. Client headers should already contain any codec encoding; workflow-produced headers are encoded by the worker only when this option is enabled.

@Sushisource
Sushisource force-pushed the normalize-header-conversion branch from 1077a6a to f00fc8f Compare October 26, 2026 22:20
@Sushisource Sushisource changed the title feat: add opt-in header codec processing Add opt-in worker header codec processing Oct 30, 2026
@Sushisource
Sushisource marked this pull request as ready for review October 31, 2026 00:02
@Sushisource
Sushisource requested a review from a team as a code owner October 31, 2026 00:02

This branch has not been deployed

No deployments
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