Skip to content

[Brook] Reached Core's stream store from Python. - #149

Closed
moetemp wants to merge 5 commits into
mainfrom
moe/brook/v2/p1-core-stream-store
Closed

moetemp wants to merge 5 commits into
mainfrom
moe/brook/v2/p1-core-stream-store

Conversation

@moetemp

@moetemp moetemp commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR pins Core to the in-process stream service and reaches it from Python through a generated stub.

  • temporalio/bridge/sdk-core points at the Brook v2 Core top 70f5d3e3 (c5c). It has the streams crate with its Redis and memory stores and the StreamService, including RetireProducer, the 16 KiB read state and the owner check per owner, and no output commit or staging. The generated protos and Core's changelog fragments follow the pin.
  • temporalio/bridge/src/streams.rs is about 60 lines of pyo3. Each connect_stream_store call builds a store from a serialized StreamStoreConfig on the client's connection.
  • scripts/gen_bridge_client.py generates a typed StreamService into streams_generated.py, so no stream call is hand-written. A failed call raises StreamCallFailure with the parsed StreamFailure.
  • The bridge Worker takes no store here. Handing a store to Core's Worker is Ford's, with the Workflow Task publish.

Why?

The store runtime lives in Core now, so every Core-based SDK binds one copy of it (DD-86). Lang reaches it through one generated stub and one call (DD-88).

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

tests/bridge/test_stream_store.py runs on the dev server with Core's memory store.

Core now keeps one entry per producer in a read state of at most 16 KiB, and
caches the owner check per owner rather than per producer attempt.
Only comments and test names changed in Core since the last pin.
@moetemp

moetemp commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Combined into #239.

@moetemp moetemp closed this Oct 16, 2026
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