chadtmiller.com/group-host
atmosphere group host
An account on another server moves here to become a group
MergedThis adds checkImport, importAccount and completeImport, so a did:plc account on another server can move here and become a group. It also pulls out take_in, creds, identity and make_group so moving a group can share them. The token check is sound: it uses the account's own key, this host's audience and the createAccount method, and it refuses SameAccount and non-PLC accounts. completeImport only goes ahead once the signed operation names this host, the keys made here and the handle. Server fetches go through pinned. I found no blocking bug.
I haven't read the test files (tests/import.rs, tests/migration.rs) or the docs diffs. Of the pull's checks, check passed, web and lexicons were skipped, and test and e2e hadn't finished when I looked. I haven't verified the 100% coverage claim.
There is one gap I'd close, though it needn't block the merge. In complete_import, a failure after the PLC operation is published leaves the account stuck. That covers a failed activate_arrived, make_group, end_import or record. The account is already pointed at this host. Calling completeImport again republishes an operation whose prev is now stale, so the directory will refuse it. The user gets InvalidOperation for good and the pending row stays. Consider checking whether the directory already names this host before publishing, as migrate_activate does, and skipping the publish if it does.
crates/group-host/src/import.rsline 527Outdated
These lines can no longer be read.
The operation is already published at line 520 by the time make_group can fail. A retry then reaches publish again and the directory refuses a stale prev. Make this step resumable, for example by skipping the publish when the directory already names this host for the DID.
What changes
An account on another server becomes a group (
import.rs,docs/design/moving.md#an-account-becoming-a-group). It keeps its DID, so whoever follows it, and whatever points at it, still does.checkImportsays what a move would make of the account before anything moves:importAccounttakes the account's owncreateAccountservice token for this host, checked against its key in the directory. Only a did:plc account can move, and never the caller's own. It then:Its records keep their CIDs. A record this host wouldn't keep is left out. A file that doesn't come, or isn't what its CID says, is also left out, and the records holding it still point at it. If the copy fails, nothing of it stays. The one who started may start again; nobody else may.
completeImport:importAccountsaid;Shared with moving a group. A group or account taken in keeps its address under this host's domain beside a handle of its own. It sends an
#identityevent when it's switched on. A failed take-in removes the files it uploaded, so it leaves none behind.group.rscan now make an existing account a group (make_group).Asked.copiedlets a copied record keep pointing at a file that didn't come.From #3mzhxpugcnjyn's review. A moved group's own domain comes along only while this host's resolvers say it names the group: the snapshot's word for it isn't enough.
migrateCompleteends the export token.Why
This is step 8's fourth part, from the prototype's
methods/importAccount.ts. It is atproto's account migration with the group made at the end. The person moving the account gets the token and the signed operation from the account's own server, so only the account itself can hand its DID over.How it was checked
tests/import.rshas 18 tests, covering the cases of the prototype'simportAccount.test.tsin this host's terms. The account lives on a fake old server (its repo, its files in pages,describeServer, handle resolution), with its DID in the fake directory. The tests cover:SameAccount,NotPlcandNotAllowed;tests/migration.rsadds two tests: a moved group's own domain kept only while it names the group, and a taken one refused. It also checks that the export token ends.just covis at 100% locally.Shortcomings
importAccountSpaceisn't here. It brings the spaces such an account governs, and its repos in others', in the space alpha's archives. It waits for the alpha to publish its meta archive, which the version the prototype builds against doesn't have. Its lexicon stays, unserved.🤖 Generated with Claude Code