app
Hero Studio
Public Made by Adomby adom
The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P
Windows: instance state lives under HOME or /home/adom, so a restart from another shell loses the pose
Windows: instance state lives under process.env.HOME || '/home/adom', so a restart from another shell loses the pose and splits the gate tally
Windows 11, hero-studio 0.21.5.
What happened
- I started the server from Git Bash, which sets
HOME. The pose (page, headline, the human's subtitle edit, title size, showcase) was snapshotted toC:\Users\<user>\.adom\instances\hero-studio\snapshots\orbital-logo-hero.json, including by a politePOST /shutdown. - The user restarted it from PowerShell with the same
--ai-thread. PowerShell does not setHOME, soINSTANCES_DIRbecame/home/adom/.adom/instances/hero-studio, which on Windows isC:\home\adom\.adom\instances\hero-studio. No snapshot there: the studio came up on the fixture page (adom/adom-tts) and the human's edits were gone until I re-posed them from the old snapshot. - The same directory also holds
gates.jsonand the instance registry. So the seasoned-gate count andhero-studio lsnow differ depending on which shell started the studio.C:\home\adom\.adom\instances\hero-studio\already held aplaywright.jsonfrom August, so this has happened before. - The restore failure is silent: no log line says no snapshot was found where it looked.
Suggested fix
- Use
os.homedir()forINSTANCES_DIR(and anywhere elseprocess.env.HOME || '/home/adom'appears). That is correct in containers and on desktops. - Log the snapshot path on boot, whether or not a snapshot was restored.