Repository navigation
Require event subscriptions to be read-only and non-destructive - #13
Open
tsarlandie-oai wants to merge 1 commit into
Open
tsarlandie-oai wants to merge 1 commit into
tsarlandie-oai 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.
Event subscriptions should observe application activity without changing it. Require subscriptions to be read-only and non-destructive throughout setup, refresh, polling, streaming, delivery, reconnect/replay, and cleanup, across every argument combination and delivery mode.
Subscription operations must not modify application data, memberships, or permissions, or initiate application work. For example, subscribing to messages must not mark them as read or join a channel. Such actions require a separate, explicitly authorized operation. State used solely to observe and deliver the authorized stream—such as listeners, leases, queues, and cursors—remains permitted.
Update the lifecycle example to register and remove a listener over an already-authorized message feed, replacing the channel join/leave example, and add the corresponding threat-model entry.
This changes the proposed behavioral requirements without adding annotation fields or changing the wire format. Implementations that mutate application state while subscribing would need to separate those mutations into explicitly authorized operations. The wording is a proposal for WG review.
Validation: the final patch applies cleanly to current
main(d5316be), passes whitespace checks, preserves all JSON/JSONC examples, and the revised lifecycle example parses as Python without execution. Documentation only; no runtime or interoperability tests.