~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Groups speak the space alpha of November 13, on atproto 0.2

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:host/spaces-alpha-nov-13

The host now speaks the space alpha of November 13, 2026 (@atproto/space 0.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, getLatestCommit and listRepoOps answer MACs as RFC 9421 HTTP message signatures asked for in Accept-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, gets InvalidSpaceMac. getRepo answers application/vnd.dasl.star in the new STAR framing. listRepoOps answers commit on every page and RepoNotFound without a head. A malformed cursor is InvalidCursor. listRecords drops reverse and listBlobs drops since. The index reads members' repos the same way, checking each with the crate's check_commit_mac and read_repo_star.

As authority.

  • getSpaceCredential is now authorizeSpaceSync: credentialKey, an optional notify {endpoint, token} confirmed by confirmRegistration, and spaceRev in the answer. It answers SpaceDeleted for a deleted space (kept as a tombstone until the space is made again) and RepoDeactivated while the group is off.
  • notifyWrite is now notifyRepoUpdate, and listRepos is now listWriters, which lists repoWrite and repoRemoved items in space-revision order.
  • registerNotify, unregisterNotify and notifySpaceDeleted are gone.
  • Syncers get notifySpaceUpdate. Changes are best effort. registrationExpired and spaceDeleted are kept and retried for 72h.
  • A member who leaves or is put out leaves each space's writer set.
  • notifyCredentialRevoked is now notifyCredentialsRevoked.

Inboxes, scopes, moves.

  • checkUserAccess is now com.atproto.managedspace.checkAccess {space, repo?, clientId?} → {read, write}. An inbox names the host as <host DID>#opensocial.
  • space: scopes read spaceType=, not type=.
  • Moves read listSpaces' space and meta writers' repoRev.

CI and console. ATPROTO_COMMIT is 83d473dec (permissioned-data-alpha, the build that version was published from). The console's @atproto/* alpha packages move to the same build; SpacePermission.type became spaceType.

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 atproto crate 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 cov locally, with GROUP_HOST_DEV_ENV set 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's npm run check.
  • Local coverage misses tracing field lines and if-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, in authority.rs. The runner's number is the one that counts.

Shortcomings

  • A client attestation sent to authorizeSpaceSync is accepted and not verified, as no space here gates on apps.
  • Retries of syncer notices carry no jitter.
  • Host-to-host group moves change wire format (STAR framing, writers' repoRev), so both hosts must run this version.
  • Removed writers are never garbage-collected from the writer log.
Approved

This 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_space tombstone 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_star refuses any STAR key that isn't a record path, so the expect on split_once in index.rs holds.
  • read_accept_signature checks the key share is P-256 before decapsulate.

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.

review.knotless.dev

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.

Approved

Three changes since I approved at d84c2c3:

  • Clippy fix. rewind in tests/common/mod.rs now uses rfind(made) in place of filter(made).last(). The check workflow, which failed last round, now passes, including clippy.
  • import_space_repo now panics on a bad key. It used to answer InvalidArchive when a STAR key had no /. It now calls expect on split_once. I checked atproto::space::read_star in the crate. It rejects any key that isn't nsid/record-key before returning, so a bad archive is still refused with InvalidArchive higher up and the expect can't be reached.
  • New test case. tells_every_syncer_of_a_space_deleted_until_it_lands now 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.

Merged as ab69e0a