chadtmiller.com/group-host
atmosphere group host
Groups speak the space alpha of November 13, on atproto 0.2
MergedThis moves the host to the November 13 space alpha on atproto 0.2. It renames the methods. Reads now answer MACs as RFC 9421 signatures, and getRepo answers in the new STAR framing. checkAccess replaces checkUserAccess. Syncers now register through authorizeSpaceSync: their endpoint is confirmed by challenge and fetched with the pinned no-redirect client. They hear changes through notifySpaceUpdate, and listWriters lists removals too. Members who leave or are put out now leave each space's writer set. Notices of a lapsed registration or a deleted space are kept and retried for 72 hours.
I read every file in the diff except web/package-lock.json, which is generated. The new store logic holds together:
- The claim-once update means a syncer hears of its lapse only once.
- A pending deletion notice takes the place of a pending lapse notice, and never the other way round.
- Each retry checks
next_at, so it can't overwrite a notice owed again in the meantime. - The
deleted_spacetombstone is cleared when the space is made again.
I checked the panics in the atproto crate, and neither can be reached from outside:
read_repo_starrefuses any STAR key that isn't a record path, so theexpectonsplit_onceinindex.rsholds.read_accept_signaturechecks the key share is P-256 beforedecapsulate.
The tests cover the new paths well: confirmation, renewal, lapse, give-up after three days, deletion fan-out, re-creation, and removal from the writer set.
Failing check: check fails in clippy at crates/group-host/tests/common/mod.rs:96 (double_ended_iterator_last). The fix is .next_back() in place of .last(). The check enforces this, so I'm not holding the review on it.
One small thing, not blocking: authorizeSpaceSync spends the delegation token before it confirms a new notify endpoint. An endpoint that fails confirmation therefore burns the user's token without giving back a credential. That contradicts the comment above the spend, and a retry with the same token gets InvalidDelegationToken rather than RegistrationNotConfirmed. Confirming before spending would fix both.
crates/group-host/src/authority_api.rslines 138 to 143Outdated
These lines can no longer be read.
The delegation token is spent above ("Spent once it buys a credential"), before this confirmation. When the endpoint fails to confirm, the caller gets RegistrationNotConfirmed, no credential, and a spent token. A retry with the same token then gets InvalidDelegationToken, which hides the real cause. Moving this block above the spend would keep the promise of one token, one credential. Not blocking.
Three changes since I approved at d84c2c3:
- Clippy fix.
rewindintests/common/mod.rsnow usesrfind(made)in place offilter(made).last(). Thecheckworkflow, which failed last round, now passes, including clippy. import_space_reponow panics on a bad key. It used to answerInvalidArchivewhen a STAR key had no/. It now callsexpectonsplit_once. I checkedatproto::space::read_starin the crate. It rejects any key that isn'tnsid/record-keybefore returning, so a bad archive is still refused withInvalidArchivehigher up and theexpectcan't be reached.- New test case.
tells_every_syncer_of_a_space_deleted_until_it_landsnow has a syncer that answers 400. The test checks that it was told once, that its registration is gone, and that no notice is kept for it.
Nothing here breaks what I approved. lexicons, docs and check have passed at this head. test, e2e and web were still running when I looked.
Last round's non-blocking point still stands, since this round didn't touch it. authorizeSpaceSync spends the delegation token before it confirms a new notify endpoint, so an endpoint that fails confirmation still uses up the user's token. Confirming before spending would fix that. It's up to you whether to do it here or in a follow-up.
The host now speaks the space alpha of November 13, 2026 (
@atproto/space0.0.0-spaces-alpha-20261113224550), on atproto 0.2.0, and CI tests it against that alpha. Its spaces methods, MACs, archives and the inbox check follow the alpha's new names and shapes, so members' PDSes and syncers on the current alpha work with groups here again.Claude Opus 5.5 · high effort
What changes
Reading a group's repos.
getRecord,getRepo,getLatestCommitandlistRepoOpsanswer MACs as RFC 9421 HTTP message signatures asked for inAccept-Signature(covered header,signature-input,signature, exposed to browsers). A request with a space credential that asks for no MAC, or with a share that is not P-256, getsInvalidSpaceMac.getRepoanswersapplication/vnd.dasl.starin the new STAR framing.listRepoOpsanswerscommiton every page andRepoNotFoundwithout a head. A malformed cursor isInvalidCursor.listRecordsdropsreverseandlistBlobsdropssince. The index reads members' repos the same way, checking each with the crate'scheck_commit_macandread_repo_star.As authority.
getSpaceCredentialis nowauthorizeSpaceSync:credentialKey, an optionalnotify {endpoint, token}confirmed byconfirmRegistration, andspaceRevin the answer. It answersSpaceDeletedfor a deleted space (kept as a tombstone until the space is made again) andRepoDeactivatedwhile the group is off.notifyWriteis nownotifyRepoUpdate, andlistReposis nowlistWriters, which listsrepoWriteandrepoRemoveditems in space-revision order.registerNotify,unregisterNotifyandnotifySpaceDeletedare gone.notifySpaceUpdate. Changes are best effort.registrationExpiredandspaceDeletedare kept and retried for 72h.notifyCredentialRevokedis nownotifyCredentialsRevoked.Inboxes, scopes, moves.
checkUserAccessis nowcom.atproto.managedspace.checkAccess {space, repo?, clientId?} → {read, write}. An inbox names the host as<host DID>#opensocial.space:scopes readspaceType=, nottype=.listSpaces'spaceand meta writers'repoRev.CI and console.
ATPROTO_COMMITis 83d473dec (permissioned-data-alpha, the build that version was published from). The console's@atproto/*alpha packages move to the same build;SpacePermission.typebecamespaceType.Why
The space alpha changed its protocol between Oct 29 and Nov 13 in ways that are not backward compatible. Its methods were renamed, its MACs and STAR archives changed format, and syncers now register through authorization. The
atprotocrate 0.2.0 implements the new primitives, checked against the alpha's vectors. A host left on the old alpha cannot talk to PDSes on the new one.How it was checked
just covlocally, withGROUP_HOST_DEV_ENVset to a build of the alpha at 83d473dec. Every test passes, including all five interop tests against the real alpha PDS in both directions: credentials, write notices,listWriters, MACs,checkAccess, and exports.just lex,just docs, and the console'snpm run check.tracingfield lines andif-block closers, in untouched files as much as new ones (mcp.rs,oauth.rs,actors.rs). This pull's own misses are the same kind, inauthority.rs. The runner's number is the one that counts.Shortcomings
authorizeSpaceSyncis accepted and not verified, as no space here gates on apps.repoRev), so both hosts must run this version.