HydraIssues

Hydramancer self-start: new dev account gets a venue, a first experience and its own git repo
open feature Project: hydramancer Reporter: cederik 2 Oct 2026 07:23

Description

Done means

A new dev account can log in, and on first login already has:

  1. access to venue mobile-kit by default
  2. an experience called My First Experience, already created
  3. that experience has its own public git repo on our own git, seeded as a clone of the Hydra Unreal Template
  4. they can clone that repo on their machine and start developing

Delivery target for the first increment is flat, on chunky-turnip-23 (Windows, Sunshine). WiVRn and the Linux lane come later.

What already exists (verified 2026-10-02)

  • Login is built. hydramancer has the whole iamnim flow: /experience/login -> iamnim with redirect_uri, /experience/authed stores an HttpOnly iamnim_session cookie, and the server calls Me(session) and Memberships(session). It is invisible only because the entire signed-in block in experience.html is wrapped in {{if .CanProvision}} and provisioning is unconfigured in the live deployment.
  • Venue authorization has a definition and the data. hydravenues stores organization_id per venue (6 of 9 set; mobile-kit = visit-flanders), and read is unauthenticated. So "venues I can deploy to" = venues whose organization_id is one of my iamnim memberships. No new concept needed.
  • The library models publishers. Developer is first class with list/create endpoints, and every experience carries owner and developer. PUT /api/v1/experiences/{name} can set districts scoping.
  • hydragitprovision exists (private repo, SINGLE commit, scaffold only, 2026-08-16). It turns a verified iamnim org membership into git repo access next to a self-hosted Gitea: ensures org + creator account, creates the repo, adds the creator as WRITE collaborator, optionally registers the hydragitwatcher webhook. iamnim authenticates, it provisions.
  • hydragitwatcher is LIVE (gitwatcher.experiencenet.com, health ok) and is the push-to-deploy engine for scales under #492.

What is missing

  1. There is no forge. No Gitea or Forgejo anywhere in the fleet (checked every hydraskin node: pi-node-001, pi-node-003, pi-node-004, hydraskin-arm-1), and no DNS for any git host. This is the foundation; nothing in item 3 of Done can proceed without it. Needs: image, scale on a hydraskin node, persistent disk, DNS, HTTPS at the edge, admin token.
  2. hydragitprovision has never been released or deployed. One scaffold commit. Needs CI/release, a scale deploy and config holding the Gitea admin token.
  3. It creates PRIVATE repos; the spec says public. And it creates an EMPTY repo, so template seeding has to be added (Gitea supports template repos and generate-from-template).
  4. Default org membership. Venue access derives from iamnim org membership, and today an empty membership list renders "ask your admin to add you in iamnim". A new dev account needs to land in an org automatically, and that org must own mobile-kit. OWNER DECISION: either create a dedicated org (e.g. hydramancers) and move mobile-kit's organization_id to it, or keep mobile-kit on visit-flanders and introduce a shared/default-venue concept. Putting dev accounts into the real visit-flanders org is wrong.
  5. Onboarding hook. On first login: ensure developer record, create My First Experience as draft owned by their org and scoped to bxl1-test-2 / mobile-kit, provision its repo, seed it from the template.
  6. The creator view in hydramancer: un-gate the signed-in block from CanProvision, list my experiences, list my deployable venues, show the clone URL.

Two findings that constrain the design

Push-to-build does not transfer from scales to experiences. hydragitwatcher builds a repo's Dockerfile into an OCI image. An Unreal experience cannot be built that way: packaging needs UE 5.7.3/5.7.4 and C++ build tools on a Windows workstation via HydraUnrealEngine. So for an experience repo the git repo carries SOURCE only, the creator builds locally, and the artifact still arrives through the existing upload path. The repo-provisioning half of #492 transfers; the build half does not. Do not build toward push-to-deploy for experiences.

One experience record carries one exe_path, so it cannot serve both platforms. hydraunrealtemplate's exe_path is the Linux launcher /opt/hydra/experiences/hydraunrealtemplate/run.sh. On chunky (Windows) that path never stats, so hydrabody falls through to download and then cannot find the exe. Since delivery is chunky, each student experience needs a WINDOWS exe_path (C:\experiences\<slug>\<Name>.exe) and a Windows package. A Linux lane later needs its own library entry.

Already done under this work

  • #721 fixed, released as hydraexperiencelibrary v0.10.13 and deployed to pi-node-004. Experiences with an exe_path now serve a build_url again, verified live on 4 titles, so bodies can auto-install.
  • The five kit nodes are bound to district bxl1-test-2 / venue mobile-kit (#761).
  • hydraunrealtemplate and hellohydra-xr are now scoped to bxl1-test-2 / mobile-kit and both return a populated build_url for that pair.
  • The template repo history was rewritten to a single clean commit with the internal deployment log and agent notes removed (#762); it is still private pending the owner's publication decision.

Session Context

Venue
mobile-kit
District
bxl1-test-2

Comments (1)

api 2 Oct 2026 17:31

Delivered and live

All of it verified in production, not assumed.

hydramancers org created in Pantheon, realm r_349832f91720
mobile-kit district bxl1-test-2, org hydramancers
iamnim v0.52.0: POST /api/me/join on a self_join_orgs allow-list, plus organization names on memberships
hydramancer v0.5.2: /register, idempotent onboarding, grouped studio, source access on page
hydraperforceprovision v0.4.1: fleet-aware routing and per-creator streams
Perforce ssl:perforce.hydramancers.experiencenet.com:1668, depot //hydramancers/main seeded with 23 template files

Registering now joins the org, creates a library developer record and creates a first experience scoped to bxl1-test-2 / mobile-kit, idempotently. Requesting source access gives a login, a one-time password, and a personal stream branched from the template.

Defects found and fixed along the way

Several of these would each have broken the flow on first real use:

  • Membership could not be self-granted at all. Pantheon only had email-keyed invitations, so a fresh account landed with no org and therefore no venues and no experiences.
  • A login collision made per-creator isolation meaningless. UserFromEmail keeps only the local part, so ada@example.com and ada@other.org both became ada; since an existing login counts as already provisioned, the second person would have been handed the first one's account, files and stream with no password of their own. Isolated orgs now derive the login from the whole address.
  • The HTTP provisioner was not fleet-aware, so an org WITH its own scale was provisioned onto whichever single server the config named: the wrong Perforce, and no access to their own depot.
  • P4D 2026.1 requires ParentView on a stream spec, and populate -S refuses an empty target while the explicit form needs its flags BEFORE the paths. Both only surfaced by smoke-testing against the real server.
  • fleet.manage_ufw defaults to false, so ensure-server reported success while leaving the port closed and handing out an unreachable P4PORT.
  • Pantheon's membership projection has no organization name field, so every consumer displaying one rendered a blank. Filled in iamnim; the deeper fix belongs in Pantheon.
  • The portal named the wrong path to sync. A creator's stream is named after their p4 login, not their experience slug, and the two are derived differently.

Still open on this ticket

  1. Onboarding does not provision the depot account. It stays a deliberate click because it mints a one-time password that must be shown.
  2. One depot per org, not per experience. Per-creator streams give isolation; the original wording asked for a repo per experience.
  3. Nobody has driven the HTTP handler into the stream code with a live session. Every layer beneath it is verified, including a real 23-file branch, but the top of the path is still untested by a real registration.
  4. Experience rows are read-only; there is no per-experience page to click through to.
  5. Pantheon should carry the organization name rather than iamnim backfilling it.