Skip to content

feat: send client and Activity Stream calls to Stores - #2129

Draft
moetemp wants to merge 6 commits into
moe/streams-storesfrom
moe/streams-api
Draft

moetemp wants to merge 6 commits into
moe/streams-storesfrom
moe/streams-api

Conversation

@moetemp

@moetemp moetemp commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What was changed

This PR routes client and Activity Stream calls to Stores. Client gets create_stream
and get_stream. Client interceptors can intercept each Stream operation.
Core is pinned to the combined append and replay implementation in
#1882, with regenerated bridge bindings.

Why?

Retries must keep the request ID so the Store can recognize repeated writes.
Activity Producers need the scheduling event ID from
Core #1833.
This PR can merge before Core's Stream read support.

Reviewer's guide

Review after #2186.

  1. Check the Core pin, generated protos and payload visitor together.
  2. Read temporalio/client/_stream_store.py for Store selection, request checks and retry identity.
  3. Check Tim's operation-specific client hooks and their interceptor tests.
    Workflow appends and reads remain in #2187
    and #2188.

Checklist

  • Regenerate bridge protos, visitor and client at the Core pin.
  • Run Python lint and focused Stream tests.
  • Check Producer identity against a local server.

@moetemp
moetemp added this pull request to stack #2130 November 14, 2026 01:00
@moetemp
moetemp removed this pull request from stack #2130 November 15, 2026 08:27
@moetemp moetemp changed the title feat: add the Streams API, with Stream Stores on Redis and in memory feat: add the Streams API for Activity and client code, with Stores on Redis and in memory Nov 17, 2026
@moetemp
moetemp added this pull request to stack #2139 November 18, 2026 01:19
@moetemp moetemp changed the title feat: add the Streams API for Activity and client code, with Stores on Redis and in memory feat: add the Streams API for Activity and client code Nov 18, 2026
@moetemp moetemp changed the title feat: add the Streams API for Activity and client code feat: add the Streams API for client, Activity and Workflow code Nov 22, 2026
@moetemp
moetemp force-pushed the moe/streams-api branch 2 times, most recently from 4f48bab to 066b280 Compare November 22, 2026 03:31
@moetemp moetemp changed the title Add Stream Stores and Workflow Stream calls feat: add Stream Stores and Workflow Stream calls Dec 2, 2026
@moetemp
moetemp force-pushed the moe/streams-api branch 2 times, most recently from 0ca539c to e22f07e Compare December 2, 2026 20:30
@moetemp
moetemp force-pushed the moe/streams-api branch 2 times, most recently from 6f221ed to e7652a6 Compare December 2, 2026 22:46
@moetemp moetemp mentioned this pull request Dec 2, 2026
2 tasks done
@moetemp
moetemp changed the base branch from moe/streams-generated-code to moe/streams-stores December 2, 2026 22:46
@moetemp moetemp changed the title feat: add Stream Stores and Workflow Stream calls feat: send client and Activity Stream calls to Stores Dec 2, 2026
@moetemp
moetemp added this pull request to stack #2189 December 2, 2026 22:49
@moetemp
moetemp removed this pull request from stack #2189 December 3, 2026 09:00
@moetemp
moetemp added this pull request to stack #2202 December 3, 2026 09:00
moetemp and others added 6 commits December 3, 2026 03:13
This Core has the Workflow commands and activation jobs of Stream
appends and reads. A codec gets each Stream body alone and with no
serialization context, and the passes of external storage skip Stream
bodies, since any writer can make a body.
The client sends each system Nexus call of the generated Stream API to
the Store that its ref or the selector picks, with the codec and a
request id that interceptor retries keep. It checks each request with
the rules of SDK Core and the limits of the Stream config, so that
client and Workflow calls refuse the same requests. An Activity writes
as the Producer of its schedule, from the info that Core gives.
Each Stream operation of a client gets a typed hook on
`OutboundInterceptor`, so interceptors see Stream calls without the
generic Nexus chain. A hook that retries with the same input, or a copy,
keeps its request id, and a call with no result type gets the type of
its operation.
Keep Python on the reviewed Core stack and use its task completion
metadata for Local Activity identity during replay.
Workflow appends and replay share one state machine. Regenerate the
bridge bindings from the same Core revision used by the Worker.

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.

2 participants