feat: add session/stateReplaced action for complete session state replacement - #372
Draft
DonJayamanne wants to merge 1 commit into
Draft
feat: add session/stateReplaced action for complete session state replacement#372DonJayamanne wants to merge 1 commit into
session/stateReplaced action for complete session state replacement#372DonJayamanne wants to merge 1 commit into
Conversation
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.
Summary
session/stateReplacedaction carrying a completeSessionState.Motivation
A server can replace the authoritative state behind an already-subscribed session channel while preserving the channel URI. Incremental field actions cannot reliably represent that lifecycle transition because omitted fields from the previous state must also be removed.
This action lets the host publish one ordered, replayable authoritative replacement through the existing action stream. Clients retain their subscription while replacing the cached session state in full.
The immediate consumer is provisional-session recreation in VS Code: changing the working folder disposes and recreates an unsent provisional session under the same deterministic URI. Existing subscribers otherwise retain the previous session customizations and configuration.
Semantics
stateis the complete authoritative session state.0.7.0protocol surface.Validation
npm run generatenpm testgo test ./...cargo test --workspace./gradlew test --no-daemon --console=plainswift buildnpm test && npm run build