[meta] Hero instance state portability — snapshot, restore, per-context migration #226
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
A Hero instance is a portable unit. Bare VM + binaries (deterministic via home#212) + config (deterministic via home#225) + state archive = restored running instance. Same shape whether the instance has 1 app or 17 domains. Same shape whether it's a personal sovereignty export, a tenant migration between TFGrid nodes, or a backup/restore for safety.
This completes the actual promise from CLAUDE.md design principle 1: "Sovereignty first. All core data stays on the user's machine by default." Without state portability, sovereignty is aspirational — you can't take your Hero instance with you.
Why now
The deploy story has three layers, only two of which are getting first-class treatment:
Today's implementation is the
~/heronu-backups/herodemo-backup-*.tar.gzwhole-VM tarball — a hack, not a contract. No per-service backup, no per-context export, no manifest, no schema check on restore.Affected state surfaces (initial — full inventory pending)
hero_dbhero_osishero_foundryhero_collabhero_bizhero_bookshero_indexer/hero_embedderhero_voicehero_procFirst task of this issue: full inventory + classification.
Scope (contract to define)
hero_proc service pause(doesn't exist yet — would need to be added) or rely on filesystem snapshots (LVM/btrfs/ZFS). Probably FS snapshots for v1, per-service--quiescefor v2.service X backup --context geomindproduces a portable per-context archive, restorable into any other Hero instance. The killer feature for sovereignty.hero_launcher. Restore boots that tenant's archive into a freshly-deployed binary+secret stack. Wraps toservice all install --download && hero_proc secret set ... && service backup restore <archive>.Sequencing
After home#212 (binaries) + home#225 (config) land. State restore depends on both being deterministic, since the archive references service versions and secret names that those layers stabilize. Order in the queue:
Acceptance criteria
docs_heroor this issue body).decisions/D-NN-state-snapshot-contract.md.service X backup --to <archive>andservice X restore --from <archive>verbs indispatcher.nu.service backup all --to <archive>umbrella verb that produces a self-consistent multi-service archive.hero_demo/docs/ops/DEPLOYMENT.mddocuments the snapshot/restore runbook.End-state vision (depends on this + auth + router-installer)
Once this lands plus the auth arc and a one-session add to hero_router, the full deploy contract becomes:
That's the actual end-user product loop. This issue is the third leg of the tripod that makes it shippable.
References
~/.claude/skills/hero_db/SKILL.md— encrypted DB backend~/.claude/skills/hero_router/SKILL.md— single TCP entry + service discovery~/heronu-backups/herodemo-backup-*.tar.gz— current crude implementation (tarball hack)mik-tf referenced this issue from lhumina_code/hero_demo2026-05-06 21:42:24 +00:00