Skip to content

[Brook] Added Link Records and Follow. - #16

Closed
moetemp wants to merge 16 commits into
moe/brook/ss4-core-testsfrom
moe/brook/ss5-links
Closed

moetemp wants to merge 16 commits into
moe/brook/ss4-core-testsfrom
moe/brook/ss5-links

Conversation

@moetemp

@moetemp moetemp commented Oct 19, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR adds Link Records and Follow to Brook. A producer writes a LINK record with a StreamLink that names a Workflow's stream. Follow reads a stream and the streams it links in one order, and its state resumes the follow. The crate copies only StreamReference and StreamOwnerKind from the stream API, at the paths Jetty uses, so a stored LINK has the same bytes in every stage. The Brook messages are a subset of Jetty's at the same field numbers. There is no FollowRange, no floor_holder, no subscriber and no close outcome on DONE. ReadResponse.start_cursor comes along, since a $end read cut at a gate reads again from it.

Why?

Moe moved Link Records and the client Link Follower from Jetty into Brook, so a client or an Activity gets one order across a stream and its links without a merge of its own.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

A stored LINK names its target with the Jetty API type, so its bytes stay the same in every stage.
A link names only a Workflow's stream here. The batch digest takes each link field, and a record with no link keeps its digest.
A client or an Activity gets one order across a stream and its links, and resumes from the answer's state.
The follow cases use a child and a grandchild Workflow, and every conformance lane reads a LINK back.
A late OPEN from an older attempt opened a segment again after its JOIN. The child's records then read twice, and the next turn had no gate.
A retry that writes the same OPEN again showed each child record twice, or the withdrawn child read on. Now the SUPERSEDED pauses the segment and the same OPEN resumes it at its cursor.
A resumed child could wait on a JOIN of a grandchild that the list had dropped first.
A resumed descendant could read a Stream that was open again, and a resume could pass max_open. The list also kept a parent after its descendants.
A failed resume opened the child from after, so its earlier Records showed twice. Now a top entry past the limit is skipped, and a descendant that can't come back stays ended and gives up its JOIN.
An entry under a descendant that stays ended was left with no way to resume. Descendants now come back in source number order.
@moetemp moetemp changed the title Added Link Records and Follow to Brook. [Brook] Added Link Records and Follow. 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, #17 to #24.

@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