From 0cd2c171a85a1e94f5c36b4f64988a40895f8bbd Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 11:05:40 +0000 Subject: [PATCH 1/2] Shared core at the commit that lets a cancellation resume a suspended 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 Claude-Session: https://claude.ai/code/session_01RePHkSS8KRKmJ93hcd9asV --- Cargo.lock | 3 +-- Cargo.toml | 4 +++- tests/agents_suspended_stop_server.py | 8 -------- tests/sessions_suspended_server.py | 10 ---------- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8cb629a..8dd88d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2491,8 +2491,7 @@ dependencies = [ [[package]] name = "restate-sdk-shared-core" version = "8.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f776d05ba074f66611aafd9f1b91373638bd9ed6e867a4b392463f5eb7281b0a" +source = "git+https://github.com/restatedev/sdk-shared-core?rev=b15c9724cde752ff6f563c815e6da7dbc26a55e5#b15c9724cde752ff6f563c815e6da7dbc26a55e5" dependencies = [ "base64 0.22.1", "bs58", diff --git a/Cargo.toml b/Cargo.toml index e50c6d9..a12afaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,9 @@ tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } # checkpoints may outgrow Restate into (RESTATE_SQL_OBJECT_STORE: S3, GCS, Azure, or a # directory); `tunnel` is Restate Cloud's. `aws_lc_rs` is the crypto of all of them (the # tunnel's TLS, request identity's signatures), as the object stores' must be aws-lc. -restate-sdk-shared-core = { version = "8.7.0", features = [ +# Main at the commit of sdk-shared-core#120 (a cancellation resumes an invocation shut down while it +# waits for a call), until the next shared-core release: then back to a version. +restate-sdk-shared-core = { git = "https://github.com/restatedev/sdk-shared-core", rev = "b15c9724cde752ff6f563c815e6da7dbc26a55e5", features = [ "request_identity", "sha2_random_seed", "aws_lc_rs", diff --git a/tests/agents_suspended_stop_server.py b/tests/agents_suspended_stop_server.py index 74a415e..1fe3622 100644 --- a/tests/agents_suspended_stop_server.py +++ b/tests/agents_suspended_stop_server.py @@ -38,13 +38,6 @@ def anyio_backend(): pytestmark = [pytest.mark.anyio] -NEEDS_SHARED_CORE = pytest.mark.xfail( - strict=True, - reason="shared-core 8.7.0 suspends a shut down attempt on its calls alone, so a cancellation does not resume it; " - "fixed on shared-core's branch claude/cancel-wakes-a-shut-down-attempt, not released yet", -) -"""Remove with the shared-core release that has the fix: these then pass, and a strict xfail that passes fails.""" - class Refund(pydantic.BaseModel): order: str @@ -81,7 +74,6 @@ async def harness(): yield harness -@NEEDS_SHARED_CORE async def test_stop_ends_a_turn_that_restate_shut_down_while_it_waited_for_an_approval(harness: HarnessEnvironment): key = str(uuid.uuid4()) seen: list[str] = [] diff --git a/tests/sessions_suspended_server.py b/tests/sessions_suspended_server.py index dafb069..61bc2fd 100644 --- a/tests/sessions_suspended_server.py +++ b/tests/sessions_suspended_server.py @@ -34,13 +34,6 @@ def anyio_backend(): pytestmark = [pytest.mark.anyio] -NEEDS_SHARED_CORE = pytest.mark.xfail( - strict=True, - reason="shared-core 8.7.0 suspends a shut down attempt on its calls alone, so a cancellation does not resume it; " - "fixed on shared-core's branch claude/cancel-wakes-a-shut-down-attempt, not released yet", -) -"""Remove with the shared-core release that has the fix: these then pass, and a strict xfail that passes fails.""" - sleeper = restate.Service("sleeper") @@ -129,7 +122,6 @@ async def cancelled_while_suspended(harness: HarnessEnvironment, handler: Any) - return code, seen -@NEEDS_SHARED_CORE async def test_a_cancellation_reaches_an_invocation_that_was_shut_down_while_it_waited_for_a_call( harness: HarnessEnvironment, ): @@ -137,7 +129,6 @@ async def test_a_cancellation_reaches_an_invocation_that_was_shut_down_while_it_ assert code == 409, f"the cancelled invocation did not end in 10 s: {seen}" -@NEEDS_SHARED_CORE async def test_a_handler_that_watches_for_its_cancellation_learns_of_it_after_it_was_shut_down( harness: HarnessEnvironment, ): @@ -145,7 +136,6 @@ async def test_a_handler_that_watches_for_its_cancellation_learns_of_it_after_it assert code == 200, f"the cancelled invocation did not end in 10 s: {seen}" -@NEEDS_SHARED_CORE async def test_a_cancelled_invocation_that_goes_on_waiting_is_not_resumed_over_and_over(harness: HarnessEnvironment): # Waiting on a cancellation that Restate has stored resumes the invocation at once. The attempt that follows # the cancellation knows of it, and waits for its call alone. From 76a9aeedfb290ebda181be8e75bce6de2571607c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 13:44:48 +0000 Subject: [PATCH 2/2] Shared core 8.7.1, from the registry 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 Claude-Session: https://claude.ai/code/session_01RePHkSS8KRKmJ93hcd9asV --- Cargo.lock | 5 +++-- Cargo.toml | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8dd88d0..9c18e5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2490,8 +2490,9 @@ dependencies = [ [[package]] name = "restate-sdk-shared-core" -version = "8.7.0" -source = "git+https://github.com/restatedev/sdk-shared-core?rev=b15c9724cde752ff6f563c815e6da7dbc26a55e5#b15c9724cde752ff6f563c815e6da7dbc26a55e5" +version = "8.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed583844d652c40185869483ef35370c5780ff15f0bb8e2adf2f5c25a494aefc" dependencies = [ "base64 0.22.1", "bs58", diff --git a/Cargo.toml b/Cargo.toml index a12afaa..4922cdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,9 +21,8 @@ tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } # checkpoints may outgrow Restate into (RESTATE_SQL_OBJECT_STORE: S3, GCS, Azure, or a # directory); `tunnel` is Restate Cloud's. `aws_lc_rs` is the crypto of all of them (the # tunnel's TLS, request identity's signatures), as the object stores' must be aws-lc. -# Main at the commit of sdk-shared-core#120 (a cancellation resumes an invocation shut down while it -# waits for a call), until the next shared-core release: then back to a version. -restate-sdk-shared-core = { git = "https://github.com/restatedev/sdk-shared-core", rev = "b15c9724cde752ff6f563c815e6da7dbc26a55e5", features = [ +# 8.7.1: a cancellation resumes an invocation shut down while it waits for a call (sdk-shared-core#120). +restate-sdk-shared-core = { version = "8.7.1", features = [ "request_identity", "sha2_random_seed", "aws_lc_rs",