feat: feat(cluster-protocol): add the Rust WebSocket binding and cloud data-plane contract#798
Merged
Merged
Conversation
… binding and cloud data-plane contract
tomdps
enabled auto-merge
July 25, 2026 03:22
Greptile SummaryAdds cooperative WebSocket request cancellation with ownership-safe request-ID reuse.
Confidence Score: 5/5The PR appears safe to merge, with cancellation registration, cleanup, and request-ID reuse handled consistently. Cooperative cancellation always converges on shared cleanup, registry removal is ownership-checked against same-ID reuse, and current production backend operations expose no cancellation-sensitive partial mutation.
|
| Filename | Overview |
|---|---|
| crates/openengine-cluster-server/src/websocket.rs | Replaces abort-handle cancellation with cooperative notification, synchronous registration, and ownership-checked cleanup without an identified correctness defect. |
| crates/openengine-cluster-server/src/websocket/tests.rs | Adds focused white-box tests for registration ordering, completion cleanup, and protection of newer same-ID registrations. |
| crates/openengine-cluster-server/tests/websocket.rs | Adds wire-level tests proving cancelled requests emit no response and request IDs remain reusable and independently cancellable. |
Sequence Diagram
sequenceDiagram
participant Client
participant WebSocket
participant Registry
participant Task
participant Backend
Client->>WebSocket: Unary request (id)
WebSocket->>Registry: Register Notify under id
WebSocket->>Task: Spawn request task
Task->>Backend: dispatch(request)
Client->>WebSocket: $/cancelRequest(id)
WebSocket->>Registry: Lookup Notify
Registry-->>Task: Notify cancellation
Task--xBackend: Drop dispatch future
Task->>Registry: Remove owned entry
Note over Task,Client: Cancelled request emits no response
Client->>WebSocket: Reuse id
WebSocket->>Registry: Register fresh Notify
Reviews (1): Last reviewed commit: "feat: implement #651 - feat(cluster-prot..." | Re-trigger Greptile
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.
Closes #651