HydraIssues

hydrabody: detect that the WiVRn client connected, so armed can become active
open unclassified Priority: high Project: hydrabody Parent: #781 Reporter: 14 Oct 2026 20:47

Description

The ALVR lane proves the headset arrived with alvrClientConnected (alvr_windows.go:821), which checks the ALVR dashboard and then the stream socket (alvrStreamSocketConnected, :863). WiVRn has no equivalent, so the body cannot tell armed from active.

Two consequences, both bad:

  1. No connect timeout. xrConnectTimeout (alvr.go:93, default 120s) exists but there is nothing to time out against, so a body armed for a head that never joins stays armed. The session is never torn down and the body is never freed.
  2. No doff grace. xrDoffGrace (alvr.go:84, default 90s) keys off the client dropping. Without connection detection, taking the headset off leaves the session live until something else kills it.

What to check

The WiVRn server listens on 9757 tcp and udp. An established peer on 9757 is the honest signal, the same approach alvrStreamSocketConnected already takes. The server also logs the client handshake, but a log scrape is more fragile than a socket check and the socket check needs no WiVRn change.

Note the direction is reversed from ALVR: the WiVRn client dials the body, so there is no trust-the-client step like alvrTrustClient (:788). The PIN carries that role instead. See the PIN child.

Done when

A real headset joining a WiVRn body moves the body to active within one tick. An armed body no head ever joins tears down with connect_timeout. Doffing holds the session for the doff grace and then drains.

Session Context

Venue
mobile-kit