HydraIssues

MASTER: a content plane for streams and signage, and where its venue-local controller lives
open improvement Project: experiencenet Reporter: 22 Oct 2026 17:16

Description

Design doc: hydravenues/docs/design/content-plane.md (commit 51321d8 on master). This issue exists for an owner ruling, not for implementation. No code change is proposed yet.

PROBLEM

Three systems answer "what is on this screen right now" and none owns it:

  • hydracluster head-assignment decides which body streams to a head, stored in cluster node state.
  • hydracastquest routes decide which source feeds a display, stored in routes.json on a venue laptop.
  • The packaged intro is the fallback picture, baked into each signed Tizen widget.

So one physical screen carries three identities: a head id, a display id and an IP address. signage.Display in HydraVenues is the seam where all three meet, carrying ID/Name/Venue/Model, Address, HeadID, GatewayNodeID and the IntroEnabled/CastEnabled flags in one struct. Having no shared model, one plane clears the other to win the screen: SelectCast POSTs head-assignment with empty body_id and app_id, commented 'A cast or intro replaces a cloud experience, releasing its body/session'.

This is a missing concept, not a bug. The 2026-10-21 defect (#858) came straight out of it: Play intro and selecting the Intro source were two controls that could not agree whether they changed content or changed routing, because there is no single thing for them to change.

WHAT IS MISSING

One model of what a surface should show, whose value is a live stream from a body, a live stream from an ingest (Quest today, Pico/camera/laptop later), or content (intro, playlist, page), with an explicit fallback chain. hydracastquest already speaks this language: its contract 'uses sources, displays, routes, and SDP rather than vendor-specific controls' and it anticipates a hydracastpico. The vocabulary is right; the placement is wrong, because those nouns live per venue on a laptop under a name taken from the first input rather than the function.

SHAPE

Control central, data local. The desired state, content catalogue and permissions belong in one place; HydraVenues is the strongest candidate since it already owns venues, displays, signage and per-venue roles, and the duplication found is between HydraVenues and hydracastquest. Media stays local: a venue cast goes browser to TV over WebRTC on the venue LAN by design, and must not be routed through the cloud.

A venue-local controller is required, not an optimization: a lost uplink must not blank the screens, LAN discovery does not cross WireGuard, and route changes should be immediate. It should be a ROLE rather than a new daemon, because hydranode already runs on these machines and roles (hydrabody, the hydrahead family) already provide enrolment, venue binding, release channel, self-update, exec and diagnostics. hydracastquest then becomes the Quest ingest adapter and stops being the system.

This retires routes.json on a laptop, the untracked per-profile runtime-config.js holding a source token, two hand-enabled user systemd units whose restart policy tolerates a closed window, and HydraVenues reaching control by shelling control.js into a venue machine.

NAMING

Recommend NOT naming the local controller hydravenue. Two components differing only by a trailing letter, one central and one local, are an operational hazard across logs, repos, tokens, runbooks and spoken instructions. This ecosystem already had to document that agentcodex is not agentclaudecode, and that two different nodes both answer to hydraapplepipeline. The proven precedent here is better: hydracluster is the central control plane and hydranode is the local agent, two distinct words.

Recommended: keep hydravenues central and extended; name the local controller role hydrastage (alternative hydrausher if the overlap with the staging release channel is unwelcome). If the ruling favours a separate central service instead, hydrascene or hydramatrix both name the function; hydrarouter is unavailable because hydrascalerouter exists.

CONSTRAINTS

Tizen panels are Chromium M85, which sets the output ceiling. A signed .wgt is the only install route there, so TV-side content code is an expensive deployment rather than a config change. Venue permissions already exist in HydraVenues and must not be reinvented. The standing 'keep hydracluster minimal' rule argues against hydracluster absorbing this despite it owning head-assignment. It must slot into the experience datamodel split and the ontology master.

FIRST SLICE

Unify surface identity before anything else: one screen, one id across the three planes, with head id, gateway and address as attributes of that surface rather than competing keys.

RULINGS NEEDED

  1. Placement: extend HydraVenues, or a separate central service?
  2. Ontology: is an ingest a new node class, or does it reuse head-assignment for a node that is not a display? Assignment today is head-shaped; the only surface is handleSetHeadAssignment in hydracluster/pkg/api/handlers_head.go.
  3. Naming, per above.
  4. hydracastquest's CLAUDE.md forbids depending on browser inspectors in normal operation. A supervised browser adapter makes the inspector a supported internal dependency. Amend the rule explicitly, or require the adapter to avoid it.

Session Context

Venue
mobile-kit