Skip to content

[Brook] Added Link Records and the client Link Follower. - #321

Closed
moetemp wants to merge 12 commits into
moe/brook/v2/h10-sdk-streamsfrom
moe/brook/v2/h11-links
Closed

moetemp wants to merge 12 commits into
moe/brook/v2/h10-sdk-streamsfrom
moe/brook/v2/h11-links

Conversation

@moetemp

@moetemp moetemp commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR adds Link Records and the client Link Follower to Brook. A Workflow producer and a StreamProducer write an OPEN with link() and a JOIN with join(). StreamHandle.follow() and ActivityStreamHandle.follow() read a stream and the streams its links open in one order, with max_depth=4 and max_open=16 by default. Link reports come as OPENED, DONE, UNAVAILABLE and SKIPPED items, and the last item of each batch carries a FollowPosition. A link names a Workflow's stream only, and any other ref raises ValueError. append also takes StreamLink items next to plain values, so an event and its link land as one batch with one dedupe identity.

The bridge pins sdk-streams ss5 (moetemp/sdk-streams#16). The protos and the bridge client are regenerated from it, and StreamReference comes from the crate's API copy, as in Jetty. The names and signatures match Jetty's, so the Jetty layers keep their code.

Why?

An agent can link a child's stream in place of copying its records, and a client still gets one ordered view. The harness needs this to drop its client-side stream merge.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

The stream reference protos come from the crate's API copy, so a stored link has the same types here as in Jetty.
A producer links a child Workflow's stream with link and join, and follow() reads a stream and the streams it links in one order. Only Workflow-owned streams are link targets.
@moetemp moetemp changed the title Added Link Records and the client Link Follower to Brook. [Brook] Added Link Records and the client Link Follower. Oct 20, 2026
@moetemp

moetemp commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

Link Records are paused after the 2026-10-19 SDK review. Replaced by the Brook v3 stack, #322 to #338.

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