HydraIssues

hydraheadflatscreen recipe write-config truncates config.yaml and destroys local_apps on every reprovision
open bug Project: hydracluster Reporter: 5 Nov 2026 11:37

Description

The write-config step in the hydraheadflatscreen recipes overwrites the head's config.yaml unconditionally with only five server-supplied keys, destroying every per-machine setting. The next step, install-service, restarts the agent, so the loss takes effect immediately.

macOS (recipes/hydraheadflatscreen-macos.yaml):

cat > "$HOME/.hydraheadflatscreen/config.yaml" <<CFGEOF
server_url / token / head_id / sunshine_username / sunshine_password
CFGEOF

Windows (recipes/hydraheadflatscreen-windows.yaml) does the same to C:\hydraheadwindows\config.yaml.

What is lost: local_apps and inactivity_timeout. local_apps is per machine BY DESIGN (issue #833, #866) and the cluster has no copy of it, so a reprovision is unrecoverable from the server side. It has to be rebuilt by hand from backups and logs.

Observed, two stands at the FTI expo

  • node-8acd8c19 (MendelCraft, Mac mini, venue mobile-kit). config.yaml rewritten 2026-11-04 01:48:15, byte-identical to the pre-#833 backup. The agent restarted in the same second, so the tile broke at once: no local_apps entry for mendelcraft-kiosk on this head.
  • node-1eb186e9 (Lunar Strike, DESKTOP-UAC92OI, venue fti-experience-zone). config.yaml rewritten 2026-11-03 23:56:38. The agent kept running on its in-memory copy and the stand stayed up for another day; it broke only when the agent restarted at 2026-11-05 00:32. Visitors then hit no local_apps entry on all four tiles.

That delay is worth noting: local_apps is read once at startup, so a reprovision leaves a time bomb that goes off at the next restart, far from the change that caused it.

node-ff913390 (the other Windows head, mobile-kit) was not reprovisioned and is unaffected.

Suggested fix

Do not truncate. Either write only the keys the recipe owns and merge the rest, or skip the write when the file exists and the five keys already match (writeTransferConfig in hydranode already takes the do-not-overwrite approach). At minimum, back the file up before writing, so recovery does not depend on someone having left a .bak behind.

Recovery note for whoever hits this next

The agent log is the authoritative record of what was configured, better than any backup: launching local experience: <name> (<command>) gives the exact command, and inactivity return enabled: 5m0s gives the timer. On node-1eb186e9 the newest on-disk backup was two weeks stale and pointed at executables the builds no longer ship.

Session Context

Venue
mobile-kit

Comments (1)

claude 5 Nov 2026 11:39

Timestamp caveat: node-1eb186e9's system clock is about 10h47m SLOW. Measured 2026-11-05: the PC reported 01:51+01:00 while real time was 12:38 CET. So every Windows-side time in this report, including the 2026-11-03 23:56:38 config.yaml mtime and the agent log lines, is in that skewed clock and is not wall-clock accurate. The ORDER of events and the correlation between the config write and the agent restart still hold, because both come from the same clock. The macOS side (node-8acd8c19) was checked against UTC and is correct.

The skew is worth chasing separately: this head's GameStream pairing with crispy-badger-25 fails repeatedly with 'pairchallenge rejected (paired=0)', and large clock skew is a known cause of TLS and pairing failures. It does not affect the local_apps tiles, which need no pairing. 'w32tm /query /status' returned a non-zero exit on this box.