Repository navigation
Sessions: drop the SDK's explicitRecovery option from session handlers - #56
Merged
Merged
Conversation
The SDK reads it only when it builds its own VM for an invocation, which a session object's never reaches: endpoint.ts routes it to our own explicit recovery VM, and a fetch endpoint fails it with a TerminalError either way. It is not in the discovery manifest either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. The flag was dead weight. Session invocations never reach a code path that reads it, so dropping it is simpler than keeping a decoration that implies the SDK does the recovery.
Reviewed changes
I checked the removal against SDK 1.18.2's handling of the option and against this package's endpoint routing.
recovery()helper removed:handlerOfnow passes the entry's own options torestate.handlers.object.{shared,exclusive}. This confirms the PR's claims: the SDK keys the option on a symbol (endpoint/components.js) and reads it only when it constructsWasmVM(endpoint/handlers/generic.js:114), so the option never reached the discovery manifest.routing()inendpoint.tssends every session object invocation toserveSessionor answers it directly with 401/415, and never falls through to the SDK. On other endpoints,wrap()throws. No other code referencedrecovery.- README "No journal replay" paragraph: it now names shared-core's explicit recovery VM as the reason a retried attempt skips the journal, instead of a per-handler option.
claude-opus-5-5 | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Session handlers spread
restate.internal.explicitRecovery()into their SDK handler options, but nothing reads it on a path a session object takes:WasmVMfor an invocation (endpoint/handlers/generic.js). It is not in the discovery manifest.NodeEndpoint(restate.endpoint(),serve,connect),endpoint.tsroutes a session object's invocation to our own explicit recovery VM. The SDK's VM is never built.wrap(...), which fails with aTerminalErrorstraight away, flag or not.So this removes the
recoveryhelper and the spread, and rewords the README paragraph that said every handler carries the option.Formatting checked locally. Typecheck shows no errors in
packages/sessions. The 47 errors elsewhere are the same onmain, from missing packages in the localnode_modules. CI runs the tests.🤖 Generated with Claude Code