feat: feat(cluster-protocol): add the Rust WebSocket binding and cloud data-plane contract#797
feat: feat(cluster-protocol): add the Rust WebSocket binding and cloud data-plane contract#797tomdps wants to merge 1 commit into
Conversation
… binding and cloud data-plane contract
Greptile SummaryThis PR makes WebSocket passthrough cancellation registration deterministic and adds cancellation lifecycle regression coverage.
Confidence Score: 3/5This PR should not merge until cleanup for an old request is prevented from deleting the cancellation handle of a newer request with the same ID. The separate admission and cancellation registry removals create an ownership race in which request-ID reuse can leave an active retry without a usable cancellation handle. Files Needing Attention: crates/openengine-cluster-server/src/websocket.rs
|
| Filename | Overview |
|---|---|
| crates/openengine-cluster-server/src/websocket.rs | Adds gated task startup and unconditional cleanup, but cleanup can remove a newer same-ID request's cancellation handle. |
| crates/openengine-cluster-server/src/websocket/tests.rs | Adds deterministic unit coverage for the original spawn-before-registration stale-entry race. |
| crates/openengine-cluster-server/tests/websocket.rs | Adds integration coverage for cancellation cleanup, ID reuse, and rapid completion behavior, but not the cross-task cleanup race. |
Reviews (1): Last reviewed commit: "feat: implement #651 - feat(cluster-prot..." | Re-trigger Greptile
| self.state.in_flight_ids.lock().remove(&self.id); | ||
| self.cancel_registry.lock().remove(&self.id); |
There was a problem hiding this comment.
Cleanup removes the retry handle
When a cancelled or completed request is immediately retried with the same ID, the old guard releases in_flight_ids before separately removing from cancel_registry, allowing the retry's newly registered abort handle to be removed and causing a later $/cancelRequest to be silently ignored.
|
Post-validation review found an additional P1 ownership race: the old request guard releases |
Closes #651