Skip to content

Shared core 8.7.1: a cancellation resumes a suspended invocation - #317

Merged
igalshilman merged 2 commits into
mainfrom
claude/shared-core-cancel-wake
Nov 17, 2026
Merged

igalshilman merged 2 commits into
mainfrom
claude/shared-core-cancel-wake

Conversation

@igalshilman

@igalshilman igalshilman commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

restate-sdk-shared-core 8.7.1, from crates.io. It is 8.7.0 plus sdk-shared-core#120. The first commit pinned shared-core's main at that commit as a git dependency; the second replaces the pin with the release.

What changes for a handler

Cancelling a session object's invocation that Restate shut down while it waits for a call now starts its next attempt, which is given the cancellation. On 8.7.0 it took effect only when the call answered, and never if it did not: an agent's stop answered 200 and left a turn that waits on an approval suspended. This was the regression from the journal-replay path that #316 recorded as not fixed.

In this PR

  • Cargo.toml: version 8.7.1, with the same features. In Cargo.lock only that package changes, from crates.io, with its checksum.
  • The four server tests that showed the gap lose their strict expected-failure markers (tests/sessions_suspended_server.py, tests/agents_suspended_stop_server.py). They pass.

The TypeScript side is sdk-sessions#42.

Run locally, on 8.7.1

  • 504 fast tests pass.
  • Against a local Restate 1.8.0: the four suspension tests pass.
  • On the git pin (the same code), the linters and the other server suites passed too.

To know

  • The callee is left running. A cancelled caller ends while the callee it was waiting on stays suspended, uncancelled (seen in the TypeScript runs of the same scenario). On 8.7.0 this could not be seen, since the caller never ended. Cancelling calls made by earlier attempts is not changed here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RePHkSS8KRKmJ93hcd9asV

… invocation

restate-sdk-shared-core now points at main at the commit of sdk-shared-core#120, which
makes a cancellation resume an invocation that Restate shut down while it waits for a call.
The fix is merged but not in a crates.io release yet, so this is a git dependency until
the next release.

The four server tests that showed the gap lose their expected-failure markers, because
they pass.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RePHkSS8KRKmJ93hcd9asV

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Reviewed changes

I reviewed the switch to a git-pinned shared core and the removal of the four xfail markers. I checked the pinned source against the 8.7.0 crate.

  • Shared-core pin: restate-sdk-shared-core is now a git dependency at b15c972, with the same features. Cargo.lock changes only that package's source. cargo metadata --locked and cargo check --locked both pass, and b15c972 is currently identical to sdk-shared-core main.
  • What the pin changes: the published 8.7.0 crate matches the old lock checksum. Its src/ differs from b15c972 only in explicit_recovery. In HitShutdown, the suspension now awaits CANCEL_SIGNAL_ID unless context.cancelled is set, and the module docs explain why. That is the behavior the un-xfailed tests check: resume on cancel, and no repeated resumes once the attempt knows about the cancellation.
  • Tests: the NEEDS_SHARED_CORE strict xfail is removed from agents_suspended_stop_server.py (1 test) and sessions_suspended_server.py (3 tests). No other references to it remain, and no docs in this repo describe the old gap.

ℹ️ The git pin should not ship in a release

release.yml builds an sdist. While the dependency is a git rev, anyone building from that sdist would fetch shared-core from GitHub instead of crates.io. It would be best to switch back to a crates.io version before the next v* tag.

Technical details
# Git-pinned shared-core in release artifacts

## Affected sites
- Cargo.toml:24-26 — `restate-sdk-shared-core = { git = ..., rev = "b15c972..." }`
- .github/workflows/release.yml:124-137 — `sdist` job

## Required outcome
- Before tagging a release, pin `restate-sdk-shared-core` to a crates.io version that contains sdk-shared-core#120.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Test Results

  8 files  ±0    8 suites  ±0   3m 39s ⏱️ -19s
 71 tests ±0   71 ✅ ±0  0 💤 ±0  0 ❌ ±0 
322 runs  ±0  322 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 76a9aee. ± Comparison against base commit c16e4ed.

♻️ This comment has been updated with latest results.

8.7.1 is released with restatedev/sdk-shared-core#120, so the extension
takes it as an ordinary version again instead of the git revision of main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RePHkSS8KRKmJ93hcd9asV
@igalshilman igalshilman changed the title Shared core at the commit that lets a cancellation resume a suspended invocation Shared core 8.7.1: a cancellation resumes a suspended invocation Nov 17, 2026

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found. This resolves the earlier note about the git pin.

Reviewed changes

I reviewed the switch from the git pin to the published 8.7.1 crate, and checked that the release contains the same code that was pinned before.

  • Shared core 8.7.1 from crates.io: Cargo.toml now asks for version = "8.7.1" with the same features. In Cargo.lock, only that package's version and checksum change. The .crate I downloaded hashes to the locked ed583844…, and cargo metadata --locked passes.
  • Same code as the pin: the crate's .cargo_vcs_info.json names b7765f5f. That commit is one commit ahead of the old pin b15c972, and that commit is the release bump, which changes only Cargo.toml. diff -r finds no differences in src/ between the pin and the 8.7.1 crate. So the test results reported against the pin still hold.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@igalshilman
igalshilman merged commit e4acac3 into main Nov 17, 2026
12 checks passed
@igalshilman
igalshilman deleted the claude/shared-core-cancel-wake branch November 17, 2026 14:00
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants