Skip to content

Added the native stream protos. - #5

Closed
moetemp wants to merge 1 commit into
moe/AI-198-if-api-1-record-envelopefrom
moe/AI-198-st-api-1-stream-protos
Closed

moetemp wants to merge 1 commit into
moe/AI-198-if-api-1-record-envelopefrom
moe/AI-198-st-api-1-stream-protos

Conversation

@moetemp

@moetemp moetemp commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR adds native server streams to the public API.

What changed?

  • StreamSlice, StreamRange and StreamStartPosition join the envelope in stream/v1.
  • AppendStreamRecords and SubscribeStream commands, each with its own History event. The appended event carries only the offset range.
  • PollWorkflowTaskQueueResponse.stream_slices carries the records a task consumes.
  • WorkflowTaskCompletedEventAttributes.consumed_stream_ranges records which offsets the task consumed.
  • Three workflow task failed causes: a bad append, a bad subscribe, and a consumed range the server can't serve anymore.
  • StreamRecord.body's comment now names the two paths where a payload codec reaches a record: the append command and the poll slices.
  • The new values take the numbers after the channel's.
  • openapi/ regenerated.

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

Why?

A Workflow that streams records today pushes each one through History, as Signals, Updates or activity results. History then grows with the data, not the work. Here the records live in a log the server keeps next to the Workflow. History only records offsets, so it grows with tasks, and replay reads the same records back by offset.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

make buf-lint and make api-linter are clean, with the inline exemptions for the "from" and "to" offset fields. make http-api-docs regenerates openapi/. The make go-grpc output builds and vets in a scratch module. The server, Core and Python PRs in the series run append, subscribe and replay end to end.

A Workflow appends to and subscribes to server-held streams with two
commands. Workflow Tasks carry the records out of band, and History keeps
only the offset ranges. The new values take the numbers after the channel's.
@moetemp

moetemp commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Paused per the 2026-10-05 design review (the decision record is on the proposal page, section 14). Resumes in phase 2 with the CHASM notification work. The branch stays as a pin.

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