Skip to content

Vendored the stream api and added the DeliverStreamRecords job. - #19

Open
moedash wants to merge 2 commits into
moe/AI-198-if-core-record-envelopefrom
moe/AI-198-st-core-1-protos
Open

moedash wants to merge 2 commits into
moe/AI-198-if-core-record-envelopefrom
moe/AI-198-st-core-1-protos

Conversation

@moedash

@moedash moedash commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR brings the native stream api into Core and adds the job that hands a workflow a consumed stream range.

What changed?

  • The vendored api tree gets the rest of the stream api from Added the native stream protos. api#5: StreamSlice, StreamRange, StreamStartPosition, the subscribe and append commands and events, consumed_stream_ranges on the Workflow Task completed event and stream_slices on the poll response.
  • The protos crate's type maps name the two new commands and events. Neither event is ignorable. The stream package gets its serde derives and its module.
  • StreamRecord.body and .metadata aren't checked against the blob limit. Records never reach an event, and the server bounds a batch by message count instead.
  • DeliverStreamRecords is a new activation job. The Rust SDK and the Rust workflow runtime have no stream API, so they fail the activation instead of ignoring it.

Part of AI-198 (epic AI-37).

Why?

Core can only decode the stream fields on a poll response or a completed event once its vendored api carries them. The job comes first so the machines and the delivery can build on it in the next two PRs. Failing in the Rust SDKs is on purpose: the server has recorded the range as consumed and won't send it again, so dropping it would lose data without a trace. There are no commands here yet, so nothing can subscribe through this PR alone.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

The workspace builds, cargo lint, cargo test-lint and cargo fmt --check are clean, and both commits build. The protos, common, client, SDK, workflow and Core unit tests pass. The vendored files are byte-identical to the api PR.

Core decodes the stream commands, events, slices and consumed ranges only when its vendored api carries them. The type maps in the protos crate name the two new commands and events, which are not ignorable.
A consumed stream range reaches lang as its own job. The Rust SDKs have no stream API yet, so they fail the activation rather than drop records the server will not send again.
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