Sub-issue of #565 (master: HydraNPS end of experience rating). Phase 6: the experience
side. The full card design lives on #565, and this issue holds everything specific to an
experience that asks the question itself.
#565 asks the question on the head, after the visitor taps "Exit experience". An
experience developer cannot reach that card and cannot ask inside the world they built.
The ask here is the opposite direction: a Unity developer drops one prefab in front of
their own ending screen and the experience captures the score.
unity/com.experiencenet.hydranps: a UPM package with the HydraNPSCard prefab, theHydraNPS.Ask(callback) one line entry point, settings read from disk,docs/design/rating-card.md: the card spec file that Phase 1 (#579) owes. Copy, colors,docs/guides/unity-rating-card.md: the integration guide for experience developers./docs/card and /docs/unity, because the peopleCorrection to #565 while writing the spec: the card spec says the star shape is "the SVG
path already shipped in inject.go". There is no such path. inject.go draws the Unicode
character U+2605 in the page font. The spec file now defines the geometry (outer points
on the box, inner radius 0.382 of the outer) and says a text only renderer may use
U+2605.
A submit token cannot go into a Unity build. The developer ships the build, a build is
readable, and #565 already rules that the token is never baked into an IPA, an APK or a
DMG. The same rule applies harder here, because a third party holds the artifact.
So the default transport posts to hydrabody on the loopback interface of the body, and the
body forwards the record with the credential it already holds:
POST http://127.0.0.1:47991/api/v1/nps/rating
{"source":"experience","experience":"rizeof","score":8,"score_scale":"5-star",
"experience_version":"1.4.2","session_hint":"exp-3f91ab02-1761590400123"}
The body fills session_id, head_id, body_id, district, venue and duration_ms
from the stream session it is already running. Reaching the loopback interface already
proves the caller runs on the body, so the relay takes no credential.
That endpoint does not exist. It needs:
:47991 server (pkg/provider/httpserver.go),nps_url and nps_token on BodyConfig, the same wiring asexperience_library_url, which BodyConfig already carrieshydraclusterapi/types.go:164). Phase 2 (#580) adds the nps: block for headssource on POST /api/v1/ratings, and validate it next toscore_scale. Today unknown fields are decoded and dropped, so the direct transportUntil then a developer uses the direct transport with a hydranps.json beside the build.
That path works against the live service today and is the test path in the guide.
POST /api/v1/body/status, thenheadConfigResponse).<head_id>-<milliseconds> and theend_reason for an experience record. The experience knows it reached its ownquit, timeout, error, shutdown, watchdog. The packageend_reason and lets the body or the cluster label the end. The NPS average isend_reason: quit only, so an experience record sits outside the headline metrichydranps.json beside a build, tap three stars, thenGET /api/v1/ratings?experience=<name> returns score: 6.docs/design/rating-card.md, the same step every head testbook gets.A developer now has a page to land on: https://hydranps.experiencenet.com/unity
Shipped in v0.3.3 (commit de6796f) and v0.3.4 (commit 2d23803). Both runs green in both jobs.
/unity is a page of its own, not a markdown section in the docs viewer:
/unity/package.tgz asks the release API which version is in production at the click, then redirects to the tarball on the release server. An instance running a version behind still hands out a current package, and no document has to carry a version number by hand. internal/unitypackage holds the package version, with a test that fails if it drifts from package.json.
/ is the hydranps landing page again, this repository's own template, with "Add the card to a Unity experience" as the first button. The shared hydrawebcomponents landing offers only Documentation and Admin Login, and the audience for the public face of this service is an experience developer.
Wording: the copy called a visit a "streaming session". The streaming is how the experience reaches the visitor; what gets rated is the experience session. The landing page, the docs tagline, the runbook, the testbook, the dashboard empty state and the Unity copy all say experience session now.
Testbook: 5a now covers / and /unity as well as the three docs sections, and a new 5a2 checks that the redirect lands on a tarball whose root is package/, which is what Unity needs for "Add package from tarball". Two pass criteria rows added.
Still true, and still open: the body relay endpoint POST /api/v1/nps/rating does not exist, so a developer uses the direct transport with a hydranps.json beside the build. The three rulings on this issue are unchanged.
Not verified yet: the live instance still answers v0.2.3 and picks up the new release on its next six hour check, so /unity returns 404 on the public host until then. The release itself is verified: releases.experiencenet.com reports 0.3.4 and the tarball downloads with no credential.
LIVE. https://hydranps.experiencenet.com/unity serves the page, /, /docs/unity, /docs/card and /docs/runbook all 200, /unity/package.tgz redirects to the current tarball and it downloads with a package/ root. The 208 stored ratings survived the rebuild.
The service does not auto-update, and the runbook said it did. The public instance is an Incus scale and the image sets HYDRA_AUTO_UPDATE=off on purpose, because the built-in updater would restart a systemd unit that is not in a container. The instance had been on v0.2.3 for 57 days. The image is the unit of update: a release is published and then deployed by hand, or it is not deployed at all. Corrected in the runbook in v0.3.5, with the node, the mesh address, the state path, the exec channel and the command.
Where it runs: scale hydranps on pi-node-003-nvme (node-6bf57aed), mesh 10.10.100.19:8080, state /srv/scales/hydranps -> /root/.hydranps, routed by the edge at 141.227.136.199. The Pi nodes take no SSH, so the way in is hydracluster exec, which runs as root.
How it was deployed: hydraskin update hydranps --tag v0.3.4 as a dry run, then --apply. 12 seconds. It preserves the state disk, the hydraskin-expose proxy on the same host port and every user.hydra.* label, and verifies health through the proxy before it is done. The edge returned 503 for a few seconds while traefik caught up. Repeated for v0.3.5.
Worth knowing for any hydra service: a scale name is not unique in the fleet. There is a second hydranps scale on pi-node-001 (node-2b224f6a), left from the 2026-08 cutover, still running v0.2.3 with nothing routed to it and no domain label. I did not touch it. Check routes.json on the edge for which node really serves a domain before updating anything.
Releases: v0.3.3 the page, v0.3.4 the experience session wording, v0.3.5 the deployment runbook. All three green in both jobs.
Filed #1164: our own Unity experience to validate this package end to end. Nothing has imported the tarball into a Unity project yet, so the integration is unproven and a third party developer would be the first to exercise it. #1164 also carries the reproduction the three open rulings here need (the experience and the head both ask, so the visitor answers twice).
Distribution: an experience developer cannot install the package by git URL, because
every
cederikdotcom/hydra*repository is private. The release now packs the UPMtarball and publishes it with the binaries, and the release server serves a plain public
download (verified: a 302 to the mirror, then 206 with no credential):
Window>Package Manager>+>Add package from tarball. The package version inpackage.jsonmoves on its own, apart from the service version.Release CI, found by the first tag since 2026-07-28 and fixed in the same session
(hydraissue #822 for this repository): the workflow had no module credential, so
go testcould not read hydraapi, andSCALE_REGISTRY_TOKENpredated the 2026-08-28rotation so the image job got a 401. Both halves are fixed with the netrc pattern the
other hydra repos use,
GO_PRIVATE_TOKENis new on this repository, and the registrytoken is refreshed from the registry host. v0.3.0 is burned, because a tag cannot be
re-pointed.