chadtmiller.com/group-host
atmosphere group host
Spaces, repos and notices are read and sent through atproto-client
MergedThis moves the host's space reads, repo and file copies and its notices onto atproto-client's space, sync and Xrpc. I reviewed only the pull's own commit, 30020576..dfdbfe42. The first pull's commits in the diff are that pull's to review.
I read every file of that commit's diff. I did not run it, and I could not read the atproto-client source. Whether the shared calls behave as the pull describes rests on the author's local runs and CI.
- Same behaviour. The index keeps its fallbacks: a write whose record no longer matches its CID sends it to read the repo whole, and a non-map record is hashed and left out with a warning.
repo_writes'Invalidstill maps toInvalidRepoon import andSourceUnreadableon migration. The size caps carry over:REPO_AT_MOSTon repos,blob_upload_limiton files, andANSWER_AT_MOSTelsewhere.retryabletakes the same statuses as before. - One point worth a look.
requestCrawl,notifyCredentialsRevokedandconfirmRegistrationgo throughXrpc::procedure::<IgnoredAny>or<Json>. The reference servers answerrequestCrawlandnotifyCredentialsRevokedwith an empty body. Ifprocedurefails on an empty 200, those would show up as warnings or errors even though they succeeded. Theinteropandfirehoseruns you list probably cover this, so I'm not asking for a change. A line in the pull confirming it would settle it. - Behaviour changes. The ones you list (stricter
confirmRegistration, the new error wording, a 16 MiB cap on a notice's answer) are fine, and the change file covers them.
This round only rebases the pull's commit onto a new base commit, e7d4d81. That base commit makes Event::of in the firehose read a frame through message(), and it isn't the pull's change. I diffed the pull's own commit at its old head, 30020576..dfdbfe42, against its new one, e7d4d81..cd6677e0, and the two are identical. That covers the changeset, index.rs, import.rs, migration.rs, authority.rs, firehose.rs, index_api.rs, xrpc.rs and the test. My earlier approval stands. The one thing I raised before is still open, and I'm not asking for a change: confirm that procedure::<IgnoredAny> accepts an empty 200 from requestCrawl and notifyCredentialsRevoked.
Since my approval at cd6677e, the only change is in record_bytes in index.rs. It is now written as from_json(..).ok(), then filter for a map, then encode. The behaviour is the same: a value that is not a DRISL map still gives None, so the record is hashed and left out with a warning as before. My earlier approval stands. The one open point, whether procedure::<IgnoredAny> accepts an empty 200 from requestCrawl and notifyCredentialsRevoked, is still unconfirmed. I'm not asking for a change on it.
Since my approval at 6f29600, the only change to the pull's own commit is record_bytes in index.rs, and that same rewrite was already in the commit I approved at 6f29600. It reads the value with from_json(..).ok(), keeps it only if it is a map, then encodes it. A value that is not a DRISL map still gives None, so the record is hashed and left out with a warning, as before. The rest of the head's difference from 6f29600 is the base commits, which belong to the first pull. My approval stands. I'm still not asking for a change on the open point from before: whether procedure::<IgnoredAny> accepts an empty 200 from requestCrawl and notifyCredentialsRevoked.
8 passed, 1 skipped
The host's space index, repo copies and notices to syncers, PDSes and relays now go through atproto-client's
space,syncandXrpcclients, deleting about 200 lines of hand-rolled XRPC, MAC checking and CAR reading. It builds on The host answers XRPC through atproto-server, on the shared crates' new releases (the move onto atproto-server and the shared releases), which has landed.Claude Opus 5.5 · high effort
What changes
Two commits on main: 14 files, about +250 / −450 (the crate's code +239 / −442).
The space index (
index.rs). A writer's repo at their PDS is read withspace::list_repo_ops(read on from the revision the index came to, the set hash moved by each write, the head commit held to its MAC) orspace::get_repo(the STAR archive whole, held to its commit), with aspace::Credentialthe group mints itself (Host::own_credential). The localRemote::ask,Vouched,commit_ofand the op-by-op hashing are deleted. What the index keeps is as before: a write whose record is no longer what its CID says (Oplog::changes' unreadable) sends it to read the repo whole, and a record that is not a DRISL map is hashed and left out, with a warning.A space's files (
index_api.rs).space_blobfetches a writer's file withspace::get_blob, held to its CID, with the same self-minted credential.An account moved here (
import.rs). Its files are listed withsync::list_blobsand fetched withsync::get_blob; its repo is read withsync::get_repointo anExport(migration::repo_writes); its server'sdescribeServeris anXrpcquery.ask_serverand the paging loop are deleted.A group moved here (
migration.rs). Its public repo issync::get_repothrough the samerepo_writes; each part of its export (migrateExport) is anXrpc::query_raw, capped per part as before.ask_sourceandjson_at_mostare deleted. The space repos keep their own STAR v1 reading (space_writes), the export's format.Notices (
authority.rs,firehose.rs,account_move.rs).notifySpaceUpdateandnotifyRepoUpdateare posted withXrpc::procedure_reply, the delivery judged by the status (deliver_to);confirmRegistrationandnotifyCredentialsRevokedwithXrpc::procedure; the relays'requestCrawltoo. Whether an account's server holds spaces isspace::spaces_alpha.cappedmoves toxrpc.rs, kept for the plain HTTP fetches left (an app's logo, OAuth client documents, a proxied failure's body); every XRPC answer is capped byXrpc::at_most.api::too_muchis deleted.Behaviour changes (the change file, patch):
sync::ACCEPT).getRepo: RepoNotFound (404): no such repo, was…/xrpc/com.atproto.sync.getRepo answered 404 Not Found);tests/migration.rsasserts the new words.Why
The shared crates carry these reads and their checks, tested against the spaces alpha and the reference PDS; the host keeps only what it decides.
How it was checked
Locally, with
CARGO_BUILD_JOBS=2: clippy on the workspace, and theindex,import,migration,account_move,authority,spaces,group_spaces,firehose,interop(the reference network, the spaces alpha included),move_host,domainandoauth_clientstests. The whole suite under the coverage gate, and e2e, are CI's.Shortcomings
Left, and why:
group_domain.rsreachesasks a domain'sdescribeServerwith the domain as itsHostheader and a lookup timeout of its own;Xrpctakes neither per call.actor_search.rsasks the typeahead service at the full URL an operator configures (TYPEAHEAD), not a base and an NSID; the PLC export it reads is no XRPC.account_move.rsbring_spaces:listSpaces,exportSpaceMeta,listBlobs,getBlob,getRepoof the account's own spaces) stay onmoving_json/moving_bytes, under the move's own refresh rule.space::Accountlists one's spaces but has no call to export a space's meta or read one's own repo and files in it, so onlylistSpacescould move, beside four raw calls.space_writesstays: a group's export carries its space repos as STAR v1 (atproto::space::read_star), which is whatspace::get_reporeads only behind a MAC the export does not have.apps.rs,oauth_clients.rs,proxy.rskeepcappedfor plain HTTP.Shared-crate gap, not blocking:
space::Accounthas no reads of an account's own repo in a space (exportSpaceMeta,listBlobs,getBlob,getRepoas their owner), which an account moving its spaces needs.Review
Start at
index.rs;import.rsandmigration.rssharerepo_writes.