HydraIssues

hydrabody: mint and report the WiVRn pairing PIN
open unclassified Priority: high Project: hydrabody Parent: #781 Reporter: 14 Oct 2026 20:47

Description

WiVRn pairs on a PIN. The body never produces one, never reports one, and the cluster has no field to carry one (grep -i pin over hydracluster pkg/api/handlers_xr.go returns nothing). So the head cannot be handed a PIN and the operator types whatever the WiVRn server printed on the body's screen.

Approach

Have the body mint the PIN and seed it into the WiVRn config at arm time, rather than scrape it back out of the server. Minting is deterministic, testable, and avoids parsing someone else's log format. The body then reports it in the status POST alongside xr_state.

A fresh PIN per arm. It is a single-use pairing secret, not a body property.

Plumbing

Body status POST gains the PIN next to the existing xr_state, xr_head_id and xr_detail fields built in xrStatusFields (alvr.go:102). The cluster stores it on the session and returns it to the head that owns the session, and only to that head. See the cluster child.

The ALVR lane has no PIN, so the field is empty there and nothing changes for a Windows body.

Care

Never log the PIN. hydraheadquest's rule about not logging tokens applies on this side too.

Done when

Arming a WiVRn body produces a PIN, that PIN is what the server accepts, it reaches the head through the session, and it changes on the next arm.

Session Context

Venue
mobile-kit