Skip to content

feat: feat(cluster-protocol): add the Rust WebSocket binding and cloud data-plane contract#798

Merged
tomdps merged 1 commit into
devfrom
zeroshot/silver-horizon-32
Jul 25, 2026
Merged

feat: feat(cluster-protocol): add the Rust WebSocket binding and cloud data-plane contract#798
tomdps merged 1 commit into
devfrom
zeroshot/silver-horizon-32

Conversation

@tomdps

@tomdps tomdps commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #651

@tomdps
tomdps enabled auto-merge July 25, 2026 03:22
@tomdps
tomdps added this pull request to the merge queue Jul 25, 2026
@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown

Greptile Summary

Adds cooperative WebSocket request cancellation with ownership-safe request-ID reuse.

  • Registers per-request cancellation signals before spawning unary request tasks.
  • Races unary dispatch against $/cancelRequest and suppresses cancelled responses.
  • Adds unit and integration coverage for registration, cleanup, cancellation, and same-ID reuse.

Confidence Score: 5/5

The 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.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "feat: implement #651 - feat(cluster-prot..." | Re-trigger Greptile

Merged via the queue into dev with commit f7641e5 Jul 25, 2026
6 checks passed
@tomdps
tomdps deleted the zeroshot/silver-horizon-32 branch July 25, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant