Skip to content

Nest native Workflow Streams under their owner - #94

Closed
moetemp wants to merge 2 commits into
moe/jetty/v2/t5-close-with-runfrom
moe/jetty/v2/t6-nested-stream
Closed

moetemp wants to merge 2 commits into
moe/jetty/v2/t5-close-with-runfrom
moe/jetty/v2/t6-nested-stream

Conversation

@moetemp

@moetemp moetemp commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

This PR stores a Workflow-owned Stream as a child of its owning CHASM Workflow. Standalone Streams keep their own execution.

This layer belongs to the frozen Jetty server prototype. The active Streams contract has no close operation and does not require a server change.

Current Streams design and project plan.

Reviewer's guide

Review this as a frozen prototype. The active Streams API uses a separate contract.

  1. Start with chasm/lib/stream/host.go and chasm/lib/workflow/workflow.go. Check routing to the first run and transaction boundaries for nested Streams.
  2. Read the chain-retention and nested-wake cases in tests/stream_test.go. Later runs must still find Records stored under the first run.

An append and the wake of its readers commit in the Workflow's transaction (S107). Close-with-run follows the chain's final close through a same-shard task, so the owner poll goes.
The first run outlives its retention while its Streams live, Retention and the size cap drop no Record while the chain is open, and an append past the caps fails with stream_too_large.
@moetemp moetemp changed the title [Jetty] Nested Workflow Streams in the Workflow component. Nest native Workflow Streams under their owner Nov 27, 2026
@moetemp moetemp closed this Nov 28, 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