HydraIssues

MASTER OF MASTERS: land XR streaming in a venue (#663 allocation, #781 WiVRn lane, #544 head app)
open unclassified Priority: high Project: hydra-experiencenet Reporter: 14 Oct 2026 22:37

Description

Read this whole issue, then the SEQUENCE comment below it, then the one issue the sequence tells you to start on. You do not need any other background.

What this program is

Three masters stand between the fleet today and XR streaming that a venue can run unattended:

  • #663 central body allocation authority + real per-device identity. Who gets which machine, and pairing that is not thrown away on every stream. 13 open children.
  • #781 remaining work on the WiVRn lane. The XR driver itself: body state machine, pairing PIN, config render, head wiring, client APK. 18 open children.
  • #544 hydraheadquest, the Quest head app. The product that carries all of it to a headset. 8 open children.

#544 is the deliverable. #781 makes XR streaming work at all. #663 makes it work when more than one headset is in the room.


Orientation for someone new

The system in six sentences

A head is a device a person looks through or touches: a Quest headset, an iPad, a flatscreen kiosk. A body is a machine with a GPU that runs the actual experience and encodes video. hydracluster is the control plane: heads and bodies both talk to its HTTP API, and it decides which head gets which body. A head enrolls once by QR, then polls the cluster for its experience catalog, asks for a free body, and streams from it. Heads are outbound clients only, they run no listener and no hydranode. Bodies run hydrabody, an agent that polls the cluster, installs experiences, and starts and stops the streaming server.

Two lanes, and why the word driver matters

Flat lane: ordinary 2D video. Sunshine runs on the body, Moonlight runs in the head. This is live in venues today and is not what this program is about.

XR lane: immersive 6DoF for a headset. This needs a VR driver. The three drivers are peers: alvr, wivrn, picobusinessstreaming. Sunshine and Moonlight are the flat lane and are not drivers. This distinction was ruled by the owner and the code follows it: a body advertises xr_drivers as a list, a head reports what clients it has installed, and the cluster matches on the intersection.

  • ALVR is a driver for SteamVR, so it only works on a Windows body. Arming it means starting SteamVR and registering a driver.
  • WiVRn is not a driver for anything. It is the OpenXR runtime, Monado based, and it runs only on Linux. Arming it means running its server, and the server launches the experience itself from its own config file.
  • picobusinessstreaming is for Pico headsets. The owner has parked Pico. Do not start it.

One asymmetry explains several issues: the ALVR body dials the client, the WiVRn client dials the body. That is why ALVR needs an xr_client_hostname configured on the head and WiVRn does not (#787), and why WiVRn needs a pairing PIN instead (#784).

Why WiVRn at all: PyroWave

PyroWave is an intra-only wavelet codec written in Vulkan compute shaders (upstream Themaister/pyrowave, MIT). It encodes and decodes in under 0.1 ms at 1080p and is built to actually spend a 200+ Mbit/s link, which H.264 and H.265 hardware encoders will not do. It codes 64x64 blocks independently, so packet loss degrades gracefully instead of smearing. We carry it in our WiVRn fork.

This already works. PyroWave streams end to end from an Omarchy Linux body to a Quest 2 at about 98.7 Mbit/s per eye. The validation experience is HelloHydra XR, our branded build of Khronos hello_xr. So the codec, the fork, the packaging and the cluster matching are all proven. What is missing is the automation around them, which is what this program is.

The one thing wrong that explains most of the work

hydrabody's XR state machine does not exist on Linux. The engine is 953 lines in pkg/provider/alvr_windows.go behind //go:build windows, and pkg/provider/alvr_other.go stubs it out to no-ops on every other platform.

So today a Linux body truthfully advertises xr_drivers:["wivrn"], the cluster matches a head to it and writes a session directive, and the body never reads the directive. wivrnArm exists, compiles, and is reached by no code path. The head waits for the body to report armed until it times out.

That is #782, and it is why the sequence starts there.

The repos

Repo What Language Default branch
hydrabody Body agent. Polls the cluster, manages experiences and the streaming server Go master
hydracluster Control plane and HTTP API. The authority on allocation Go main
hydraheadquest Quest head app Kotlin + Java, NDK master
hydra-wivrn Our WiVRn fork, carries PyroWave C++ + Vulkan master, work on pyrowave
hydrahelloxr HelloHydra XR, the validation experience C++ master

Branch names differ per repo. Check before you push.

Vocabulary you will hit in the issues

  • arm / disarm: tell a body to start or stop serving a specific head's XR session.
  • directive: the instruction the cluster puts in its reply to a body's status POST. The body acts on it next tick.
  • district: a logical fleet grouping. venue: a physical site. A head only ever sees bodies in its own district and venue.
  • land / plant: how services are deployed. Never docker run and never deploy by hand.
  • role: a capability string on a body, for example wivrn. A recipe installs it.
  • lane: flat or XR, as above.

Environment facts that will cost you an hour otherwise

  • There is no JDK and no Android SDK on this workstation. hydraheadquest cannot be compiled locally, only in CI. Be rigorous, you get no compiler.
  • hydrabody and hydracluster are Go and build locally. Cross-compile both targets before claiming a platform-neutral change is safe: GOOS=windows go build ./... and GOOS=linux go build ./....
  • Windows bodies are live in venues. Any change to the shared XR state machine must leave the ALVR path byte for byte identical. This is the main risk in #782.
  • The workstation root filesystem runs near full. Check df -h / before a build. Never put build output or caches in /dev/shm.
  • The test body is msi1060, an Omarchy machine in the mobile-kit venue. Test headset is a Quest 2 reachable over hydraadb.

Hard rules, not preferences

  • Issues go only to issues.experiencenet.com. Never GitHub Issues. File an issue before or alongside any non-trivial change.
  • Test on bxl1-test* districts only. Never on production bodies or production heads.
  • Reach nodes through the cluster API and cluster exec, not SSH, unless the owner explicitly approves SSH. Use full paths in exec and never modify PATH.
  • Never stop hydranode and never hand-edit nodes.yaml. Both cut the exec channel you are standing on.
  • Never reboot a body remotely.
  • Deploys go CI to registry to land pull. No manual deploys, no editing config on servers.
  • No em dashes in prose or code comments. Short clear sentences.

Can the three masters run in parallel

Mostly yes. Full detail and the ordering constraint are in the SEQUENCE comment. In short: three work fronts are genuinely independent, and there is exactly one collision, #788 extends the storage that #663 exists to delete. The ruling is to land #788 anyway because it is two fields and the head clients are blocked on it, then treat it as known rework inside #663.

Not work, do not plan against them

#388 and #734 are historical roots. Everything live has moved out of them. #734 keeps the delivered phases #737 and #743 as the record of how the lane was built.

Before #544 can be used as a master

It was written before several owner rulings and now contradicts them. It needs a grooming pass: the title still says HMS-managed, which the no-Meta ruling killed (#739); #561 is a WiVRn spike that already landed as #388 and #734; #559 Pico is parked; #557 assumes unstarted picobusinessstreaming; #558 and #560 are ALVR-first and need reconciling with the WiVRn-first decision. Also #789, #790 and #791 are currently children of #781 but are #544 work.

The honest gate on production

#781 alone gets a demo: one head, one body, no contention.

#663 is what gates a venue. Four of its children are the same defect reported from four different venues: #308, #530, #660 and #182 are all two heads landing on one body. That is already true for the flat lane today, so WiVRn does not make it worse, but it does not fix it either.

Neither #711 (fenced slot leases) nor #753 (the stream as the unit) has been scored or adopted, so #663 has no agreed design yet. That decision is step 0 of the sequence and it is an owner call, not an engineering task.

Sub-issues (3)

open #781 MASTER: remaining work on the WiVRn lane (head client, body client, fork, experience)
open #663 MASTER: central body allocation authority + real per-device identity (double-booking and pairing thrash are one defect)
open #544 hydraheadquest: Quest head app (one APK, HMS-managed) + XR stream receiver plan

Session Context

Venue
mobile-kit

Comments (2)

api 14 Oct 2026 22:38

Parented #663, #781 and #544 here 2026-10-14.

#781 moved out from under #734, which now holds only the delivered phases #737 and #743 and stays as the historical root. Nothing is orphaned: #734's record is intact and all live work is reachable from here.

api 14 Oct 2026 23:02

SEQUENCE (ruled 2026-10-14)

Where to start, and what waits on what.

Step 0, in parallel with everything, and it is an owner decision not code

Rule on #663's design: #711 fenced slot leases vs #753 the stream as the unit. Neither has been scored or adopted, so the program's biggest master has no agreed shape. This costs no engineering time and it decides two things: how a venue with more than one head behaves, and whether #788's two fields are throwaway. Nothing below is blocked by it, which is exactly why it should be settled while the code work runs.

Step 1, start here

#782 lift the XR directive state machine out of the Windows build.

Chosen first because it blocks the entire WiVRn lane, it depends on nothing, it is self-contained in hydrabody pkg/provider, and the function-by-function split is already written on the issue. Until it lands, a matched WiVRn body ignores the cluster directive and no amount of head-side work can be tested.

Acceptance is a behaviour-preserving move: Linux gains the state machine, and a Windows ALVR body behaves byte for byte as it does today. Windows bodies are live in venues, so this one does not land unproven on both targets.

Step 2, same repo, in order

#783 client-connected detection, then #784 the pairing PIN, then #785 the config render.

#783 comes first of the three because without it there is no connect timeout and no doff grace, so an armed body is never freed and every later test leaves wreckage behind. #784 and #785 can swap order.

Step 3, makes the lane end-to-end testable

#788 cluster returns the driver and PIN, then #786 pass body host and PIN to the launch, then #787 drop the ALVR-only pre-flight.

#788 goes first because both head items read what it returns. See the collision note below.

Step 4, after the lane works on the bench

#740 venue readiness, then #739 the signed com.experiencenet.hydraxr client. #739 is packaging: the side-loaded upstream client proves the lane without it.

Running in parallel at any time, no collisions

  • #663's pair-once track (#549, then #371 and #531). This is Sunshine GameStream pairing, which is the flat lane. WiVRn pairs on a single-use PIN, so the two mechanisms never touch. #549 is also the highest-value item in #663 that is not blocked on the design ruling: every head re-pairs on every stream start today and nobody verifies stored trust, which is what took bodies down in #371.
  • #544's product track (#789, #790, #791 once moved). Mic relay, operator visibility and in-stream UX apply equally to the flat lane.
  • #728, #729, #730, the fork and experience residuals. Independent of everything.

The one ordering constraint

#788 extends what #663 deletes. #788 adds driver and PIN to xrSessionResponse in hydracluster handlers_xr.go. #663 exists to rewrite that storage: the root defect is session_store.go:32, active map[string]*SessionRecord // keyed by body ID, and XR sessions hang off body.XRSession. Both #711 and #753 replace it.

Ruling: land #788 anyway. It is two fields, the head clients are blocked on it, and the rework is cheap. Treat it as known rework inside #663 and do not run #788 and the #663 rewrite in the same file in the same week.

Softer, a merge concern rather than a design conflict: #786, #787 and #789 all touch HydraState.kt in different functions. Sequence them within the repo instead of running two threads on that file.

Do not start yet

  • #544 as a master until it is groomed. Title still says HMS-managed, killed by the no-Meta ruling. #561 is a WiVRn spike that already landed as #388 and #734. #559 Pico is parked. #557 assumes unstarted picobusinessstreaming. #558 and #560 are ALVR-first and need reconciling with WiVRn-first.
  • #753 implementation. It is a proposal. Score it or drop it in step 0.

What each step buys

#782 and #783 get a single head streaming XR from a body with no hand-holding. Steps 1 to 3 get a demo anyone can run. #663 is what makes it a venue: #308, #530, #660 and #182 are the same two-heads-one-body defect reported from four venues, already true on the flat lane today.