Skip to content

[wip] Introduce combinators#13

Open
igalshilman wants to merge 3 commits into
mainfrom
combinators
Open

[wip] Introduce combinators#13
igalshilman wants to merge 3 commits into
mainfrom
combinators

Conversation

@igalshilman
Copy link
Copy Markdown
Contributor

blocked on the 1.7 (protocol v7) release

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Test Results

  8 files  ±0    8 suites  ±0   3m 50s ⏱️ - 1m 4s
 49 tests ±0   49 ✅ ±0  0 💤 ±0  0 ❌ ±0 
216 runs  ±0  216 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 85a5768. ± Comparison against base commit 582f43e.

♻️ This comment has been updated with latest results.

- Restate.all/race/any/all_settled now return a CombinedFuture instead of
  blocking. The future carries a tree shape (variant + children) that the
  shared-core uses for cooperative-suspension decisions and that composes
  naturally — e.g. Restate.race(Restate.all(a, b), c).await.
- CombinedFuture caches both values and TerminalErrors. The all-succeeded
  variant scans settled children to surface short-circuit failures so it
  doesn't block awaiting children still in flight after one fails.
- Moved Server::Context#wait_combined above the private boundary so
  CombinedFuture can drive it via @ctx.
- Bumped maxProtocolVersion 6 → 7 (wire bits already pass through the
  native ext; v7 will activate once the runtime negotiates it).
- Interpreter, harness specs, example, RBS and docs updated to .await.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread ext/restate_internal/src/lib.rs Outdated
Comment thread ext/restate_internal/src/lib.rs Outdated
Comment on lines +482 to +483
// [:unknown, [child, ...]] → unknown combinator
fn do_await(&self, future_value: Value) -> Result<Value, Error> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why now you have do_await and do_progress? :D either one or the other

do_progress was a thin wrapper that built a FirstCompleted tree from a flat
handle list and called the same shared-core entry point. Keep only do_await
on both sides of the FFI; Server::Context#poll_or_cancel builds the tree
itself before delegating to wait_combined. Single source of truth, ~57
fewer lines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants