chadtmiller.com/group-host
atmosphere group host
The host moves to a new address, its groups keeping their DIDs
MergedThis adds group-host move-host --from <old> [--dry-run]. For each account it repoints the DID document's services from the old address to the new one, signs with the host's rotation key, and sequences an #identity event. It skips ended DIDs and DIDs whose rotation key the host no longer holds. The group-host binary now dispatches on its arguments: no arguments serves, and anything it doesn't know fails with the usage text.
I read the logic and found no bugs:
- The
from == toguard is in place, as is the trailing-slash normalisation. - Stale services are detected correctly.
- The rotation-key check happens before signing.
- The dry run writes nothing.
- A re-run re-announces only accounts already at the new address.
The tests cover each of these cases. The docs the repository asks for are updated: docs/design/README.md, moving.md and cli.md. All checks pass, including the 100% coverage gate in test.
One small point, not a blocker: the PLC publish and the tell for each account aren't atomic. If publish succeeds and tell then fails, the run aborts. A re-run takes the Current path and announces that account, so this recovers on its own.
What changes
The host moves to a new address, and its groups keep their DIDs (
move_host.rs,docs/design/moving.md#moving-the-host). Run this with the host stopped and its environment naming the new address (PUBLIC_URL,SERVICE_DID):It points every service each account's DID document names at the old address to the new one, signs that with the host's rotation key, and sequences an
#identityevent for each account. It says, and skips:--dry-runsays what it would do. Run again, it finds nothing left to repoint, and tells the relays again about each account already at the new address.The
group-hostbinary takes a command. With none it serves, as before. With anything it doesn't know, it fails with its usage (docs/reference/cli.md).Why
This is step 8's last part, from the prototype's
scripts/move-host.ts. This host keeps no managing app on its spaces and no PDS per group, so only the DID documents change. Sessions, app passwords' among them, are found by their hash, not their audience, so they go on working at the new address. It is part of the host binary, not of theopensocialcommand, because it needs the host's own database and rotation key.How it was checked
tests/move_host.rscovers:tests/serve.rsruns the binary'smove-host --dry-run, and checks its usage for wrong arguments.just covis at 100% locally.Shortcomings
The relays hear the
#identityevents once they read the host's firehose. A relay that hasn't connected since the move hears of an account when it next reads its document.🤖 Generated with Claude Code