Skip to content

decision(ws): reconcile close-before-accept (#2818) vs accept-before-close (live_events) handshake conventions #12366

Description

@mrveiss

Surfaced in #12340. Two WS handshake conventions coexist: websocket_endpoint/ws/npu-workers (websockets.py) close(4001) BEFORE accept() (per #2818 — returns HTTP 403 on auth fail), while live_events.py does accept() THEN close() (returns 101 + close frame). The close-before-accept form makes an auth-rejected WS indistinguishable from a missing route (403) — which caused the #12340 misdiagnosis. Owner decision: standardize on ONE convention (accept-before-close = clearer client errors / fail-loud, but reverses #2818's deliberate close-before-accept). Reconcile deliberately across all WS handlers. Refs #12340 #2818 #1408.

Activity

  1. mrveiss commented on Jul 25, 2026

    @mrveiss
    OwnerAuthor

    Fixed in #12527 (merged to Dev_new_gui). Supervised prod rollout where applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions