HydraIssues

Run Lunar Strike locally on a new Windows machine (stream_mode: local, second tenant)
open feature Project: hydraheadflatscreen Reporter: 19 Oct 2026 10:50

Description

Goal

Second tenant for the local-experience path delivered in #833: Lunar Strike running ON the machine at its desk, not streamed from a body. Same shape as MendelCraft on cheeky-cactus, different operating system, and that difference is the whole job.

What already exists

The experience record is in hydraexperiencelibrary as lunar-strike, status draft:

label: Lunar Strike | developer: Cognition | public: true
description:   Single-player PC game at the right-most desk position, with a screen and a gamepad.
open_question: Not yet released: confirm the build for FTI, and whether a Dutch
               version or subtitles exist.
districts:     bxl1 / fti-experience-zone
production_build: 0

There is also a signage head named samsung-qm43b-t-desk-lunarstrike (node-edb1240b, tizen, mobile-kit, offline). Decide whether that screen is involved at all, see Open questions.

The pattern to copy is documented, not improvised: docs/runbooks/runbook.md under "Local experiences" (procedure, verification, troubleshooting) and docs/testbooks/local-experience.md (acceptance). Needs hydraheadflatscreen v2.3.0+ and hydraexperiencelibrary v0.22.0+.

The blocker to solve FIRST: session 0 on Windows

The local launch path as shipped will not put a window on a Windows screen. This is not a configuration detail, it is the one piece of code that has to be written.

  • The Windows agent installs as scheduled task HydraHeadWindows with <UserId>S-1-5-18</UserId> (LocalSystem) on a BootTrigger: internal/cli/install_windows.go.
  • startLocalApp launches with a plain exec.Command (pkg/client/localapp.go), so on Windows the process starts in session 0, which has no desktop. The game runs invisibly or not at all. This is the same wall recorded for launching experience slots on bodies: Task Scheduler cannot do it.
  • On macOS this never showed up, because there the agent is a per-user LaunchAgent already inside the GUI session.

The repo already has the fix. startInInteractiveSessionWithArgs(exePath, cmdLine, workDir) in pkg/client/session_windows.go does WTSGetActiveConsoleSessionId + WTSQueryUserToken + CreateProcessAsUserW, and is what startMoonlightStream (moonlight_windows.go:82) and pairing (pairing.go:101) already use. The local path must route through it on Windows. buildCmdLine in moonlight.go turns an argv slice into a Windows command line and is currently unused, which is exactly what this needs.

Suggested shape: give startLocalApp a platform seam like the rest of this package (localapp_windows.go / localapp_unix.go), so unix keeps exec.Command and Windows builds a command line and hands it to the interactive-session launcher.

Second Windows difference: match is an image name

processMatches is pgrep -f on macOS and Linux (matches the full command line) but tasklist on Windows, which matches the image name only. So on Windows:

local_apps:
  lunar-strike:
    command: ["C:\\Experiences\\LunarStrike\\LunarStrike.exe"]
    match: "LunarStrike.exe"          # image name, NOT a path fragment
    stop_command: ["taskkill", "/IM", "LunarStrike.exe", "/F"]

And remember the rule MendelCraft taught: match names the process the VISITOR sees, stop_command must account for every process the launch created. If Lunar Strike ships with a launcher or a crash reporter, both have to go on exit or they land on the desk screen.

Which role does this machine need

A local experience is a HEAD feature. The machine that runs Lunar Strike on its own screen needs the hydraheadflatscreen role, which is what reads local_apps and owns the kiosk grid. hydrabody is the opposite thing: it streams to other heads.

If the new machine is also meant to serve streams to other heads, say so explicitly in this issue before provisioning, because the head agent's kiosk expects to own the display.

Steps once the above is settled

  1. Install the experience on the machine. Confirm it launches by hand, fullscreen, with the gamepad working, before any kiosk is involved.
  2. Ship the Windows interactive-session change in the agent and release it.
  3. Set stream_mode: local on lunar-strike, set status: live, and scope its districts/venues to where the machine actually is. production_build stays 0.
  4. Add the local_apps entry to that machine's config.yaml, keyed by the experience name lunar-strike exactly.
  5. Restart the agent. local_apps is read ONCE at startup.
  6. Run docs/testbooks/local-experience.md against it, substituting the names. Phase 0 first: confirm the screen is not locked and the running binary is the one under test.

Open questions, all owner-side

  • Is there a build? The record says not yet released. Nothing below step 1 can start without one.
  • Dutch version or subtitles, per the same note.
  • Licence and distribution terms for putting it on a venue machine, the question that cost a day on MendelCraft.
  • Gamepad: which pad, and does it need mapping or pairing that survives a reboot.
  • Does the samsung-qm43b-t-desk-lunarstrike signage head play any part, or is the game on the PC's own screen with that TV used for something else?
  • Where will the machine live at setup time (district/venue), since that scoping decides which heads are offered the tile.

Related

#833 (the local path, closed and verified on cheeky), #835 (offer a local experience only to heads that declare they can launch it, which this second tenant makes more pressing: two machines, two different local apps, one shared venue catalog).

Session Context

Venue
mobile-kit

Comments (4)

api 22 Oct 2026 10:41

Takeover status, 2026-10-22

The Codex session that did this work stopped because it reached its weekly usage
limit, at 1% left. It did not hit a technical blocker. Its last task finished and
merged cleanly. This comment records the delivered state, because the issue
carried no record of the work from 2026-10-19 and 2026-10-20.

Delivered and verified live

  • Machine: crispy-badger-25 (node-1eb186e9, DESKTOP-UAC92OI), online, district
    bxl1, venue fti-experience-zone, stream status idle.
  • Roles: hydraheadflatscreen and hydrabody. The owner asked for the body
    role on 2026-10-19. This answers the question in the issue about a machine that
    also serves streams.
  • Head agent on disk: hydrahead v2.6.1, read from the machine. This matches the
    latest release, so the fix is live, not only tagged.
  • Step 2 of this issue is done: the Windows interactive-session launch shipped in
    v2.4.0. launchLocalApp now refuses a launch without match and stop_command.
  • Kiosk protections, operator PIN, PIN-gated Restart and Shut down, and a five
    minute inactivity return to HydraGrid are all in place. inactivity_timeout: 5m
    and operator_pin_file are set in the live config.
  • Unattended recovery after a power cut is verified by the owner.
  • Releases v2.4.0 to v2.6.1 are merged with green CI. No open PRs.
  • Library: lunar-strike is status: live, label "Lunar Strike 22753".

Defect found in the live configuration

The machine has four local apps, one per delivered build:

tile command path match
lunar-strike ...\LunarStrike\22753\LunarStrike.exe LunarStrike.exe
lunar-strike-22751 ...\LunarStrike\22751\LunarStrike.exe LunarStrike.exe
lunar-strike-22750 ...\LunarStrike\22750\LunarStrike.exe LunarStrike.exe
lunar-strike-22744 ...\LunarStrike\22744\LunarStrike.exe LunarStrike.exe

All four use the same match and the same stop_command.

This issue states the rule, and the code agrees: on Windows processMatches runs
tasklist and does a substring test on the image name
(pkg/client/localapp_windows.go:17). The command path makes the tiles different.
The match value does not. So:

  • When a visitor starts one build, the agent reports all four tiles as running.
  • A stop from any tile ends whichever build runs. The PIN exit, the inactivity
    timeout and the operator restart cannot tell the tiles apart.
  • match is the only way the agent sees the experience on screen, because
    CreateProcessAsUserW returns no process handle.

The four builds are one game

Measured from the packaged file manifests in the mirror:

  • 22750 and 22751 have identical file lists. Their content paks differ by 2 KB out
    of 26.8 GB.
  • 22753 is that same list plus four files, all development assets under
    Content/Gameplay/GameModes/DEV/.
  • All carry one map set, Maps/Crater, and the same LunarStrike.uproject stamp.

These are four CI iterations of one build of one game. Four real parts would differ
by thousands of assets and carry different maps. This also explains the owner
report that the tile screenshots come out "4 times the same".

Four library records are live and public: lunar-strike, lunar-strike-22751,
lunar-strike-22750, lunar-strike-22744.

Decision needed before FTI

  1. Collapse to one tile. Keep one build, retire the other three library records
    and local app entries. This matches the evidence and needs no code.
  2. Keep four tiles. Then processMatches must match on the executable path,
    not the image name. That is a code change in hydraheadflatscreen.

Option 1 is the recommendation. Ask Piranha which build to run.

No configuration or library change was made for this comment. It is a read and a
record only.

api 22 Oct 2026 15:44

Correction, 2026-10-22, and a look at the live grid

One piece of evidence in the comment above is out of date. I wrote that the
four-tile problem explains the owner report that the tile screenshots come out
"4 times the same". That symptom was fixed. I checked the live screen.

The grid is up and shows four tiles, each with a DIFFERENT in-game screenshot:

  • Lunar Strike 22753, a suited figure by the lockers
  • Lunar Strike 22751, a vehicle in the hangar
  • Lunar Strike 22750, the convoy on the surface
  • Lunar Strike 22744, a close-up with the weapon

This does not weaken the finding. It sharpens it. Four distinct images tell a
visitor that these are four different games. The packaged manifests say they are
one game with one map set, Maps/Crater. The art fix removed the visible clue
and left the duplication in place. Judge this from the manifests, not the grid.

The defect itself is unchanged and does not depend on the art. All four
local_apps entries carry match: "LunarStrike.exe", and processMatches on
Windows substring tests the tasklist image name
(pkg/client/localapp_windows.go:17).

Two further observations from the live screen

  • Build 22753 was running at 17:33 local on a calibration page, showing a red
    developer line, PLAYER CAMER MANAGER WRONG CLASS : PlayerCameraManager. 22753
    is the one build of the four that carries the extra development assets
    GM_Dev_LaserShootingComms and PC_Dev_LaserShootingComms under
    Content/Gameplay/GameModes/DEV/, and it is the build the default
    lunar-strike tile points at. Worth confirming against 22750 or 22751 before
    FTI, to tell whether that overlay belongs to the dev build or to the game.
  • The desktop spans 5760x2160 and both the grid and the game render 3840
    wide
    , so a 1920 column stays black in both states.

Note on the cluster screenshot route

GET /api/v1/heads/{id}/screenshot returns 502 for a Windows flatscreen head. The
handler shells the Unix base64, which PowerShell does not provide, so the exec
exits 1. The capture loop on the machine writes
C:\tmp\hydra-live-screenshot.jpg, which is the working route meanwhile.

Still a read and a record only. No configuration or library change.

api 22 Oct 2026 15:47

Correction, 2026-10-22: I overstated the match defect

I traced the callers, which I should have done before I wrote the first comment.
The claim that all four tiles report running is wrong. Withdraw it.

The agent holds ONE localAppSpec singleton, set by the launch the visitor taps.
isLocalAppRunning tests that spec only (pkg/client/localapp.go:118). The
watcher, the grid restore, the PIN exit and the five minute inactivity return all
read the same singleton. Per tile running state does not exist, so the shared
match has nothing to corrupt there. Attribution at launch is correct too: the
log line local experience started: %s uses the name that was tapped
(pkg/client/localapi.go:423).

What the collision really costs

One place: runningLocalApp(apps) (pkg/client/localapp.go:164) ranges over the
configured map and returns the first app whose match hits. Go randomizes map
iteration order, so with four identical matches it returns a random one of the
four names
. Its only caller is stopOrphanLocalApp, which runs at agent
startup to clear an experience orphaned by an agent restart.

  • The startup log orphaned local experience found at startup (%s), stopping
    names a random build, not the one that was running. Diagnostics lie after a
    restart.
  • The kill still works, because all four stop_command values are identical.
  • So this is a latent trap, not a live break. The identical stop commands mask
    it. Make the stop commands build specific and stopOrphanLocalApp would start
    running the wrong build's stop command.

What this does not change

The four builds are still one game. That rests on the packaged manifests, not on
runtime behaviour: 22750 and 22751 have identical file lists, 22753 adds exactly
four development assets, and all four carry one map set Maps/Crater and the
same LunarStrike.uproject stamp. The case for collapsing to one tile stands on
that evidence alone.

On the build question

Launching 22751 to compare the red PlayerCameraManager overlay would prove
little. That line appeared on a calibration page somebody had navigated to. A
different entry path on another build would not reach the same state, so a clean
screen there would be uninformative. The useful statement is structural instead:
22753 is exactly 22751 plus four development assets, so 22751 is the safer
shipping candidate by construction. Piranha still decides which build is meant.

api 22 Oct 2026 17:39

Owner ruling: KEEP FOUR. Supersedes my recommendation above

Relayed to me on 2026-10-22 by the session working on zappy, not heard by me
directly, so correct this if the relay is wrong. The owner's words: "four for
lunar: different entry points for the same game"
.

So allowed_experiences on crispy-badger-25 stays as it is:

[lunar-strike-22744, lunar-strike-22750, lunar-strike-22751, lunar-strike]

My recommendation to collapse to one tile is withdrawn. No library record is
retired and no tile is removed.

Both statements are true, and the record should say so

This is not the manifest evidence being overruled. The two findings sit together:

  • One game, by the manifests. 22750 and 22751 have identical file lists, 22753
    is that list plus four development assets, all four carry one map set
    Maps/Crater and the same LunarStrike.uproject stamp.
  • Four entry points, by the owner's intent. The four tiles are a deliberate
    way into that one game, not four separate experiences and not a misreading.

What the manifests settle is that nobody should expect four different games. What
the ruling settles is that four doors into one game is what the stand wants.

The ruling makes the latent trap worth closing

While the four were an accident, the shared match cost only a wrong name in the
startup orphan log. Now that the four are deliberately distinct things, they should
be distinguishable to the agent. hydraheadflatscreen v2.7.0 makes this a config
change rather than a code change: a match containing a path separator is matched
against each process's FULL IMAGE PATH, so each tile can carry a path match such as
C:\Experiences\LunarStrike\22751\ with a path scoped stop command.

Two constraints on doing it, both of which decide the ORDER of operations:

  1. v2.7.0 must be running first. Under v2.6.1 a match is an image name, so a
    path value would never match any tasklist row. The agent would believe the
    experience never started and the grid would return over a running game.
  2. Never change the stop commands to build specific ones without the path match
    in the same edit.
    Identical stop commands are exactly what masks the collision
    today. Build specific stops combined with image name matching is the one
    combination that makes stopOrphanLocalApp run the WRONG build's stop command.

config.yaml is read once at agent start, so the change needs a restart of the
HydraHeadWindows task to take effect.