chadtmiller.com/group-host
atmosphere group host
Groups move from one host to another, whole, keeping their DID
MergedThis adds the four-step group move (prepare, receive, complete, activate). I read migration.rs, which holds the logic, and found nothing that blocks merging.
I did not read the other changed files: tests/migration.rs, the small edits in repo.rs, space.rs, store.rs, token_writes.rs, authority.rs and lib.rs, the jose additions, the docs and the lexicon. Their checks pass: check, lexicons, web and e2e succeeded, and test was still running when I looked.
Two things worth fixing, neither blocking:
- Failed receive leaves files on disk. The cleanup calls
Store::delete_account, which returns the blob CIDs, but the result is dropped. The filesreceiveuploaded stay on disk after a failed receive, which the "leaves nothing behind" claim doesn't cover.Host::delete_accountinlifecycle.rscallsremove_blobswith that list. Do the same here, but without its DID tombstone, since the DID is still the old host's. - The snapshot's handle is trusted.
handle_heretakes any handle that differs fromaddressas "a domain of its own" and stores it without checking it. A caller who passes a mismatched handle and address can register an arbitrary handle on this host. The caller needs the group's service token, so this is low risk. Resolving the handle to the group's DID before keeping it would close it.
One smaller point: the export token travels in the query string, where access logs may capture it. It is good for an hour, but it stays valid after migrateComplete. Clearing it on completion would be tidy.
crates/group-host/src/migration.rsline 451Outdated
These lines can no longer be read.
delete_account returns the blob CIDs, and they are dropped, so the files uploaded earlier in receive stay on disk after a failed receive. Pass them to remove_blobs, as Host::delete_account does.
What changes
A group moves from one group host to another, whole, and keeps its DID (
migration.rs,docs/design/moving.md).migratePrepare, at the source, for one who configures the group, answers three things:migrateExport, which serves what nothing public serves whole: its files, and each space's state and repo.migrateReceive, at the destination, pulls the group in and keeps it switched off, with keys of its own here. It answers with what the PLC operation should name.migrateComplete, at the source, signs and sends that operation, keeping stewards' recovery keys ahead of the new host's, and switches the group off there.migrateActivate, at the destination, switches the group on once the directory names this host, and reads its spaces' index again.What moves with it:
Members' repos stay at their own PDSes. The destination keeps the writer set, so it reads them on.
Why
This is step 8's third part, from the prototype's
methods/migration.ts. The destination checks everything before the directory changes, and anything it can't check leaves nothing behind:How it was checked
tests/migration.rscovers:These are the cases of the prototype's
migration.test.ts.just covis at 100% locally.Shortcomings
leaving) isn't here.opensocial migratecommand that walks the four steps comes in its own pull.🤖 Generated with Claude Code