add support for Temporal PayloadCodec#328
Merged
declan-scale merged 7 commits intomainfrom Apr 21, 2026
Merged
Conversation
eberki-scale
commented
Apr 20, 2026
Contributor
Author
|
@declan-scale thank you for the review! added the tests. |
declan-scale
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greptile Summary
This PR adds opt-in
PayloadCodecsupport throughout the Temporal integration layer — fromTemporalACPConfigandFastACP.createdown toTemporalClient,TemporalACP, andAgentexWorker— so callers can plug in encryption or compression codecs at both the ACP (client) and worker sides. The previous concern about silent codec dropping whenOpenAIAgentsPluginis present is resolved by promoting it to an explicitValueErroron both paths.Confidence Score: 5/5
Safe to merge; all remaining findings are P2 style suggestions.
The core behavioral change (explicit ValueError instead of silent drop) directly addresses the previous review concern. Codec propagation is consistent across client and worker paths and is well-covered by the new test suite. The only open item is a P2 inconsistency in TemporalACPConfig where payload_codec lacks the same @field_validator guard applied to plugins and interceptors.
src/agentex/lib/types/fastacp.py —
payload_codecfield lacks runtime type validation.Important Files Changed
payload_codecparameter to__init__,create, and_get_temporal_client; correctly stored and propagated toget_temporal_client.payload_codectoget_temporal_client; raisesValueErrorwhen both OpenAI plugin and codec are present; attaches codec viadataclasses.replacewhen provided.payload_codectoAgentexWorkerand itsget_temporal_clienthelper; same guard against OpenAI plugin conflict as the client-side utility.payload_codecfield toTemporalACP.__init__andcreate; forwarded toTemporalClient.createin the lifespan function.payload_codecforwarding fromTemporalACPConfigtoTemporalACP.createvia thehasattrpattern consistent with other fields.payload_codec: Anyfield toTemporalACPConfigwith documentation, but lacks a@field_validatorunlikepluginsandinterceptors.AgentexWorker,TemporalACP, andFastACPconfig forwarding.Sequence Diagram
sequenceDiagram participant User participant FastACP participant TemporalACP participant TemporalClient participant get_temporal_client participant Temporal User->>FastACP: create("async", config=TemporalACPConfig(payload_codec=codec)) FastACP->>TemporalACP: create(temporal_address, plugins, interceptors, payload_codec) Note over TemporalACP: stores _payload_codec Note over TemporalACP: lifespan startup TemporalACP->>TemporalClient: create(temporal_address, plugins, payload_codec) TemporalClient->>get_temporal_client: get_temporal_client(..., payload_codec) alt has_openai_plugin AND payload_codec is not None get_temporal_client-->>User: raise ValueError else no conflict get_temporal_client->>get_temporal_client: dataclasses.replace(data_converter, payload_codec=codec) get_temporal_client->>Temporal: Client.connect(data_converter=patched_converter) Temporal-->>get_temporal_client: client end get_temporal_client-->>TemporalClient: client TemporalClient-->>TemporalACP: TemporalClient instance User->>AgentexWorker: AgentexWorker(payload_codec=codec) AgentexWorker->>get_temporal_client: get_temporal_client(..., payload_codec) get_temporal_client->>Temporal: Client.connect(data_converter=patched_converter)Prompt To Fix All With AI
Reviews (3): Last reviewed commit: "add override annotations to codec and pl..." | Re-trigger Greptile