Skip to content

feat: support Go Nexus serialization contexts - #206

Draft
dplyukhin wants to merge 9 commits into
go-transfer-typesfrom
go-serialization-contexts
Draft

dplyukhin wants to merge 9 commits into
go-transfer-typesfrom
go-serialization-contexts

Conversation

@dplyukhin

@dplyukhin dplyukhin commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Depends on temporalio/sdk-go#2721. The registry-based Go output requires the SDK APIs in that PR; the currently pinned transfer-types SDK revision is insufficient.

The registry rewrite emits system-operation metadata keyed by service and operation wire names and registers it with the Go SDK. The SDK selects the serialization context after outbound interceptors and owns the conversion scope, covering native-model calls that bypass generated wrappers. Generated code no longer injects context values or attaches serialization-policy methods to request models; operations sharing a model can have different policies.

This matches Python’s ownership boundary, not full system-payload parity. Go captures a selection once and keeps its existing Nexus envelope encoding; Python-style system-envelope marking and codec traversal remain out of scope. Raw protobuf inputs retain their existing behavior, and future-wrapping interceptors must explicitly forward the optional context carrier for eager result adapters.

Validation: 83 Go generator tests, selected Rust suites, Go sample race tests and vet, and reproducible Go generation passed. Full cargo validate remains blocked by TypeScript dependencies missing nexus-rpc.TransferTypeConverter, @temporalio/common.createPayloadValidationError, and OperationOptions.inputType.

The registry rewrite was pushed with explicit authorization to override the full-validation requirement for the known TypeScript dependency failures.

@dplyukhin
dplyukhin force-pushed the go-serialization-contexts branch from 78e7eb0 to d8815a2 Compare October 7, 2026 20:25

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